c594a97518
GitOrigin-RevId: 301aada7a64812853f2e2634a530ef5d34505048
41 lines
965 B
Nix
41 lines
965 B
Nix
{ stdenv
|
|
, lib
|
|
, fetchFromGitHub
|
|
, rustPlatform
|
|
, AppKit
|
|
, Cocoa
|
|
, Foundation
|
|
, installShellFiles
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "topgrade";
|
|
version = "9.1.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "topgrade-rs";
|
|
repo = "topgrade";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-0WI05bfnCKjsUJJyurnouVE/wkCJZ+6DStQMPBNI+Bs=";
|
|
};
|
|
|
|
cargoSha256 = "sha256-EVnH1YT5ivuBhhd54sho/1x4ZPhrdrWjE40FGL9HXRc=";
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ AppKit Cocoa Foundation ];
|
|
|
|
NIX_CFLAGS_COMPILE = lib.optionals stdenv.isDarwin [ "-framework" "AppKit" ];
|
|
|
|
postInstall = ''
|
|
ln -rs $out/bin/topgrade-rs $out/bin/topgrade
|
|
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 ];
|
|
};
|
|
}
|