Created
September 28, 2023 13:00
-
-
Save schickling/2c2ab55b338d8fa1ab7458ac4ecccce0 to your computer and use it in GitHub Desktop.
Node.js 16 Nix flake
This file contains hidden or 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
{ | |
inputs = { | |
nixpkgs.url = "github:NixOS/nixpkgs/release-23.05"; | |
flake-utils.url = "github:numtide/flake-utils"; | |
}; | |
outputs = { self, nixpkgs, flake-utils }: | |
flake-utils.lib.eachDefaultSystem (system: | |
let | |
pkgs = import nixpkgs { | |
system = "x86_64-linux"; | |
config = { | |
allowUnfree = true; | |
permittedInsecurePackages = [ "nodejs-16.20.2" ]; | |
}; | |
}; | |
corepack = pkgs.runCommand "corepack-enable" { } '' | |
mkdir -p $out/bin | |
${pkgs.nodejs-16_x}/bin/corepack enable --install-directory $out/bin | |
''; | |
in | |
{ | |
devShell = with pkgs; pkgs.mkShell { | |
buildInputs = [ | |
act | |
pkgs.nodejs-16_x | |
corepack | |
]; | |
}; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment