/yarn.nix Secret
Created
July 22, 2024 02:24
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