Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 162546f0a175
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: da4f6a2a09e3
Choose a head ref
  • 1 commit
  • 5 files changed
  • 1 contributor

Commits on Apr 28, 2019

  1. Copy the full SHA
    da4f6a2 View commit details
10 changes: 0 additions & 10 deletions nixos/modules/programs/browserpass.nix
Original file line number Diff line number Diff line change
@@ -26,16 +26,6 @@ with lib;
# brave
"opt/brave/native-messaging-hosts/${appId}".source = source "hosts/chromium";
"opt/brave/policies/managed/${appId}".source = source "policies/chromium";
}
# As with the v2 backwards compatibility in the pkgs.browserpass
# declaration, this part can be removed once the browser extension
# auto-updates to v3 (planned 2019-04-13, see
# https://github.com/browserpass/browserpass-native/issues/31)
// {
"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";
};
nixpkgs.config.firefox.enableBrowserpass = true;
};
43 changes: 0 additions & 43 deletions pkgs/tools/security/browserpass/2.nix

This file was deleted.

39 changes: 0 additions & 39 deletions pkgs/tools/security/browserpass/2deps.nix

This file was deleted.

27 changes: 7 additions & 20 deletions pkgs/tools/security/browserpass/default.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
{ lib, callPackage, buildGoPackage, fetchFromGitHub, makeWrapper, gnupg }:
let
# For backwards compatibility with v2 of the browser extension, we embed v2
# of the native host in v3. Because the extension will auto-update when it
# is released, this code can be removed from that point on.
# Don't forget to remove v2 references down below and the v2 files in this
# folder
v2 = callPackage ./2.nix {};
in buildGoPackage rec {
{ lib, callPackage, buildGoModule, fetchFromGitHub, makeWrapper, gnupg }:
buildGoModule rec {
pname = "browserpass";
version = "3.0.6";

@@ -19,8 +12,7 @@ in buildGoPackage rec {

nativeBuildInputs = [ makeWrapper ];

goPackagePath = "github.com/browserpass/browserpass-native";
goDeps = ./deps.nix;
modSha256 = "13yw7idgw8l48yvm4jjha0kbx6q22m2zp13y006mikavynqsr5kj";

postPatch = ''
# Because this Makefile will be installed to be used by the user, patch
@@ -31,10 +23,9 @@ in buildGoPackage rec {
sed -i -e 's/INSTALL :=.*/INSTALL := install/' Makefile
'';

DESTDIR = placeholder "bin";
DESTDIR = placeholder "out";

postConfigure = ''
cd "go/src/$goPackagePath"
make configure
'';

@@ -45,16 +36,12 @@ in buildGoPackage rec {
installPhase = ''
make install
wrapProgram $bin/bin/browserpass \
wrapProgram $out/bin/browserpass \
--suffix PATH : ${lib.makeBinPath [ gnupg ]}
# This path is used by our firefox wrapper for finding native messaging hosts
mkdir -p $bin/lib/mozilla/native-messaging-hosts
ln -s $bin/lib/browserpass/hosts/firefox/*.json $bin/lib/mozilla/native-messaging-hosts
# These can be removed too, see comment up top
ln -s ${lib.getBin v2}/etc $bin/etc
ln -s ${lib.getBin v2}/lib/mozilla/native-messaging-hosts/* $bin/lib/mozilla/native-messaging-hosts
mkdir -p $out/lib/mozilla/native-messaging-hosts
ln -s $out/lib/browserpass/hosts/firefox/*.json $out/lib/mozilla/native-messaging-hosts
'';

meta = with lib; {
93 changes: 0 additions & 93 deletions pkgs/tools/security/browserpass/deps.nix

This file was deleted.