depot/third_party/nixpkgs/pkgs/tools/misc/topgrade/default.nix
Default email 01ed8ef136 Project import generated by Copybara.
GitOrigin-RevId: 20fc948445a6c22d4e8d5178e9a6bc6e1f5417c8
2022-11-21 19:40:18 +02:00

40 lines
916 B
Nix

{ stdenv
, lib
, fetchFromGitHub
, rustPlatform
, AppKit
, Cocoa
, Foundation
, installShellFiles
}:
rustPlatform.buildRustPackage rec {
pname = "topgrade";
version = "10.1.2";
src = fetchFromGitHub {
owner = "topgrade-rs";
repo = "topgrade";
rev = "v${version}";
sha256 = "sha256-/xabrMFcP8O2haGzqJ64u/O2snk9dJ9Sm17c3kr3nsY=";
};
cargoSha256 = "sha256-mWV8h2l7kJnTfTyF74BqR/qaVpswUqI971IDiBZF3XE=";
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optionals stdenv.isDarwin [ AppKit Cocoa Foundation ];
NIX_CFLAGS_COMPILE = lib.optionals stdenv.isDarwin [ "-framework" "AppKit" ];
postInstall = ''
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 ];
};
}