diff --git a/soup/extraPackages.nix b/soup/extraPackages.nix index ac0c2bc..b5b782f 100644 --- a/soup/extraPackages.nix +++ b/soup/extraPackages.nix @@ -23,4 +23,5 @@ in # some-qt5-package = pkgs.libsForQt5.callPackage ./pkgs/some-qt5-package { }; # ... love = callPackageWithMaybeFlakeInputs ./pkgs/love { }; + jujutsu = callPackageWithMaybeFlakeInputs ./pkgs/jujutsu.nix { }; } diff --git a/soup/flake.lock b/soup/flake.lock index 3447f1c..357ebd3 100644 --- a/soup/flake.lock +++ b/soup/flake.lock @@ -449,6 +449,24 @@ "type": "github" } }, + "flake-utils_3": { + "inputs": { + "systems": "systems_5" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "gitignore": { "inputs": { "nixpkgs": [ @@ -471,6 +489,29 @@ "type": "github" } }, + "jujutsu": { + "inputs": { + "flake-utils": "flake-utils_3", + "nixpkgs": [ + "nixpkgs" + ], + "rust-overlay": "rust-overlay" + }, + "locked": { + "lastModified": 1764829414, + "narHash": "sha256-HGMzNXm6vWKf/RHPwB/soDqxAvCOW1J6BPs0tsrEuTI=", + "owner": "jj-vcs", + "repo": "jj", + "rev": "70fd8f7697fbc20a9329a6e2f790ef86a8e284d1", + "type": "github" + }, + "original": { + "owner": "jj-vcs", + "ref": "v0.36.0", + "repo": "jj", + "type": "github" + } + }, "libgit2": { "flake": false, "locked": { @@ -855,10 +896,11 @@ "devenv": "devenv", "fenix": "fenix", "flake-compat": "flake-compat_6", + "jujutsu": "jujutsu", "love": "love", "nixpkgs": "nixpkgs_3", "nixpkgs-devenv": "nixpkgs-devenv", - "systems": "systems_5" + "systems": "systems_6" } }, "rust-analyzer-src": { @@ -878,6 +920,27 @@ "type": "github" } }, + "rust-overlay": { + "inputs": { + "nixpkgs": [ + "jujutsu", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1762915112, + "narHash": "sha256-d9j1g8nKmYDHy+/bIOPQTh9IwjRliqaTM0QLHMV92Ic=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "aa1e85921cfa04de7b6914982a94621fbec5cc02", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, "systems": { "locked": { "lastModified": 1681028828, @@ -952,6 +1015,21 @@ "repo": "default", "type": "github" } + }, + "systems_6": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } } }, "root": "root", diff --git a/soup/flake.nix b/soup/flake.nix index b9d1192..75be3c1 100644 --- a/soup/flake.nix +++ b/soup/flake.nix @@ -19,6 +19,13 @@ url = "https://github.com/love2d/love/releases/download/11.5/love-11.5-macos.zip"; flake = false; }; + jujutsu = { + url = "github:jj-vcs/jj/v0.36.0"; + inputs = { + nixpkgs.follows = "nixpkgs"; + }; + }; + chaseln = { url = "github:starptr/chaseln"; inputs = { @@ -68,7 +75,7 @@ forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system); # TODO: remove in favor of `exports` flake-inputs = { - inherit (inputs) love chaseln dark-notify fenix check-gits; + inherit (inputs) love chaseln dark-notify fenix check-gits jujutsu; }; # List of flake inputs that we want to transparently re-export (i.e. without custom packaging) exports = import ./exports.nix; diff --git a/soup/overlays/default.nix b/soup/overlays/default.nix index 6788eff..53ebb4d 100644 --- a/soup/overlays/default.nix +++ b/soup/overlays/default.nix @@ -25,4 +25,12 @@ } else maybe-flake-inputs.check-gits.overlays.default; + + jujutsu = if builtins.isNull maybe-flake-inputs + then + self: super: { + jujutsu = (self.callPackage ../. { inherit maybe-flake-inputs; }).jujutsu; + } + else + maybe-flake-inputs.jujutsu.overlays.default; } diff --git a/soup/pkgs/jujutsu.nix b/soup/pkgs/jujutsu.nix new file mode 100644 index 0000000..c62dae5 --- /dev/null +++ b/soup/pkgs/jujutsu.nix @@ -0,0 +1,16 @@ +{ stdenv, fetchFromGitHub, maybe-flake-inputs, flake-lock }: +let + node-name = flake-lock.nodes.root.inputs.jujutsu; + locked = flake-lock.nodes.${node-name}.locked; + jujutsu = if builtins.isNull maybe-flake-inputs + then + import (fetchFromGitHub { + owner = locked.owner; + repo = locked.repo; + rev = locked.rev; + hash = locked.narHash; + }) + else + maybe-flake-inputs.jujutsu.packages.${stdenv.hostPlatform.system}.default; +in +jujutsu \ No newline at end of file