1 { lib, stdenv, fetchurl, makeWrapper, nodejs }:
3 stdenv.mkDerivation rec {
8 url = "https://registry.npmjs.org/@napi-rs/cli/-/cli-${version}.tgz";
9 hash = "sha256-TGhPPv73tb3tr1cY9mUuN4FaVql5tGh436uJeTkbnJs=";
12 nativeBuildInputs = [ makeWrapper ];
17 mkdir -p "$out/bin" "$out/lib/napi-rs-cli"
19 cp scripts/index.js "$out/lib/napi-rs-cli"
21 makeWrapper ${nodejs}/bin/node "$out/bin/napi" --add-flags "$out/lib/napi-rs-cli/index.js"
27 description = "CLI tools for napi-rs";
28 homepage = "https://napi.rs";
29 license = licenses.mit;
30 maintainers = with maintainers; [ winter ];
31 inherit (nodejs.meta) platforms;