[Nix-dev] How to package Heroku Toolbelt?

Vladimír Čunát vcunat at gmail.com
Thu Nov 14 10:57:46 CET 2013


On 11/14/2013 10:44 AM, Alex Berg wrote:
> [chexxor at nixos:~]$ nix-build /my-sources/pkgs/top-level/all-packages.nix
> -A heroku-toolbelt
> these derivations will be built:
>    /nix/store/226khb1zh9kb94wwc27as2kxiyrqmqkj-heroku-toolbelt.drv
> building path(s)
> `/nix/store/ibh9r574dd14wd01xpmldy90c69z8lfh-heroku-toolbelt'
> building /nix/store/ibh9r574dd14wd01xpmldy90c69z8lfh-heroku-toolbelt
> unpacking sources
> punpacking source archive
> /nix/store/dfryky194z2bv179pd4jf3ny2gn9di02-heroku-client.tgz
> source root is heroku-client
> builder for
> `/nix/store/226khb1zh9kb94wwc27as2kxiyrqmqkj-heroku-toolbelt.drv' failed
> to produce output path
> `/nix/store/ibh9r574dd14wd01xpmldy90c69z8lfh-heroku-toolbelt'
> error: build of
> `/nix/store/226khb1zh9kb94wwc27as2kxiyrqmqkj-heroku-toolbelt.drv' failed

The error just means that the builder didn't create anything in the 
output path (passed in $out variable). But it doesn't seem you even 
wanted to do that yet ;-)

Q1: the script can't be used as it is, because it installs into wrong 
paths (/usr/local/...).

Q2: the source of the tarball doesn't really matter. It needs to always 
have the same hash. (You can even specify multiple sources, for the case 
that some are unavailable.)


If the program is a ruby script, then you need to patch its shebang to 
use ruby from nix store and not #!/usr/bin/ruby. For that it should be 
enough to have postInstall = "patchShebangs $out"; with ruby in 
buildInputs and assuming you get the scripts into $out in installPhase.


Vlada


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3251 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20131114/67a44194/attachment-0001.bin 


More information about the nix-dev mailing list