mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
70 lines
1.4 KiB
Nix
70 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
pkg-config,
|
|
openssl,
|
|
writableTmpDirAsHomeHook,
|
|
podman,
|
|
versionCheckHook,
|
|
nix-update-script,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage (finalAttrs: {
|
|
pname = "snouty";
|
|
version = "0.5.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "antithesishq";
|
|
repo = "snouty";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-zO+2UFu/KD2dtE2AkUVv5A1EBFMsSTl8gP18bCxquI8=";
|
|
};
|
|
|
|
cargoHash = "sha256-fWdzaqyFT2ZFTy5AsejDgEm3E55syLKbYz5DW9Ra2PQ=";
|
|
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = [
|
|
openssl
|
|
];
|
|
|
|
env.OPENSSL_NO_VENDOR = true;
|
|
|
|
postInstall = ''
|
|
installShellCompletion \
|
|
$releaseDir/build/snouty-*/out/snouty.{bash,fish} \
|
|
--zsh $releaseDir/build/snouty-*/out/_snouty
|
|
'';
|
|
|
|
useNextest = true;
|
|
|
|
nativeCheckInputs = [
|
|
writableTmpDirAsHomeHook
|
|
podman
|
|
];
|
|
|
|
nativeInstallCheckInputs = [ versionCheckHook ];
|
|
versionCheckProgramArg = "version";
|
|
doInstallCheck = true;
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
meta = {
|
|
description = "CLI for the Antithesis API";
|
|
homepage = "https://github.com/antithesishq/snouty";
|
|
changelog = "https://github.com/antithesishq/snouty/releases/tag/v${finalAttrs.version}";
|
|
license = lib.licenses.asl20;
|
|
maintainers = with lib.maintainers; [
|
|
carlsverre
|
|
winter
|
|
];
|
|
mainProgram = "snouty";
|
|
};
|
|
})
|