I need (perhaps want would be more accurate) to deploy Nix to an application server (running Debian Jessie).
As a company policy, I can not install Nix through the usual way, it has to
be packaged as a debian package.
Does a debian package exist?
I’m aware of: https://ftp-master.debian.org/new/nix_2.2.1-2.html
but is it available through any apt repository? Which debian versions can it
currently be installed on? Failing to understand that, I cloned the repo:
https://salsa.debian.org/debian/nix
and was greeted by a release.nix in which all the makedebian
derivations were
commented out. I tried uncommenting and building them and (not surprisingly,
as they were commented out) the build failed, an error about requiring features of C++14
(perhaps if I were to use a certain nixpkgs checkout if would have worked?)
I understood that it is based on the work of this repo:
https://github.com/KaiHa/nix-debian, so I cloned it, followed the
instructions, installed git-buildpackage
, set the cowbuilder basepath
correctly, but building with gbp buildpackage --git-pbuilder
failed both on
master and debian/stretch branches.
The following packages have unmet dependencies:
pbuilder-satisfydepends-dummy : Depends: libbrotli-dev which is a virtual package and is not provided by any available package
Unable to resolve dependencies! Giving up...
Next, I Tried to reproduce an old Hydra build from 2015 of Nix 1.9 (the latest one
I could find) to build and use as reference to create a package for 2.1 but
the build dragged on for a long time and started getting time outs when
downloading dependencies.
Where should I look for next?
I don’t really need a multi-user installation, it is just an application
server where I will deploy nix-built applications to. nix-bundle
requires
linux user namespaces which are associated with drama and security
vulnerabilities so I am not allowed to use that, unfortunately. Trying to build my Haskell
application statically using: https://github.com/nh2/static-haskell-nix also
failed and I do not have the time to dive deep into musl to understand the
intricacies there.
Ideally I just want a single installation that does not create the /nix
directory (as we provision a partition for /nix beforehand, so the directory will
pre-exist). I am thinking of getting the binary tarball and removing
stuff as necessary from the ./install script and packaging that (I have zero
experience with debian packaging, but hopefully I can wing it).
Is there a more straightforward approach I can take here? I’m willing to bet there is something I am missing here, that will make all of this much simpler.
Push comes to shove, I will have to give up Nix and not use it in my company, not just for the
application server but for the CI server and the developer workstations (although it already builds and deploys perfectly if I install Nix the usual way). I prefer not to reach this
state, so any help is greatly appreciated!
Thanks!