git.iko.soy/typeable/nixpkgs
on master help sign in
Merge branch 'pinentry-qt5'
commit114584aca8f04485379fe50ca58bf653ae6ee0bc authorThomas Tuegel <ttuegel@gmail.com> dateThu 10 Dec 2015, 11:12 (11 years ago) parent8f5856cca0514d
3 files changed+61−2
pkgs/tools/security/pinentry/default.nix+2−2 pkgs/tools/security/pinentry/qt5.nix+47 pkgs/top-level/all-packages.nix+12
pkgs/tools/security/pinentry/default.nix+2−2
@@ -10,11 +10,11 @@ let
1010in
1111with stdenv.lib;
1212stdenv.mkDerivation rec {
13− name = "pinentry-0.9.5";
13+ name = "pinentry-0.9.6";
1414
1515 src = fetchurl {
1616 url = "mirror://gnupg/pinentry/${name}.tar.bz2";
17− sha256 = "1338hj1h3sh34897120y30x12b64wyj3xjzzk5asm2hdzhxgsmva";
17+ sha256 = "0rhyw1vk28kgasjp22myf7m2q8kycw82d65pr9kgh93z17lj849a";
1818 };
1919
2020 buildInputs = [ libgpgerror libassuan libcap gtk2 ncurses qt4 ];
pkgs/tools/security/pinentry/qt5.nixnew file+47
@@ -0,0 +1,47 @@
1+{ fetchurl, stdenv, pkgconfig
2+, libgpgerror, libassuan
3+, qtbase
4+, libcap ? null
5+}:
6+
7+let
8+ mkFlag = pfxTrue: pfxFalse: cond: name: "--${if cond then pfxTrue else pfxFalse}-${name}";
9+ mkEnable = mkFlag "enable" "disable";
10+ mkWith = mkFlag "with" "without";
11+in
12+with stdenv.lib;
13+stdenv.mkDerivation rec {
14+ name = "pinentry-0.9.6";
15+
16+ src = fetchurl {
17+ url = "mirror://gnupg/pinentry/${name}.tar.bz2";
18+ sha256 = "0rhyw1vk28kgasjp22myf7m2q8kycw82d65pr9kgh93z17lj849a";
19+ };
20+
21+ buildInputs = [ libgpgerror libassuan libcap qtbase ];
22+
23+ # configure cannot find moc on its own
24+ preConfigure = ''
25+ export QTDIR="${qtbase}"
26+ export MOC="${qtbase}/bin/moc"
27+ '';
28+
29+ configureFlags = [
30+ (mkWith (libcap != null) "libcap")
31+ (mkEnable true "pinentry-qt")
32+ ];
33+
34+ nativeBuildInputs = [ pkgconfig ];
35+
36+ meta = {
37+ homepage = "http://gnupg.org/aegypten2/";
38+ description = "GnuPG's interface to passphrase input";
39+ license = stdenv.lib.licenses.gpl2Plus;
40+ platforms = stdenv.lib.platforms.all;
41+ longDescription = ''
42+ Pinentry provides a console and (optional) GTK+ and Qt GUIs allowing users
43+ to enter a passphrase when `gpg' or `gpg2' is run and needs it.
44+ '';
45+ maintainers = [ stdenv.lib.maintainers.ttuegel ];
46+ };
47+}
pkgs/top-level/all-packages.nix+12
@@ -2711,6 +2711,18 @@ let
27112711 qt4 = null;
27122712 };
27132713
2714+ pinentry_ncurses = pinentry.override {
2715+ gtk2 = null;
2716+ };
2717+
2718+ pinentry_qt4 = pinentry_ncurses.override {
2719+ inherit qt4;
2720+ };
2721+
2722+ pinentry_qt5 = qt55Libs.callPackage ../tools/security/pinentry/qt5.nix {
2723+ libcap = if stdenv.isDarwin then null else libcap;
2724+ };
2725+
27142726 pius = callPackage ../tools/security/pius { };
27152727
27162728 pk2cmd = callPackage ../tools/misc/pk2cmd { };