Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
65 lines
1.4 KiB
Nix
65 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
curl,
|
|
pkg-config,
|
|
openssl,
|
|
zlib,
|
|
asciidoctor,
|
|
nix-update-script,
|
|
findutils,
|
|
installShellFiles,
|
|
versionCheckHook,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "snphost";
|
|
version = "0.6.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "virtee";
|
|
repo = "snphost";
|
|
tag = "v${version}";
|
|
hash = "sha256-FvHawwoIqCiZ+Jm1itDWspaI+vDN6xDfeI11KoiO/DU=";
|
|
};
|
|
|
|
cargoHash = "sha256-ZOXOfFYingTBq5LfJqHRf6ZdvrdY1Zve/ZMnAE25kPM=";
|
|
|
|
nativeBuildInputs = [
|
|
asciidoctor
|
|
findutils
|
|
installShellFiles
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = [
|
|
curl
|
|
openssl
|
|
zlib
|
|
];
|
|
|
|
env.OPENSSL_NO_VENDOR = true;
|
|
|
|
# man page is placed in cargo's $OUT_DIR, which is randomized.
|
|
# Contacted upstream about it, for now use find to locate it.
|
|
postInstall = ''
|
|
installManPage $(find target/x86_64-unknown-linux-gnu/release/build -name "snphost.1")
|
|
'';
|
|
|
|
nativeInstallCheckInputs = [ versionCheckHook ];
|
|
doInstallCheck = true;
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
meta = {
|
|
description = "Administrative utility for SEV-SNP";
|
|
homepage = "https://github.com/virtee/snphost/";
|
|
changelog = "https://github.com/virtee/snphost/releases/tag/v${version}";
|
|
license = lib.licenses.asl20;
|
|
maintainers = with lib.maintainers; [ katexochen ];
|
|
mainProgram = "snphost";
|
|
platforms = [ "x86_64-linux" ];
|
|
};
|
|
}
|