depot/third_party/nixpkgs/pkgs/tools/security/openpgp-card-tools/default.nix
Default email c7cb07f092 Project import generated by Copybara.
GitOrigin-RevId: 1536926ef5621b09bba54035ae2bb6d806d72ac8
2024-02-29 21:09:43 +01:00

43 lines
1 KiB
Nix

{ lib
, stdenv
, rustPlatform
, fetchFromGitea
, pkg-config
, pcsclite
, nettle
, PCSC
, testers
, openpgp-card-tools
}:
rustPlatform.buildRustPackage rec {
pname = "openpgp-card-tools";
version = "0.10.0";
src = fetchFromGitea {
domain = "codeberg.org";
owner = "openpgp-card";
repo = "openpgp-card-tools";
rev = "v${version}";
hash = "sha256-dSGkPAeiQ54hYMJgghlPkbeJP3ZPUXGU7WmE63yIvz0=";
};
cargoHash = "sha256-coFoFWI/Iq7tbkv9RKPCNfAVKWDsJd7KTzOTtQDHXJY=";
nativeBuildInputs = [ pkg-config rustPlatform.bindgenHook ];
buildInputs = [ pcsclite nettle ] ++ lib.optionals stdenv.isDarwin [ PCSC ];
passthru = {
tests.version = testers.testVersion {
package = openpgp-card-tools;
};
};
meta = with lib; {
description = "A tool for inspecting and configuring OpenPGP cards";
homepage = "https://codeberg.org/openpgp-card/openpgp-card-tools";
license = with licenses ;[ asl20 /* OR */ mit ];
maintainers = with maintainers; [ nickcao ];
mainProgram = "oct";
};
}