[Nix-dev] Nix expressions for packages with complex acquisition procedures

Fabian Schmitthenner nix-dev at schmitthenner.eu
Sun Mar 13 18:18:36 CET 2016


You can use the requireFile function, that displays a message how to
download the file manually and use nix-prefetch-url or nix-store
--add-fixed to add it to the nix store.
See oraclejdk for an example of its usage (e. g. nix-build -A oraclejdk
'<nixpkgs>')

On 03/13/2016 05:11 PM, Thomas Levine wrote:
> I want to install files that are contained in an archive. The only way I
> know to extract the files from the archive involves clicking buttons in
> a graphical interface. (It's a Windows installer for Qualcomm Gobi
> firmware, and I run it in WINE.)
>
> I cannot simply extract these once and serve them on a web server
> because the package has strong restrictions on redistribution; people
> are permitted to download the package freely from a particular website,
> but people are not permitted to redistribute the package.
>
> Installing it for my own use is easy enough, of course, because I can
> just hard-code the paths to the appropriate files, but it would be
> easier in the long-run if I put it in the upstream nixpkgs.
>
> Is there a typical way of handling situations like this? For example,
> the obvious thing that comes to mind is a convenient way to specify that
> nix should prompt you to download and extract the archive and to enter
> the path to the resulting files on the local filesystem.
> _______________________________________________
> 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