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
This commit is contained in:
@@ -418,15 +418,9 @@
|
||||
|
||||
# Make sure that nix-env still produces the exact same result
|
||||
# on a particular version of Nixpkgs.
|
||||
evalNixpkgs =
|
||||
with nixpkgsFor.x86_64-linux.native;
|
||||
runCommand "eval-nixos" { buildInputs = [ nix ]; } ''
|
||||
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
|
||||
'';
|
||||
evalNixpkgs = nixpkgsFor.x86_64-linux.native.callPackage ./tests/nixpkgs/eval.nix {
|
||||
inherit nixpkgs-regression;
|
||||
};
|
||||
|
||||
nixpkgsLibTests = forAllSystems (
|
||||
system:
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
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
|
||||
''
|
||||
Reference in New Issue
Block a user