2018-03-31 07:19:26 +02:00
|
|
|
# This file was generated by https://github.com/kamilchm/go2nix v1.2.1
|
2018-04-16 16:49:01 +02:00
|
|
|
{ stdenv, buildGoPackage, fetchFromGitHub, gnupg }:
|
2017-04-10 23:21:20 +02:00
|
|
|
|
|
|
|
buildGoPackage rec {
|
2017-04-11 17:32:33 +02:00
|
|
|
name = "browserpass-${version}";
|
2018-11-23 22:13:59 +01:00
|
|
|
version = "2.0.22";
|
2017-04-10 23:21:20 +02:00
|
|
|
|
|
|
|
goPackagePath = "github.com/dannyvankooten/browserpass";
|
|
|
|
|
2017-11-05 14:38:03 +01:00
|
|
|
goDeps = ./deps.nix;
|
|
|
|
|
2017-06-13 01:03:02 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
repo = "browserpass";
|
|
|
|
owner = "dannyvankooten";
|
|
|
|
rev = version;
|
2018-11-23 22:13:59 +01:00
|
|
|
sha256 = "05cacrx08k99c5zra7ksdik9xxn3vih3x6in7536zs5gm55mkbfx";
|
2017-04-10 23:21:20 +02:00
|
|
|
};
|
|
|
|
|
2018-04-16 16:49:01 +02:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace browserpass.go \
|
|
|
|
--replace /usr/local/bin/gpg ${gnupg}/bin/gpg
|
|
|
|
'';
|
|
|
|
|
2017-04-10 23:21:20 +02:00
|
|
|
postInstall = ''
|
|
|
|
host_file="$bin/bin/browserpass"
|
|
|
|
mkdir -p "$bin/etc"
|
|
|
|
|
|
|
|
sed -e "s!%%replace%%!$host_file!" go/src/${goPackagePath}/chrome/host.json > chrome-host.json
|
|
|
|
sed -e "s!%%replace%%!$host_file!" go/src/${goPackagePath}/firefox/host.json > firefox-host.json
|
|
|
|
|
2017-06-13 01:03:02 +02:00
|
|
|
install chrome-host.json $bin/etc/
|
2017-04-22 15:13:02 +02:00
|
|
|
install -D firefox-host.json $bin/lib/mozilla/native-messaging-hosts/com.dannyvankooten.browserpass.json
|
2017-06-13 01:03:02 +02:00
|
|
|
install go/src/${goPackagePath}/chrome/policy.json $bin/etc/chrome-policy.json
|
2017-04-10 23:21:20 +02:00
|
|
|
'';
|
|
|
|
|
2017-06-13 01:03:02 +02:00
|
|
|
meta = with stdenv.lib; {
|
2017-04-10 23:21:20 +02:00
|
|
|
description = "A Chrome & Firefox extension for zx2c4's pass";
|
2017-06-13 01:03:02 +02:00
|
|
|
homepage = https://github.com/dannyvankooten/browserpass;
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = with platforms; linux ++ darwin ++ openbsd;
|
2017-08-11 10:32:17 +02:00
|
|
|
maintainers = with maintainers; [ rvolosatovs ];
|
2017-04-10 23:21:20 +02:00
|
|
|
};
|
2017-04-22 15:13:02 +02:00
|
|
|
}
|