Nix is great for tracking dependencies but you really need to go all-in on making it your platform. To use a blood type analogy, Nix is a universal recipient of software; the polar opposite of a universal donor. Software like this helps, but it’s only useful for distributing programs with fully Nix’d dependencies.
I’m working on a project right now which involves a handful of Haskell executables and a Cythonized Python wheel. Nix bundle can easily package the Haskell programs since they don’t link against anything external; their only public interface is the command-line.
Building and distributing a Cython wheel which links against arbitrary other Python libraries is a separate challenge altogether. NixOS/Nixpkgs attacks this problem as a competing distribution of packages, when I really need something one level more meta.
Nix is great for tracking dependencies but you really need to go all-in on making it your platform. To use a blood type analogy, Nix is a universal recipient of software; the polar opposite of a universal donor. Software like this helps, but it’s only useful for distributing programs with fully Nix’d dependencies.
What would it mean for a platform manager to be a ‘donor?’ Are there examples of that?
It’s true that ‘Nix’-ifying a program sometimes requires modifying software. However, this modification - removing hardcoded dependencies - typically bears no long-term maintenance cost. For this reason, maintainers tend to be happy to do it. That’s been my experience, at least.
I guess the “software donor” I’m thinking of would be better described as a build system. Imagine a tool which provides similar determinism/reproducibility as Nix, but helps you build “native” deb/rpm packages for target distros.
Nix is great for tracking dependencies but you really need to go all-in on making it your platform. To use a blood type analogy, Nix is a universal recipient of software; the polar opposite of a universal donor. Software like this helps, but it’s only useful for distributing programs with fully Nix’d dependencies.
I’m working on a project right now which involves a handful of Haskell executables and a Cythonized Python wheel. Nix bundle can easily package the Haskell programs since they don’t link against anything external; their only public interface is the command-line.
Building and distributing a Cython wheel which links against arbitrary other Python libraries is a separate challenge altogether. NixOS/Nixpkgs attacks this problem as a competing distribution of packages, when I really need something one level more meta.
Poking around Nixpkgs, I did find various libraries for building RPM packages, managing VMs and building containers
What would it mean for a platform manager to be a ‘donor?’ Are there examples of that?
It’s true that ‘Nix’-ifying a program sometimes requires modifying software. However, this modification - removing hardcoded dependencies - typically bears no long-term maintenance cost. For this reason, maintainers tend to be happy to do it. That’s been my experience, at least.
I guess the “software donor” I’m thinking of would be better described as a build system. Imagine a tool which provides similar determinism/reproducibility as Nix, but helps you build “native” deb/rpm packages for target distros.
BuildStream is the closest fit I know of.
Does anyone happen to know enough about both
nix bundle
andguix pack
to compare the two?https://guix.gnu.org/manual/en/html_node/Invoking-guix-pack.html
You can also get nix to barf out docker images, which is handy.