nixpkgs/pkgs/servers/nosql/apache-jena/fuseki-binary.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

52 lines
1.5 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchurl
, java
, coreutils
, which
, makeWrapper
# For the test
, pkgs
}:
stdenv.mkDerivation rec {
pname = "apache-jena-fuseki";
2024-08-14 11:17:46 +00:00
version = "5.1.0";
src = fetchurl {
url = "mirror://apache/jena/binaries/apache-jena-fuseki-${version}.tar.gz";
2024-08-14 11:17:46 +00:00
hash = "sha256-GcwXcLVM2txPC+kkHjEIpqK9dTkQEN9Jkka0EaJRO7Q=";
};
nativeBuildInputs = [
makeWrapper
];
installPhase = ''
cp -r . "$out"
2021-09-18 20:27:15 +00:00
chmod +x $out/fuseki
ln -s "$out"/{fuseki-backup,fuseki-server,fuseki} "$out/bin"
for i in "$out"/bin/fuseki*; do
2024-05-10 12:42:02 +00:00
# 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" \
--prefix "PATH" : "${java}/bin/:${coreutils}/bin:${which}/bin" \
--set-default "FUSEKI_HOME" "$out" \
2024-05-10 12:42:02 +00:00
--run "if [ -z \"\$FUSEKI_BASE\" ]; then export FUSEKI_BASE=\"\$HOME/.local/fuseki\" ; mkdir -p \"\$HOME/.local/fuseki\" ; fi" \
;
done
'';
passthru = {
tests = {
basic-test = pkgs.callPackage ./fuseki-test.nix { };
};
};
meta = with lib; {
description = "SPARQL server";
license = licenses.asl20;
maintainers = with maintainers; [ raskin ];
2023-09-05 19:48:52 +00:00
platforms = platforms.all;
2024-05-10 12:42:02 +00:00
sourceProvenance = with sourceTypes; [ binaryBytecode binaryNativeCode ];
homepage = "https://jena.apache.org";
downloadPage = "https://archive.apache.org/dist/jena/binaries/";
2024-05-10 12:42:02 +00:00
mainProgram = "fuseki";
};
}