diff options
author | Aleksana <me@aleksana.moe> | 2024-04-07 11:41:14 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-07 11:41:14 +0800 |
commit | 5f84fef171d6deb2f140959829fa8808429602cf (patch) | |
tree | d526b278763178ff9103f5c3b84e05e7c4499c0b | |
parent | 7b01c27540b2b3e013f8b8595fdafb6c96175465 (diff) | |
parent | b42ac809231651028ac50ffb38d41857348b9ee1 (diff) |
Merge pull request #301492 from nokazn/feature/add-proto-package
proto: init at 0.32.2
-rw-r--r-- | maintainers/maintainer-list.nix | 6 | ||||
-rw-r--r-- | pkgs/by-name/pr/proto/package.nix | 52 |
2 files changed, 58 insertions, 0 deletions
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 22f57ca2c1d4a..f2a3793cb19aa 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -14429,6 +14429,12 @@ githubId = 42322511; name = "Patryk Kwiatek"; }; + nokazn = { + email = "me@nokazn.me"; + github = "nokazn"; + githubId = 41154684; + name = "nokazn"; + }; nomeata = { email = "mail@joachim-breitner.de"; github = "nomeata"; diff --git a/pkgs/by-name/pr/proto/package.nix b/pkgs/by-name/pr/proto/package.nix new file mode 100644 index 0000000000000..62ca8f2b025de --- /dev/null +++ b/pkgs/by-name/pr/proto/package.nix @@ -0,0 +1,52 @@ +{ lib +, stdenv +, fetchFromGitHub +, rustPlatform +, darwin +, libiconv +, makeBinaryWrapper +, pkg-config +}: + +rustPlatform.buildRustPackage rec { + pname = "proto"; + version = "0.32.2"; + + src = fetchFromGitHub { + owner = "moonrepo"; + repo = pname; + rev = "v${version}"; + hash = "sha256-QxaVXggVfr3O26RwSuUx4qpabhWE9+ZFLKRin/ya2e4="; + }; + + cargoHash = "sha256-j5wXmlauhrUnUVTj/KyqDrf1y9bq3ZInREZXIUQImVE="; + + 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 = { + description = "A 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; + }; +} |