nixpkgs/pkgs/tools/security/browserpass/default.nix

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

56 lines
1.4 KiB
Nix
Raw Normal View History

{ lib, buildGoModule, fetchFromGitHub, makeWrapper, gnupg }:
buildGoModule rec {
pname = "browserpass";
2022-04-24 20:06:19 +00:00
version = "3.0.10";
2017-11-05 13:38:03 +00:00
2017-06-12 23:03:02 +00:00
src = fetchFromGitHub {
owner = "browserpass";
repo = "browserpass-native";
2017-06-12 23:03:02 +00:00
rev = version;
2022-04-24 20:06:19 +00:00
sha256 = "8eAwUwcRTnhVDkQc3HsvTP0TqC4LfVrUelxdbJxe9t0=";
};
nativeBuildInputs = [ makeWrapper ];
2022-04-24 20:06:19 +00:00
vendorSha256 = "gWXcYyIp86b/Pn6vj7qBj/VZS9rTr4weVw0YWmg+36c=";
doCheck = false;
postPatch = ''
# Because this Makefile will be installed to be used by the user, patch
# variables to be valid by default
substituteInPlace Makefile \
--replace "PREFIX ?= /usr" ""
2022-04-24 20:06:19 +00:00
sed -i -e 's/SED =.*/SED = sed/' Makefile
sed -i -e 's/INSTALL =.*/INSTALL = install/' Makefile
'';
DESTDIR = placeholder "out";
postConfigure = ''
make configure
'';
buildPhase = ''
make
'';
installPhase = ''
make install
wrapProgram $out/bin/browserpass \
--suffix PATH : ${lib.makeBinPath [ gnupg ]}
# This path is used by our firefox wrapper for finding native messaging hosts
mkdir -p $out/lib/mozilla/native-messaging-hosts
ln -s $out/lib/browserpass/hosts/firefox/*.json $out/lib/mozilla/native-messaging-hosts
'';
meta = with lib; {
description = "Browserpass native client app";
homepage = "https://github.com/browserpass/browserpass-native";
license = licenses.isc;
maintainers = with maintainers; [ rvolosatovs infinisil ];
};
}