[Nix-dev] nix-build $CONFIG -A package

Shea Levy shea at shealevy.com
Fri Apr 13 19:33:42 CEST 2012


On 04/13/2012 01:04 PM, Sergey Mironov wrote:
> Hi!
>
> I used to call function
>
> fetch () {
> 	nix-build $NIXPKGS_ALL -A $1.src --show-trace
> }
>
> to download a source tarball for a package.
>
> But it doesn't work anymore! That is because of absence of
> $NIXPKGS_ALL in my environment. How to fix it? I've tried the
> following, also unsuccessfully:
>
> $ nix-build /etc/nixos/configuration.nix -A firefox.src --show-trace
> error: cannot auto-call a function that has an argument without a
> default value (`config')
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev

If you're using NixOS (which I suspect you are based on your attempt), 
you can do something like this with a current version of nix:

$ nix-build "<nixpkgs>" -A firefox.src --show-trace


More information about the nix-dev mailing list