From 850da1803ffd3fb3d140983814a7d7523f537bba Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Fri, 31 Oct 2014 11:47:03 -0700 Subject: gnupg: Add gnupg 2.1 as default Additionally, move all gnupg expressions into the gnupg folder. --- pkgs/tools/security/gnupg/1.nix | 21 ++++++++++++++ pkgs/tools/security/gnupg/1compat.nix | 20 +++++++++++++ pkgs/tools/security/gnupg/20.nix | 53 +++++++++++++++++++++++++++++++++++ pkgs/tools/security/gnupg/21.nix | 30 ++++++++++++++++++++ pkgs/tools/security/gnupg/default.nix | 53 ----------------------------------- 5 files changed, 124 insertions(+), 53 deletions(-) create mode 100644 pkgs/tools/security/gnupg/1.nix create mode 100644 pkgs/tools/security/gnupg/1compat.nix create mode 100644 pkgs/tools/security/gnupg/20.nix create mode 100644 pkgs/tools/security/gnupg/21.nix delete mode 100644 pkgs/tools/security/gnupg/default.nix (limited to 'pkgs/tools/security/gnupg') diff --git a/pkgs/tools/security/gnupg/1.nix b/pkgs/tools/security/gnupg/1.nix new file mode 100644 index 000000000000..3675c8bc390f --- /dev/null +++ b/pkgs/tools/security/gnupg/1.nix @@ -0,0 +1,21 @@ +{ stdenv, fetchurl, readline, bzip2 }: + +stdenv.mkDerivation rec { + name = "gnupg-1.4.18"; + + src = fetchurl { + url = "mirror://gnupg/gnupg/${name}.tar.bz2"; + sha256 = "1233bppjvdpbbl425ii6l7xvgy0879ghhnmwrph5b6c4g3dgvddp"; + }; + + buildInputs = [ readline bzip2 ]; + + doCheck = true; + + meta = { + description = "free implementation of the OpenPGP standard for encrypting and signing data"; + homepage = http://www.gnupg.org/; + license = stdenv.lib.licenses.gpl3Plus; + platforms = stdenv.lib.platforms.gnu; # arbitrary choice + }; +} diff --git a/pkgs/tools/security/gnupg/1compat.nix b/pkgs/tools/security/gnupg/1compat.nix new file mode 100644 index 000000000000..9bd71467f0ea --- /dev/null +++ b/pkgs/tools/security/gnupg/1compat.nix @@ -0,0 +1,20 @@ +{ stdenv, gnupg, coreutils, writeScript }: + +stdenv.mkDerivation { + name = "gnupg1compat-0"; + + builder = writeScript "gnupg1compat-builder" '' + # First symlink all top-level dirs + ${coreutils}/bin/mkdir -p $out + ${coreutils}/bin/ln -s ${gnupg}/* $out + + # Replace bin with directory and symlink it contents + ${coreutils}/bin/rm $out/bin + ${coreutils}/bin/mkdir -p $out/bin + ${coreutils}/bin/ln -s ${gnupg}/bin/* $out/bin + + # Add gpg->gpg2 and gpgv->gpgv2 symlinks + ${coreutils}/bin/ln -s gpg2 $out/bin/gpg + ${coreutils}/bin/ln -s gpgv2 $out/bin/gpgv + ''; +} diff --git a/pkgs/tools/security/gnupg/20.nix b/pkgs/tools/security/gnupg/20.nix new file mode 100644 index 000000000000..45a25d7e2422 --- /dev/null +++ b/pkgs/tools/security/gnupg/20.nix @@ -0,0 +1,53 @@ +{ fetchurl, stdenv, readline, zlib, libgpgerror, pth, libgcrypt, libassuan +, libksba, coreutils, libiconvOrEmpty +# Each of the dependencies below are optional. +# Gnupg can be built without them at the cost of reduced functionality. +, pinentry ? null, openldap ? null, bzip2 ? null, libusb ? null, curl ? null +}: + +stdenv.mkDerivation rec { + name = "gnupg-2.0.26"; + + src = fetchurl { + url = "mirror://gnupg/gnupg/${name}.tar.bz2"; + sha256 = "1q5qcl5panrvcvpwvz6nl9gayl5a6vwvfhgdcxqpmbl2qc6y6n3p"; + }; + + buildInputs + = [ readline zlib libgpgerror libgcrypt libassuan libksba pth + openldap bzip2 libusb curl ] + ++ libiconvOrEmpty; + + patchPhase = '' + find tests -type f | xargs sed -e 's@/bin/pwd@${coreutils}&@g' -i + ''; + + configureFlags = + if pinentry != null then "--with-pinentry-pgm=${pinentry}/bin/pinentry" + else ""; + + checkPhase="GNUPGHOME=`pwd` ./agent/gpg-agent --daemon make check"; + + doCheck = true; + + meta = { + homepage = "http://gnupg.org/"; + description = "free implementation of the OpenPGP standard for encrypting and signing data"; + license = stdenv.lib.licenses.gpl3Plus; + + longDescription = '' + GnuPG is the GNU project's complete and free implementation of + the OpenPGP standard as defined by RFC4880. GnuPG allows to + encrypt and sign your data and communication, features a + versatile key managment system as well as access modules for all + kind of public key directories. GnuPG, also known as GPG, is a + command line tool with features for easy integration with other + applications. A wealth of frontend applications and libraries + are available. Version 2 of GnuPG also provides support for + S/MIME. + ''; + + maintainers = with stdenv.lib.maintainers; [ roconnor urkud ]; + platforms = stdenv.lib.platforms.all; + }; +} diff --git a/pkgs/tools/security/gnupg/21.nix b/pkgs/tools/security/gnupg/21.nix new file mode 100644 index 000000000000..8c3854ac23d6 --- /dev/null +++ b/pkgs/tools/security/gnupg/21.nix @@ -0,0 +1,30 @@ +{ fetchurl, stdenv, pkgconfig, libgcrypt, libassuan, libksba, npth +, readline ? null, libusb ? null, gnutls ? null, adns ? null, openldap ? null +, zlib ? null, bzip2 ? null, pinentry ? null +}: + +with stdenv.lib; +stdenv.mkDerivation rec { + name = "gnupg-2.1.0"; + + src = fetchurl { + url = "mirror://gnupg/gnupg/${name}.tar.bz2"; + sha256 = "12q5shx6ldqad3rky154nv8f2cy57sxy9idivz93ggqm1bsw7a0n"; + }; + + buildInputs = [ + pkgconfig libgcrypt libassuan libksba npth + readline libusb gnutls adns openldap zlib bzip2 + ]; + + configureFlags = + optional (pinentry != null) "--with-pinentry-pgm=${pinentry}/bin/pinentry"; + + meta = with stdenv.lib; { + homepage = http://gnupg.org; + description = "a complete and free implementation of the OpenPGP standard"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ wkennington ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/tools/security/gnupg/default.nix b/pkgs/tools/security/gnupg/default.nix deleted file mode 100644 index 45a25d7e2422..000000000000 --- a/pkgs/tools/security/gnupg/default.nix +++ /dev/null @@ -1,53 +0,0 @@ -{ fetchurl, stdenv, readline, zlib, libgpgerror, pth, libgcrypt, libassuan -, libksba, coreutils, libiconvOrEmpty -# Each of the dependencies below are optional. -# Gnupg can be built without them at the cost of reduced functionality. -, pinentry ? null, openldap ? null, bzip2 ? null, libusb ? null, curl ? null -}: - -stdenv.mkDerivation rec { - name = "gnupg-2.0.26"; - - src = fetchurl { - url = "mirror://gnupg/gnupg/${name}.tar.bz2"; - sha256 = "1q5qcl5panrvcvpwvz6nl9gayl5a6vwvfhgdcxqpmbl2qc6y6n3p"; - }; - - buildInputs - = [ readline zlib libgpgerror libgcrypt libassuan libksba pth - openldap bzip2 libusb curl ] - ++ libiconvOrEmpty; - - patchPhase = '' - find tests -type f | xargs sed -e 's@/bin/pwd@${coreutils}&@g' -i - ''; - - configureFlags = - if pinentry != null then "--with-pinentry-pgm=${pinentry}/bin/pinentry" - else ""; - - checkPhase="GNUPGHOME=`pwd` ./agent/gpg-agent --daemon make check"; - - doCheck = true; - - meta = { - homepage = "http://gnupg.org/"; - description = "free implementation of the OpenPGP standard for encrypting and signing data"; - license = stdenv.lib.licenses.gpl3Plus; - - longDescription = '' - GnuPG is the GNU project's complete and free implementation of - the OpenPGP standard as defined by RFC4880. GnuPG allows to - encrypt and sign your data and communication, features a - versatile key managment system as well as access modules for all - kind of public key directories. GnuPG, also known as GPG, is a - command line tool with features for easy integration with other - applications. A wealth of frontend applications and libraries - are available. Version 2 of GnuPG also provides support for - S/MIME. - ''; - - maintainers = with stdenv.lib.maintainers; [ roconnor urkud ]; - platforms = stdenv.lib.platforms.all; - }; -} -- cgit 1.4.1