1{ stdenv, fetchurl, makeWrapper, perl, perlPackages }:
2
3stdenv.mkDerivation rec {
4 version = "3.0";
5 name = "kpcli-${version}";
6
7 src = fetchurl {
8 url = "mirror://sourceforge/kpcli/${name}.pl";
9 sha256 = "1704b412f8h9cls85xcpqm9k4n5vga26r4xq9ghp4pr1hl27nywl";
10 };
11
12 buildInputs = [ makeWrapper perl ];
13
14 phases = [ "installPhase" "fixupPhase" ];
15
16 installPhase = ''
17 mkdir -p $out/bin
18 cp ${src} $out/bin/kpcli
19 chmod +x $out/bin/kpcli
20
21 wrapProgram $out/bin/kpcli --set PERL5LIB \
22 "${with perlPackages; stdenv.lib.makePerlPath [
23 CaptureTiny Clipboard Clone CryptRijndael SortNaturally TermReadKey TermShellUI FileKeePass TermReadLineGnu XMLParser
24 ]}"
25 '';
26
27
28 meta = with stdenv.lib; {
29 description = "KeePass Command Line Interface";
30 longDescription = ''
31 KeePass Command Line Interface (CLI) / interactive shell.
32 Use this program to access and manage your KeePass 1.x or 2.x databases from a Unix-like command line.
33 '';
34 license = licenses.artistic1;
35 homepage = "http://kpcli.sourceforge.net";
36 platforms = platforms.all;
37 maintainers = [ maintainers.j-keck ];
38 };
39}