Add Apache Jena Fuseki instead of obsolete and unavailable Jena Joseki
This commit is contained in:
parent
2af46e4393
commit
a08c8b12f0
@ -1,112 +0,0 @@
|
||||
x@{builderDefsPackage
|
||||
, unzip
|
||||
, ...}:
|
||||
builderDefsPackage
|
||||
(a :
|
||||
let
|
||||
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
|
||||
[];
|
||||
|
||||
buildInputs = map (n: builtins.getAttr n x)
|
||||
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
|
||||
sourceInfo = rec {
|
||||
baseName="jena-joseki";
|
||||
version="3.4.3-201103";
|
||||
name="${baseName}-${version}";
|
||||
};
|
||||
in
|
||||
rec {
|
||||
inherit (sourceInfo) name version;
|
||||
inherit buildInputs;
|
||||
|
||||
tarballs = {
|
||||
jenaBin = a.fetchurl {
|
||||
url = "mirror://sourceforge/project/jena/Jena/Jena-2.6.4/jena-2.6.4.zip";
|
||||
sha256 = "ec23a24eee9148b1ddb366ab035a48eacd43c2b50c534a7bdd9cf31c6f8a9e7c";
|
||||
};
|
||||
josekiBin = a.fetchurl {
|
||||
url = "mirror://sourceforge/project/joseki/Joseki-SPARQL/Joseki-3.4.3/joseki-3.4.3.zip";
|
||||
sha256 = "cde1138e7bafcc2db7800dcde08f268237accd76c0a3e4b4c95cc96eacdcad12";
|
||||
};
|
||||
tdbBin = a.fetchurl {
|
||||
url = "mirror://sourceforge/project/jena/TDB/TDB-0.8.9/tdb-0.8.9.zip";
|
||||
sha256 = "78fd4b6cea5a6e412f1d58ba8a9e1fc72315becdf06f3675e4e604cd4435779e";
|
||||
};
|
||||
arqBin = a.fetchurl {
|
||||
url = "mirror://sourceforge/project/jena/ARQ/ARQ-2.8.7/arq-2.8.7.zip";
|
||||
sha256 = "66990e92514a85a9596a7efaf128041002cd098e063964dd5d2264cfcdd26070";
|
||||
};
|
||||
jettyBin = a.fetchurl {
|
||||
url = "http://dist.codehaus.org/jetty/jetty-6.1.26/jetty-6.1.26.zip";
|
||||
sha256 = "96c08eb87ec3772dccc2b3dba54fea85ccc3f804faf7429eecfba3ed55648187";
|
||||
};
|
||||
};
|
||||
tarballFiles = map (x: builtins.getAttr x tarballs) (builtins.attrNames tarballs);
|
||||
|
||||
/* doConfigure should be removed if not needed */
|
||||
phaseNames = ["doDeploy" "fixScripts"];
|
||||
|
||||
fixScripts = a.doPatchShebangs ''$TARGET/bin'';
|
||||
|
||||
doDeploy = a.fullDepEntry (''
|
||||
${a.lib.concatStringsSep ";" (map (y : "unzip ${y}") tarballFiles)}
|
||||
for i in */; do cp -rTf $i merged; done
|
||||
cd merged
|
||||
|
||||
for i in "lib/"jsp-*/*.jar; do
|
||||
ln -s "''${i#lib/}" "lib" || true
|
||||
done
|
||||
|
||||
cp [Cc]opyright* doc
|
||||
mkdir lib/obsolete
|
||||
(
|
||||
ls "lib/"log4j-[0-9]*.jar | sort | tac | tail -n +2 ;
|
||||
ls "lib/"slf4j-api-[0-9]*.jar | sort | tac | tail -n +2 ;
|
||||
ls "lib/"xercesImpl-[0-9]*.jar | sort | tac | tail -n +2 ;
|
||||
ls "lib/"arq-[0-9]*.jar | sort | tac | tail -n +2
|
||||
ls "lib/"tdb-[0-9]*.jar | sort | tac | tail -n +2
|
||||
ls "lib/"jetty-[0-9]*.jar | sort | tac | tail -n +2
|
||||
ls "lib/"jetty-util-[0-9]*.jar | sort | tac | tail -n +2
|
||||
) |
|
||||
xargs -I @@ mv @@ lib/obsolete
|
||||
|
||||
mv lib/slf4j-simple-*.jar lib/obsolete
|
||||
|
||||
mkdir -p "$out/share"
|
||||
TARGET="$out/share/${name}-dist"
|
||||
cp -r . "$TARGET"
|
||||
ln -s "$TARGET/lib" "$out/lib"
|
||||
chmod a+x "$TARGET/bin/"*
|
||||
mkdir -p "$out/bin"
|
||||
|
||||
sed -e 's/\r//g' -i "$TARGET/bin"/*
|
||||
|
||||
echo -e '#! ${a.stdenv.shell}\nls "'"$TARGET"'"/bin' > "$out/bin/jena-list-commands"
|
||||
echo '#! ${a.stdenv.shell}' >> "$out/bin/jena-command"
|
||||
echo 'export JENAROOT="'"$TARGET"'"' >> "$out/bin/jena-command"
|
||||
echo 'export JOSEKIROOT="'"$TARGET"'"' >> "$out/bin/jena-command"
|
||||
echo 'export TDBROOT="'"$TARGET"'"' >> "$out/bin/jena-command"
|
||||
echo 'export ARQROOT="'"$TARGET"'"' >> "$out/bin/jena-command"
|
||||
echo 'sh "'"$TARGET"'"/bin/"$@"' >> "$out/bin/jena-command"
|
||||
|
||||
chmod a+x "$out/bin/"*
|
||||
'') ["defEnsureDir" "minInit" "addInputs"];
|
||||
|
||||
trimVersions = a.fullDepEntry (''
|
||||
'') ["doDeploy" "minInit"];
|
||||
|
||||
passthru = {
|
||||
inherit tarballs;
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "An RDF database with SparQL interface over HTTP";
|
||||
maintainers = with a.lib.maintainers;
|
||||
[
|
||||
raskin
|
||||
];
|
||||
hydraPlatforms = []; # Builder is just unpacking/mixing what is needed
|
||||
license = a.lib.licenses.free; # mix of packages under different licenses
|
||||
homepage = "http://openjena.org/";
|
||||
};
|
||||
}) x
|
@ -33,6 +33,6 @@ stdenv.mkDerivation {
|
||||
homepage = "http://jena.apache.org";
|
||||
downloadPage = "http://archive.apache.org/dist/jena/binaries/";
|
||||
updateWalker = true;
|
||||
downloadURLRegex = "apache-jena-.*[.]tar[.]gz\$";
|
||||
downloadURLRegexp = "apache-jena-.*[.]tar[.]gz\$";
|
||||
};
|
||||
}
|
||||
|
41
pkgs/servers/nosql/apache-jena/fuseki-binary.nix
Normal file
41
pkgs/servers/nosql/apache-jena/fuseki-binary.nix
Normal file
@ -0,0 +1,41 @@
|
||||
{stdenv, fetchurl, java, makeWrapper}:
|
||||
let
|
||||
s = # Generated upstream information
|
||||
rec {
|
||||
baseName="apache-jena-fuseki";
|
||||
version = "2.3.1";
|
||||
name="${baseName}-${version}";
|
||||
url="http://archive.apache.org/dist/jena/binaries/apache-jena-fuseki-${version}.tar.gz";
|
||||
sha256 = "1c5330kwnby1vqcia1vm6z17j8hzyyajvvv46rf478l7wkzmyvlp";
|
||||
};
|
||||
buildInputs = [
|
||||
makeWrapper
|
||||
];
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
inherit (s) name version;
|
||||
inherit buildInputs;
|
||||
src = fetchurl {
|
||||
inherit (s) url sha256;
|
||||
};
|
||||
installPhase = ''
|
||||
cp -r . "$out"
|
||||
ln -s "$out"/{fuseki-server,fuseki} "$out/bin"
|
||||
for i in "$out"/bin/*; do
|
||||
wrapProgram "$i" \
|
||||
--prefix "PATH" : "${java}/bin/" \
|
||||
--set "FUSEKI_HOME" '"''${FUSEKI_HOME:-'"$out"'}"' \
|
||||
;
|
||||
done
|
||||
'';
|
||||
meta = {
|
||||
inherit (s) version;
|
||||
description = ''SPARQL server'';
|
||||
license = stdenv.lib.licenses.asl20;
|
||||
maintainers = [stdenv.lib.maintainers.raskin];
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
homepage = "http://jena.apache.org";
|
||||
downloadPage = "http://archive.apache.org/dist/jena/binaries/";
|
||||
downloadURLRegexp = "apache-jena-fuseki-.*[.]tar[.]gz\$";
|
||||
};
|
||||
}
|
4
pkgs/servers/nosql/apache-jena/fuseki-binary.upstream
Normal file
4
pkgs/servers/nosql/apache-jena/fuseki-binary.upstream
Normal file
@ -0,0 +1,4 @@
|
||||
name apache-jena-fuseki
|
||||
attribute apache-jena-fuseki
|
||||
target fuseki-binary.nix
|
||||
minimize_overwrite
|
@ -9426,6 +9426,12 @@ let
|
||||
java = jdk;
|
||||
};
|
||||
|
||||
apache-jena-fuseki = callPackage ../servers/nosql/apache-jena/fuseki-binary.nix {
|
||||
java = jdk;
|
||||
};
|
||||
|
||||
fuseki = apache-jena-fuseki;
|
||||
|
||||
apcupsd = callPackage ../servers/apcupsd { };
|
||||
|
||||
asterisk = callPackage ../servers/asterisk { };
|
||||
@ -9544,8 +9550,6 @@ let
|
||||
|
||||
jetty92 = callPackage ../servers/http/jetty/9.2.nix { };
|
||||
|
||||
joseki = callPackage ../servers/http/joseki {};
|
||||
|
||||
rdkafka = callPackage ../development/libraries/rdkafka { };
|
||||
|
||||
leafnode = callPackage ../servers/news/leafnode { };
|
||||
@ -16215,6 +16219,7 @@ aliases = with pkgs; {
|
||||
htmlTidy = html-tidy; # added 2014-12-06
|
||||
inherit (haskell.compiler) jhc uhc; # 2015-05-15
|
||||
inotifyTools = inotify-tools;
|
||||
joseki = apache-jena-fuseki; # added 2016-02-28
|
||||
jquery_ui = jquery-ui; # added 2014-09-07
|
||||
libdbusmenu_qt5 = qt5.libdbusmenu; # added 2015-12-19
|
||||
libtidy = html-tidy; # added 2014-12-21
|
||||
|
Loading…
Reference in New Issue
Block a user