Merge pull request #155172 from lukegb/solo2

solo2-cli: init at 0.1.1
This commit is contained in:
Luke Granger-Brown 2022-01-16 17:27:30 +00:00 committed by GitHub
commit a41ab71c4f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 52 additions and 0 deletions

View file

@ -0,0 +1,48 @@
{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, installShellFiles
, pkg-config
, pcsclite
, udev
, PCSC
, IOKit
, CoreFoundation
, AppKit
}:
rustPlatform.buildRustPackage rec {
pname = "solo2-cli";
version = "0.1.1";
src = fetchFromGitHub {
owner = "solokeys";
repo = pname;
rev = "v${version}";
sha256 = "sha256-3GIK0boxGD4Xa5OskP1535zCQyhMQ/oXbgThRivJzww=";
};
cargoSha256 = "sha256-MYxVegXUVeZ4AzDz+Si5TtTjUDEPTO0Nh008rgLtsLw=";
nativeBuildInputs = [ installShellFiles pkg-config ];
buildInputs = [ ]
++ lib.optionals stdenv.isLinux [ pcsclite udev ]
++ lib.optionals stdenv.isDarwin [ PCSC IOKit CoreFoundation AppKit ];
postInstall = ''
installShellCompletion target/*/release/solo2.{bash,fish,zsh}
'';
doCheck = true;
buildFeatures = [ "cli" ];
meta = with lib; {
description = "A 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 ];
};
}

View file

@ -4889,6 +4889,10 @@ with pkgs;
s-tar = callPackage ../tools/archivers/s-tar {};
solo2-cli = callPackage ../tools/security/solo2-cli {
inherit (darwin.apple_sdk.frameworks) PCSC IOKit CoreFoundation AppKit;
};
sonota = callPackage ../tools/misc/sonota { };
sonobuoy = callPackage ../applications/networking/cluster/sonobuoy { };