summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2018-03-26 10:04:47 +0100
committerGitHub <noreply@github.com>2018-03-26 10:04:47 +0100
commit458ff5a7a0a7f6a9a32bb53495faf64b902a1d47 (patch)
treee6a47707587c3cb3c0181d37130f4d57f0918742 /pkgs/applications
parent635b5fc95f90735fd7efaeda41427bc80e5a86c7 (diff)
parent3f1a03b20ea5f8bd8dcb366656f33f32d91ec4ae (diff)
downloadnixlib-458ff5a7a0a7f6a9a32bb53495faf64b902a1d47.tar
nixlib-458ff5a7a0a7f6a9a32bb53495faf64b902a1d47.tar.gz
nixlib-458ff5a7a0a7f6a9a32bb53495faf64b902a1d47.tar.bz2
nixlib-458ff5a7a0a7f6a9a32bb53495faf64b902a1d47.tar.lz
nixlib-458ff5a7a0a7f6a9a32bb53495faf64b902a1d47.tar.xz
nixlib-458ff5a7a0a7f6a9a32bb53495faf64b902a1d47.tar.zst
nixlib-458ff5a7a0a7f6a9a32bb53495faf64b902a1d47.zip
Merge pull request #37790 from knedlsepp/fix-keepassxc-on-darwin
keepassxc: fix darwin build
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/misc/keepassx/community.nix19
1 files changed, 15 insertions, 4 deletions
diff --git a/pkgs/applications/misc/keepassx/community.nix b/pkgs/applications/misc/keepassx/community.nix
index 4daa1938aba4..0e1aecaab1d1 100644
--- a/pkgs/applications/misc/keepassx/community.nix
+++ b/pkgs/applications/misc/keepassx/community.nix
@@ -14,6 +14,7 @@
 , yubikey-personalization
 , libXi
 , qtx11extras
+, qtmacextras
 
 , withKeePassBrowser ? true
 , withKeePassSSHAgent ? true
@@ -25,17 +26,27 @@ with stdenv.lib;
 
 stdenv.mkDerivation rec {
   name = "keepassxc-${version}";
-  version = "2.3.0";
+  version = "2.3.1";
 
   src = fetchFromGitHub {
     owner = "keepassxreboot";
     repo = "keepassxc";
     rev = "${version}";
-    sha256 = "1zch1qbqgphhp2p2kvjlah8s337162m69yf4y00kcnfb3539ii5f";
+    sha256 = "1xlg8zb22c2f1pi2has4f4qwggd0m2z254f0d6jrgz368x4g3p87";
   };
 
-  NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-Wno-old-style-cast";
+  NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang [
+    "-Wno-old-style-cast"
+    "-Wno-error"
+    "-D__BIG_ENDIAN__=${if stdenv.isBigEndian then "1" else "0"}"
+  ];
 
+  postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
+    substituteInPlace CMakeLists.txt \
+      --replace "/usr/local/bin" "../bin" \
+      --replace "/usr/local/share/man" "../share/man"
+  '';
+  NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-rpath ${libargon2}/lib";
   patches = [ ./darwin.patch ];
 
   cmakeFlags = [
@@ -72,7 +83,7 @@ stdenv.mkDerivation rec {
     qtx11extras
     yubikey-personalization
     zlib
-  ];
+  ] ++ stdenv.lib.optional stdenv.isDarwin qtmacextras;
 
   postInstall = optionalString stdenv.isDarwin ''
     # Make it work without Qt in PATH.