[Nix-dev] fetchurl with executable bit?

Domen Kožar domen at dev.si
Mon Jan 18 19:46:15 CET 2016


Hi all,

I'd like to have a function that fetches a script from the url and stores
it as an executable.

Currently fetchurl doesn't support chmod:
https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/fetchurl/default.nix


My current workaround is to do:

pkgs.writeScript "foobar" (builtins.readFile (pkgs.fetchurl {..}))

but that's rather ugly.

Do we have something in nixpkgs that's better? Should fetchurl be improved?

Domen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20160118/71063ecb/attachment.html 


More information about the nix-dev mailing list