News for hackers. Stuff that matters.
Re:NixOS 22.11 “Raccoon” Released by justoreply on Thursday December 01, 2022 @08:04AM (#33815711)
you can't run binaries built for other distributions, without patching them
Re:NixOS 22.11 “Raccoon” Released by bfrog on Thursday December 01, 2022 @08:09AM (#33815757)
Sort of true, you can but it require a fhs environment setup
Re:NixOS 22.11 “Raccoon” Released by Filligree on Thursday December 01, 2022 @08:20AM (#33815841)
steam-run usually. That gives you a Ubuntu-like environment.
Re:NixOS 22.11 “Raccoon” Released by throwup on Thursday December 01, 2022 @08:52AM (#33816184)
I wonder why Nix doesn't give every package a FHS env by default. In 2022 chroot and overlayfs should be available everywhere. Wouldn't that solve a ton of problems?
Re:NixOS 22.11 “Raccoon” Released by SuperSandro2000 on Thursday December 01, 2022 @09:41AM (#33816800)
A FHS adds slight overhead to a package and to launch times. It also shadows part of the file system. For example /lib would probably be different for every other program which would be even more confusing.
Re:NixOS 22.11 “Raccoon” Released by pxc on Thursday December 01, 2022 @12:34PM (#33819553)
They're also not implemented on macOS, since they rely on Linux sandboxing features.
Re:NixOS 22.11 “Raccoon” Released by kaba0 on Thursday December 01, 2022 @01:46PM (#33820698)
Plus nix allows more than possible with FHS alone. What if your package has to use multiple versions of a single dependency? You are back to square one, for no good reason.
Re:NixOS 22.11 “Raccoon” Released by chriswarbo on Thursday December 01, 2022 @09:30AM (#33816661)
Nix has no concept of "package". Applications are defined as derivations, but so is everything else (I wouldn't want an entire FHS directory structure for, e.g., a single text file).

If you want an FHS, you can get one using a function like buildFHSUserEnv (that's defined in the Nixpkgs project; Nix itself doesn't know or case what FHS is)

Re:NixOS 22.11 “Raccoon” Released by rnhmjoj on Thursday December 01, 2022 @09:11AM (#33816410)
Not true: there are many tools that allows directly running any binary, like nix-autobahn [1].

[1]: https://github.com/Lassulus/nix-autobahn

Re:NixOS 22.11 “Raccoon” Released by SuperSandro2000 on Thursday December 01, 2022 @09:38AM (#33816770)
or https://github.com/Mic92/nix-ld or a FHS. There are many projects to help with this.
Re:NixOS 22.11 “Raccoon” Released by 331c8c71 on Thursday December 01, 2022 @02:30PM (#33821433)
Haha, sometimes it goes the other way round.

The vpn client at work wasn't available for the latest ubuntu and the old version did not work due to changes in some libs. Wrapping it with nix providing the right libs was way easier and much more replicable than manually building the required stuff. Did in on my machine and than 3 mins to do the same for a colleague.