linux-pam: move scripts to separate output
This enables us to use the lib and out output without pulling in bash. - Enable structuredAttrs - Enable strictDeps - Add bash to disallowedRequisites
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
ninja,
|
||||
audit,
|
||||
libxcrypt,
|
||||
bash,
|
||||
bashNonInteractive,
|
||||
nixosTests,
|
||||
meson,
|
||||
pkg-config,
|
||||
@@ -31,8 +33,11 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
repo = "linux-pam";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-kANcwxifQz2tYPSrSBSFiYNTm51Gr10L/zroCqm8ZHQ=";
|
||||
|
||||
};
|
||||
|
||||
__structuredAttrs = true;
|
||||
|
||||
# patching unix_chkpwd is required as the nix store entry does not have the necessary bits
|
||||
postPatch = ''
|
||||
substituteInPlace modules/module-meson.build \
|
||||
@@ -43,9 +48,12 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
"out"
|
||||
"doc"
|
||||
"man"
|
||||
"scripts"
|
||||
# "modules"
|
||||
];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
nativeBuildInputs = [
|
||||
flex
|
||||
@@ -65,6 +73,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
buildInputs = [
|
||||
db4
|
||||
libxcrypt
|
||||
bash
|
||||
]
|
||||
++ lib.optionals stdenv.buildPlatform.isLinux [
|
||||
audit
|
||||
@@ -89,8 +98,18 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
(lib.mesonBool "examples" false)
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
moveToOutput sbin/pam_namespace_helper $scripts
|
||||
moveToOutput etc/security/namespace.init $scripts
|
||||
'';
|
||||
|
||||
doCheck = false; # fails
|
||||
|
||||
outputChecks.out.disallowedRequisites = [
|
||||
bash
|
||||
bashNonInteractive
|
||||
];
|
||||
|
||||
passthru = {
|
||||
tests = {
|
||||
inherit (nixosTests)
|
||||
|
||||
Reference in New Issue
Block a user