devshell
devshell copied to clipboard
Strange issue on a Mac
I'm testing this on a Mac (nix flakes enabled), and I'm getting this output:
% nix develop
mktemp: illegal option -- -
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
mktemp [-d] [-q] [-u] -t prefix
### 🔨 Welcome to devshell ####
[commands]
devshell-menu - print this menu
devshell-root - change directory to root
[devshell]$
I've been unable to find any mention of mktemp
in this repo, however it seems to be related to mkDevShell since I can use mkShell from nixpkgs without ever seeing the above output. On NixOS everything is fine.
Also, the error above doesn't seem to affect usage as far as I've been able to determine anyway. But it sure doesn't look good. I'm testing this on MacOS Catalina, latest version 10.15.6.
So, clearly something is calling the mktemp that comes with MacOS. Could even be somewhere in nixpkgs. By doing this:
nix profile install nixpkgs#mktemp
I no longer have this problem. Would be interesting to find where this happens since I believe it should call the mktemp from nixpkgs.
I'm seeing the same issue on macOS 1.15.5 - nix (Nix) 3.0pre20200804_ed52cf6
This is an issue with Nix. nix develop
is calling mktemp
before entering the environment:
https://github.com/NixOS/nix/blob/13e49be6602314fe5e5d7beb8a807d5d892e864e/src/nix/develop.cc#L198
It looks like this was fixed upstream: https://github.com/NixOS/nix/pull/4491