2021-01-15 05:42:41 +00:00
|
|
|
{ fetchurl, lib, stdenv, ncurses, gnupg }:
|
2016-07-19 10:09:20 +01:00
|
|
|
|
|
|
|
let version = "0.7.4";
|
|
|
|
in stdenv.mkDerivation {
|
|
|
|
# mdp renamed to gpg-mdp because there is a mdp package already.
|
2019-08-13 22:52:01 +01:00
|
|
|
pname = "gpg-mdp";
|
|
|
|
inherit version;
|
2016-07-19 10:09:20 +01:00
|
|
|
meta = {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://tamentis.com/projects/mdp/";
|
2021-01-15 05:42:41 +00:00
|
|
|
license = [lib.licenses.isc];
|
2016-07-19 10:09:20 +01:00
|
|
|
description = "Manage your passwords with GnuPG and a text editor";
|
|
|
|
};
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://tamentis.com/projects/mdp/files/mdp-${version}.tar.gz";
|
|
|
|
sha256 = "04mdnx4ccpxf9m2myy9nvpl9ma4jgzmv9bkrzv2b9affzss3r34g";
|
|
|
|
};
|
|
|
|
buildInputs = [ ncurses ];
|
|
|
|
prePatch = ''
|
|
|
|
substituteInPlace ./configure \
|
|
|
|
--replace "alias echo=/bin/echo" ""
|
|
|
|
|
|
|
|
substituteInPlace ./src/config.c \
|
2017-08-10 10:43:48 +01:00
|
|
|
--replace "/usr/bin/gpg" "${gnupg}/bin/gpg" \
|
2016-07-19 10:09:20 +01:00
|
|
|
--replace "/usr/bin/vi" "vi"
|
|
|
|
|
|
|
|
substituteInPlace ./mdp.1 \
|
2017-08-10 10:43:48 +01:00
|
|
|
--replace "/usr/bin/gpg" "${gnupg}/bin/gpg"
|
2016-07-19 10:09:20 +01:00
|
|
|
'';
|
|
|
|
# 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.
|
|
|
|
postFixup = ''
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
}
|