depot/third_party/nixpkgs/pkgs/tools/security/solo2-cli/default.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

68 lines
1.3 KiB
Nix

{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
installShellFiles,
pkg-config,
pcsclite,
udev,
PCSC,
IOKit,
CoreFoundation,
AppKit,
}:
rustPlatform.buildRustPackage rec {
pname = "solo2-cli";
version = "0.2.2";
src = fetchFromGitHub {
owner = "solokeys";
repo = pname;
rev = "v${version}";
sha256 = "sha256-7tpO5ir42mIKJXD0NJzEPXi/Xe6LdyEeBQWNfOdgX5I=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-qD185H6wfW9yuYImTm9hqSgQpUQcKuCESM8riZwmGY0=";
nativeBuildInputs = [
installShellFiles
pkg-config
];
buildInputs =
[ ]
++ lib.optionals stdenv.hostPlatform.isLinux [
pcsclite
udev
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
PCSC
IOKit
CoreFoundation
AppKit
];
postInstall = ''
install -D 70-solo2.rules $out/lib/udev/rules.d/70-solo2.rules
installShellCompletion target/*/release/solo2.{bash,fish}
installShellCompletion --zsh target/*/release/_solo2
'';
doCheck = true;
buildFeatures = [ "cli" ];
meta = with lib; {
description = "CLI tool for managing SoloKeys' Solo2 USB security keys";
homepage = "https://github.com/solokeys/solo2-cli";
license = with licenses; [
asl20
mit
]; # either at your option
maintainers = with maintainers; [ lukegb ];
mainProgram = "solo2";
};
}