From 89cefcd50193725e78275317ad7f2b661df6a320 Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Wed, 11 Sep 2024 10:57:59 -0400 Subject: [PATCH] flake: Follow package Nix version in dev shell --- crane.nix | 4 ++++ flake/devshells.nix | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/crane.nix b/crane.nix index ffe9eb0..f7abf6e 100644 --- a/crane.nix +++ b/crane.nix @@ -109,6 +109,10 @@ let maintainers = with maintainers; [ zhaofengli ]; platforms = platforms.linux ++ platforms.darwin; }; + + passthru = { + inherit nix; + }; } // args // extraArgs); attic = mkAttic { diff --git a/flake/devshells.nix b/flake/devshells.nix index e7b1145..4f30d8e 100644 --- a/flake/devshells.nix +++ b/flake/devshells.nix @@ -97,7 +97,7 @@ in NIX_PATH = "nixpkgs=${pkgs.path}"; # See comment in `attic/build.rs` - NIX_INCLUDE_PATH = "${lib.getDev pkgs.nixVersions.nix_2_24}/include"; + NIX_INCLUDE_PATH = "${lib.getDev self'.packages.attic.passthru.nix}/include"; # Used by `just with-nix` to build/test with alternative Nix versions. NIX_VERSIONS = config.attic.nix-versions.manifestFile;