1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00
nixpkgs/pkgs/tools/security/browserpass/default.nix

36 lines
1.2 KiB
Nix
Raw Normal View History

# This file was generated by https://github.com/kamilchm/go2nix v1.2.0
2017-06-13 00:03:02 +01:00
{ stdenv, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
2017-04-11 16:32:33 +01:00
name = "browserpass-${version}";
2017-06-13 00:03:02 +01:00
version = "1.0.5";
goPackagePath = "github.com/dannyvankooten/browserpass";
2017-06-13 00:03:02 +01:00
src = fetchFromGitHub {
repo = "browserpass";
owner = "dannyvankooten";
rev = version;
sha256 = "1r9x1asgblay7pry2jpgfisfgb3423x3cqd3g68q8b98zvc9l9lz";
};
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 00:03:02 +01:00
install chrome-host.json $bin/etc/
2017-04-22 14:13:02 +01:00
install -D firefox-host.json $bin/lib/mozilla/native-messaging-hosts/com.dannyvankooten.browserpass.json
2017-06-13 00:03:02 +01:00
install go/src/${goPackagePath}/chrome/policy.json $bin/etc/chrome-policy.json
'';
2017-06-13 00:03:02 +01:00
meta = with stdenv.lib; {
description = "A Chrome & Firefox extension for zx2c4's pass";
2017-06-13 00:03:02 +01:00
homepage = https://github.com/dannyvankooten/browserpass;
license = licenses.mit;
platforms = with platforms; linux ++ darwin ++ openbsd;
};
2017-04-22 14:13:02 +01:00
}