diff options
author | Alexander Bantyev <balsoft@balsoft.ru> | 2023-03-23 13:36:32 +0400 |
---|---|---|
committer | Alexander Bantyev <balsoft@balsoft.ru> | 2023-03-24 14:29:28 +0400 |
commit | 80f9231b69916100f622008f490ec6813fcd994b (patch) | |
tree | a85b7153e3739513145d3708ecf8b8ffe6635abd | |
parent | 006291e5bec26ab071a07772a094fc6ea9a9c03a (diff) |
Filter tests/nixos from source
-rw-r--r-- | flake.nix | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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" ]; |