1{ stdenv
2, fetchFromGitLab
3, libmd
4, coreutils
5, lib
6, testers
7, donkey
8}:
9
10stdenv.mkDerivation rec {
11 pname = "donkey";
12 version = "1.2.0";
13
14 src = fetchFromGitLab {
15 owner = "donkey";
16 repo = "donkey";
17 rev = "tags/release/${version}";
18 hash = "sha256-2xgb9l0Eko39HJVROAWEIP3qLg5t/5h/rm2MoXoKnJI=";
19 };
20 sourceRoot = "${src.name}/src";
21
22 buildInputs = [ libmd ];
23
24 preInstall = ''
25 # don't change the owner, use global permissions:
26 export INSTALL_PROGRAM="${coreutils}/bin/install -m 555"
27 export INSTALL_DATA="${coreutils}/bin/install -m 444"
28 '';
29
30 passthru.tests.version = testers.testVersion { package = donkey; };
31
32 meta = with lib; {
33 description = "an alternative for S/KEY's 'key' command.";
34 longDescription = ''
35Donkey is an alternative for S/KEY's "key" command. The new feature that
36the original key doesn't have is print an entry for skeykeys as
37follows;
38
39 kazu 0099 al02004 115d83956f1089b6 Apr 26,1995 22:13:27
40
41This means that donkey is also an alternative for "keyinit". Since the
42entry is printed to stdout (not to /etc/skeykeys), you can easily send
43it to a remote operator by e-mail (with a PGP signature or something).
44So, it is possible to initiate S/KEY without logging in from the console of
45the host.
46
47The name "Donkey" is an acronym of "Don't Key".
48 '';
49 homepage = "https://devel.ringlet.net/security/donkey";
50 license = licenses.gpl2;
51 maintainers = with maintainers; [ raboof ];
52 platforms = platforms.all;
53 };
54}