default.nix 629 B

12345678910111213141516171819202122232425
  1. {
  2. description = "Node.js and JavaScript development environment";
  3. inputs = {
  4. nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
  5. };
  6. outputs = { self, nixpkgs }:
  7. let
  8. supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
  9. forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
  10. pkgs = import nixpkgs { inherit system; };
  11. });
  12. in
  13. {
  14. devShells = forEachSupportedSystem ({ pkgs }: {
  15. default = pkgs.mkShell {
  16. packages = with pkgs; [
  17. nodejs
  18. nodePackages.npm
  19. ];
  20. };
  21. });
  22. };
  23. }