You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider this log, where a trivial setup works fine, unless the script is a symlink:
$ cat default.nix
{ }:
with (import <nixpkgs> {});
runCommand "test" { buildInputs = [ pkgs.hello ]; } ""
$ cat test.sh
#!/usr/bin/env nix-shell
#! nix-shell --pure -i bash
hello
$ ./test.sh
Hello, world!
$ mv test.sh aa && ln -s aa/test.sh
$ ./test.sh
error: getting status of ‘/home/b/tmp/nix-shell-interpreter/aa/default.nix’: No such file or directory
Expected behavior
It surprised me that the symlink was followed. My scenario is that certain scripts are located in one location, but I would like to use them in the context of another location. Symlinks seem like a reasonable way to do this. But maybe I could be convinced otherwise.
Info
system: "x86_64-linux"
host os: Linux 4.9.86, NixOS, 17.09.3243.bca2ee28db4 (Hummingbird)
Consider this log, where a trivial setup works fine, unless the script is a symlink:
Expected behavior
It surprised me that the symlink was followed. My scenario is that certain scripts are located in one location, but I would like to use them in the context of another location. Symlinks seem like a reasonable way to do this. But maybe I could be convinced otherwise.
Info
"x86_64-linux"
Linux 4.9.86, NixOS, 17.09.3243.bca2ee28db4 (Hummingbird)
yes
no
nix-env (Nix) 1.11.16
"nixos-17.09.3243.bca2ee28db4"
"unstable-18.09pre138871.af55a0c3002"
/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs
The text was updated successfully, but these errors were encountered: