nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at litex 61 lines 1.5 kB view raw
1{ lib 2, stdenv 3, fetchFromGitHub 4, cmake 5, pkg-config 6, qtbase 7, qttools 8, CoreFoundation 9, Security 10, libsecret 11}: 12 13stdenv.mkDerivation rec { 14 pname = "qtkeychain"; 15 version = "0.14.1"; 16 17 src = fetchFromGitHub { 18 owner = "frankosterfeld"; 19 repo = "qtkeychain"; 20 rev = "${version}"; 21 sha256 = "sha256-LclYOuIYn+jYCvg69uHFlV3VcZ2KWdr8lFyCSBIB7Kw="; 22 }; 23 24 dontWrapQtApps = true; 25 26 cmakeFlags = [ 27 "-DBUILD_WITH_QT6=${if lib.versions.major qtbase.version == "6" then "ON" else "OFF"}" 28 "-DQT_TRANSLATIONS_DIR=share/qt/translations" 29 ]; 30 31 nativeBuildInputs = [ cmake ] 32 ++ lib.optionals (!stdenv.isDarwin) [ pkg-config ] # for finding libsecret 33 ; 34 35 buildInputs = lib.optionals (!stdenv.isDarwin) [ libsecret ] 36 ++ [ qtbase qttools ] 37 ++ lib.optionals stdenv.isDarwin [ 38 CoreFoundation 39 Security 40 ]; 41 42 doInstallCheck = true; 43 44 # we previously had a note in here saying to run this check manually, so we might as 45 # well do it automatically. It seems like a perfectly valid sanity check, but I 46 # have no idea *why* we might need it 47 installCheckPhase = '' 48 runHook preInstallCheck 49 50 grep --quiet -R 'set(PACKAGE_VERSION "${version}"' . 51 52 runHook postInstallCheck 53 ''; 54 55 meta = { 56 description = "Platform-independent Qt API for storing passwords securely"; 57 homepage = "https://github.com/frankosterfeld/qtkeychain"; 58 license = lib.licenses.bsd3; 59 platforms = lib.platforms.unix; 60 }; 61}