Hi,

On 07/02/13 16:20, Danny Wilson wrote:

> Eh nevermind the md5sum, I see a builtins.readFile in the docs but no string
> hashing function to shorten it.
> 
> Would something like:
> 
>   import (pkgs.runCommand "cflags" {cpuinfo = builtins.readFile 
> "/proc/cpuinfo";
> __noChroot = true;} ''
> 
> work?

Unfortunately not, since readFile "/proc/cpuinfo" will return an empty string.
This is because readFile trusts the file size (i.e. 0) returned by the kernel.

-- 
Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/
_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to