about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/qtkeychain
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-06-16 06:56:35 +0000
committerAlyssa Ross <hi@alyssa.is>2023-06-16 06:56:35 +0000
commit99fcaeccb89621dd492203ce1f2d551c06f228ed (patch)
tree41cb730ae07383004789779b0f6e11cb3f4642a3 /nixpkgs/pkgs/development/libraries/qtkeychain
parent59c5f5ac8682acc13bb22bc29c7cf02f7d75f01f (diff)
parent75a5ebf473cd60148ba9aec0d219f72e5cf52519 (diff)
downloadnixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.gz
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.bz2
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.lz
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.xz
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.zst
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.zip
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs
Conflicts:
	nixpkgs/nixos/modules/config/console.nix
	nixpkgs/nixos/modules/services/mail/mailman.nix
	nixpkgs/nixos/modules/services/mail/public-inbox.nix
	nixpkgs/nixos/modules/services/mail/rss2email.nix
	nixpkgs/nixos/modules/services/networking/ssh/sshd.nix
	nixpkgs/pkgs/applications/networking/instant-messengers/dino/default.nix
	nixpkgs/pkgs/applications/networking/irc/weechat/default.nix
	nixpkgs/pkgs/applications/window-managers/sway/default.nix
	nixpkgs/pkgs/build-support/go/module.nix
	nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix
	nixpkgs/pkgs/development/interpreters/python/default.nix
	nixpkgs/pkgs/development/node-packages/overrides.nix
	nixpkgs/pkgs/development/tools/b4/default.nix
	nixpkgs/pkgs/servers/dict/dictd-db.nix
	nixpkgs/pkgs/servers/mail/public-inbox/default.nix
	nixpkgs/pkgs/tools/security/pinentry/default.nix
	nixpkgs/pkgs/tools/text/unoconv/default.nix
	nixpkgs/pkgs/top-level/all-packages.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/qtkeychain')
-rw-r--r--nixpkgs/pkgs/development/libraries/qtkeychain/default.nix37
1 files changed, 30 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/development/libraries/qtkeychain/default.nix b/nixpkgs/pkgs/development/libraries/qtkeychain/default.nix
index 0d3528e92f8a..e06667540719 100644
--- a/nixpkgs/pkgs/development/libraries/qtkeychain/default.nix
+++ b/nixpkgs/pkgs/development/libraries/qtkeychain/default.nix
@@ -1,11 +1,18 @@
-{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, qtbase, qttools
-, CoreFoundation, Security
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, pkg-config
+, qtbase
+, qttools
+, CoreFoundation
+, Security
 , libsecret
 }:
 
 stdenv.mkDerivation rec {
   pname = "qtkeychain";
-  version = "0.12.0";            # verify after nix-build with `grep -R "set(PACKAGE_VERSION " result/`
+  version = "0.12.0";
 
   src = fetchFromGitHub {
     owner = "frankosterfeld";
@@ -18,7 +25,10 @@ stdenv.mkDerivation rec {
 
   patches = [ ./0002-Fix-install-name-Darwin.patch ];
 
-  cmakeFlags = [ "-DQT_TRANSLATIONS_DIR=share/qt/translations" ];
+  cmakeFlags = [
+    "-DBUILD_WITH_QT6=${if lib.versions.major qtbase.version == "6" then "ON" else "OFF"}"
+    "-DQT_TRANSLATIONS_DIR=share/qt/translations"
+  ];
 
   nativeBuildInputs = [ cmake ]
     ++ lib.optionals (!stdenv.isDarwin) [ pkg-config ] # for finding libsecret
@@ -27,9 +37,22 @@ stdenv.mkDerivation rec {
   buildInputs = lib.optionals (!stdenv.isDarwin) [ libsecret ]
     ++ [ qtbase qttools ]
     ++ lib.optionals stdenv.isDarwin [
-      CoreFoundation Security
-    ]
-  ;
+    CoreFoundation
+    Security
+  ];
+
+  doInstallCheck = true;
+
+  # we previously had a note in here saying to run this check manually, so we might as
+  # well do it automatically. It seems like a perfectly valid sanity check, but I
+  # have no idea *why* we might need it
+  installCheckPhase = ''
+    runHook preInstallCheck
+
+    grep --quiet -R 'set(PACKAGE_VERSION "${version}"' .
+
+    runHook postInstallCheck
+  '';
 
   meta = {
     description = "Platform-independent Qt API for storing passwords securely";