| 16 Feb 2026 |
KFears 🏳️⚧️ (they/them) | (I also never knew how such shebangs are implemented, and this is a very specific amalgamation of checks that enables it, like I think the command needs to check its arguments and see how and where it's invoked and then manually read the next line of the file or something like that) | 10:21:06 |
KFears 🏳️⚧️ (they/them) | (and I became kinda uncomfortable with doing this kind of feature in general, because of how special-case it is) | 10:21:35 |
K900 | I mean honestly shebangs are just generally horribly cursed | 10:24:06 |
KFears 🏳️⚧️ (they/them) | Mhm, that is the impression I got | 11:06:53 |
KFears 🏳️⚧️ (they/them) | 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 |
| zimward changed their display name from zimward to zim. | 13:49:38 |
| zimward changed their display name from zim to zimward. | 13:50:44 |
| @opandddd:matrix.org left the room. | 16:27:27 |
minman | 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 |
minman | * 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 |
minman | * 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 |
minman | * 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 |
ian-h-chamberlain | for simple case like this I think you can use env -S arg:
nix-on-droid@localhost ~> cat /tmp/test.sh
#!/usr/bin/env -S nix shell nixpkgs#hello nixpkgs#cowsay -c bash
hello | cowsay
nix-on-droid@localhost ~> /tmp/test.sh
_______________ < Hello, world! > --------------- \ ^__^ \ (oo)\_______
(__)\ )\/\
||----w |
|| ||
| 18:28:30 |
| Mistress Lyna changed their display name from 𐑤𐑰𐑯𐑨 to Mistress Lyna. | 20:18:29 |
| yimi joined the room. | 22:10:53 |
| 17 Feb 2026 |
opeik | wat
error: flake 'flake:nixpkgs' does not provide attribute 'packages.aarch64-darwin.default' or 'defaultPackage.aarch64-darwin'
| 02:25:13 |
opeik | * it's busted?
error: flake 'flake:nixpkgs' does not provide attribute 'packages.aarch64-darwin.default' or 'defaultPackage.aarch64-darwin'
| 02:25:31 |
opeik | * it's busted?
error: flake 'flake:nixpkgs' does not provide attribute 'packages.aarch64-darwin.default' or 'defaultPackage.aarch64-darwin'
the flake.nix definitely has nixpkgs:
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; # Nix unstable packages.
flake-utils.url = "github:numtide/flake-utils"; # Nix flake utility functions.
};
| 02:26:10 |
ian-h-chamberlain | what does your shebang look like? it seems like you might be missing the #package selectors? | 16:31:07 |
| yimi set a profile picture. | 22:04:02 |
| 18 Feb 2026 |
| Vitriolic 👾 joined the room. | 02:04:03 |
opeik | exactly the same as yours:
#!/usr/bin/env -S nix shell nixpkgs#hello nixpkgs#cowsay -c bash
hello | cowsay
| 02:37:12 |
opeik | * the same as your example above:
#!/usr/bin/env -S nix shell nixpkgs#hello nixpkgs#cowsay -c bash
hello | cowsay
| 02:37:58 |
ian-h-chamberlain | 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
§ /tmp/test.sh
path '/tmp/test.sh' does not contain a 'flake.nix', searching up
error: could not find a flake.nix file
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 github:nixos/nixpkgs that I was trying
| 06:15:26 |
ian-h-chamberlain | 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 |
| splurged changed their profile picture. | 09:31:42 |
| KSP Atlas joined the room. | 09:57:56 |
| Erin [ DEPRECATED ] left the room. | 12:02:57 |
| lucy changed their display name from evoea0 to lucy. | 17:01:00 |
| -> @n:rab.lol changed their display name from niko ⚡️ to -> @n:rab.lol. | 23:28:24 |