2022-02-20 05:27:41 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "nodenv";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "1.5.0";
|
2022-02-20 05:27:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nodenv";
|
|
|
|
repo = "nodenv";
|
|
|
|
rev = "v${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
sha256 = "sha256-PGeZKL7qsffMAZIsCLB244Fuu48GyWw5Rh67ePu6h38=";
|
2022-02-20 05:27:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
|
|
|
|
bash src/configure
|
|
|
|
make -C src
|
|
|
|
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out
|
|
|
|
cp -r libexec $out/
|
|
|
|
cp -r bin $out/
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Manage multiple NodeJS versions";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "nodenv";
|
2022-02-20 05:27:41 +00:00
|
|
|
homepage = "https://github.com/nodenv/nodenv/";
|
|
|
|
changelog = "https://github.com/nodenv/nodenv/releases/tag/v${version}";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ alexnortung ];
|
2023-03-04 12:14:45 +00:00
|
|
|
platforms = platforms.unix;
|
2022-02-20 05:27:41 +00:00
|
|
|
};
|
|
|
|
}
|