Jump to content

Node.js: Difference between revisions

30 bytes added ,  8 September 2023
update example to use python3, default is python
imported>Garethstokes
(add example of a nix flake for developer shell.)
imported>Artturin
(update example to use python3, default is python)
Line 159: Line 159:
let
let
   lib = import <nixpkgs/lib>;
   lib = import <nixpkgs/lib>;
   buildNodeJs = pkgs.callPackage <nixpkgs/pkgs/development/web/nodejs/nodejs.nix> {};
   buildNodeJs = pkgs.callPackage "${nixpkgs}/pkgs/development/web/nodejs/nodejs.nix" {
    python = pkgs.python3;
  };


   nodejsVersion = lib.fileContents ./.nvmrc;
   nodejsVersion = lib.fileContents ./.nvmrc;
Line 193: Line 195:
   description = "example-node-js-flake";
   description = "example-node-js-flake";


   inputs = {  
   inputs = {
     flake-utils.url = "github:numtide/flake-utils";
     flake-utils.url = "github:numtide/flake-utils";
   };
   };
Line 200: Line 202:
     flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
     flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
       let
       let
         pkgs = import nixpkgs {  
         pkgs = import nixpkgs {
           inherit system;  
           inherit system;
         };
         };


Anonymous user