Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

pwsafe: add darwin support

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