From 2a80448fed239d4cf15aad88a6387a611db9e5f1 Mon Sep 17 00:00:00 2001 From: Josef Kemetmüller Date: Sun, 25 Mar 2018 18:46:28 +0200 Subject: keepassxc: fix darwin build --- pkgs/applications/misc/keepassx/community.nix | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'pkgs/applications') diff --git a/pkgs/applications/misc/keepassx/community.nix b/pkgs/applications/misc/keepassx/community.nix index 4daa1938aba4..620039b5a94b 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 @@ -34,8 +35,18 @@ stdenv.mkDerivation rec { sha256 = "1zch1qbqgphhp2p2kvjlah8s337162m69yf4y00kcnfb3539ii5f"; }; - 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. -- cgit 1.4.1