···2 lib,
3 stdenv,
4 fetchFromGitHub,
5- runtimeShell,
6 nixosTests,
7 autoreconfHook,
8 bison,
···49 "man"
50 ];
5152- RUNTIME_SHELL = runtimeShell;
53-54 nativeBuildInputs = [
55 autoreconfHook
56 bison
···74 ./keep-path.patch
75 # Obtain XML resources from XML catalog (patch adapted from gtk-doc)
76 ./respect-xml-catalog-files-var.patch
77- ./runtime-shell.patch
78 ./fix-install-with-tcb.patch
79 ];
8081- # The nix daemon often forbids even creating set[ug]id files.
82 postPatch = ''
083 sed 's/^\(s[ug]idperms\) = [0-9]755/\1 = 0755/' -i src/Makefile.am
0000084 '';
8586 # `AC_FUNC_SETPGRP' is not cross-compilation capable.
···2 lib,
3 stdenv,
4 fetchFromGitHub,
05 nixosTests,
6 autoreconfHook,
7 bison,
···48 "man"
49 ];
500051 nativeBuildInputs = [
52 autoreconfHook
53 bison
···71 ./keep-path.patch
72 # Obtain XML resources from XML catalog (patch adapted from gtk-doc)
73 ./respect-xml-catalog-files-var.patch
074 ./fix-install-with-tcb.patch
75 ];
76077 postPatch = ''
78+ # The nix daemon often forbids even creating set[ug]id files
79 sed 's/^\(s[ug]idperms\) = [0-9]755/\1 = 0755/' -i src/Makefile.am
80+81+ # The default shell is not defined at build time of the package. It is
82+ # decided at build time of the NixOS configration. Thus, don't decide this
83+ # here but just point to the location of the shell on the system.
84+ substituteInPlace configure.ac --replace-fail '$SHELL' /bin/sh
85 '';
8687 # `AC_FUNC_SETPGRP' is not cross-compilation capable.
-13
pkgs/by-name/sh/shadow/runtime-shell.patch
···1-diff --git a/configure.ac b/configure.ac
2-index e4c6aaec..03883ad7 100644
3---- a/configure.ac
4-+++ b/configure.ac
5-@@ -682,7 +682,7 @@ if test "$enable_utmpx" = "yes"; then
6- [Define if utmpx should be used])
7- fi
8-9--AC_DEFINE_UNQUOTED(SHELL, ["$SHELL"], [The default shell.])
10-+AC_DEFINE_UNQUOTED(SHELL, ["$RUNTIME_SHELL"], [The runtime shell.])
11-12- AM_GNU_GETTEXT_VERSION(0.16)
13- AM_GNU_GETTEXT([external], [need-ngettext])