Skip to content

Commit

Permalink
Use pushd/popd to work around issue with -d
Browse files Browse the repository at this point in the history
  • Loading branch information
raphiz committed Feb 6, 2024
1 parent d53e305 commit 7ecdd38
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions buildGradleApplication/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -68,24 +68,26 @@
'';
installPhase = ''
runHook preInstall
pushd ${installLocaltion}
mkdir -p $out/lib/
mv ${installLocaltion}/lib/*.jar $out/lib/
mv lib/*.jar $out/lib/
${linkScript} $out/lib/
if [ -d ${installLocaltion}/agent-libs/ ]; then
if [ -d agent-libs/ ]; then
mkdir -p $out/agent-libs/
mv ${installLocaltion}/agent-libs/*.jar $out/agent-libs/
mv agent-libs/*.jar $out/agent-libs/
${linkScript} $out/agent-libs/
fi
mkdir -p $out/bin
cp $(ls ${installLocaltion}/bin/* | grep -v ".bat") $out/bin/${pname}
cp $(ls bin/* | grep -v ".bat") $out/bin/${pname}
wrapProgram $out/bin/${pname} \
--set-default JAVA_HOME "${jdk.home}"
popd
runHook postInstall
'';
};
Expand Down

0 comments on commit 7ecdd38

Please sign in to comment.