Skip to content

Instantly share code, notes, and snippets.

@schickling
Created September 28, 2023 13:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save schickling/2c2ab55b338d8fa1ab7458ac4ecccce0 to your computer and use it in GitHub Desktop.
Save schickling/2c2ab55b338d8fa1ab7458ac4ecccce0 to your computer and use it in GitHub Desktop.
Node.js 16 Nix flake
{
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