1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 06:31:14 +02:00

* New primop builtins.filterSource, which can be used to filter files

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.
This commit is contained in:
Eelco Dolstra 2006-12-12 23:05:01 +00:00
parent b438d37558
commit a3e6415ba8
19 changed files with 143 additions and 68 deletions

View file

@ -12,7 +12,7 @@
<itemizedlist>
<listitem><para>TODO: multi-user support.</para></listitem>
<listitem><para>TODO: multi-user support.</para></listitem>
<listitem><para><command>nix-store</command> has a new operation
@ -50,6 +50,11 @@
<option>--set</option>.</para></listitem>
<listitem><para>TODO: new built-ins
<function>builtins.attrNames</function>,
<function>builtins.filterSource</function>.</para></listitem>
</itemizedlist>
</section>