mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-11 04:05:40 +03:00
gpg-mdp: 0.7.4 -> 0.7.5
This commit is contained in:
parent
0784176a58
commit
21bf349b55
1 changed files with 24 additions and 24 deletions
|
@ -1,53 +1,53 @@
|
||||||
{
|
{
|
||||||
fetchurl,
|
|
||||||
fetchpatch,
|
|
||||||
lib,
|
lib,
|
||||||
|
fetchFromGitHub,
|
||||||
stdenv,
|
stdenv,
|
||||||
|
nix-update-script,
|
||||||
|
|
||||||
ncurses,
|
ncurses,
|
||||||
gnupg,
|
gnupg,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
version = "0.7.4";
|
|
||||||
in
|
|
||||||
stdenv.mkDerivation {
|
|
||||||
# mdp renamed to gpg-mdp because there is a mdp package already.
|
# mdp renamed to gpg-mdp because there is a mdp package already.
|
||||||
pname = "gpg-mdp";
|
pname = "gpg-mdp";
|
||||||
inherit version;
|
version = "0.7.5";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = "https://tamentis.com/projects/mdp/";
|
homepage = "https://tamentis.com/projects/mdp/";
|
||||||
|
changelog = "https://github.com/tamentis/mdp/releases/tag/v${finalAttrs.version}";
|
||||||
license = [ lib.licenses.isc ];
|
license = [ lib.licenses.isc ];
|
||||||
description = "Manage your passwords with GnuPG and a text editor";
|
description = "Manage your passwords with GnuPG and a text editor";
|
||||||
};
|
};
|
||||||
src = fetchurl {
|
|
||||||
url = "https://tamentis.com/projects/mdp/files/mdp-${version}.tar.gz";
|
src = fetchFromGitHub {
|
||||||
sha256 = "04mdnx4ccpxf9m2myy9nvpl9ma4jgzmv9bkrzv2b9affzss3r34g";
|
owner = "tamentis";
|
||||||
|
repo = "mdp";
|
||||||
|
tag = "v${finalAttrs.version}";
|
||||||
|
hash = "sha256-Y92y70XkUbB+lhWAzEkCB/cvfUPPKIfu0yrlCS2pKn0=";
|
||||||
};
|
};
|
||||||
patches = [
|
|
||||||
# Pull fix pending upstream inclusion for -fno-common toolchain support:
|
|
||||||
# https://github.com/tamentis/mdp/pull/9
|
|
||||||
(fetchpatch {
|
|
||||||
name = "fno-common.patch";
|
|
||||||
url = "https://github.com/tamentis/mdp/commit/95c77de3beb96dc7c76ff36d3f3dfb18411d7c54.patch";
|
|
||||||
sha256 = "1j6yvjzkx31b758yav4arhlm5ig7phl8mgx4fcwj7lm2pfvzwcsz";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
buildInputs = [ ncurses ];
|
buildInputs = [ ncurses ];
|
||||||
|
|
||||||
prePatch = ''
|
prePatch = ''
|
||||||
substituteInPlace ./configure \
|
substituteInPlace ./configure \
|
||||||
--replace "alias echo=/bin/echo" ""
|
--replace-fail "alias echo=/bin/echo" "" \
|
||||||
|
--replace-fail "main()" "int main()"
|
||||||
|
|
||||||
substituteInPlace ./src/config.c \
|
substituteInPlace ./src/config.c \
|
||||||
--replace "/usr/bin/gpg" "${gnupg}/bin/gpg" \
|
--replace-fail "/usr/bin/gpg" "${lib.getExe gnupg}" \
|
||||||
--replace "/usr/bin/vi" "vi"
|
--replace-fail "/usr/bin/vi" "vi"
|
||||||
|
|
||||||
substituteInPlace ./mdp.1 \
|
substituteInPlace ./mdp.1 \
|
||||||
--replace "/usr/bin/gpg" "${gnupg}/bin/gpg"
|
--replace-fail "/usr/bin/gpg" "${lib.getExe gnupg}"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# we add symlinks to the binary and man page with the name 'gpg-mdp', in case
|
# we add symlinks to the binary and man page with the name 'gpg-mdp', in case
|
||||||
# the completely unrelated program also named 'mdp' is already installed.
|
# the completely unrelated program also named 'mdp' is already installed.
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
ln -s $out/bin/mdp $out/bin/gpg-mdp
|
ln -s $out/bin/mdp $out/bin/gpg-mdp
|
||||||
ln -s $out/share/man/man1/mdp.1.gz $out/share/man/man1/gpg-mdp.1.gz
|
ln -s $out/share/man/man1/mdp.1.gz $out/share/man/man1/gpg-mdp.1.gz
|
||||||
'';
|
'';
|
||||||
}
|
|
||||||
|
passthru.updateScript = nix-update-script { };
|
||||||
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue