30 Nov 2023 |
quentin | It looks like Configure tries to detect the path to the shell, and I can see from the built config.h that it found /bin/sh :
$ grep SH_PATH /nix/store/afz9z2iczjx13i66ymwwinwp2zvgc1ck-perl-5.38.0/lib/perl5/5.38.0/x86_64-linux-thread-multi/CORE/config.h
/* SH_PATH:
#define SH_PATH "/bin/sh" /**/
| 00:27:20 |
quentin | Am I missing something? Should configure be patched to use `stdenv.shell`? I don't understand why `/bin/sh` would work for Perl's own build if `/bin/sh` doesn't exist in a normal build sandbox | 00:34:18 |
stigo | Hm, need to look into this a bit more. But thinking we might need to set targetsh= and startsh= when calling Configure | 01:56:51 |
stigo | system() calls /bin/sh when it thinks that it needs a shell | 01:57:37 |
stigo | What are you trying to do specifically? Do you have an example I can look at? | 01:57:50 |
stigo | (getting some sleep now, but will check in again tomorrow) | 01:58:04 |
stigo | Ready for review/merge: https://github.com/NixOS/nixpkgs/pull/269996 | 15:34:33 |
quentin | In reply to @stigo:matrix.org What are you trying to do specifically? Do you have an example I can look at? I'm trying to package https://salsa.debian.org/perl-team/modules/packages/equivs, which is a perl script that includes a system() call. | 20:14:13 |
quentin | I packaged it just fine, but the resulting program fails with
Can't exec "/bin/sh": No such file or directory at /nix/store/yc09sxq40aaai2141cv1d32c7wflh90c-equivs-2.3.1/bin/equivs-build line 54.
| 20:14:45 |