File tree Expand file tree Collapse file tree 3 files changed +8
-24
lines changed
examples/typescript-flake-project Expand file tree Collapse file tree 3 files changed +8
-24
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 53
53
- executes `${name}-npm-extra-dependencies`.
54
54
55
55
- `packages."${name}-typescript-exe"` is `packages."${name}-typescript"` except
56
- runs `npm install --global --prefix="$out"` for the `installPhase`.
56
+ runs `npm install --global --prefix="$out"` for the `installPhase` and
57
+ copies some of the symbolic links so that the output makes sense.
57
58
58
59
- `packages."${name}-typescript-tgz"` is `packages."${name}-typescript"` except
59
60
runs `npm pack` after the `buildPhase` to create a tarball of the project in
Original file line number Diff line number Diff line change @@ -410,9 +410,12 @@ pkgs.lib.makeExtensible
410
410
# A better solution would be to symlink stuff inside the tarballs
411
411
# / find a way to tell npm that the dependencies are in the root
412
412
# directory in `./.extra-dependencies/*`
413
- mv -f ${ pkgs . lib . escapeShellArg npmExtraDependenciesFolder } "$TMPFILE"
414
- rm -rf .gitignore # otherwise, `npm` will ignore the `.extra-dependencies`
415
- cp -Lr "$TMPFILE" ${ pkgs . lib . escapeShellArg npmExtraDependenciesFolder }
413
+ if [ -e ${ pkgs . lib . escapeShellArg npmExtraDependenciesFolder } ]
414
+ then
415
+ mv -f ${ pkgs . lib . escapeShellArg npmExtraDependenciesFolder } "$TMPFILE"
416
+ rm -rf .gitignore # otherwise, `npm` will ignore the `.extra-dependencies`
417
+ cp -Lr "$TMPFILE" ${ pkgs . lib . escapeShellArg npmExtraDependenciesFolder }
418
+ fi
416
419
417
420
mkdir -p "$out/tarballs"
418
421
npm pack --pack-destination "$out/tarballs"
You can’t perform that action at this time.
0 commit comments