bottom: use writableTmpDirAsHomeHook (#462295)

This commit is contained in:
nixpkgs-ci[bot]
2025-11-16 18:01:40 +00:00
committed by GitHub
+11 -10
View File
@@ -4,18 +4,19 @@
fetchFromGitHub,
autoAddDriverRunpath,
installShellFiles,
writableTmpDirAsHomeHook,
versionCheckHook,
nix-update-script,
}:
rustPlatform.buildRustPackage rec {
rustPlatform.buildRustPackage (finalAttrs: {
pname = "bottom";
version = "0.11.3";
src = fetchFromGitHub {
owner = "ClementTsang";
repo = "bottom";
tag = version;
tag = finalAttrs.version;
hash = "sha256-7rVvKAqK8hqICnSr/Ax9ndsIZAdTaUyOAoVZ13W5BJs=";
};
@@ -26,6 +27,10 @@ rustPlatform.buildRustPackage rec {
installShellFiles
];
env = {
BTM_GENERATE = true;
};
postInstall = ''
installManPage target/tmp/bottom/manpage/btm.1
installShellCompletion \
@@ -35,24 +40,20 @@ rustPlatform.buildRustPackage rec {
install -Dm444 desktop/bottom.desktop -t $out/share/applications
'';
preCheck = ''
HOME=$(mktemp -d)
'';
doInstallCheck = true;
nativeInstallCheckInputs = [
versionCheckHook
writableTmpDirAsHomeHook
];
versionCheckProgram = "${placeholder "out"}/bin/btm";
BTM_GENERATE = true;
versionCheckProgramArg = "--version";
passthru = {
updateScript = nix-update-script { };
};
meta = {
changelog = "https://github.com/ClementTsang/bottom/blob/${version}/CHANGELOG.md";
changelog = "https://github.com/ClementTsang/bottom/blob/${finalAttrs.version}/CHANGELOG.md";
description = "Cross-platform graphical process/system monitor with a customizable interface";
homepage = "https://github.com/ClementTsang/bottom";
license = lib.licenses.mit;
@@ -62,4 +63,4 @@ rustPlatform.buildRustPackage rec {
gepbird
];
};
}
})