nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 stdenv,
3 lib,
4 fetchFromGitHub,
5}:
6
7stdenv.mkDerivation rec {
8 pname = "nodenv";
9 version = "1.5.0";
10
11 src = fetchFromGitHub {
12 owner = "nodenv";
13 repo = "nodenv";
14 rev = "v${version}";
15 sha256 = "sha256-PGeZKL7qsffMAZIsCLB244Fuu48GyWw5Rh67ePu6h38=";
16 };
17
18 buildPhase = ''
19 runHook preBuild
20
21 bash src/configure
22 make -C src
23
24 runHook postBuild
25 '';
26
27 installPhase = ''
28 runHook preInstall
29
30 mkdir -p $out
31 cp -r libexec $out/
32 cp -r bin $out/
33
34 runHook postInstall
35 '';
36
37 meta = {
38 description = "Manage multiple NodeJS versions";
39 mainProgram = "nodenv";
40 homepage = "https://github.com/nodenv/nodenv/";
41 changelog = "https://github.com/nodenv/nodenv/releases/tag/v${version}";
42 license = lib.licenses.mit;
43 maintainers = with lib.maintainers; [ alexnortung ];
44 platforms = lib.platforms.unix;
45 };
46}