Files
nixpkgs/pkgs/by-name/cr/cracklib/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

83 lines
1.8 KiB
Nix

{
stdenv,
lib,
fetchFromGitHub,
autoreconfHook,
zlib,
bash,
buildPackages,
nix-update-script,
pkgsCross,
pkgsStatic,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "cracklib";
version = "2.10.3";
src = fetchFromGitHub {
owner = "cracklib";
repo = "cracklib";
tag = "v${finalAttrs.version}";
hash = "sha256-ORpJje4TGw1STtvRiNEwUwSDbLXdS+WgXGlc1Wtf/gw=";
};
sourceRoot = "${finalAttrs.src.name}/src";
outputs = [
"bin"
"out"
"dev"
"man"
];
strictDeps = true;
enableParallelBuilding = true;
nativeBuildInputs = [
autoreconfHook
]
++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ buildPackages.cracklib ];
buildInputs = [
zlib
bash
];
configureFlags = [
"--without-python"
];
postInstall =
# For cross compilation use the tools from nativeBuildInputs. Otherwise use
# the ones in the util directory of the source tree.
lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
PATH=$PATH:util
''
+ ''
cracklib-format $out/share/cracklib/cracklib-small \
| cracklib-packer $out/share/cracklib/pw_dict
'';
passthru = {
updateScript = nix-update-script { };
tests = {
cross =
let
systemString = if stdenv.buildPlatform.isAarch64 then "gnu64" else "aarch64-multiplatform";
in
pkgsCross.${systemString}.cracklib;
static = pkgsStatic.cracklib;
};
};
meta = {
homepage = "https://github.com/cracklib/cracklib";
description = "Password checking library";
changelog = "https://github.com/cracklib/cracklib/releases/tag/v${finalAttrs.version}";
license = lib.licenses.lgpl21;
maintainers = with lib.maintainers; [ lovek323 ];
platforms = lib.platforms.unix;
};
})