[Nix-dev] fetching a single file (not an archive)

Mathijs Kwik mathijs at bluescreen303.nl
Sat Jan 14 16:41:44 CET 2012


thanks, that worked.

On Sat, Jan 14, 2012 at 4:25 PM, Marc Weber <marco-oweber at gmx.de> wrote:
> Excerpts from Mathijs Kwik's message of Sat Jan 14 16:11:43 +0100 2012:
>> With my limited knowledge of nix, I use fetchurl, which then complains
>> about unknown archive type.
>
> You should "grep" nixpkgs for the error message. Then you'll understand
> that not fetchurl yells about the achive type - its the unpackPhase of
> the default build script.
>
> You can disable it by
> a) not using src env var
>
>  eg
>  mkDerivation {
>    installPhase = ''
>     ensureDir $out/bi
>     cp ${fetchurl{ ...}} $out/bin
>     chmod +x $out/bin
>    '';
>  }
>  Note that there are shortcuts like writeScript or runCommand or such.
>
> b) overwriting it
>  unpackcPhase = ":";
> c) overwrite phases
>  phases=" everyhting but unpackPhase";
>
> I recommend a) or b)
>
> Marc Weber
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev


More information about the nix-dev mailing list