depot/third_party/nixpkgs/pkgs/by-name/op/openpgp-card-tools/package.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

46 lines
1.1 KiB
Nix

{ lib
, stdenv
, rustPlatform
, fetchFromGitea
, pkg-config
, pcsclite
, testers
, openpgp-card-tools
, darwin
}:
rustPlatform.buildRustPackage rec {
pname = "openpgp-card-tools";
version = "0.11.2";
src = fetchFromGitea {
domain = "codeberg.org";
owner = "openpgp-card";
repo = "openpgp-card-tools";
rev = "v${version}";
hash = "sha256-4PRUBzVy1sb15sYsbitBrOfQnsdbGKoR2OA4EjSc8B8=";
};
cargoHash = "sha256-Jm1181WQfYZPKnu0f2om/hxkJ8Bm5AA/3IwBgZkpF0I=";
nativeBuildInputs = [ pkg-config rustPlatform.bindgenHook ];
buildInputs = [ pcsclite ] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.PCSC
darwin.apple_sdk.frameworks.Security
];
passthru = {
tests.version = testers.testVersion {
package = openpgp-card-tools;
};
};
meta = with lib; {
description = "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";
};
}