1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 22:33:57 +02:00

Add path primop.

builtins.path allows specifying the name of a path (which makes paths
with store-illegal names now addable), allows adding paths with flat
instead of recursive hashes, allows specifying a filter (so is a
generalization of filterSource), and allows specifying an expected
hash (enabling safe path adding in pure mode).
This commit is contained in:
Shea Levy 2018-01-25 07:05:57 -08:00
parent 98f3c75a0e
commit 69d82e5c58
No known key found for this signature in database
GPG key ID: 5C0BD6957D86FE27
8 changed files with 162 additions and 27 deletions

1
tests/lang/data Normal file
View file

@ -0,0 +1 @@
foo

View file

@ -0,0 +1 @@
"/run/user/1000/nix-test/store/wjagrv37lfvfx92g2gf3yqflwypj0q1y-output"

View file

@ -0,0 +1,7 @@
builtins.path
{ path = ./.;
filter = path: _: baseNameOf path == "data";
recursive = true;
sha256 = "1yhm3gwvg5a41yylymgblsclk95fs6jy72w0wv925mmidlhcq4sw";
name = "output";
}