2024-04-21 15:54:59 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, darwin
|
|
|
|
, libiconv
|
|
|
|
, makeBinaryWrapper
|
|
|
|
, pkg-config
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "proto";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "0.38.0";
|
2024-04-21 15:54:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "moonrepo";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-60PLC/5aouvUy33Qw/orEv+3/3j//3frUxZdh4chlMc=";
|
2024-04-21 15:54:59 +00:00
|
|
|
};
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
cargoHash = "sha256-l6BzvJI+DimykVKYl7Gow+7f3uwfDFajmHcXKoUwcUk=";
|
2024-04-21 15:54:59 +00:00
|
|
|
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.SystemConfiguration
|
|
|
|
libiconv
|
|
|
|
];
|
|
|
|
nativeBuildInputs = [ makeBinaryWrapper pkg-config ];
|
|
|
|
|
|
|
|
# Tests requires network access
|
|
|
|
doCheck = false;
|
|
|
|
cargoBuildFlags = [ "--bin proto" "--bin proto-shim" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
# proto looks up a proto-shim executable file in $PROTO_LOOKUP_DIR
|
|
|
|
wrapProgram $out/bin/${pname} \
|
|
|
|
--set PROTO_LOOKUP_DIR $out/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Pluggable multi-language version manager";
|
2024-04-21 15:54:59 +00:00
|
|
|
longDescription = ''
|
|
|
|
proto is a pluggable next-generation version manager for multiple programming languages. A unified toolchain.
|
|
|
|
'';
|
|
|
|
homepage = "https://moonrepo.dev/proto";
|
|
|
|
changelog = "https://github.com/moonrepo/proto/releases/tag/v${version}";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ nokazn ];
|
|
|
|
mainProgram = "proto";
|
|
|
|
platforms = lib.platforms.linux ++ lib.platforms.darwin;
|
|
|
|
};
|
|
|
|
}
|