Skip to content

Commit

Permalink
chore: add vervet package
Browse files Browse the repository at this point in the history
Signed-off-by: Drew Hess <src@drewhess.com>
  • Loading branch information
dhess committed Nov 26, 2023
1 parent 3aa3df8 commit 3743912
Show file tree
Hide file tree
Showing 4 changed files with 1,330 additions and 0 deletions.
2 changes: 2 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@
};

packages = {
inherit (pkgs) vervet;

inherit (pkgs) nmrpflash;

inherit (pkgs) ffdhe2048Pem ffdhe3072Pem ffdhe4096Pem;
Expand Down
9 changes: 9 additions & 0 deletions nix/overlays/500-vervet.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
final: prev:
let
vervet = final.callPackage ../pkgs/vervet {
inherit (final.darwin.apple_sdk.frameworks) PCSC;
};
in
{
inherit vervet;
}
43 changes: 43 additions & 0 deletions nix/pkgs/vervet/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{ buildGoModule
, fetchFromGitHub
, installShellFiles
, lib
, stdenv
, pkg-config
, pcsclite
, PCSC
, withApplePCSC ? stdenv.isDarwin
}:
buildGoModule rec {
pname = "vervet";
version = "git-20230219";

src = fetchFromGitHub {
owner = "onryo";
repo = pname;
rev = "9b674439e14b3e7d14930f2e5229aab662eb992d";
sha256 = "sha256-qVsAm/yuji3+zLsgsUeXk6UAAf6gFH/762HYwgieh1Y=";
};

vendorHash = "sha256-7Hf9gC+/qXyDNc1WNN8ln3k+jPDgWb48RFLn/V/3Aus=";

patches = [
./go-1.20.patch
];

subPackages = [ "." ];

nativeBuildInputs = [ pkg-config installShellFiles ];

buildInputs = [ ]
++ (if withApplePCSC then [ PCSC ] else [ pcsclite ]);

meta = with lib; {
description =
"Vault YubiKey OpenPGP unseal utility";
homepage = "https://github.com/onryo/vervet";
license = licenses.mpl20;
maintainers = with maintainers; [ dhess ];
};
}

Loading

0 comments on commit 3743912

Please sign in to comment.