-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
arthsmn
committed
Jan 4, 2024
1 parent
75edae0
commit 5f58599
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ lib | ||
, buildGoModule | ||
, fetchFromGitHub | ||
, makeBinaryWrapper | ||
, libfido2 | ||
, dbus | ||
, pinentry | ||
, nix-update-script | ||
}: | ||
|
||
buildGoModule rec { | ||
pname = "goldwarden"; | ||
version = "0.2.7"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "quexten"; | ||
repo = "goldwarden"; | ||
rev = "v${version}"; | ||
hash = "sha256-OXJovoJ2+YIMqzoG6J2LlxUC5DMZRAdEl+ZEv6PDXlI="; | ||
}; | ||
|
||
vendorHash = "sha256-1Px60+f23qoP5eEOUC3WG5vKJYjbD3bPOrDyBpXlMT0="; | ||
|
||
ldflags = [ "-s" "-w" ]; | ||
|
||
nativeBuildInputs = [makeBinaryWrapper]; | ||
|
||
buildInputs = [libfido2]; | ||
|
||
postInstall = '' | ||
wrapProgram $out/bin/goldwarden \ | ||
--suffix PATH : ${lib.makeBinPath [dbus pinentry]} | ||
install -Dm644 $src/resources/com.quexten.goldwarden.policy -t $out/share/polkit-1/actions | ||
''; | ||
|
||
passthru.updateScript = nix-update-script {}; | ||
|
||
meta = with lib; { | ||
description = "A feature-packed Bitwarden compatible desktop integration"; | ||
homepage = "https://github.com/quexten/goldwarden"; | ||
license = licenses.mit; | ||
maintainers = with maintainers; [ arthsmn ]; | ||
mainProgram = "goldwarden"; | ||
platforms = platforms.linux; # Support for other platforms is not yet ready, see https://github.com/quexten/goldwarden/issues/4 | ||
}; | ||
} |