nix: switch to crane for incramental builds
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: Ia5ab2f512ffac20722966b605d7eaf156a6a6964
This commit is contained in:
parent
150f632fb8
commit
57b739ddbe
3 changed files with 50 additions and 24 deletions
12
flake.nix
12
flake.nix
|
|
@ -1,9 +1,13 @@
|
|||
{
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
|
||||
crane.url = "github:ipetkov/crane";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
crane,
|
||||
}: let
|
||||
systems = ["x86_64-linux" "aarch64-linux"];
|
||||
forEachSystem = nixpkgs.lib.genAttrs systems;
|
||||
|
|
@ -14,8 +18,10 @@
|
|||
default = self.nixosModules.eris;
|
||||
};
|
||||
|
||||
packages = forEachSystem (system: {
|
||||
eris = pkgsForEach.${system}.callPackage ./nix/package.nix {};
|
||||
packages = forEachSystem (system: let
|
||||
craneLib = crane.mkLib pkgsForEach.${system};
|
||||
in {
|
||||
eris = pkgsForEach.${system}.callPackage ./nix/package.nix {inherit craneLib;};
|
||||
default = self.packages.${system}.eris;
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue