Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keepassxc: 2.2.4 -> 2.3.0 #36133

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
36 changes: 30 additions & 6 deletions pkgs/applications/misc/keepassx/community.nix
@@ -1,23 +1,33 @@
{ stdenv, fetchFromGitHub, cmake, makeWrapper, qttools
, libgcrypt, zlib, libmicrohttpd, libXtst, qtbase, libgpgerror, glibcLocales, libyubikey, yubikey-personalization, libXi, qtx11extras
, curl
, glibcLocales
, libXi
, libXtst
, libargon2
, libgcrypt
, libgpgerror
, libmicrohttpd
, libyubikey
, qtbase
, qtx11extras
, yubikey-personalization
, zlib
, withKeePassHTTP ? true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is missing options for withKeePassBrowser (requires a new dependency on libsodium), withNetworking, and withSSHAgent and their equivalent CMAKE flags.

To preserve the spirit of the existing configuration, withKeePassBrowser should likely default to true.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Echoing @Mic92, KeePassHTTP is deprecated and should be disabled by default.

}:

with stdenv.lib;

stdenv.mkDerivation rec {
name = "keepassxc-${version}";
version = "2.2.4";
version = "2.3.0";

src = fetchFromGitHub {
owner = "keepassxreboot";
repo = "keepassxc";
rev = "${version}";
sha256 = "0q913v2ka6p7jr7c4w9fq8aqh5v6nxqgcv9h7zllk5p0amsf8d80";
sha256 = "1zch1qbqgphhp2p2kvjlah8s337162m69yf4y00kcnfb3539ii5f";
};

patches = [ ./cmake.patch ./darwin.patch ];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cmake.patch file should be removed if it's no longer needed.

Copy link
Contributor

@jonafato jonafato Feb 28, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is darwin.patch not necessary anymore? (I don't use MacOS and can't verify whether or not it's still needed.) If it still is, here's an updated version that applies against the 2.3.0 tag:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7410b4e0..0fd39403 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -250,8 +250,8 @@ else()
   set(PROGNAME keepassxc)
 endif()
 
-if(APPLE AND WITH_APP_BUNDLE AND "${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr/local")
-  set(CMAKE_INSTALL_PREFIX "/Applications")
+if(APPLE AND WITH_APP_BUNDLE)
+  set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/Applications")
   set(CMAKE_INSTALL_MANDIR "/usr/local/share/man")
 endif()
 
@@ -262,7 +262,7 @@ if(MINGW)
   set(PLUGIN_INSTALL_DIR ".")
   set(DATA_INSTALL_DIR   "share")
 elseif(APPLE AND WITH_APP_BUNDLE)
-  set(CLI_INSTALL_DIR    "/usr/local/bin")
+  set(CLI_INSTALL_DIR    "../bin")
   set(PROXY_INSTALL_DIR  "/usr/local/bin")
   set(BIN_INSTALL_DIR    ".")
   set(PLUGIN_INSTALL_DIR "${PROGNAME}.app/Contents/PlugIns")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 69526967..38f7c5d4 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -319,11 +319,6 @@ if(APPLE AND WITH_APP_BUNDLE)
   set(CPACK_PACKAGE_FILE_NAME "${PROGNAME}-${KEEPASSXC_VERSION}")
   include(CPack)
 
-  add_custom_command(TARGET ${PROGNAME}
-                     POST_BUILD
-                     COMMAND ${MACDEPLOYQT_EXE} ${PROGNAME}.app
-                     WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/src
-                     COMMENT "Deploying app bundle")
 endif()
 
 install(TARGETS ${PROGNAME}
diff --git a/src/autotype/mac/CMakeLists.txt b/src/autotype/mac/CMakeLists.txt
index 08c53278..b833b692 100644
--- a/src/autotype/mac/CMakeLists.txt
+++ b/src/autotype/mac/CMakeLists.txt
@@ -14,7 +14,6 @@ if(WITH_APP_BUNDLE)
   add_custom_command(TARGET keepassx-autotype-cocoa
                      POST_BUILD
                      COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/libkeepassx-autotype-cocoa.so ${PLUGIN_INSTALL_DIR}
-                     COMMAND ${MACDEPLOYQT_EXE} ${PROGNAME}.app -executable=${PLUGIN_INSTALL_DIR}/libkeepassx-autotype-cocoa.so -no-plugins
                      WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/src
   COMMENT "Deploying autotype plugin")
 else()

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/cc @orivej


cmakeFlags = [
"-DWITH_GUI_TESTS=ON"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll want to add "-DKEEPASSXC_BUILD_TYPE=Release" to avoid a big prerelease warning in the UI.

"-DWITH_XC_AUTOTYPE=ON"
Expand All @@ -32,7 +42,21 @@ stdenv.mkDerivation rec {

nativeBuildInputs = [ cmake makeWrapper qttools ];

buildInputs = [ libgcrypt zlib qtbase libXtst libmicrohttpd libgpgerror glibcLocales libyubikey yubikey-personalization libXi qtx11extras ];
buildInputs = [
curl
glibcLocales
libXi
libXtst
libargon2
libgcrypt
libgpgerror
libmicrohttpd
libyubikey
qtbase
qtx11extras
yubikey-personalization
zlib
];

postInstall = optionalString stdenv.isDarwin ''
# Make it work without Qt in PATH.
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/libraries/libargon2/default.nix
Expand Up @@ -36,6 +36,6 @@ stdenv.mkDerivation rec {
homepage = https://www.argon2.com/;
license = with licenses; [ asl20 cc0 ];
maintainers = with maintainers; [ taeer olynch ];
platforms = platforms.linux;
platforms = platforms.linux ++ platforms.darwin;
};
}