mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 18:33:00 +00:00
bd872b4a77
When running `nix develop` for a package, Nix records the stdenv environment with NIX_LOG_FD set. That is, when the actual development shell runs, it uses the functions that attempt to log to NIX_LOG_FD, but this variable is not actually set. As a workaround, check whether NIX_LOG_FD is set at runtime. Example (before this change): ```console $ nix develop --file . bash $ echo "${NIX_LOG_FD-unset}" unset $ runPhase unpackPhase bash: "$NIX_LOG_FD": Bad file descriptor Running phase: unpackPhase unpacking source archive /nix/store/v28dv6l0qk3j382kp40bksa1v6h7dx9p-bash-5.2.tar.gz bash: "$NIX_LOG_FD": Bad file descriptor source root is bash-5.2 bash: "$NIX_LOG_FD": Bad file descriptor setting SOURCE_DATE_EPOCH to timestamp 1663942708 of file bash-5.2/y.tab.h ``` After this change: ```console $ nix develop --file . bash $ runPhase unpackPhase Running phase: unpackPhase unpacking source archive /nix/store/v28dv6l0qk3j382kp40bksa1v6h7dx9p-bash-5.2.tar.gz source root is bash-5.2 setting SOURCE_DATE_EPOCH to timestamp 1663942708 of file bash-5.2/y.tab.h ``` |
||
---|---|---|
.. | ||
cross | ||
custom | ||
cygwin | ||
darwin | ||
freebsd | ||
generic | ||
linux | ||
native | ||
nix | ||
tests | ||
adapters.nix | ||
booter.nix | ||
default.nix |