File tree Expand file tree Collapse file tree 5 files changed +50
-33
lines changed
Expand file tree Collapse file tree 5 files changed +50
-33
lines changed Original file line number Diff line number Diff line change 4545 "eslint-plugin-prettier" : " ^3.3.1" ,
4646 "jest" : " ^26.6.3" ,
4747 "jest-mock-process" : " ^1.4.0" ,
48- "pkg" : " 5.3.1 " ,
48+ "pkg" : " 5.3.0 " ,
4949 "prettier" : " ^2.2.1" ,
5050 "ts-jest" : " ^26.4.4" ,
5151 "ts-node" : " ^9.1.1" ,
Original file line number Diff line number Diff line change 22
33with pkgs ;
44let
5- pkg = pkgs . nodePackages . pkg . override {
6- postFixup = ''
7- patch -p0 < ${ ./nix/leveldown.patch }
8- '' ;
9- } ;
105 utils = callPackage ./utils.nix { } ;
116 buildElf = arch :
127 stdenv . mkDerivation rec {
138 name = "${ utils . basename } -${ version } -linux-${ arch } " ;
149 version = utils . node2nixDev . version ;
1510 src = "${ utils . node2nixDev } /lib/node_modules/${ utils . node2nixDev . packageName } " ;
1611 buildInputs = [
17- pkg
12+ utils . pkg
1813 ] ;
1914 PKG_CACHE_PATH = utils . pkgCachePath ;
2015 PKG_IGNORE_TAG = 1 ;
4035 version = utils . node2nixDev . version ;
4136 src = "${ utils . node2nixDev } /lib/node_modules/${ utils . node2nixDev . packageName } " ;
4237 buildInputs = [
43- pkg
38+ utils . pkg
4439 ] ;
4540 PKG_CACHE_PATH = utils . pkgCachePath ;
4641 PKG_IGNORE_TAG = 1 ;
6560 version = utils . node2nixDev . version ;
6661 src = "${ utils . node2nixDev } /lib/node_modules/${ utils . node2nixDev . packageName } " ;
6762 buildInputs = [
68- pkg
63+ utils . pkg
6964 ] ;
7065 PKG_CACHE_PATH = utils . pkgCachePath ;
7166 PKG_IGNORE_TAG = 1 ;
Original file line number Diff line number Diff line change 11{ pkgs ? import ./pkgs.nix { } } :
22
33with pkgs ;
4- pkgs . mkShell {
5- nativeBuildInputs = [
6- nodejs
7- nodePackages . node2nix
8- ] ;
9- shellHook = ''
10- echo 'Entering Typescript-Demo-Lib'
11- set -o allexport
12- . ./.env
13- set +o allexport
14- set -v
4+ let
5+ utils = callPackage ./utils.nix { } ;
6+ in
7+ pkgs . mkShell {
8+ nativeBuildInputs = [
9+ nodejs
10+ nodePackages . node2nix
11+ utils . pkg
12+ ] ;
13+ PKG_CACHE_PATH = utils . pkgCachePath ;
14+ PKG_IGNORE_TAG = 1 ;
15+ # ensure that native modules are built from source
16+ npm_config_build_from_source = "true" ;
17+ shellHook = ''
18+ echo 'Entering Typescript-Demo-Lib'
19+ set -o allexport
20+ . ./.env
21+ set +o allexport
22+ set -v
1523
16- export PATH="$(pwd)/dist/bin:$(npm bin):$PATH"
17- npm install
18- mkdir --parents "$(pwd)/tmp"
24+ export PATH="$(pwd)/dist/bin:$(npm bin):$PATH"
1925
20- set +v
21- '' ;
22- }
26+ # pkg is installed in package.json
27+ # this ensures that in nix-shell we are using the nix packaged versions
28+ export PATH="${ lib . makeBinPath
29+ [
30+ utils . pkg
31+ ]
32+ } :$PATH"
33+
34+ npm install
35+ mkdir --parents "$(pwd)/tmp"
36+
37+ set +v
38+ '' ;
39+ }
Original file line number Diff line number Diff line change 8282 path = pkgBuild . macos-x64 ;
8383 }
8484 ] ;
85+ pkg = pkgs . nodePackages . pkg . override {
86+ postFixup = ''
87+ patch -p0 < ${ ./nix/leveldown.patch }
88+ '' ;
89+ } ;
8590}
You can’t perform that action at this time.
0 commit comments