2010-05-19 21:59:20 +01:00
|
|
|
{ stdenv, gnupg, coreutils, writeScript }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "gnupg1compat-0";
|
|
|
|
|
|
|
|
builder = writeScript "gnupg1compat-builder" ''
|
|
|
|
# First symlink all top-level dirs
|
|
|
|
${coreutils}/bin/mkdir -p $out
|
2016-03-11 09:54:18 +00:00
|
|
|
${coreutils}/bin/ln -s "${gnupg}/"* $out
|
2010-05-19 21:59:20 +01:00
|
|
|
|
|
|
|
# Replace bin with directory and symlink it contents
|
|
|
|
${coreutils}/bin/rm $out/bin
|
|
|
|
${coreutils}/bin/mkdir -p $out/bin
|
2016-03-11 09:54:18 +00:00
|
|
|
${coreutils}/bin/ln -s "${gnupg}/bin/"* $out/bin
|
2010-05-19 21:59:20 +01:00
|
|
|
|
|
|
|
# Add gpg->gpg2 and gpgv->gpgv2 symlinks
|
|
|
|
${coreutils}/bin/ln -s gpg2 $out/bin/gpg
|
|
|
|
${coreutils}/bin/ln -s gpgv2 $out/bin/gpgv
|
|
|
|
'';
|
2016-08-02 17:06:29 +01:00
|
|
|
|
|
|
|
meta = {
|
2016-08-20 16:31:08 +01:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2016-08-02 17:06:29 +01:00
|
|
|
};
|
2010-05-19 21:59:20 +01:00
|
|
|
}
|