depot/third_party/nixpkgs/pkgs/by-name/nr/nrr/package.nix
Default email 5ca88bfbb9 Project import generated by Copybara.
GitOrigin-RevId: 9f918d616c5321ad374ae6cb5ea89c9e04bf3e58
2024-07-31 10:19:44 +00:00

43 lines
918 B
Nix

{ lib
, stdenv
, fetchFromGitHub
, rustPlatform
, darwin
, pkg-config
, libiconv
, nrxAlias ? true
}:
rustPlatform.buildRustPackage rec {
pname = "nrr";
version = "0.9.4";
src = fetchFromGitHub {
owner = "ryanccn";
repo = "nrr";
rev = "v${version}";
hash = "sha256-X1zgQvgjWbTQAOHAZ+G2u0yO+qeiU0hamTLM39VOK20=";
};
cargoHash = "sha256-NpvYN68l5wibrFxST35sWDBbUG1mauNszA8NYIWGGa0=";
buildInputs = lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.CoreFoundation
darwin.apple_sdk.frameworks.Security
darwin.apple_sdk.frameworks.IOKit
libiconv
];
nativeBuildInputs = [
pkg-config
];
postInstall = lib.optionalString nrxAlias "ln -s $out/bin/nr{r,x}";
meta = with lib; {
description = "Minimal, blazing fast npm scripts runner";
maintainers = with maintainers; [ ryanccn ];
license = licenses.gpl3Only;
mainProgram = "nrr";
};
}