2021-01-17 02:09:27 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, zip, gettext, perl
|
2020-10-04 23:27:11 +01:00
|
|
|
, wxGTK30, libXext, libXi, libXt, libXtst, xercesc
|
2019-01-01 16:19:07 +00:00
|
|
|
, qrencode, libuuid, libyubikey, yubikey-personalization
|
2020-03-05 13:21:50 +00:00
|
|
|
, curl, openssl, file
|
2015-01-22 22:46:40 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-10-12 18:04:09 +01:00
|
|
|
pname = "pwsafe";
|
2021-08-17 16:53:12 +01:00
|
|
|
version = "3.56.0";
|
2015-01-22 22:46:40 +00:00
|
|
|
|
2016-07-23 05:37:10 +01:00
|
|
|
src = fetchFromGitHub {
|
2019-05-21 13:14:09 +01:00
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
2020-11-01 22:39:49 +00:00
|
|
|
rev = version;
|
2021-08-17 16:53:12 +01:00
|
|
|
sha256 = "sha256-ZLX/3cs1cdia5+32QEwE6q3V0uFNkkmiIGboKW6Xej8=";
|
2015-01-22 22:46:40 +00:00
|
|
|
};
|
|
|
|
|
2020-09-26 10:53:51 +01:00
|
|
|
nativeBuildInputs = [
|
2021-01-17 02:09:27 +00:00
|
|
|
cmake gettext perl pkg-config zip
|
2019-04-25 20:23:44 +01:00
|
|
|
];
|
2018-10-12 18:04:09 +01:00
|
|
|
buildInputs = [
|
2020-10-04 23:27:11 +01:00
|
|
|
libXext libXi libXt libXtst wxGTK30
|
2019-04-25 20:23:44 +01:00
|
|
|
curl qrencode libuuid openssl xercesc
|
2018-10-12 18:04:09 +01:00
|
|
|
libyubikey yubikey-personalization
|
2020-03-05 13:21:50 +00:00
|
|
|
file
|
2018-10-12 18:04:09 +01:00
|
|
|
];
|
2019-04-25 20:23:44 +01:00
|
|
|
|
2018-10-12 18:04:09 +01:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DNO_GTEST=ON"
|
|
|
|
"-DCMAKE_CXX_FLAGS=-I${yubikey-personalization}/include/ykpers-1"
|
|
|
|
];
|
2015-01-22 22:46:40 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# Fix perl scripts used during the build.
|
|
|
|
for f in `find . -type f -name '*.pl'`; do
|
|
|
|
patchShebangs $f
|
|
|
|
done
|
|
|
|
|
|
|
|
# Fix hard coded paths.
|
|
|
|
for f in `grep -Rl /usr/share/ src`; do
|
|
|
|
substituteInPlace $f --replace /usr/share/ $out/share/
|
|
|
|
done
|
|
|
|
|
2016-07-23 05:37:10 +01:00
|
|
|
# Fix hard coded zip path.
|
|
|
|
substituteInPlace help/Makefile.linux --replace /usr/bin/zip ${zip}/bin/zip
|
|
|
|
|
2015-01-22 22:46:40 +00:00
|
|
|
for f in `grep -Rl /usr/bin/ .`; do
|
|
|
|
substituteInPlace $f --replace /usr/bin/ ""
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2019-05-21 13:14:09 +01:00
|
|
|
installFlags = [ "PREFIX=${placeholder "out"}" ];
|
2015-01-22 22:46:40 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2015-04-30 16:05:14 +01:00
|
|
|
description = "A password database utility";
|
2015-01-22 22:46:40 +00:00
|
|
|
longDescription = ''
|
|
|
|
Password Safe is a password database utility. Like many other
|
|
|
|
such products, commercial and otherwise, it stores your
|
|
|
|
passwords in an encrypted file, allowing you to remember only
|
|
|
|
one password (the "safe combination"), instead of all the
|
|
|
|
username/password combinations that you use.
|
|
|
|
'';
|
2019-05-21 13:14:09 +01:00
|
|
|
homepage = "https://pwsafe.org/";
|
2018-10-12 18:04:09 +01:00
|
|
|
maintainers = with maintainers; [ c0bw3b pjones ];
|
2015-01-22 22:46:40 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.artistic2;
|
|
|
|
};
|
|
|
|
}
|