mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-29 17:16:15 +02:00
Filter tests/nixos from source
This commit is contained in:
parent
006291e5be
commit
80f9231b69
1 changed files with 8 additions and 2 deletions
10
flake.nix
10
flake.nix
|
@ -319,12 +319,18 @@
|
||||||
};
|
};
|
||||||
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 = self;
|
src = sourceByRegexInverted [ "tests/nixos/.*" "tests/installer/.*" ] self;
|
||||||
|
|
||||||
VERSION_SUFFIX = versionSuffix;
|
VERSION_SUFFIX = versionSuffix;
|
||||||
|
|
||||||
outputs = [ "out" "dev" "doc" ];
|
outputs = [ "out" "dev" "doc" ];
|
||||||
|
|
Loading…
Reference in a new issue