2019-06-16 22:59:06 +03:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, makeWrapper, gnupg }:
|
2019-04-28 21:05:24 +03:00
|
|
|
buildGoModule rec {
|
2019-04-01 00:13:44 +03:00
|
|
|
pname = "browserpass";
|
2019-04-14 22:16:17 +03:00
|
|
|
version = "3.0.6";
|
2017-11-05 16:38:03 +03:00
|
|
|
|
2017-06-13 02:03:02 +03:00
|
|
|
src = fetchFromGitHub {
|
2019-04-01 00:13:44 +03:00
|
|
|
owner = "browserpass";
|
|
|
|
repo = "browserpass-native";
|
2017-06-13 02:03:02 +03:00
|
|
|
rev = version;
|
2019-04-14 22:16:17 +03:00
|
|
|
sha256 = "0q3bsla07zjl6i69nj1axbkg2ia89pvh0jg6nlqgbm2kpzzbn0pz";
|
2017-04-11 00:21:20 +03:00
|
|
|
};
|
|
|
|
|
2019-04-01 00:13:44 +03:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
2020-05-01 04:59:00 +03:00
|
|
|
vendorSha256 = "1wcbn0ip596f2dp68y6jmxgv20l0dgrcxg5cwclkawigj05416zj";
|
2019-04-01 00:13:44 +03:00
|
|
|
|
2020-08-04 03:26:27 +03:00
|
|
|
doCheck = false;
|
|
|
|
|
2018-04-16 17:49:01 +03:00
|
|
|
postPatch = ''
|
2019-04-01 00:13:44 +03:00
|
|
|
# Because this Makefile will be installed to be used by the user, patch
|
|
|
|
# variables to be valid by default
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace "PREFIX ?= /usr" ""
|
2019-04-14 22:16:17 +03:00
|
|
|
sed -i -e 's/SED :=.*/SED := sed/' Makefile
|
|
|
|
sed -i -e 's/INSTALL :=.*/INSTALL := install/' Makefile
|
2018-04-16 17:49:01 +03:00
|
|
|
'';
|
|
|
|
|
2019-04-28 21:05:24 +03:00
|
|
|
DESTDIR = placeholder "out";
|
2019-04-01 00:13:44 +03:00
|
|
|
|
|
|
|
postConfigure = ''
|
|
|
|
make configure
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
make
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
make install
|
|
|
|
|
2019-04-28 21:05:24 +03:00
|
|
|
wrapProgram $out/bin/browserpass \
|
2019-04-01 00:13:44 +03:00
|
|
|
--suffix PATH : ${lib.makeBinPath [ gnupg ]}
|
2017-04-11 00:21:20 +03:00
|
|
|
|
2019-04-01 00:13:44 +03:00
|
|
|
# This path is used by our firefox wrapper for finding native messaging hosts
|
2019-04-28 21:05:24 +03:00
|
|
|
mkdir -p $out/lib/mozilla/native-messaging-hosts
|
|
|
|
ln -s $out/lib/browserpass/hosts/firefox/*.json $out/lib/mozilla/native-messaging-hosts
|
2017-04-11 00:21:20 +03:00
|
|
|
'';
|
|
|
|
|
2019-04-01 00:13:44 +03:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Browserpass native client app";
|
2020-04-01 04:11:51 +03:00
|
|
|
homepage = "https://github.com/browserpass/browserpass-native";
|
2019-04-01 00:13:44 +03:00
|
|
|
license = licenses.isc;
|
|
|
|
maintainers = with maintainers; [ rvolosatovs infinisil ];
|
2017-04-11 00:21:20 +03:00
|
|
|
};
|
2020-07-31 06:58:04 +03:00
|
|
|
}
|