472aeafc57
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
52 lines
1.4 KiB
Nix
52 lines
1.4 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, rustPlatform
|
|
, darwin
|
|
, libiconv
|
|
, makeBinaryWrapper
|
|
, pkg-config
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "proto";
|
|
version = "0.41.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "moonrepo";
|
|
repo = "proto";
|
|
rev = "v${version}";
|
|
hash = "sha256-FkuHKfrMH+l/k9lfFhbG619KoDIxmEYwoaniHSPF8hQ=";
|
|
};
|
|
|
|
cargoHash = "sha256-vll9ckegcECmzoOkTCe2q2M1r4s5JlUnv2DtzJEQ7bY=";
|
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.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/proto \
|
|
--set PROTO_LOOKUP_DIR $out/bin
|
|
'';
|
|
|
|
meta = {
|
|
description = "Pluggable multi-language version manager";
|
|
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;
|
|
};
|
|
}
|