Fix up install directories
This commit is contained in:
@@ -151,17 +151,17 @@ let
|
|||||||
installPhase = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
|
||||||
mkdir -p "$out/libexec/$name" "$out/bin"
|
|
||||||
|
|
||||||
# Move the package contents to the output directory.
|
# Move the package contents to the output directory.
|
||||||
if grep -q '"workspaces"' package.json; then
|
if grep -q '"workspaces"' package.json; then
|
||||||
# We can't use `yarn pack` in a workspace setup, because it only
|
# We can't use `yarn pack` in a workspace setup, because it only
|
||||||
# packages the outer workspace.
|
# packages the outer workspace.
|
||||||
|
mkdir -p "$out/libexec"
|
||||||
mv $PWD "$out/libexec/$name"
|
mv $PWD "$out/libexec/$name"
|
||||||
else
|
else
|
||||||
# - If the package.json has a `files` field, only files matching those patterns are copied
|
# - If the package.json has a `files` field, only files matching those patterns are copied
|
||||||
# - Otherwise all files are copied.
|
# - Otherwise all files are copied.
|
||||||
yarn pack --out package.tgz
|
yarn pack --out package.tgz
|
||||||
|
mkdir -p "$out/libexec/$name"
|
||||||
tar xzvf package.tgz --directory "$out/libexec/$name" --strip-components=1
|
tar xzvf package.tgz --directory "$out/libexec/$name" --strip-components=1
|
||||||
|
|
||||||
cp .yarnrc* '@@LOCKFILE@@' "$out/libexec/$name"
|
cp .yarnrc* '@@LOCKFILE@@' "$out/libexec/$name"
|
||||||
@@ -180,6 +180,7 @@ let
|
|||||||
cd "$out/libexec/$name"
|
cd "$out/libexec/$name"
|
||||||
|
|
||||||
# Invoke a plugin internal command to setup binaries.
|
# Invoke a plugin internal command to setup binaries.
|
||||||
|
mkdir -p "$out/bin"
|
||||||
yarn nixify install-bin $out/bin
|
yarn nixify install-bin $out/bin
|
||||||
|
|
||||||
# A package with node_modules doesn't need the cache
|
# A package with node_modules doesn't need the cache
|
||||||
|
|||||||
Reference in New Issue
Block a user