From 8d163530bdeda8574603f8a78d4b8ded6db16cfc Mon Sep 17 00:00:00 2001 From: Ryan Cao <70191398+ryanccn@users.noreply.github.com> Date: Fri, 26 Jan 2024 18:37:12 +0800 Subject: [PATCH] nrr: init at 0.5.0 --- pkgs/by-name/nr/nrr/package.nix | 40 +++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 pkgs/by-name/nr/nrr/package.nix diff --git a/pkgs/by-name/nr/nrr/package.nix b/pkgs/by-name/nr/nrr/package.nix new file mode 100644 index 000000000000..73c395cf00db --- /dev/null +++ b/pkgs/by-name/nr/nrr/package.nix @@ -0,0 +1,40 @@ +{ lib +, stdenv +, fetchFromGitHub +, rustPlatform +, darwin +, pkg-config +, libiconv +}: + +rustPlatform.buildRustPackage rec { + pname = "nrr"; + version = "0.5.0"; + + src = fetchFromGitHub { + owner = "ryanccn"; + repo = "nrr"; + rev = "v${version}"; + hash = "sha256-jkI5t+1P7Ae6MkSnyy7Ur3Z0Vt8+hWTgf6dgL5tzhY8="; + }; + + cargoHash = "sha256-9qLeFuaKAGhtyHFHOBS6HA0wAWuk0ZJppVySpMwUGYc="; + + buildInputs = lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.CoreFoundation + darwin.apple_sdk.frameworks.Security + darwin.apple_sdk.frameworks.IOKit + libiconv + ]; + + nativeBuildInputs = [ + pkg-config + ]; + + meta = with lib; { + description = "Minimal, blazing fast Node.js script runner"; + maintainers = with maintainers; [ ryanccn ]; + license = licenses.gpl3Only; + mainProgram = "nrr"; + }; +}