Adding Redstore HTTP RDF/SPARQL server

svn path=/nixpkgs/trunk/; revision=22428
This commit is contained in:
Michael Raskin 2010-06-29 22:18:49 +00:00
parent f366f3020c
commit 14eea491b8
8 changed files with 62 additions and 11 deletions

View file

@ -12,4 +12,3 @@ src-for-default.nix will contain advertisedUrl (raw URL chosen on the site; its
nixpkgs/pkgs/build-support/upstream-updater directory contains some scripts. The worker script is called update-upstream-data.sh. This script requires main expression name (e.g. default.nix). It can optionally accpet a second parameter, URL which will be used instead of getting one by parsing the downloadPage (version extraction, mirror URL creation etc. will still be run). After running the script, check src-for-default.nix (or replace default.nix with expression name, if there are seceral expressions in the directory) for new version information.

View file

@ -1,10 +1,10 @@
args: with args;
stdenv.mkDerivation {
name = "raptor-1.4.19";
stdenv.mkDerivation rec {
name = "raptor-1.4.21";
src = fetchurl {
url = http://download.librdf.org/source/raptor-1.4.19.tar.gz;
sha256 = "0qpfl73dvkhngica7wk9qglvd0b3fp9wqnjkl5q8m6h1kf8605ml";
url = "http://download.librdf.org/source/${name}.tar.gz";
sha256 = "db3172d6f3c432623ed87d7d609161973d2f7098e3d2233d0702fbcc22cfd8ca";
};
buildInputs = [

View file

@ -18,10 +18,6 @@ stdenv.mkDerivation rec {
librdf_raptor librdf_rasqal
];
preConfigure = ''
export NIX_LDFLAGS="$NIX_LDFLAGS -lrasqal -lraptor"
'';
configureFlags =
[ "--with-threads" ]
++ stdenv.lib.optional (bdb != null) "--with-bdb=${bdb}";

View file

@ -94,6 +94,11 @@ rec {
composedArgsAndFun = f: foldArgs defaultMerge f {};
# shortcut for attrByPath ["name"] default attrs
maybeAttrNullable = name: default: attrs:
if attrs == null then default else
if (__hasAttr name attrs) then (__getAttr name attrs) else default;
# shortcut for attrByPath ["name"] default attrs
maybeAttr = name: default: attrs:
if (__hasAttr name attrs) then (__getAttr name attrs) else default;
@ -204,8 +209,8 @@ rec {
innerClosePropagation
(ready ++ [(head list)])
((tail list)
++ (maybeAttr "propagatedBuildInputs" [] (head list))
++ (maybeAttr "propagatedBuildNativeInputs" [] (head list)));
++ (maybeAttrNullable "propagatedBuildInputs" [] (head list))
++ (maybeAttrNullable "propagatedBuildNativeInputs" [] (head list)));
closePropagation = list: (uniqList {inputList = (innerClosePropagation [] list);});

View file

@ -0,0 +1,32 @@
x@{builderDefsPackage
, redland, pkgconfig, gmp
, ...}:
builderDefsPackage
(a :
let
s = import ./src-for-default.nix;
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
[];
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 = ["doConfigure" "doMakeInstall"];
meta = {
description = "An HTTP interface to Redland RDF store";
maintainers = with a.lib.maintainers;
[
raskin
];
platforms = with a.lib.platforms;
linux ++ freebsd ++ gnu;
};
}) x

View file

@ -0,0 +1,9 @@
rec {
version="0.4";
name="redstore-0.4";
hash="1fs54v0d0kkqaz9ajacabb8wifrglvg6kkhd5b0mxmnng352wpp7";
url="http://redstore.googlecode.com/files/redstore-${version}.tar.gz";
advertisedUrl="http://redstore.googlecode.com/files/redstore-0.4.tar.gz";
}

View file

@ -0,0 +1,6 @@
{
downloadPage = "http://code.google.com/p/redstore/downloads/list";
baseName = "redstore";
choiceCommand = '' head -n 1 |
sed -re "s@[&].*@@; s@.*[?]name=(.*)@http://$(sed -re "s@.*/p/([^/]+)/.*@\\1@" <<< "$(getAttr downloadPage)").googlecode.com/files/\\1@" '';
}

View file

@ -5943,6 +5943,10 @@ let
inherit fetchurl stdenv m4 groff readline;
};
redstore = import ../servers/http/redstore {
inherit builderDefsPackage redland pkgconfig gmp;
};
samba = makeOverridable (import ../servers/samba) {
inherit stdenv fetchurl readline openldap pam kerberos popt iniparser
libunwind acl fam;