2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, makeWrapper, perl, perlPackages }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "4.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "kpcli";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/kpcli/${pname}-${version}.pl";
|
2024-06-05 15:53:02 +00:00
|
|
|
sha256 = "sha256-3t8OhvRPj3oanFJKRaUVhGlF0B4E+UAlcfGMIpcet9s=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ perl ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
dontUnpack = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/{bin,share}
|
|
|
|
cp ${src} $out/share/kpcli.pl
|
|
|
|
chmod +x $out/share/kpcli.pl
|
|
|
|
|
|
|
|
makeWrapper $out/share/kpcli.pl $out/bin/kpcli --set PERL5LIB \
|
|
|
|
"${with perlPackages; makePerlPath ([
|
|
|
|
CaptureTiny Clipboard Clone CryptRijndael SortNaturally TermReadKey TermShellUI FileKeePass TermReadLineGnu XMLParser
|
2024-09-26 11:04:55 +00:00
|
|
|
] ++ lib.optional stdenv.hostPlatform.isDarwin MacPasteboard)}"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "KeePass Command Line Interface";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "kpcli";
|
2020-04-24 23:36:52 +00:00
|
|
|
longDescription = ''
|
2021-01-15 22:18:51 +00:00
|
|
|
KeePass Command Line Interface (CLI) / interactive shell.
|
2020-04-24 23:36:52 +00:00
|
|
|
Use this program to access and manage your KeePass 1.x or 2.x databases from a Unix-like command line.
|
|
|
|
'';
|
|
|
|
license = licenses.artistic1;
|
|
|
|
homepage = "http://kpcli.sourceforge.net";
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = [ maintainers.j-keck ];
|
|
|
|
};
|
|
|
|
}
|