[Nix-dev] deploying nix-built software to non-nix linux systems

Andreas Herrmann andreash87 at gmx.ch
Tue Nov 4 10:54:05 CET 2014


There was a post here recently about using proot to install Nix in $HOME [1].

I haven't used it myself, but I could imagine that you could install a closure of your package and provide a wrapper script which configures the environment and uses proot to run your app.

[1]: https://nixos.org/wiki/How_to_install_nix_in_home_%28on_another_distribution%29

Best, Andreas

On Tuesday 04 November 2014 10:24:15 Luca Bruno wrote:
> On 04/11/2014 00:36, Anders Papitto wrote:
> > Hello,
> >
> > I'm interested in using nix/nixos to build an application with its
> > full set of dependencies, and then deploy it to non-nixos machines as
> > a self-contained package (up to and including the system libraries),
> > without root privileges. Ideally I would like to not require that any
> > nix tools be available on the target system. The perfect workflow
> > would be something like
> >
> > # on any linux system
> > $ wget https://some/path/to/my-app.tar.gz
> > $ tar -xf my-app.tar.gz
> > $ ./my-app/bin/my-app # run the application -> it should not try to
> > access anything outside ./my-app
> >
> > Is this possible? I haven't been able to find any resources on
> > deploying to a non-nix systems.
> You don't have to install nix to run packages on other systems, you can
> simply copy the closure of it.
> However usually packages are stored into /nix, which requires root
> access. You may
> try something like fakechroot or proot.
> _______________________________________________
> 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