Files
lix/tests/nixpkgs/eval.nix
T
Tom Hubrecht 7b8947ea63 tests/evalNixpkgs: Split out into its own file and set NIX_CONFIG
This adds a way to control the deprecated features that need to be
enable while evaluating the specific nixpkgs version

Change-Id: Ia2b9a29f1966d4d5f32239a36ba8270330007da9
2026-01-04 23:00:24 +00:00

27 lines
668 B
Nix

{
lib,
runCommand,
nix,
nixpkgs-regression,
}:
let
inherit (lib) concatStringsSep;
deprecatedFeatures = [ ];
in
runCommand "eval-nixos"
{
buildInputs = [ nix ];
env.NIX_CONFIG = "extra-deprecated-features = ${concatStringsSep " " deprecatedFeatures}";
}
''
type -p nix-env
# Note: we're filtering out nixos-install-tools because https://github.com/NixOS/nixpkgs/pull/153594#issuecomment-1020530593.
time nix-env --store dummy:// -f ${nixpkgs-regression} -qaP --drv-path | sort | grep -v nixos-install-tools > packages
[[ $(sha1sum < packages | cut -c1-40) = 402242fca90874112b34718b8199d844e8b03d12 ]]
mkdir $out
''