aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThéophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>2023-03-24 12:06:26 +0100
committerGitHub <noreply@github.com>2023-03-24 12:06:26 +0100
commiteed43de02f15c450934edfb7acc7b8df37a7c388 (patch)
treec0f76d87973c3507d0489f41c72f6be3cb184e65
parentfbc296e00fa05703ea08f9ec478a3cfe11abf3e2 (diff)
parent80f9231b69916100f622008f490ec6813fcd994b (diff)
Merge pull request #8096 from tweag/filter-tests
Filter tests/nixos from source
-rw-r--r--flake.nix10
1 files changed, 8 insertions, 2 deletions
diff --git a/flake.nix b/flake.nix
index af0ce5022..2fa16f8e2 100644
--- a/flake.nix
+++ b/flake.nix
@@ -319,12 +319,18 @@
};
let
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: {
name = "nix-${version}";
inherit version;
- src = self;
-
+ src = sourceByRegexInverted [ "tests/nixos/.*" "tests/installer/.*" ] self;
VERSION_SUFFIX = versionSuffix;
outputs = [ "out" "dev" "doc" ];