17 Feb 2025 |
Arian | “Hmm I wonder why the lack of manpages in 2.26 wasn’t caught by tests” | 15:18:47 |
Arian |
- apparently they disabled the test because it stopped working after the migration to meson instead of fixing the fact that there are no man pages
https://github.com/NixOS/nix/issues/12382#issuecomment-2661640562
| 15:19:29 |
Arian | .-. | 15:19:36 |
| Marcus changed their profile picture. | 21:38:25 |
Andy Hamon | Is there any sort of tracker that makes it easy to find out which notable bugfixes, features, etc. have been ported from Lix to og Nix and vice versa? | 23:41:39 |
Andy Hamon | Also, I assume it is fine to submit patches to both projects, right? e.g. i landed my first ever patch to nix, which is something that will soon be a hard dep at my company. So I would need to patch Lix if i want to use it. | 23:45:30 |
Andy Hamon | Reading the contributing guide, i think so:
For example, the following would likely be accepted assuming it has tests, without needing prior discussion Backports of CLI UX features from CppNix
| 23:48:19 |
Charles |
Also, I assume it is fine to submit patches to both projects, right?
yes
| 23:52:05 |
18 Feb 2025 |
| norta joined the room. | 00:10:22 |
| @mlaga97:matrix.mlaga97.space left the room. | 03:25:12 |
| Unit 1721344 [polygon] (it/she) changed their profile picture. | 13:02:02 |
| Nehu joined the room. | 19:44:35 |
Nehu | Hi ppl! I have an issue with Lix on mac (had it with nix too). I installed rustup (with nix-env -iA) to build rust apps, but when linking, cargo/rustc complains: ld: library not found for -liconv . And here’s the weird thing: if I run nix-shell -p libiconv , it works. But if I install the library with nix-env -iA libiconv , cargo/rustc/ld does’t find the library… | 19:49:59 |
Nehu | Would someone with more nix knowledge than me be able to tell me why the library is found when inside a nix-shell, but not when the package is installed normally? | 19:51:41 |
K900 | That is normal and working as intended | 19:51:52 |
K900 | nix-shell runs setup hooks, nix-env does not | 19:52:05 |
Charles | not necessarily related to your problem but rustup is not really in the spirit of nix | 19:52:16 |
Nehu | In reply to @k900:0upti.me
nix-shell runs setup hooks, nix-env does not I see… do you know what kind of hook does the magic? Something with otool? I couldn’t find much but… I also don’t know where to look for answers. | 19:54:00 |
Nehu | In reply to @charles:computer.surgery not necessarily related to your problem but rustup is not really in the spirit of nix I assume because the nix way would be to build the apps with nix right? I‘m not quite there yet. Or at least, not anymore for now; there used to be a time where I would nixify both my projects and my environment (with nix-darwin + home manager), but it led to me having to invest too much time in learning nix. | 19:56:50 |
Charles |
- if you're packaging something, you should make a nix expression to build it entirely in nix
- if you're developing something, you should get your toolchain from nix, e.g. putting
cargo and rustc in your mkShell 's packages , or using fenix, or rust-overlay, or something like that. rustup doesn't pin the toolchain, which makes it less reproducible
| 19:58:27 |
just1602 | Yeah I got my ass bitten by using rustup and not pinning rust in development | 20:00:00 |
Charles | here is the rust project template i maintain and use frequently if it helps you: https://gitlab.computer.surgery/charles/nix-rust-quickstart | 20:01:36 |
Nehu | It’s a common problem, which rust also solves outside of nix, even if it’s by far not as reproducible. You can specify which rust toolchain a project targets. | 20:01:56 |
Charles | the other problem is that since rustup is downloading its own binaries for stuff, i'm not sure if nix gets a chance to patch them, so the downloaded binaries might not actually work on nixos | 20:02:46 |
Charles | https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/development/tools/rust/rustup/0001-dynamically-patchelf-binaries.patch | 20:04:34 |
Charles | nixpkgs has to patch rustup to make it work it looks like | 20:04:40 |
Nehu | Hmm that could explain a few things… And I fuess nix-shell patches something on the fly then (or injects stuff, like setting LD_LIBRARY_PATH or something?) | 20:06:22 |
Charles | all nix-shell does is update PATH and run shellHook | 20:07:17 |
Charles | the important part is what stuff it puts in PATH and how that stuff is packaged | 20:07:36 |
Charles | * all nix-shell does is update PATH and run shellHook (or at least nix develop does the shellHook thing, i don't actually remember what the non-nix-command things do) | 20:08:20 |