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
55 lines
1.3 KiB
Nix
55 lines
1.3 KiB
Nix
{
|
|
stdenv,
|
|
lib,
|
|
fetchFromGitHub,
|
|
rustPlatform,
|
|
installShellFiles,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "topgrade";
|
|
version = "16.0.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "topgrade-rs";
|
|
repo = "topgrade";
|
|
rev = "v${version}";
|
|
hash = "sha256-b/xzmC49ETGtcf9ekrSkq75cKxSL4ZrvKPkparwz6zU=";
|
|
};
|
|
|
|
cargoHash = "sha256-d6jX+3ZcCswhKy5SsSpvXZL9el70+OyIa7lYQ3B/o8M=";
|
|
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
];
|
|
|
|
env.NIX_CFLAGS_COMPILE = toString (
|
|
lib.optionals stdenv.hostPlatform.isDarwin [
|
|
"-framework"
|
|
"AppKit"
|
|
]
|
|
);
|
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
installShellCompletion --cmd topgrade \
|
|
--bash <($out/bin/topgrade --gen-completion bash) \
|
|
--fish <($out/bin/topgrade --gen-completion fish) \
|
|
--zsh <($out/bin/topgrade --gen-completion zsh)
|
|
|
|
$out/bin/topgrade --gen-manpage > topgrade.8
|
|
installManPage topgrade.8
|
|
'';
|
|
|
|
meta = {
|
|
description = "Upgrade all the things";
|
|
homepage = "https://github.com/topgrade-rs/topgrade";
|
|
changelog = "https://github.com/topgrade-rs/topgrade/releases/tag/v${version}";
|
|
license = lib.licenses.gpl3Only;
|
|
maintainers = with lib.maintainers; [
|
|
SuperSandro2000
|
|
xyenon
|
|
];
|
|
mainProgram = "topgrade";
|
|
};
|
|
}
|