about summary refs log tree commit diff
path: root/pkgs/servers/http/4store/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/servers/http/4store/default.nix')
-rw-r--r--pkgs/servers/http/4store/default.nix88
1 files changed, 45 insertions, 43 deletions
diff --git a/pkgs/servers/http/4store/default.nix b/pkgs/servers/http/4store/default.nix
index 4854f9e18dda..664953ca34dc 100644
--- a/pkgs/servers/http/4store/default.nix
+++ b/pkgs/servers/http/4store/default.nix
@@ -1,48 +1,50 @@
-x@{builderDefsPackage
-  , librdf_raptor, librdf_rasqal,
-  glib, libxml2, pcre, avahi,
-  readline, ncurses, expat,
-  zlib, pkgconfig, which,
-  perl, libuuid, gmp, mpfr
-  , db_dir ? "/var/lib/4store"
-  , ...}:
-builderDefsPackage
-(a :  
-let 
-  s = import ./src-for-default.nix;
-  helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 
-    ["db_dir"];
-  buildInputs = map (n: builtins.getAttr n x)
-    (builtins.attrNames (builtins.removeAttrs x helperArgNames));
-in
-rec {
-  src = a.fetchUrlFromSrcInfo s;
-
-  inherit (s) name;
-  inherit buildInputs;
-
-  /* doConfigure should be removed if not needed */
-  phaseNames = ["doFixConfigure" "doConfigure" "doMakeInstall"
-    "fixInterpreter"];
-
-  doFixConfigure = a.fullDepEntry ''
-    sed -e 's@#! */bin/bash@#! ${a.stdenv.shell}@' -i configure
+{ stdenv, fetchFromGitHub, librdf_raptor
+, librdf_rasqal, glib, libxml2, pcre
+, avahi, readline, ncurses, expat, autoreconfHook
+, zlib, pkgconfig, which, perl, libuuid
+, gmp, mpfr
+, db_dir ? "/var/lib/4store" }:
+
+
+stdenv.mkDerivation rec {
+  name = "4store-${version}";
+  version = "1.1.6";
+
+  src = fetchFromGitHub {
+    owner = "4store";
+    repo = "4store";
+    rev = "v${version}";
+    sha256 = "1kzdfmwpzy64cgqlkcz5v4klwx99w0jk7afckyf7yqbqb4rydmpk";
+  };
+
+  patches = [ ./4store-1.1.6-glibc-2.26.patch ];
+
+  nativeBuildInputs = [ autoreconfHook perl pkgconfig which ];
+
+  buildInputs = [ librdf_raptor librdf_rasqal glib libxml2 pcre
+    avahi readline ncurses expat zlib libuuid gmp mpfr ];
+
+  # needed for ./autogen.sh
+  prePatch = ''
+    echo "${version}" > .version
+  '';
+
+  preConfigure =  ''
+    sed -e 's@#! */bin/bash@#! ${stdenv.shell}@' -i configure
     find . -name Makefile -exec sed -e "s@/usr/local@$out@g" -i '{}' ';'
-    
-    sed -e 's@/var/lib/4store@${db_dir}@g' -i src/common/params.h src/utilities/*
+
+    rm src/utilities/4s-backend
+    sed -e 's@/var/lib/4store@${db_dir}@g' -i configure.ac src/utilities/*
     sed -e '/FS_STORE_ROOT/d' -i src/utilities/Makefile*
-  '' ["minInit" "doUnpack"];
+  '';
+
+  enableParallelBuilding = true;
 
-  fixInterpreter = (a.doPatchShebangs "$out/bin");
-      
-  meta = {
+  meta = with stdenv.lib; {
     description = "SparQL query server (RDF storage)";
-    homepage = http://4store.org/;
-    maintainers = with a.lib.maintainers;
-    [
-      raskin
-    ];
-    platforms = with a.lib.platforms;
-      linux;
+    homepage = https://4store.danielknoell.de/;
+    maintainers = with maintainers; [ raskin ];
+    platforms = platforms.linux;
+    broken = true; # since 2018-04-11
   };
-}) x
+}