Hi.

On 07/26/2012 03:13 PM, Marc Weber wrote:
I'd even propose a second change:

builtins.__writeArbitraryFile "/root/directory" "text-contents"

Should use a hash function to create a filename and return that based on
"text-contents". This way new contents will
yield a different path. Then you can rollback more easily, and
everything feels little more functional (don't write a file twice if it
exists - contents should be the same)

Isn't that essentially the private-file approach, only stored outside the nix store?

I understand it will be more work than just adding the primop, if you hurry now... but in the long run, adding support private files or derivations seems a much clearer way.

And what about a catch-all builtins.unsafePerformCommand :-D (Haskell-like)


Vlada

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to