Lix | 1118 Members | |
| Lix user channel. Feel free to discuss on-topic issues here and give each other help. For matrix.to links to the rest of the Lix channels, see: https://wiki.lix.systems/books/lix-organisation/page/matrix-rooms | 304 Servers |
| Sender | Message | Time |
|---|---|---|
| 16 Feb 2026 | ||
| (and I became kinda uncomfortable with doing this kind of feature in general, because of how special-case it is) | 10:21:35 | |
| I mean honestly shebangs are just generally horribly cursed | 10:24:06 | |
| Mhm, that is the impression I got | 11:06:53 | |
| So I would aim instead to create some nice-r UX for using general Nix commands and/or code for scripts, than hacking together a shebang | 11:07:43 | |
| 13:49:38 | ||
| 13:50:44 | ||
| 16:27:27 | ||
Could it have something to do with the emulation? When I remove hostPlatform = "aarch64-linux"; I do not get the from elftools.common.exceptions import ELFError error. In this thread it looks like someone has a simular problem. https://discourse.nixos.org/t/fex-as-binfmt-to-build-nix-derivations/74845 | 17:19:58 | |
* Could it have something to do with the cross-compilation/emulation? When I remove hostPlatform = "aarch64-linux"; I do not get the from elftools.common.exceptions import ELFError error. In this thread it looks like someone has a simular problem. https://discourse.nixos.org/t/fex-as-binfmt-to-build-nix-derivations/74845 | 17:23:15 | |
* Could it have something to do with the cross-compilation? When I remove hostPlatform = "aarch64-linux"; I do not get the from elftools.common.exceptions import ELFError error. In this thread it looks like someone has a simular problem. https://discourse.nixos.org/t/fex-as-binfmt-to-build-nix-derivations/74845 | 17:26:39 | |
| * Could it have something to do with the cross-compilation/emulation? When I remove hostPlatform = "aarch64-linux"; I do not get the from elftools.common.exceptions import ELFError error. In this thread it looks like someone has a simular problem. https://discourse.nixos.org/t/fex-as-binfmt-to-build-nix-derivations/74845 | 17:58:35 | |
| for simple case like this I think you can use env -S arg:
| 18:28:30 | |
| 20:18:29 | ||
| 22:10:53 | ||
| 17 Feb 2026 | ||
| wat
| 02:25:13 | |
| * it's busted?
| 02:25:31 | |
| * it's busted?
the
| 02:26:10 | |
what does your shebang look like? it seems like you might be missing the #package selectors? | 16:31:07 | |
| 22:04:02 | ||
| 18 Feb 2026 | ||
| 02:04:03 | ||
| exactly the same as yours:
| 02:37:12 | |
| * the same as your example above:
| 02:37:58 | |
| huh, maybe some quirk of macos Lix then? the nix-on-droid example worked with Lix 2.93.3 for me but my Mac with Lix 2.93.3 is also giving me a similar error
also reading the manpage it seems like -S shouldn't even be needed on Darwin but is probably more portable with it. but with or without, seems to want a flake.nix file which afaik shouldn't be necessary with a fully qualified flake ref like | 06:15:26 | |
| I'll try this on nixos when I have a chance then probably search for / file an issue since it seems inconsistent and I think ought to work without the fancy nix-shell parsing mentioned further up | 06:22:14 | |
| 09:31:42 | ||
| 09:57:56 | ||
| 12:02:57 | ||
| 17:01:00 | ||
| 23:28:24 | ||
| 19 Feb 2026 | ||
| Aha! I've figured something out, this is not a Lix issue but indeed a cursed macOS shebang quirk. You can see it more obviously with one like this:
The man pages for This StackExchange question has some more details about a similar, related issue: https://unix.stackexchange.com/a/774145 | 04:45:06 | |