Merge pull request #236749 from kirillrdy/optional-patch

browserpass: autopatchelf only on linux + testVersion
This commit is contained in:
Naïm Favier 2023-06-09 13:59:27 +02:00 committed by GitHub
commit 7b403f04f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,6 +5,8 @@
, gnupg
, makeWrapper
, autoPatchelfHook
, testers
, browserpass
}:
buildGoModule rec {
@ -18,7 +20,7 @@ buildGoModule rec {
sha256 = "sha256-UZzOPRRiCUIG7uSSp9AEPMDN/+4cgyK47RhrI8oUx8U=";
};
nativeBuildInputs = [ makeWrapper autoPatchelfHook ];
nativeBuildInputs = [ makeWrapper ] ++ lib.optionals stdenv.isLinux [ autoPatchelfHook ];
vendorHash = "sha256-CjuH4ANP2bJDeA+o+1j+obbtk5/NVLet/OFS3Rms4r0=";
@ -56,6 +58,11 @@ buildGoModule rec {
ln -s $out/lib/browserpass/hosts/firefox/*.json $out/lib/mozilla/native-messaging-hosts
'';
passthru.tests.version = testers.testVersion {
package = browserpass;
command = "browserpass --version";
};
meta = with lib; {
description = "Browserpass native client app";
homepage = "https://github.com/browserpass/browserpass-native";