Add gnupg1 compatibility wrapper

Gnupg1compat is symlinked gnupg2 with two additional symlinks:
gpg->gpg2 and gpgv->gpgv2.

Move original gnupg 1.x to gnupg1orig.
Set default gnupg1 to gnupg1compat.

svn path=/nixpkgs/trunk/; revision=21888
This commit is contained in:
Yury G. Kudryashov 2010-05-19 20:59:20 +00:00
parent 6a0318fead
commit cc6ca8b2ae
2 changed files with 30 additions and 2 deletions

View file

@ -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
'';
}

View file

@ -650,8 +650,9 @@ let
};
duplicity = import ../tools/backup/duplicity {
inherit fetchurl stdenv librsync gnupg makeWrapper python;
inherit fetchurl stdenv librsync makeWrapper python;
inherit (pythonPackages) boto;
gnupg = gnupg1;
};
dvdplusrwtools = import ../tools/cd-dvd/dvd+rw-tools {
@ -811,11 +812,18 @@ let
inherit fetchurl stdenv ed;
});
gnupg1 = makeOverridable (import ../tools/security/gnupg1) {
gnupg1orig = makeOverridable (import ../tools/security/gnupg1) {
inherit fetchurl stdenv readline bzip2;
ideaSupport = false;
};
gnupg1compat = import ../tools/security/gnupg1compat {
inherit stdenv gnupg writeScript coreutils;
};
# use config.packageOverrides if you prefer original gnupg1
gnupg1 = gnupg1compat;
gnupg = makeOverridable (import ../tools/security/gnupg) {
inherit fetchurl stdenv readline libgpgerror libgcrypt libassuan pth libksba zlib
openldap bzip2 libusb curl coreutils;