mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-11 00:36:20 +02:00
a3e6415ba8
from a source directory. All files for which a predicate function returns true are copied to the store. Typical example is to leave out the .svn directory: stdenv.mkDerivation { ... src = builtins.filterSource (path: baseNameOf (toString path) != ".svn") ./source-dir; # as opposed to # src = ./source-dir; } This is important because the .svn directory influences the hash in a rather unpredictable and variable way.
7 lines
264 B
Nix
7 lines
264 B
Nix
derivation {
|
|
name = "filter";
|
|
system = "@system@";
|
|
builder = "@shell@";
|
|
args = ["-e" "-x" (builtins.toFile "builder" "PATH=@testPath@; ln -s $input $out")];
|
|
input = builtins.filterSource (path: baseNameOf (toString path) != "foo") ./test-tmp/filterin;
|
|
}
|