-
-
Save MatrixManAtYrService/1a43c864a635ff4085e4a31be5846245 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs, system }: | |
let | |
nodejs-src = { | |
"x86_64-linux" = { | |
url = "https://nodejs.org/dist/v16.13.2/node-v16.13.2-linux-x64.tar.gz"; | |
sha256 = pkgs.lib.fakeSha256; | |
}; | |
"aarch64-linux" = { | |
url = "https://nodejs.org/dist/v16.13.2/node-v16.13.2-linux-arm64.tar.gz"; | |
sha256 = pkgs.lib.fakeSha256; | |
}; | |
"x86_64-darwin" = { | |
url = "https://nodejs.org/dist/v16.13.2/node-v16.13.2-darwin-x64.tar.gz"; | |
sha256 = pkgs.lib.fakeSha256; | |
}; | |
"aarch64-darwin" = { | |
url = | |
"https://nodejs.org/dist/v16.13.2/node-v16.13.2-darwin-arm64.tar.gz"; | |
sha256 = "sha256-CdMAAIrVh5LBJiKl6v2xTJMVh7uIcT3032TN9P8hiNE="; | |
}; | |
}.${system}; | |
nodejs = pkgs.stdenv.mkDerivation { | |
name = "nodejs"; | |
src = pkgs.fetchurl { inherit (nodejs-src) url sha256; }; | |
installPhase = '' | |
# mkDerivation handles unpacking the .tar.gz, | |
# so this "build" just consists of handing off the contents | |
mkdir -p $out | |
cp -r ./* $out/ | |
''; | |
meta = { platforms = pkgs.lib.platforms.all; }; | |
}; | |
in | |
pkgs.yarn.override { nodejs = nodejs; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment