1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-23 14:11:36 +00:00
nixpkgs/pkgs/tools/security/gnupg/1compat.nix
Eelco Dolstra e410c78cd5
gnupg: Give the 1compat package a higher priority
This resolves collision warnings with the regular gnupg packages.
2017-04-04 16:40:06 +02:00

27 lines
747 B
Nix

{ stdenv, gnupg, coreutils, writeScript }:
stdenv.mkDerivation {
name = "gnupg1compat-${gnupg.version}";
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
'';
meta = gnupg.meta // {
description = gnupg.meta.description +
" with symbolic links for gpg and gpgv";
priority = -1;
};
}