7d542a9f98
GitOrigin-RevId: b72b8b94cf0c012b0252a9100a636cad69696666
46 lines
1.2 KiB
Nix
46 lines
1.2 KiB
Nix
{ stdenv
|
|
, lib
|
|
, fetchFromGitHub
|
|
, rustPlatform
|
|
, AppKit
|
|
, Cocoa
|
|
, Foundation
|
|
, installShellFiles
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "topgrade";
|
|
version = "10.2.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "topgrade-rs";
|
|
repo = "topgrade";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-ljjbTqFhDDHqyA+UzqxICAM9YI1U0fI6J864o9ee6kg=";
|
|
};
|
|
|
|
cargoSha256 = "sha256-PezSEd2/98us2KPNPTmVIuPlWcRIWF7TUuT/m4df1Fs=";
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ AppKit Cocoa Foundation ];
|
|
|
|
NIX_CFLAGS_COMPILE = lib.optionals stdenv.isDarwin [ "-framework" "AppKit" ];
|
|
|
|
postInstall = ''
|
|
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 = with lib; {
|
|
description = "Upgrade all the things";
|
|
homepage = "https://github.com/topgrade-rs/topgrade";
|
|
license = licenses.gpl3Only;
|
|
maintainers = with maintainers; [ SuperSandro2000 xyenon ];
|
|
};
|
|
}
|