nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchurl,
5 makeWrapper,
6 perl,
7 perlPackages,
8}:
9
10stdenv.mkDerivation rec {
11 version = "4.1.3";
12 pname = "kpcli";
13
14 src = fetchurl {
15 url = "mirror://sourceforge/kpcli/${pname}-${version}.pl";
16 hash = "sha256-yRNj5OB/NSGoZ/aNtgLJW1PcFn5DZu5/8lQlK0F2xi8=";
17 };
18
19 nativeBuildInputs = [ makeWrapper ];
20 buildInputs = [ perl ];
21
22 dontUnpack = true;
23
24 installPhase = ''
25 mkdir -p $out/{bin,share}
26 cp ${src} $out/share/kpcli.pl
27 chmod +x $out/share/kpcli.pl
28
29 makeWrapper $out/share/kpcli.pl $out/bin/kpcli --set PERL5LIB \
30 "${
31 with perlPackages;
32 makePerlPath (
33 [
34 BHooksEndOfScope
35 CaptureTiny
36 Clipboard
37 Clone
38 CryptRijndael
39 CryptX
40 DevelGlobalDestruction
41 ModuleImplementation
42 ModuleRuntime
43 SortNaturally
44 SubExporterProgressive
45 TermReadKey
46 TermShellUI
47 TryTiny
48 FileKDBX
49 FileKeePass
50 PackageStash
51 RefUtil
52 TermReadLineGnu
53 XMLParser
54 boolean
55 namespaceclean
56 ]
57 ++ lib.optional stdenv.hostPlatform.isDarwin MacPasteboard
58 )
59 }"
60 '';
61
62 meta = {
63 description = "KeePass Command Line Interface";
64 mainProgram = "kpcli";
65 longDescription = ''
66 KeePass Command Line Interface (CLI) / interactive shell.
67 Use this program to access and manage your KeePass 1.x or 2.x databases from a Unix-like command line.
68 '';
69 license = lib.licenses.artistic1;
70 homepage = "http://kpcli.sourceforge.net";
71 platforms = lib.platforms.all;
72 maintainers = [ lib.maintainers.j-keck ];
73 };
74}