forked from mirrors/nixpkgs
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
69 lines
1.9 KiB
Nix
69 lines
1.9 KiB
Nix
{ lib, stdenv, fetchFromGitHub, cmake, pkgconfig, zip, gettext, perl
|
|
, wxGTK30, libXext, libXi, libXt, libXtst, xercesc
|
|
, qrencode, libuuid, libyubikey, yubikey-personalization
|
|
, curl, openssl, file
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "pwsafe";
|
|
version = "3.53.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = pname;
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "0nh5jnf5yls2qv5hpfhm6i854zsknyh7d93c987a0cg14sg820fv";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
cmake gettext perl pkgconfig zip
|
|
];
|
|
buildInputs = [
|
|
libXext libXi libXt libXtst wxGTK30
|
|
curl qrencode libuuid openssl xercesc
|
|
libyubikey yubikey-personalization
|
|
file
|
|
];
|
|
|
|
cmakeFlags = [
|
|
"-DNO_GTEST=ON"
|
|
"-DCMAKE_CXX_FLAGS=-I${yubikey-personalization}/include/ykpers-1"
|
|
];
|
|
|
|
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
|
|
|
|
# Fix hard coded zip path.
|
|
substituteInPlace help/Makefile.linux --replace /usr/bin/zip ${zip}/bin/zip
|
|
|
|
for f in `grep -Rl /usr/bin/ .`; do
|
|
substituteInPlace $f --replace /usr/bin/ ""
|
|
done
|
|
'';
|
|
|
|
installFlags = [ "PREFIX=${placeholder "out"}" ];
|
|
|
|
meta = with lib; {
|
|
description = "A password database utility";
|
|
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 ];
|
|
platforms = platforms.linux;
|
|
license = licenses.artistic2;
|
|
};
|
|
}
|