archi: unbreak build

Additionally make a wrapper to put the jdk in the PATH to avoid
needed a global JDK
This commit is contained in:
freezeboy 2020-12-13 11:42:42 +01:00
parent e955c4315f
commit b25ba4a632

View File

@ -2,6 +2,8 @@
, fetchurl
, fetchzip
, autoPatchelfHook
, makeWrapper
, jdk
, libsecret
}:
@ -29,17 +31,20 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [
autoPatchelfHook
makeWrapper
];
installPhase =
if stdenv.hostPlatform.system == "x86_64-linux" then
''
mkdir -p $out/bin
for f in configuration features p2 plugins Archi.ini Archi; do
cp $f $out/bin/
mkdir -p $out/bin $out/libexec
for f in configuration features p2 plugins Archi.ini; do
cp -r $f $out/libexec
done
install -D -m755 Archi $out/bin/Archi
install -D -m755 Archi $out/libexec/Archi
makeWrapper $out/libexec/Archi $out/bin/Archi \
--prefix PATH : ${jdk}/bin
''
else
''