blob: c4fde7359f01bc1483b3101c7930511295b75809 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
{
stdenv,
lib,
fetchFromGitHub,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "nodenv";
version = "1.5.0";
__structuredAttrs = true;
strictDeps = true;
src = fetchFromGitHub {
owner = "nodenv";
repo = "nodenv";
tag = "v${finalAttrs.version}";
hash = "sha256-PGeZKL7qsffMAZIsCLB244Fuu48GyWw5Rh67ePu6h38=";
};
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 = {
description = "Manage multiple NodeJS versions";
mainProgram = "nodenv";
homepage = "https://github.com/nodenv/nodenv/";
changelog = "https://github.com/nodenv/nodenv/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ alexnortung ];
platforms = lib.platforms.unix;
};
})
|