depot/third_party/nixpkgs/pkgs/tools/security/openpgp-card-tools/default.nix
Default email 02cf88bb76 Project import generated by Copybara.
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
2022-08-12 15:06:08 +03:00

40 lines
899 B
Nix

{ lib
, stdenv
, rustPlatform
, fetchCrate
, pkg-config
, pcsclite
, nettle
, PCSC
, testers
, openpgp-card-tools
}:
rustPlatform.buildRustPackage rec {
pname = "openpgp-card-tools";
version = "0.0.12";
src = fetchCrate {
inherit pname version;
sha256 = "sha256-3OKOMe7Uj+8qpzfu0DzqwIGa/QJ0YoKczPN9W8HXJZU=";
};
cargoHash = "sha256-gq17BXorXrlJx4zlvLuOT8XGUCqZXFDSxgs/Fv9dChk=";
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 = "CLI tools for OpenPGP cards";
homepage = "https://gitlab.com/openpgp-card/openpgp-card";
license = licenses.asl20;
maintainers = with maintainers; [ nickcao ];
mainProgram = "opgpcard";
};
}