depot/third_party/nixpkgs/pkgs/by-name/op/openpgp-card-tools/package.nix
Luke Granger-Brown f92e137cfb
Some checks failed
/ combine-systems (push) Blocked by required conditions
/ build (x86_64-linux) (push) Failing after 11m44s
/ build (aarch64-linux) (push) Failing after 11m50s
/ build (push) Failing after 16m42s
Merge commit '1e2ed035f4bebc9adad02b365508ad96f7df87c1' into HEAD
2025-03-02 02:23:32 +00:00

63 lines
1.4 KiB
Nix

{
lib,
stdenv,
rustPlatform,
fetchFromGitea,
installShellFiles,
pkg-config,
pcsclite,
dbus,
testers,
openpgp-card-tools,
}:
rustPlatform.buildRustPackage rec {
pname = "openpgp-card-tools";
version = "0.11.8";
src = fetchFromGitea {
domain = "codeberg.org";
owner = "openpgp-card";
repo = "openpgp-card-tools";
rev = "v${version}";
hash = "sha256-pE7AAgps8LlsmM97q/XIi7If1UwNP/0uJH9wOeZ6neM=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-/OC/+eMRBF2MICVUtsJR0m62fWLP0lr10J/XkKGcPnA=";
nativeBuildInputs = [
installShellFiles
pkg-config
rustPlatform.bindgenHook
];
buildInputs = [
pcsclite
dbus
];
passthru = {
tests.version = testers.testVersion {
package = openpgp-card-tools;
};
};
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
OCT_COMPLETION_OUTPUT_DIR=$PWD/shell $out/bin/oct
installShellCompletion ./shell/oct.{bash,fish} ./shell/_oct
OCT_MANPAGE_OUTPUT_DIR=$PWD/man $out/bin/oct
installManPage ./man/*.1
'';
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";
};
}