nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 95 lines 2.8 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 libX11, 6 libXtst, 7 cmake, 8 qtbase, 9 qttools, 10 qtwayland, 11 openssl, 12 libscrypt, 13 wrapQtAppsHook, 14 testers, 15 qMasterPassword, 16 x11Support ? true, 17 waylandSupport ? false, 18}: 19 20stdenv.mkDerivation rec { 21 pname = "qMasterPassword"; 22 version = "2.0.3"; 23 24 src = fetchFromGitHub { 25 owner = "bkueng"; 26 repo = pname; 27 rev = "v${version}"; 28 hash = "sha256-kNVdE42JFzl6HO84b793gseMhcDyiGzQCmhh6zh2epc="; 29 }; 30 31 buildInputs = [ 32 qtbase 33 qtwayland 34 openssl 35 libscrypt 36 ] 37 ++ lib.optionals x11Support [ 38 libX11 39 libXtst 40 ]; 41 nativeBuildInputs = [ 42 cmake 43 qttools 44 wrapQtAppsHook 45 ]; 46 cmakeFlags = lib.optionals waylandSupport [ 47 "-DDISABLE_FILL_FORM_SHORTCUTS=1" 48 ]; 49 50 # Upstream install is mostly defunct. It hardcodes target.path and doesn't 51 # install anything but the binary. 52 installPhase = 53 if stdenv.hostPlatform.isDarwin then 54 '' 55 mkdir -p "$out"/{Applications,bin} 56 mv qMasterPassword.app "$out"/Applications/ 57 ln -s ../Applications/qMasterPassword.app/Contents/MacOS/qMasterPassword "$out"/bin/qMasterPassword 58 '' 59 else 60 '' 61 mkdir -p $out/bin 62 mkdir -p $out/share/{applications,doc/qMasterPassword,icons/qmasterpassword,icons/hicolor/512x512/apps,qMasterPassword/translations} 63 cp qMasterPassword $out/bin 64 cp $src/data/qMasterPassword.desktop $out/share/applications 65 cp $src/LICENSE $src/README.md $out/share/doc/qMasterPassword 66 cp $src/data/icons/app_icon.png $out/share/icons/hicolor/512x512/apps/qmasterpassword.png 67 cp $src/data/icons/* $out/share/icons/qmasterpassword 68 cp ./translations/translation_de.qm $out/share/qMasterPassword/translations/translation_de.qm 69 cp ./translations/translation_pl.qm $out/share/qMasterPassword/translations/translation_pl.qm 70 ''; 71 72 passthru = { 73 tests.version = testers.testVersion { 74 package = qMasterPassword; 75 version = "v${version}"; 76 }; 77 }; 78 79 meta = with lib; { 80 description = "Stateless Master Password Manager"; 81 mainProgram = "qMasterPassword"; 82 longDescription = '' 83 Access all your passwords using only a single master password. But in 84 contrast to other managers it does not store any passwords: Unique 85 passwords are generated from the master password and a site name. This 86 means you automatically get different passwords for each account and 87 there is no password file that can be lost or get stolen. There is also 88 no need to trust any online password service. 89 ''; 90 homepage = "https://github.com/bkueng/qMasterPassword"; 91 license = licenses.gpl3; 92 maintainers = with lib.maintainers; [ teutat3s ]; 93 platforms = platforms.all; 94 }; 95}