-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36834 from badi/qtkeychain
qtkeychain: 0.7.0 -> 0.8.0, fix darwin build
- Loading branch information
Showing
1 changed file
with
17 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,43 @@ | ||
{ stdenv, fetchFromGitHub, cmake, qt4 ? null | ||
, withQt5 ? false, qtbase ? null, qttools ? null | ||
, darwin ? null | ||
}: | ||
|
||
assert withQt5 -> qtbase != null; | ||
assert withQt5 -> qttools != null; | ||
assert stdenv.isDarwin -> darwin != null; | ||
|
||
stdenv.mkDerivation rec { | ||
name = "qtkeychain-${if withQt5 then "qt5" else "qt4"}-${version}"; | ||
version = "0.7.0"; | ||
version = "0.8.0"; # verify after nix-build with `grep -R "set(PACKAGE_VERSION " result/` | ||
|
||
src = fetchFromGitHub { | ||
owner = "frankosterfeld"; | ||
repo = "qtkeychain"; | ||
rev = "v${version}"; | ||
sha256 = "04v6ymkw7qd1pf9lwijgqrl89w2hhsnqgz7dm4cdrh8i8dffpn52"; | ||
sha256 = "1r6qp9l2lp5jpc6ciklbg1swvvzcpc37rg9py46hk0wxy6klnm0b"; # v0.8.0 | ||
}; | ||
|
||
cmakeFlags = [ "-DQT_TRANSLATIONS_DIR=share/qt/translations" ]; | ||
cmakeFlags = [ "-DQT_TRANSLATIONS_DIR=share/qt/translations" ] | ||
++ stdenv.lib.optional stdenv.isDarwin [ | ||
# correctly detect the compiler | ||
# for details see cmake --help-policy CMP0025 | ||
"-DCMAKE_POLICY_DEFAULT_CMP0025=NEW" | ||
] | ||
; | ||
|
||
nativeBuildInputs = [ cmake ]; | ||
|
||
buildInputs = if withQt5 then [ qtbase qttools ] else [ qt4 ]; | ||
buildInputs = if withQt5 then [ qtbase qttools ] else [ qt4 ] | ||
++ stdenv.lib.optional stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ | ||
CoreFoundation Security | ||
]) | ||
; | ||
|
||
meta = { | ||
description = "Platform-independent Qt API for storing passwords securely"; | ||
homepage = https://github.com/frankosterfeld/qtkeychain; | ||
license = stdenv.lib.licenses.bsd3; | ||
platforms = stdenv.lib.platforms.linux; | ||
platforms = stdenv.lib.platforms.unix; | ||
}; | ||
} |