~ $ nix run nixpkgs#matrix-synapse
# [a bunch of "copying path from cache.nixos.org" stuff]
error: unable to execute '/nix/store/qmas0y5l656v5yq1z7jzg4vgdfj73jlv-matrix-synapse-1.76.0/bin/matrix-synapse': No such file or directory
Any ideas? Am I using it wrong?
There is no executable name
matrix-synapse in that outputs bin directory.
❯ ls -1 /nix/store/qmas0y5l656v5yq1z7jzg4vgdfj73jlv-matrix-synapse-1.76.0/bin
Not sure what outcome you were expecting, can you clarify?
I see. I’m very new to Nix and I’ve gotten used to
nix run nixpkgs#FOO doing something useful (like running the application). I suppose that’s not true of all packages? I guess I should try getting nix run to run one of those executables, then…?
nix run only works for packages whose binary name matches their derivation
pname (which is possibly also different from their attribute name), or for which an explicit definition of the binary has been included via… I think it’s
nix run is fairly new, and there are still quirky packages in nixpkgs for which it doesn’t work.