nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

shadow: add runtime-shell.patch

This gets the right shell in the closure.

By default, shadow wants to pull in the bash we are building it with,
while we would prefer it used the runtime bash.

authored by

Matthew Bauer and committed by
Milan
fbb26ab5 9e4a925c

+19 -1
+6 -1
pkgs/os-specific/linux/shadow/default.nix
··· 1 1 { lib, stdenv, nixosTests, fetchpatch, fetchFromGitHub, autoreconfHook, libxslt 2 - , libxml2 , docbook_xml_dtd_45, docbook_xsl, itstool, flex, bison 2 + , libxml2 , docbook_xml_dtd_45, docbook_xsl, itstool, flex, bison, runtimeShell 3 3 , pam ? null, glibcCross ? null 4 4 }: 5 5 ··· 38 38 # Obtain XML resources from XML catalog (patch adapted from gtk-doc) 39 39 ./respect-xml-catalog-files-var.patch 40 40 dots_in_usernames 41 + ./runtime-shell.patch 41 42 ]; 43 + 44 + RUNTIME_SHELL = runtimeShell; 42 45 43 46 # The nix daemon often forbids even creating set[ug]id files. 44 47 postPatch = ··· 79 76 mkdir -p $su/bin 80 77 mv $out/bin/su $su/bin 81 78 ''; 79 + 80 + disallowedReferences = lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) stdenv.shellPackage; 82 81 83 82 meta = with lib; { 84 83 homepage = "https://github.com/shadow-maint";
+13
pkgs/os-specific/linux/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])