nixpkgs/pkgs/applications/misc/pwsafe/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

106 lines
2.1 KiB
Nix
Raw Normal View History

2022-10-30 02:24:30 +00:00
{ lib
, stdenv
, fetchFromGitHub
, cmake
, pkg-config
, zip
, gettext
, perl
2022-12-03 02:28:32 +00:00
, wxGTK30
2022-10-30 02:24:30 +00:00
, libXext
, libXi
, libXt
, libXtst
, xercesc
, qrencode
, libuuid
, libyubikey
, yubikey-personalization
, curl
, openssl
, file
, gitUpdater
2015-01-22 22:46:40 +00:00
}:
stdenv.mkDerivation rec {
pname = "pwsafe";
2022-08-23 20:15:07 +00:00
version = "1.15.0"; # do NOT update to 3.x Windows releases
2015-01-22 22:46:40 +00:00
2016-07-23 04:37:10 +00:00
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = version;
2022-08-23 20:15:07 +00:00
hash = "sha256-EyyQHp2MlGgUnikClgvP7I313Bh6H3yVPXel8Z/U6gQ=";
2015-01-22 22:46:40 +00:00
};
2020-09-26 09:53:51 +00:00
nativeBuildInputs = [
2022-10-30 02:24:30 +00:00
cmake
gettext
perl
pkg-config
zip
];
2022-10-30 02:24:30 +00:00
buildInputs = [
2022-10-30 02:24:30 +00:00
libXext
libXi
libXt
libXtst
2022-12-03 02:28:32 +00:00
wxGTK30
2022-10-30 02:24:30 +00:00
curl
qrencode
libuuid
openssl
xercesc
libyubikey
yubikey-personalization
file
];
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
2015-01-22 22:46:40 +00:00
patchShebangs $f
done
# Fix hard coded paths.
for f in $(grep -Rl /usr/share/ src install/desktop) ; do
2015-01-22 22:46:40 +00:00
substituteInPlace $f --replace /usr/share/ $out/share/
done
2016-07-23 04:37:10 +00:00
# Fix hard coded zip path.
substituteInPlace help/Makefile.linux --replace /usr/bin/zip ${zip}/bin/zip
for f in $(grep -Rl /usr/bin/ .) ; do
2015-01-22 22:46:40 +00:00
substituteInPlace $f --replace /usr/bin/ ""
done
'';
installFlags = [ "PREFIX=${placeholder "out"}" ];
2015-01-22 22:46:40 +00:00
2022-08-23 20:15:07 +00:00
passthru.updateScript = gitUpdater {
ignoredVersions = "^([^1]|1[^.])"; # ignore anything other than 1.x
url = src.gitRepoUrl;
};
meta = with lib; {
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.
'';
homepage = "https://pwsafe.org/";
maintainers = with maintainers; [ c0bw3b pjones ];
2015-01-22 22:46:40 +00:00
platforms = platforms.linux;
license = licenses.artistic2;
};
}