From 4540eaf578dab5415e1cdbb99739534ee1fcf4ac Mon Sep 17 00:00:00 2001 From: Robin Stumm Date: Tue, 13 Jun 2017 01:03:02 +0200 Subject: [PATCH] browserpass: 2017-04-11 -> 1.0.5 --- nixos/modules/programs/browserpass.nix | 18 ++++++--------- pkgs/tools/security/browserpass/default.nix | 25 +++++++++++---------- 2 files changed, 20 insertions(+), 23 deletions(-) diff --git a/nixos/modules/programs/browserpass.nix b/nixos/modules/programs/browserpass.nix index 2b7ec1856431..a073c7e66eb8 100644 --- a/nixos/modules/programs/browserpass.nix +++ b/nixos/modules/programs/browserpass.nix @@ -6,21 +6,17 @@ with lib; ###### interface options = { - programs.browserpass = { - enable = mkOption { - default = false; - type = types.bool; - description = '' - Whether to install the NativeMessaging configuration for installed browsers. - ''; - }; - }; + programs.browserpass.enable = mkEnableOption "the NativeMessaging configuration for Chromium, Chrome, and Vivaldi."; }; ###### implementation config = mkIf config.programs.browserpass.enable { environment.systemPackages = [ pkgs.browserpass ]; - environment.etc."chromium/native-messaging-hosts/com.dannyvankooten.browserpass.json".source = "${pkgs.browserpass}/etc/chrome-host.json"; - environment.etc."opt/chrome/native-messaging-hosts/com.dannyvankooten.browserpass.json".source = "${pkgs.browserpass}/etc/chrome-host.json"; + environment.etc = { + "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"; + }; }; } diff --git a/pkgs/tools/security/browserpass/default.nix b/pkgs/tools/security/browserpass/default.nix index edc46fee5828..9f8a00c5956d 100644 --- a/pkgs/tools/security/browserpass/default.nix +++ b/pkgs/tools/security/browserpass/default.nix @@ -1,17 +1,17 @@ # This file was generated by https://github.com/kamilchm/go2nix v1.2.0 -{ stdenv, buildGoPackage, fetchgit, fetchhg, fetchbzr, fetchsvn }: +{ stdenv, buildGoPackage, fetchFromGitHub }: buildGoPackage rec { name = "browserpass-${version}"; - version = "2017-04-11"; - rev = "e0fe250ed8fd061125746f5d99a1f9a678d21004"; + version = "1.0.5"; goPackagePath = "github.com/dannyvankooten/browserpass"; - src = fetchgit { - inherit rev; - url = "https://github.com/dannyvankooten/browserpass"; - sha256 = "0khwlh5agdd2mm2yzklg8r2h084n8j7jbjjxsiaj67zm8zz6b39c"; + src = fetchFromGitHub { + repo = "browserpass"; + owner = "dannyvankooten"; + rev = version; + sha256 = "1r9x1asgblay7pry2jpgfisfgb3423x3cqd3g68q8b98zvc9l9lz"; }; 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}/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 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"; - homepage = "https://github.com/dannyvankooten/browserpass"; - license = stdenv.lib.licenses.mit; - platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin; + homepage = https://github.com/dannyvankooten/browserpass; + license = licenses.mit; + platforms = with platforms; linux ++ darwin ++ openbsd; }; }