Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
1.1 KiB
Nix
Raw Normal View History

2024-05-23 00:21:04 +02:00
{
lib,
rustPlatform,
fetchFromGitHub,
2024-05-26 15:19:52 +02:00
installShellFiles,
2024-05-23 00:21:04 +02:00
nix-update-script,
}:
rustPlatform.buildRustPackage rec {
pname = "nix-janitor";
2024-11-30 15:33:11 +01:00
version = "0.3.2";
2024-05-23 00:21:04 +02:00
src = fetchFromGitHub {
owner = "nobbz";
repo = "nix-janitor";
tag = version;
2024-11-30 15:33:11 +01:00
hash = "sha256-MRhTkxPl0tlObbXO7/0cD2pbd9/uQCeRKV3DStGvZMQ=";
2024-05-23 00:21:04 +02:00
};
useFetchCargoVendor = true;
cargoHash = "sha256-t4TZkwWIp/VYj4tMd5CdYuAQt3GquMRZ3wyAK3oic5k=";
2024-05-26 15:19:52 +02:00
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
for shell in bash fish zsh; do
completionFile=janitor.$shell
$out/bin/janitor --completions $shell > $completionFile
installShellCompletion $completionFile
done
'';
2024-05-23 00:21:04 +02:00
passthru.updateScript = nix-update-script { };
meta = {
homepage = "https://github.com/nobbz/nix-janitor";
changelog = "https://github.com/NobbZ/nix-janitor/blob/${version}/CHANGELOG.md";
description = "Tool to clean up old profile generations";
mainProgram = "janitor";
platforms = lib.platforms.linux;
license = lib.licenses.mit;
maintainers = [ lib.maintainers.nobbz ];
};
}