diff options
| author | Ivan Trubach <mr.trubach@icloud.com> | 2024-07-29 11:30:40 +0300 |
|---|---|---|
| committer | Ivan Trubach <mr.trubach@icloud.com> | 2024-07-29 13:08:17 +0300 |
| commit | bd872b4a778d36c3f1fdd8dd123673c84b68fe36 (patch) | |
| tree | c80c0c6a28fd65f50db52b9f6ddc71239ea8bae4 /pkgs/development/python-modules/python-mapnik/python-mapnik_std_optional.patch | |
| parent | 09de87d288bbb666021ea85fc717ce457c673293 (diff) | |
stdenv: fix unbound NIX_LOG_FD in `nix develop`
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
```
Diffstat (limited to 'pkgs/development/python-modules/python-mapnik/python-mapnik_std_optional.patch')
0 files changed, 0 insertions, 0 deletions
