openpgp-card-tools: Add shell completions and man pages (#354287)
This commit is contained in:
commit
172cb3ef53
@ -2,6 +2,7 @@
|
|||||||
, stdenv
|
, stdenv
|
||||||
, rustPlatform
|
, rustPlatform
|
||||||
, fetchFromGitea
|
, fetchFromGitea
|
||||||
|
, installShellFiles
|
||||||
, pkg-config
|
, pkg-config
|
||||||
, pcsclite
|
, pcsclite
|
||||||
, dbus
|
, dbus
|
||||||
@ -24,7 +25,7 @@ rustPlatform.buildRustPackage rec {
|
|||||||
|
|
||||||
cargoHash = "sha256-G5+lVK41hbzy/Ltc0EKoUfqF0M1OYu679jyVjYKJmn0=";
|
cargoHash = "sha256-G5+lVK41hbzy/Ltc0EKoUfqF0M1OYu679jyVjYKJmn0=";
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config rustPlatform.bindgenHook ];
|
nativeBuildInputs = [ installShellFiles pkg-config rustPlatform.bindgenHook ];
|
||||||
|
|
||||||
buildInputs = [ pcsclite dbus ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
buildInputs = [ pcsclite dbus ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
darwin.apple_sdk.frameworks.PCSC
|
darwin.apple_sdk.frameworks.PCSC
|
||||||
@ -37,6 +38,13 @@ rustPlatform.buildRustPackage rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
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; {
|
meta = with lib; {
|
||||||
description = "Tool for inspecting and configuring OpenPGP cards";
|
description = "Tool for inspecting and configuring OpenPGP cards";
|
||||||
homepage = "https://codeberg.org/openpgp-card/openpgp-card-tools";
|
homepage = "https://codeberg.org/openpgp-card/openpgp-card-tools";
|
||||||
|
Loading…
Reference in New Issue
Block a user