blob: f70076243fbbdd5b3cd2ba4f17299dda3702309c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, libxcrypt
, pam
, pkg-config
}:
stdenv.mkDerivation (finalAttrs: {
pname = "passwdqc";
version = "2.0.3";
src = fetchFromGitHub {
owner = "openwall";
repo = "passwdqc";
rev = "v${finalAttrs.version}";
hash = "sha256-EgPeccqS+DDDMBVMc4bd70EMnXFuyglftxuqoaYHwNY=";
};
patches = [
(fetchpatch {
name = "0001-fix-solaris-macos-builds.patch";
url = "https://github.com/openwall/passwdqc/commit/fbf38229857f3d1982aa305c20da5e1ea0195b3e.patch";
hash = "sha256-FaEWROHwFzd4ZTeKyPvuAr9vcgnHEv8MhERblIU8JC4=";
})
];
outputs = [ "out" "man" ];
nativeBuildInputs = [
pkg-config
];
buildInputs = [
libxcrypt
pam
];
strictDeps = true;
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
installFlags = [
# Yet another software that does not use GNUInstallDirs Convention...
"BINDIR=$(out)/bin"
"CONFDIR=$(out)/etc"
"DEVEL_LIBDIR=$(out)/lib"
"INCLUDEDIR=$(out)/include"
"LOCALEDIR=$(out)/share/locale"
"MANDIR=$(man)/man"
"PKGCONFIGDIR=$(out)/lib/pkgconfig"
"SECUREDIR=$(out)/lib/security"
"SECUREDIR_DARWIN=$(out)/lib/security"
"SHARED_LIBDIR=$(out)/lib"
"SHARED_LIBDIR_REL=$(out)/lib"
];
meta = {
homepage = "https://www.openwall.com/passwdqc/";
description = "Passphrase strength checking and enforcement";
license = with lib.licenses; [ bsd3 ];
maintainers = with lib.maintainers; [ AndersonTorres ];
mainProgram = "passwdqc";
platforms = lib.platforms.unix;
};
})
|