gnupg: 2.4.5 -> 2.4.7 (#352434)

Stig ed1ae485 f7ae1e30

Changed files
+100 -52
pkgs
tools
security
gnupg
+100 -52
pkgs/tools/security/gnupg/24.nix
···
-
{ lib, stdenv, fetchurl, buildPackages
-
, pkg-config, texinfo
-
, gettext, libassuan, libgcrypt, libgpg-error, libiconv, libksba, npth
-
, adns, bzip2, gnutls, libusb1, openldap, readline, sqlite, zlib
-
, enableMinimal ? false
-
, withPcsc ? !enableMinimal, pcsclite
-
, guiSupport ? stdenv.hostPlatform.isDarwin, pinentry
-
, withTpm2Tss ? !stdenv.hostPlatform.isDarwin && !enableMinimal, tpm2-tss
-
, nixosTests
+
{
+
lib,
+
stdenv,
+
fetchurl,
+
buildPackages,
+
pkg-config,
+
texinfo,
+
gettext,
+
libassuan,
+
libgcrypt,
+
libgpg-error,
+
libiconv,
+
libksba,
+
npth,
+
adns,
+
bzip2,
+
gnutls,
+
libusb1,
+
openldap,
+
readline,
+
sqlite,
+
zlib,
+
enableMinimal ? false,
+
withPcsc ? !enableMinimal,
+
pcsclite,
+
guiSupport ? stdenv.hostPlatform.isDarwin,
+
pinentry,
+
withTpm2Tss ? !stdenv.hostPlatform.isDarwin && !enableMinimal,
+
tpm2-tss,
+
nixosTests,
}:
assert guiSupport -> !enableMinimal;
stdenv.mkDerivation rec {
pname = "gnupg";
-
version = "2.4.5";
+
version = "2.4.7";
src = fetchurl {
url = "mirror://gnupg/gnupg/${pname}-${version}.tar.bz2";
-
hash = "sha256-9o99ddBssWNcM2002ESvl0NsP2TqFLy3yGl4L5b0Qnc=";
+
hash = "sha256-eyRwbk2n4OOwbKBoIxAnQB8jgQLEHJCWMTSdzDuF60Y=";
};
depsBuildBuild = [ buildPackages.stdenv.cc ];
-
nativeBuildInputs = [ pkg-config texinfo ];
-
buildInputs = [
-
gettext libassuan libgcrypt libgpg-error libiconv libksba npth
-
] ++ lib.optionals (!enableMinimal) [
-
adns bzip2 gnutls libusb1 openldap readline sqlite zlib
-
] ++ lib.optionals withTpm2Tss [ tpm2-tss ];
+
nativeBuildInputs = [
+
pkg-config
+
texinfo
+
];
+
buildInputs =
+
[
+
gettext
+
libassuan
+
libgcrypt
+
libgpg-error
+
libiconv
+
libksba
+
npth
+
]
+
++ lib.optionals (!enableMinimal) [
+
adns
+
bzip2
+
gnutls
+
libusb1
+
openldap
+
readline
+
sqlite
+
zlib
+
]
+
++ lib.optionals withTpm2Tss [ tpm2-tss ];
patches = [
./fix-libusb-include-path.patch
···
./v3-0001-Disallow-compressed-signatures-and-certificates.patch
];
-
postPatch = ''
-
sed -i 's,\(hkps\|https\)://keyserver.ubuntu.com,hkps://keys.openpgp.org,g' configure configure.ac doc/dirmngr.texi doc/gnupg.info-1
-
'' + lib.optionalString (stdenv.hostPlatform.isLinux && withPcsc) ''
+
postPatch =
+
''
+
sed -i 's,\(hkps\|https\)://keyserver.ubuntu.com,hkps://keys.openpgp.org,g' configure configure.ac doc/dirmngr.texi doc/gnupg.info-1
+
''
+
+ lib.optionalString (stdenv.hostPlatform.isLinux && withPcsc) ''
sed -i 's,"libpcsclite\.so[^"]*","${lib.getLib pcsclite}/lib/libpcsclite.so",g' scd/scdaemon.c
'';
-
configureFlags = [
-
"--sysconfdir=/etc"
-
"--with-libgpg-error-prefix=${libgpg-error.dev}"
-
"--with-libgcrypt-prefix=${libgcrypt.dev}"
-
"--with-libassuan-prefix=${libassuan.dev}"
-
"--with-ksba-prefix=${libksba.dev}"
-
"GPGRT_CONFIG=${lib.getDev libgpg-error}/bin/gpgrt-config"
-
]
-
++ lib.optional guiSupport "--with-pinentry-pgm=${pinentry}/${pinentry.binaryPath or "bin/pinentry"}"
-
++ lib.optional withTpm2Tss "--with-tss=intel"
-
++ lib.optional stdenv.hostPlatform.isDarwin "--disable-ccid-driver";
+
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-Wno-implicit-function-declaration";
-
postInstall = if enableMinimal
-
then ''
-
rm -r $out/{libexec,sbin,share}
-
for f in $(find $out/bin -type f -not -name gpg)
-
do
-
rm $f
-
done
-
'' else ''
-
# add gpg2 symlink to make sure git does not break when signing commits
-
ln -s $out/bin/gpg $out/bin/gpg2
+
configureFlags =
+
[
+
"--sysconfdir=/etc"
+
"--with-libgpg-error-prefix=${libgpg-error.dev}"
+
"--with-libgcrypt-prefix=${libgcrypt.dev}"
+
"--with-libassuan-prefix=${libassuan.dev}"
+
"--with-ksba-prefix=${libksba.dev}"
+
"GPGRT_CONFIG=${lib.getDev libgpg-error}/bin/gpgrt-config"
+
]
+
++ lib.optional guiSupport "--with-pinentry-pgm=${pinentry}/${
+
pinentry.binaryPath or "bin/pinentry"
+
}"
+
++ lib.optional withTpm2Tss "--with-tss=intel"
+
++ lib.optional stdenv.hostPlatform.isDarwin "--disable-ccid-driver";
-
# Make libexec tools available in PATH
-
for f in $out/libexec/; do
-
if [[ "$(basename $f)" == "gpg-wks-client" ]]; then continue; fi
-
ln -s $f $out/bin/$(basename $f)
-
done
+
postInstall =
+
if enableMinimal then
+
''
+
rm -r $out/{libexec,sbin,share}
+
for f in $(find $out/bin -type f -not -name gpg)
+
do
+
rm $f
+
done
+
''
+
else
+
''
+
# add gpg2 symlink to make sure git does not break when signing commits
+
ln -s $out/bin/gpg $out/bin/gpg2
-
for f in $out/libexec/; do
-
if [[ "$(basename $f)" == "gpg-wks-client" ]]; then continue; fi
-
ln -s $f $out/bin/$(basename $f)
-
done
-
'';
+
# Make libexec tools available in PATH
+
for f in $out/libexec/; do
+
if [[ "$(basename $f)" == "gpg-wks-client" ]]; then continue; fi
+
ln -s $f $out/bin/$(basename $f)
+
done
+
'';
enableParallelBuilding = true;
···
frontend applications and libraries are available. Version 2 of GnuPG
also provides support for S/MIME.
'';
-
maintainers = with maintainers; [ fpletz sgo ];
+
maintainers = with maintainers; [
+
fpletz
+
sgo
+
];
platforms = platforms.all;
mainProgram = "gpg";
};