2022-07-29 04:38:45 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, rustPlatform
|
2023-09-10 21:18:09 +02:00
|
|
|
, fetchFromGitea
|
2022-07-29 04:38:45 +02:00
|
|
|
, pkg-config
|
|
|
|
, pcsclite
|
|
|
|
, nettle
|
|
|
|
, PCSC
|
|
|
|
, testers
|
|
|
|
, openpgp-card-tools
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "openpgp-card-tools";
|
2024-04-26 00:42:59 +02:00
|
|
|
version = "0.10.1";
|
2022-07-29 04:38:45 +02:00
|
|
|
|
2023-09-10 21:18:09 +02:00
|
|
|
src = fetchFromGitea {
|
|
|
|
domain = "codeberg.org";
|
|
|
|
owner = "openpgp-card";
|
|
|
|
repo = "openpgp-card-tools";
|
|
|
|
rev = "v${version}";
|
2024-04-26 00:42:59 +02:00
|
|
|
hash = "sha256-fasu2XElGk6TB2VNFg43rpa3ZafgGZga9WojyUiXj0k=";
|
2022-07-29 04:38:45 +02:00
|
|
|
};
|
|
|
|
|
2024-04-26 00:42:59 +02:00
|
|
|
cargoHash = "sha256-7OauQRG8DhIoANfel45QBm3igGjmtNw9KNAwt1TL5xg=";
|
2022-07-29 04:38:45 +02:00
|
|
|
|
|
|
|
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; {
|
2024-02-17 07:34:32 +01:00
|
|
|
description = "A tool for inspecting and configuring OpenPGP cards";
|
|
|
|
homepage = "https://codeberg.org/openpgp-card/openpgp-card-tools";
|
2023-10-17 03:50:03 +02:00
|
|
|
license = with licenses ;[ asl20 /* OR */ mit ];
|
2022-07-29 04:38:45 +02:00
|
|
|
maintainers = with maintainers; [ nickcao ];
|
2024-02-17 07:34:32 +01:00
|
|
|
mainProgram = "oct";
|
2022-07-29 04:38:45 +02:00
|
|
|
};
|
|
|
|
}
|