4 ms·
> nixpkgs is already one of the largest package collections. There is a good chance your software is already included. Yes, but that still doesn't solve this:
by suprfnk 4y ago
> nixpkgs is already one of the largest package collections. There is a good chance your software is already included.
Yes, but that still doesn't solve this:
> Major problems: installing niche proprietary software that you may have to package yourself
If some software _isn't_ packaged, it's a pain in the butt to get it running on NixOS. Either you have to create Nix derivations, which have a pretty steep learning curve, or you have to do some hackery patchelf business, which also isn't easy.
At least, as of 2018, when I last tried. Things could be better now.
- SuperSandro2000 4y agoCreating a basic nix derivation is easy and if you don't want to upstream it you can take all kinds of dirty and impure shortcuts. You almost never want to invoke patchelf by itself but use some wrapper like autoPatchelfHook, FHS, nix-ld, nix-autobahn, etc. Since 2018 a lot quite a lot happened. Give it another chance.
- thomastjeffery 4y agoIt's only way when you know how. It's quite difficult to learn.
- thomastjeffery 4y agoIt's more a story of, you have to do some hackery patchelf business, but creating a Nix derivation helps you do just that. The unfortunate part is that creating a Nix derivation is no more approachable than the patchelf hackery was in the first place.
- SuperSandro2000 4y agoMost of the time you can just use autoPatchElfHook and add the missing libraries to buildInputs. I can't remember when I last looked at patchelf itself.
- thomastjeffery 4y ago...and learning that is the hard part.
- pmarreck 4y agoI run NixOS, but I'm relatively new to Nix. A couple weeks ago I was trying to get an old vanity key generator to build because it wasn't on nixpkgs (vanitygen++) and on a lark I decided to write my own derivation using some examples of similar C++ packages I found and figuring out what nix packages it needed to build. So I did, and the maintainer accepted the PR: https://github.com/10gic/vanitygen-plusplus/commit/7bcee06f3a9a718158bd8adebc3bee0286d41547 https://github.com/10gic/vanitygen-plusplus/commit/7bcee06f3... Note that I am not a C++ developer and only know the basics about how to get C/C++ things to build. So what does this get us? In theory, this is now trivially-buildable on any distro that has nix installed, or on nixos. I haven't converted it to a flake yet (still learning that) but if I (or someone else) did, it would be deterministically reproducible anywhere on nix. I agree that there's a learning curve on figuring out the "recipe" for a thing, but once someone does that work, it's basically done forever. Which is a promise that no other system can even approach. And once you figure out a certain amount of it, this moment will come where you realize you want every system you deal with to be Nixified. Like the guy elsewhere in this thread who rebuilt his own router using NixOS and loves it. Getting new developers up to speed in your shop's dev environment? Completely trivial to do with Nix. Getting a machine back up after a failure? Reinstall NixOS and reapply the config you were using (which is in source control). Upgraded Gnome and some things you need broke? Or updated your GPU driver and now your screen just shows black? Simple... Roll back in the bootloader to a previously-working config, then undo your changes to the config definition. Have 10 different projects all with different dependencies and version requirements that would normally collide with each other? Trivial, each project has its own default.nix file and Nix can drop you right into that environment while you're working on those projects. NixOS (and very honorable mention to Guix) are in fact the only ways to run Linux while keeping your sanity intact!
- senorsmile 4y agoWould be cool to get new packages like this on nixpkgs.