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

39 lines
1.3 KiB
Nix
Raw Normal View History

2018-03-31 08:19:26 +03:00
# This file was generated by https://github.com/kamilchm/go2nix v1.2.1
2017-06-13 02:03:02 +03:00
{ stdenv, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
2017-04-11 18:32:33 +03:00
name = "browserpass-${version}";
2018-03-31 08:19:26 +03:00
version = "2.0.18";
goPackagePath = "github.com/dannyvankooten/browserpass";
2017-11-05 16:38:03 +03:00
goDeps = ./deps.nix;
2017-06-13 02:03:02 +03:00
src = fetchFromGitHub {
repo = "browserpass";
owner = "dannyvankooten";
rev = version;
2018-03-31 08:19:26 +03:00
sha256 = "0wszjpxfa0krr2zdx7a33vl1r86k74dpy5c940r6ww1zbgqzcibg";
};
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 02:03:02 +03:00
install chrome-host.json $bin/etc/
2017-04-22 16:13:02 +03:00
install -D firefox-host.json $bin/lib/mozilla/native-messaging-hosts/com.dannyvankooten.browserpass.json
2017-06-13 02:03:02 +03:00
install go/src/${goPackagePath}/chrome/policy.json $bin/etc/chrome-policy.json
'';
2017-06-13 02:03:02 +03:00
meta = with stdenv.lib; {
description = "A Chrome & Firefox extension for zx2c4's pass";
2017-06-13 02:03:02 +03:00
homepage = https://github.com/dannyvankooten/browserpass;
license = licenses.mit;
platforms = with platforms; linux ++ darwin ++ openbsd;
2017-08-11 11:32:17 +03:00
maintainers = with maintainers; [ rvolosatovs ];
};
2017-04-22 16:13:02 +03:00
}