3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #26541 from dermetfan/browserpass

browserpass: 2017-04-11 -> 1.0.5
This commit is contained in:
Joachim F 2017-06-30 20:58:37 +01:00 committed by GitHub
commit 74b3a8f5ae
2 changed files with 20 additions and 23 deletions

View file

@ -6,21 +6,17 @@ with lib;
###### interface ###### interface
options = { options = {
programs.browserpass = { programs.browserpass.enable = mkEnableOption "the NativeMessaging configuration for Chromium, Chrome, and Vivaldi.";
enable = mkOption {
default = false;
type = types.bool;
description = ''
Whether to install the NativeMessaging configuration for installed browsers.
'';
};
};
}; };
###### implementation ###### implementation
config = mkIf config.programs.browserpass.enable { config = mkIf config.programs.browserpass.enable {
environment.systemPackages = [ pkgs.browserpass ]; environment.systemPackages = [ pkgs.browserpass ];
environment.etc."chromium/native-messaging-hosts/com.dannyvankooten.browserpass.json".source = "${pkgs.browserpass}/etc/chrome-host.json"; environment.etc = {
environment.etc."opt/chrome/native-messaging-hosts/com.dannyvankooten.browserpass.json".source = "${pkgs.browserpass}/etc/chrome-host.json"; "chromium/native-messaging-hosts/com.dannyvankooten.browserpass.json".source = "${pkgs.browserpass}/etc/chrome-host.json";
"chromium/policies/managed/com.dannyvankooten.browserpass.json".source = "${pkgs.browserpass}/etc/chrome-policy.json";
"opt/chrome/native-messaging-hosts/com.dannyvankooten.browserpass.json".source = "${pkgs.browserpass}/etc/chrome-host.json";
"opt/chrome/policies/managed/com.dannyvankooten.browserpass.json".source = "${pkgs.browserpass}/etc/chrome-policy.json";
};
}; };
} }

View file

@ -1,17 +1,17 @@
# This file was generated by https://github.com/kamilchm/go2nix v1.2.0 # This file was generated by https://github.com/kamilchm/go2nix v1.2.0
{ stdenv, buildGoPackage, fetchgit, fetchhg, fetchbzr, fetchsvn }: { stdenv, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec { buildGoPackage rec {
name = "browserpass-${version}"; name = "browserpass-${version}";
version = "2017-04-11"; version = "1.0.5";
rev = "e0fe250ed8fd061125746f5d99a1f9a678d21004";
goPackagePath = "github.com/dannyvankooten/browserpass"; goPackagePath = "github.com/dannyvankooten/browserpass";
src = fetchgit { src = fetchFromGitHub {
inherit rev; repo = "browserpass";
url = "https://github.com/dannyvankooten/browserpass"; owner = "dannyvankooten";
sha256 = "0khwlh5agdd2mm2yzklg8r2h084n8j7jbjjxsiaj67zm8zz6b39c"; rev = version;
sha256 = "1r9x1asgblay7pry2jpgfisfgb3423x3cqd3g68q8b98zvc9l9lz";
}; };
postInstall = '' postInstall = ''
@ -21,14 +21,15 @@ buildGoPackage rec {
sed -e "s!%%replace%%!$host_file!" go/src/${goPackagePath}/chrome/host.json > chrome-host.json 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 sed -e "s!%%replace%%!$host_file!" go/src/${goPackagePath}/firefox/host.json > firefox-host.json
install -D chrome-host.json $bin/etc/chrome-host.json install chrome-host.json $bin/etc/
install -D firefox-host.json $bin/lib/mozilla/native-messaging-hosts/com.dannyvankooten.browserpass.json install -D firefox-host.json $bin/lib/mozilla/native-messaging-hosts/com.dannyvankooten.browserpass.json
install go/src/${goPackagePath}/chrome/policy.json $bin/etc/chrome-policy.json
''; '';
meta = { meta = with stdenv.lib; {
description = "A Chrome & Firefox extension for zx2c4's pass"; description = "A Chrome & Firefox extension for zx2c4's pass";
homepage = "https://github.com/dannyvankooten/browserpass"; homepage = https://github.com/dannyvankooten/browserpass;
license = stdenv.lib.licenses.mit; license = licenses.mit;
platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin; platforms = with platforms; linux ++ darwin ++ openbsd;
}; };
} }