1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 12:41:15 +02:00

Fix fetchurl of executable file

Pointed out by @cstrahan, thanks!
This commit is contained in:
Eelco Dolstra 2015-07-23 22:25:04 +02:00
parent 19eddecc0f
commit 16c9935fa9
2 changed files with 2 additions and 2 deletions

View file

@ -14,7 +14,7 @@ void builtinFetchurl(const BasicDerivation & drv)
if (out == drv.env.end()) throw Error("attribute url missing");
writeFile(out->second, data.data);
auto executable = drv.env.find("out");
auto executable = drv.env.find("executable");
if (executable != drv.env.end() && executable->second == "1") {
if (chmod(out->second.c_str(), 0755) == -1)
throw SysError(format("making %1% executable") % out->second);