about summary refs log tree commit diff
path: root/pkgs/applications/misc/gpg-mdp
diff options
context:
space:
mode:
authorRenzo Carbonara <k0001@users.noreply.github.com>2016-07-19 06:09:20 -0300
committerFranz Pletz <fpletz@fnordicwalking.de>2016-07-19 11:09:20 +0200
commitae3896061b7d86223652250c46991df57d0698e5 (patch)
treec19968c7922a6e99088952e894c57ae5507136a2 /pkgs/applications/misc/gpg-mdp
parent4463f9f3d461615601b0280740f550e96026d129 (diff)
downloadnixlib-ae3896061b7d86223652250c46991df57d0698e5.tar
nixlib-ae3896061b7d86223652250c46991df57d0698e5.tar.gz
nixlib-ae3896061b7d86223652250c46991df57d0698e5.tar.bz2
nixlib-ae3896061b7d86223652250c46991df57d0698e5.tar.lz
nixlib-ae3896061b7d86223652250c46991df57d0698e5.tar.xz
nixlib-ae3896061b7d86223652250c46991df57d0698e5.tar.zst
nixlib-ae3896061b7d86223652250c46991df57d0698e5.zip
gpg-mpd: init at 0.7.4 (#16527)
Diffstat (limited to 'pkgs/applications/misc/gpg-mdp')
-rw-r--r--pkgs/applications/misc/gpg-mdp/default.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/pkgs/applications/misc/gpg-mdp/default.nix b/pkgs/applications/misc/gpg-mdp/default.nix
new file mode 100644
index 000000000000..fe58fa92d07b
--- /dev/null
+++ b/pkgs/applications/misc/gpg-mdp/default.nix
@@ -0,0 +1,34 @@
+{ fetchurl, stdenv, ncurses, gnupg }:
+
+let version = "0.7.4";
+in stdenv.mkDerivation {
+  # mdp renamed to gpg-mdp because there is a mdp package already.
+  name = "gpg-mdp-${version}";
+  meta = {
+    homepage = https://tamentis.com/projects/mdp/;
+    license = [stdenv.lib.licenses.isc];
+    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 \
+      --replace "/usr/bin/gpg" "${gnupg}/bin/gpg2" \
+      --replace "/usr/bin/vi" "vi"
+
+    substituteInPlace ./mdp.1 \
+      --replace "/usr/bin/gpg" "${gnupg}/bin/gpg2"
+  '';
+  # 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
+  '';
+}