diff --git a/flake.lock b/flake.lock index 50d7464..83eddda 100644 --- a/flake.lock +++ b/flake.lock @@ -122,6 +122,22 @@ "type": "github" } }, + "crane_2": { + "flake": false, + "locked": { + "lastModified": 1745454774, + "narHash": "sha256-oLvmxOnsEKGtwczxp/CwhrfmQUG2ym24OMWowcoRhH8=", + "owner": "ipetkov", + "repo": "crane", + "rev": "efd36682371678e2b6da3f108fdb5c613b3ec598", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, "darwin": { "inputs": { "nixpkgs": [ @@ -586,6 +602,7 @@ "agenix": "agenix", "attic": "attic", "conduit-src": "conduit-src", + "crane": "crane_2", "darwin": "darwin", "disko": "disko", "firefox-darwin": "firefox-darwin", diff --git a/flake.nix b/flake.nix index d83b902..15190f9 100644 --- a/flake.nix +++ b/flake.nix @@ -60,6 +60,10 @@ inputs.lix.follows = "lix"; inputs.lix-module.follows = "lix-module"; }; + crane = { + url = "github:ipetkov/crane"; + flake = false; + }; helix = { url = "github:helix-editor/helix"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/nilla.nix b/nilla.nix index 5ba3acc..fcf00e4 100644 --- a/nilla.nix +++ b/nilla.nix @@ -47,15 +47,6 @@ getPkgs = system: builtins.mapAttrs (_: pkg: pkg.result.${system}) config.packages; in { - # Re-export for convenience and for caching - attic-client = mkPackageFlakeOutput { - input = "attic"; - output = "attic-client"; - }; - attic-server = mkPackageFlakeOutput { - input = "attic"; - output = "attic-server"; - }; agenix = mkPackageFlakeOutput { input = "agenix"; }; base-packages = mkPackage ( { symlinkJoin, system }: diff --git a/pkgs/default.nix b/pkgs/default.nix index 69c608f..4e5cd0c 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,5 +1,6 @@ { config, + lib, inputs, }: let @@ -12,6 +13,14 @@ let mkPackage = package: { inherit systems package builder; }; + atticPkgs = lib.attrs.generate systems ( + system: + let + pkgs = inputs.nixpkgs.legacyPackages.${system}.extend inputs.lix-module.overlays.default; + craneLib = import inputs.crane { inherit pkgs; }; + in + pkgs.callPackage "${inputs.attic}/crane.nix" { inherit craneLib; } + ); in { config.packages.conduit-next = { @@ -49,4 +58,15 @@ in ''; } ); + + config.packages.attic-client = { + inherit systems; + builder = "custom-load"; + package = { system }: atticPkgs.${system}.attic-client; + }; + config.packages.attic-server = { + inherit systems; + builder = "custom-load"; + package = { system }: atticPkgs.${system}.attic-server; + }; }