-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdefault.nix
38 lines (31 loc) · 834 Bytes
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{ pkgs ? import <nixpkgs> {} }:
let
lib = import <nixpkgs/lib>;
buildNodeJs = pkgs.callPackage "${<nixpkgs>}/pkgs/development/web/nodejs/nodejs.nix" {
python = pkgs.python3;
};
nodejsVersion = lib.fileContents ./.nvmrc;
nodejs = buildNodeJs {
enableNpm = false;
version = nodejsVersion;
sha256 = "sha256-HgtvLyyk+wtGRKETYxadr0t8QvAOWlPSxlqf3EY+fYg=";
};
NPM_CONFIG_PREFIX = toString ./npm_config_prefix;
in pkgs.mkShell {
packages = with pkgs; [
nodejs
nodePackages.npm
nodePackages.parcel
nodePackages.yarn
elmPackages.elm
elmPackages.elm-review
elmPackages.elm-format
elmPackages.elm-test
elmPackages.elm-upgrade
elmPackages.elm-language-server
];
inherit NPM_CONFIG_PREFIX;
shellHook = ''
export PATH="${NPM_CONFIG_PREFIX}/bin:$PATH"
'';
}