From 5f58599e5915f962009f10e7fd659b489d718416 Mon Sep 17 00:00:00 2001 From: arthsmn Date: Tue, 2 Jan 2024 18:52:58 -0300 Subject: [PATCH] goldwarden: init at 0.2.7 --- pkgs/by-name/go/goldwarden/package.nix | 47 ++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 pkgs/by-name/go/goldwarden/package.nix diff --git a/pkgs/by-name/go/goldwarden/package.nix b/pkgs/by-name/go/goldwarden/package.nix new file mode 100644 index 0000000000000..8142da60a0aff --- /dev/null +++ b/pkgs/by-name/go/goldwarden/package.nix @@ -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 + }; +}