`cannot execute /root/.cache/uv/builds-v0/[REDACTED]/bin/python: You are trying to run an unpatched binary on nixos, but you have not configured NIX_LD or NIX_LD_x86_64-linux. See https://github.com/Mic92/nix-ld for more details`
-
`cannot execute /root/.cache/uv/builds-v0/[REDACTED]/bin/python: You are trying to run an unpatched binary on nixos, but you have not configured NIX_LD or NIX_LD_x86_64-linux. See https://github.com/Mic92/nix-ld for more details`
`/nix/store/[REDACTED]-python3-3.12.4/bin/python3.12: No module named virtualenv`
Oh, fuck me.
-
Xandra Granade 🏳️⚧️replied to Xandra Granade 🏳️⚧️ last edited by
....and I forgot that you can't put spaces around = in bash. Good lord.
-
Xandra Granade 🏳️⚧️replied to Xandra Granade 🏳️⚧️ last edited by
I don't know who needs to hear this, but if you want to wrap a script into a systemd service with Nix:
systemd.services.foo = {
after = [ "network-pre.target" ];
wants = [ "network-pre.target" ];
wantedBy = [ "multi-user.target" ];script = with pkgs; ''
export PATH=$PATH:${git}/bin/
export NIX_LD_LIBRARY_PATH=${lib.makeLibraryPath [
stdenv.cc.cc
]}
export NIX_LD=${lib.fileContents "${stdenv.cc}/nix-support/dynamic-linker"}
${uv}/bin/uv run ${path/to/script.py}
'';
}; -
Asta [AMP]replied to Xandra Granade 🏳️⚧️ last edited by
@[email protected] I think I’ve found writing systemd services with nix easier than writing actual systemd files