Created
January 24, 2025 19:50
-
-
Save binaryphile/80e0cb371f47382c5f9c9bb93ef87077 to your computer and use it in GitHub Desktop.
Node development shell flake
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
{ | |
description = "URMA Nix development environment"; | |
inputs = { | |
nixpkgs.url = "github:NixOS/nixpkgs"; | |
flake-utils.url = "github:numtide/flake-utils"; | |
}; | |
outputs = { self, nixpkgs, flake-utils }: | |
flake-utils.lib.eachDefaultSystem (system: | |
let | |
pkgs = import nixpkgs { | |
inherit system; | |
config.allowUnfree = true; # Allow unfree packages like vscode | |
}; | |
in { | |
devShells.default = pkgs.mkShell { | |
buildInputs = with pkgs; [ | |
git | |
nodejs | |
nodePackages.npm | |
vscode | |
]; | |
shellHook = '' | |
echo "Welcome to the development shell!" | |
echo "VSCode: Run 'code .' to launch" | |
echo "Node.js: $(node --version)" | |
echo "NPM: $(npm --version)" | |
''; | |
}; | |
} | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment