1{ lib, stdenv, fetchurl, gpgme }:
2
3stdenv.mkDerivation rec {
4 pname = "nasty";
5 version = "0.6";
6
7 src = fetchurl {
8 url = "https://www.vanheusden.com/nasty/${pname}-${version}.tgz";
9 sha256 = "1dznlxr728k1pgy1kwmlm7ivyl3j3rlvkmq34qpwbwbj8rnja1vn";
10 };
11
12 # does not apply cleanly with patchPhase/fetchpatch
13 # https://sources.debian.net/src/nasty/0.6-3/debian/patches/02_add_largefile_support.patch
14 CFLAGS = "-D_FILE_OFFSET_BITS=64";
15
16 buildInputs = [ gpgme ];
17
18 installPhase = ''
19 mkdir -p $out/bin
20 cp nasty $out/bin
21 '';
22
23 meta = with lib; {
24 description = "Recover the passphrase of your PGP or GPG-key";
25 longDescription = ''
26 Nasty is a program that helps you to recover the passphrase of your PGP or GPG-key
27 in case you forget or lost it. It is mostly a proof-of-concept: with a different implementation
28 this program could be at least 100x faster.
29 '';
30 homepage = "http://www.vanheusden.com/nasty/";
31 license = licenses.gpl2;
32 maintainers = with maintainers; [ davidak ];
33 platforms = platforms.unix;
34 };
35}
36