nix: incremental builds with crane

This commit is contained in:
Rexiel Scarlet 2025-08-14 01:05:58 +04:00
commit d2996ba521
No known key found for this signature in database
3 changed files with 65 additions and 18 deletions

View file

@ -1,16 +1,20 @@
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
inputs.crane.url = "github:ipetkov/crane";
outputs = {
self,
nixpkgs,
crane,
}: let
systems = ["x86_64-linux" "aarch64-linux"];
forEachSystem = nixpkgs.lib.genAttrs systems;
pkgsForEach = nixpkgs.legacyPackages;
in {
packages = forEachSystem (system: {
default = pkgsForEach.${system}.callPackage ./nix/package.nix {};
default = pkgsForEach.${system}.callPackage ./nix/package.nix {
craneLib = crane.mkLib pkgsForEach.${system};
};
});
devShells = forEachSystem (system: {