1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 14:21:48 +02:00

Revert "Filter tests/nixos from source"

This reverts commit 80f9231b69 because
it causes a divergence in the source tree used for the Nix build
between hydra.nixos.org and Nix.
This commit is contained in:
Eelco Dolstra 2023-04-11 16:26:57 +02:00
parent d7bedc60f9
commit d2932ad0be

View file

@ -320,18 +320,12 @@
}; };
let let
canRunInstalled = currentStdenv.buildPlatform.canExecute currentStdenv.hostPlatform; canRunInstalled = currentStdenv.buildPlatform.canExecute currentStdenv.hostPlatform;
sourceByRegexInverted = rxs: origSrc: final.lib.cleanSourceWith {
filter = (path: type:
let relPath = final.lib.removePrefix (toString origSrc + "/") (toString path);
in ! lib.any (re: builtins.match re relPath != null) rxs);
src = origSrc;
};
in currentStdenv.mkDerivation (finalAttrs: { in currentStdenv.mkDerivation (finalAttrs: {
name = "nix-${version}"; name = "nix-${version}";
inherit version; inherit version;
src = sourceByRegexInverted [ "tests/nixos/.*" "tests/installer/.*" ] self; src = self;
VERSION_SUFFIX = versionSuffix; VERSION_SUFFIX = versionSuffix;
outputs = [ "out" "dev" "doc" ]; outputs = [ "out" "dev" "doc" ];