depot/third_party/nixpkgs/pkgs/tools/security/keyscope/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

50 lines
1.1 KiB
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, openssl
, stdenv
, DiskArbitration
, Foundation
, IOKit
, Security
}:
rustPlatform.buildRustPackage rec {
pname = "keyscope";
version = "1.3.0";
src = fetchFromGitHub {
owner = "spectralops";
repo = pname;
rev = "v${version}";
sha256 = "sha256-SrBtgirg52q7gM3GZsJsV8ASACvb4sYv5HDbyItpjbk=";
};
cargoSha256 = "sha256-MFP3AqlfaclmZxRwaWFw6hsZwCQMRKJEyFEyUN+QLqo=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [
DiskArbitration
Foundation
IOKit
Security
];
# build script tries to get information from git
postPatch = ''
echo "fn main() {}" > build.rs
'';
VERGEN_GIT_SEMVER = "v${version}";
meta = with lib; {
description = "Key and secret workflow (validation, invalidation, etc.) tool";
mainProgram = "keyscope";
homepage = "https://github.com/spectralops/keyscope";
changelog = "https://github.com/spectralops/keyscope/blob/v${version}/CHANGELOG.md";
license = licenses.asl20;
maintainers = with maintainers; [ figsoda ];
};
}