pam: bind Linux-PAM locales from pam-specific folder (upstream patch)
Without the change `pam` packa looks up locales already registered via
`bindtextdomain()`:
- shadow: /nix/store/ymcln55n92xm25sk2pipqbcp5xghwc3j-shadow-4.13/share/locale/
- glibc: /nix/store/ibp4camsx1mlllwzh32yyqcq2r2xsy1a-glibc-2.37-8/share/locale
Note that there is no `pam` pne in the list.
The change adds extra lookup location:
- linux-pam: /nix/store/k1lvsb3vyw2ijk9naamnay5nwc4mibda-linux-pam-1.5.2/share/locale
Before the change:
$ LANGUAGE=fi su
Password:
su: Authentication failure
After the change:
$ LANGUAGE=fi ./result-su/bin/su
Salasana:
su: Tunnistautumisvirhe
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
{ lib, stdenv, buildPackages, fetchurl, flex, cracklib, db4, gettext, audit, libxcrypt
|
{ lib, stdenv, buildPackages, fetchurl
|
||||||
|
, fetchpatch
|
||||||
|
, flex, cracklib, db4, gettext, audit, libxcrypt
|
||||||
, nixosTests
|
, nixosTests
|
||||||
|
, autoreconfHook269, pkg-config-unwrapped
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
@@ -11,12 +14,24 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "sha256-5OxxMakdpEUSV0Jo9JPG2MoQXIcJFpG46bVspoXU+U0=";
|
sha256 = "sha256-5OxxMakdpEUSV0Jo9JPG2MoQXIcJFpG46bVspoXU+U0=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [ ./suid-wrapper-path.patch ];
|
patches = [
|
||||||
|
./suid-wrapper-path.patch
|
||||||
|
# Pull support for localization on non-default --prefix:
|
||||||
|
# https://github.com/NixOS/nixpkgs/issues/249010
|
||||||
|
# https://github.com/linux-pam/linux-pam/pull/604
|
||||||
|
(fetchpatch {
|
||||||
|
name = "bind-locales.patch";
|
||||||
|
url = "https://github.com/linux-pam/linux-pam/commit/77bd338125cde583ecdfb9fd69619bcd2baf15c2.patch";
|
||||||
|
hash = "sha256-tlc9RcLZpEH315NFD4sdN9yOco8qhC6+bszl4OHm+AI=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
outputs = [ "out" "doc" "man" /* "modules" */ ];
|
outputs = [ "out" "doc" "man" /* "modules" */ ];
|
||||||
|
|
||||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||||
nativeBuildInputs = [ flex ]
|
# autoreconfHook269 is needed for `bind-locales.patch` above
|
||||||
|
# pkg-config-unwrapped is needed for `AC_CHECK_LIB` and `AC_SEARCH_LIBS`
|
||||||
|
nativeBuildInputs = [ flex autoreconfHook269 pkg-config-unwrapped ]
|
||||||
++ lib.optional stdenv.buildPlatform.isDarwin gettext;
|
++ lib.optional stdenv.buildPlatform.isDarwin gettext;
|
||||||
|
|
||||||
buildInputs = [ cracklib db4 libxcrypt ]
|
buildInputs = [ cracklib db4 libxcrypt ]
|
||||||
|
|||||||
Reference in New Issue
Block a user