nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 55 lines 1.5 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 java, 6 coreutils, 7 which, 8 makeWrapper, 9 # For the test 10 pkgs, 11}: 12 13stdenv.mkDerivation rec { 14 pname = "apache-jena-fuseki"; 15 version = "5.1.0"; 16 src = fetchurl { 17 url = "mirror://apache/jena/binaries/apache-jena-fuseki-${version}.tar.gz"; 18 hash = "sha256-GcwXcLVM2txPC+kkHjEIpqK9dTkQEN9Jkka0EaJRO7Q="; 19 }; 20 nativeBuildInputs = [ 21 makeWrapper 22 ]; 23 installPhase = '' 24 cp -r . "$out" 25 chmod +x $out/fuseki 26 ln -s "$out"/{fuseki-backup,fuseki-server,fuseki} "$out/bin" 27 for i in "$out"/bin/fuseki*; do 28 # It is necessary to set the default $FUSEKI_BASE directory to a writable location 29 # By default it points to $FUSEKI_HOME/run which is in the nix store 30 wrapProgram "$i" \ 31 --prefix "PATH" : "${java}/bin/:${coreutils}/bin:${which}/bin" \ 32 --set-default "FUSEKI_HOME" "$out" \ 33 --run "if [ -z \"\$FUSEKI_BASE\" ]; then export FUSEKI_BASE=\"\$HOME/.local/fuseki\" ; mkdir -p \"\$HOME/.local/fuseki\" ; fi" \ 34 ; 35 done 36 ''; 37 passthru = { 38 tests = { 39 basic-test = pkgs.callPackage ./fuseki-test.nix { }; 40 }; 41 }; 42 meta = { 43 description = "SPARQL server"; 44 license = lib.licenses.asl20; 45 maintainers = with lib.maintainers; [ raskin ]; 46 platforms = lib.platforms.all; 47 sourceProvenance = with lib.sourceTypes; [ 48 binaryBytecode 49 binaryNativeCode 50 ]; 51 homepage = "https://jena.apache.org"; 52 downloadPage = "https://archive.apache.org/dist/jena/binaries/"; 53 mainProgram = "fuseki"; 54 }; 55}