Merge pull request #310577 from zebreus/fix-fuseki

apache-jena-fuseki: fix running with nix run
This commit is contained in:
7c6f434c 2024-05-10 13:32:36 +00:00 committed by GitHub
commit 6005362903
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -24,9 +24,12 @@ stdenv.mkDerivation rec {
chmod +x $out/fuseki chmod +x $out/fuseki
ln -s "$out"/{fuseki-backup,fuseki-server,fuseki} "$out/bin" ln -s "$out"/{fuseki-backup,fuseki-server,fuseki} "$out/bin"
for i in "$out"/bin/*; do for i in "$out"/bin/*; do
# It is necessary to set the default $FUSEKI_BASE directory to a writable location
# By default it points to $FUSEKI_HOME/run which is in the nix store
wrapProgram "$i" \ wrapProgram "$i" \
--prefix "PATH" : "${java}/bin/:${coreutils}/bin:${which}/bin" \ --prefix "PATH" : "${java}/bin/:${coreutils}/bin:${which}/bin" \
--set-default "FUSEKI_HOME" "$out" \ --set-default "FUSEKI_HOME" "$out" \
--run "if [ -z \"\$FUSEKI_BASE\" ]; then export FUSEKI_BASE=\"\$HOME/.local/fuseki\" ; mkdir -p \"\$HOME/.local/fuseki\" ; fi" \
; ;
done done
''; '';
@ -40,7 +43,9 @@ stdenv.mkDerivation rec {
license = licenses.asl20; license = licenses.asl20;
maintainers = with maintainers; [ raskin ]; maintainers = with maintainers; [ raskin ];
platforms = platforms.all; platforms = platforms.all;
sourceProvenance = with sourceTypes; [ binaryBytecode binaryNativeCode ];
homepage = "https://jena.apache.org"; homepage = "https://jena.apache.org";
downloadPage = "https://archive.apache.org/dist/jena/binaries/"; downloadPage = "https://archive.apache.org/dist/jena/binaries/";
mainProgram = "fuseki";
}; };
} }