tangled
alpha
login
or
join now
tjh.dev
/
nixpkgs
Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
0
fork
atom
overview
issues
pulls
pipelines
pwsafe: add darwin support
Weijia Wang
3 years ago
f2b64348
85be9549
+20
-7
1 changed file
expand all
collapse all
unified
split
pkgs
applications
misc
pwsafe
default.nix
+20
-7
pkgs/applications/misc/pwsafe/default.nix
···
19
19
, curl
20
20
, openssl
21
21
, file
22
22
+
, darwin
22
23
, gitUpdater
23
24
}:
24
25
26
26
+
let
27
27
+
inherit (darwin.apple_sdk.frameworks) Cocoa;
28
28
+
in
25
29
stdenv.mkDerivation rec {
26
30
pname = "pwsafe";
27
31
version = "1.16.0"; # do NOT update to 3.x Windows releases
···
33
37
hash = "sha256-5/TOg+hiy22vlPJHheE638abhS3B5Jrul0Umgwu+gi0=";
34
38
};
35
39
40
40
+
strictDeps = true;
41
41
+
36
42
nativeBuildInputs = [
37
43
cmake
38
44
gettext
···
42
48
];
43
49
44
50
buildInputs = [
51
51
+
wxGTK32
52
52
+
curl
53
53
+
qrencode
54
54
+
openssl
55
55
+
xercesc
56
56
+
file
57
57
+
] ++ lib.optionals stdenv.isLinux [
45
58
libXext
46
59
libXi
47
60
libXt
48
61
libXtst
49
49
-
wxGTK32
50
50
-
curl
51
51
-
qrencode
52
62
libuuid
53
53
-
openssl
54
54
-
xercesc
55
63
libyubikey
56
64
yubikey-personalization
57
57
-
file
65
65
+
] ++ lib.optionals stdenv.isDarwin [
66
66
+
Cocoa
58
67
];
59
68
60
69
cmakeFlags = [
61
70
"-DNO_GTEST=ON"
62
71
"-DCMAKE_CXX_FLAGS=-I${yubikey-personalization}/include/ykpers-1"
72
72
+
] ++ lib.optionals stdenv.isDarwin [
73
73
+
"-DNO_YUBI=ON"
63
74
];
64
75
65
76
postPatch = ''
···
79
90
for f in $(grep -Rl /usr/bin/ .) ; do
80
91
substituteInPlace $f --replace /usr/bin/ ""
81
92
done
93
93
+
'' + lib.optionalString stdenv.isDarwin ''
94
94
+
substituteInPlace src/ui/cli/CMakeLists.txt --replace "uuid" ""
82
95
'';
83
96
84
97
installFlags = [ "PREFIX=${placeholder "out"}" ];
···
99
112
'';
100
113
homepage = "https://pwsafe.org/";
101
114
maintainers = with maintainers; [ c0bw3b pjones ];
102
102
-
platforms = platforms.linux;
115
115
+
platforms = platforms.unix;
103
116
license = licenses.artistic2;
104
117
};
105
118
}