mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-23 06:26:15 +02:00
7349bd0176
* `sub' to subtract two numbers. * `stringLength' to get the length of a string. * `substring' to get a substring of a string. These should be enough to allow most string operations to be expressed.
12 lines
393 B
Nix
12 lines
393 B
Nix
derivation {
|
|
name = "filter";
|
|
system = "@system@";
|
|
builder = "@shell@";
|
|
args = ["-e" "-x" (builtins.toFile "builder" "PATH=@testPath@; ln -s $input $out")];
|
|
input =
|
|
let filter = path: type:
|
|
type != "symlink"
|
|
&& baseNameOf path != "foo"
|
|
&& !((import ./lang/lib.nix).hasSuffix ".bak" (baseNameOf path));
|
|
in builtins.filterSource filter ./test-tmp/filterin;
|
|
}
|