Added Relational FS

svn path=/nixpkgs/trunk/; revision=9865
This commit is contained in:
Michael Raskin 2007-12-06 00:32:21 +00:00
parent 980b32acea
commit 8dd296f5db
3 changed files with 54 additions and 3 deletions

View File

@ -0,0 +1,48 @@
args : with args;
with builderDefs {
src = /* put a fetchurl here */
fetchcvs {
url = ":pserver:anonymous@relfs.cvs.sourceforge.net:/cvsroot/relfs";
module = "relfs";
date = "2007-12-01";
sha256 = "ef8e2ebfda6e43240051a7af9417092b2af50ece8b5c6c3fbd908ba91c4fe068";
};
buildInputs = [ocaml fuse postgresql pcre
e2fsprogs gnomevfs pkgconfig GConf];
configureFlags = [];
} null; /* null is a terminator for sumArgs */
let build = FullDepEntry ("
cd deps
sed -e 's/^CPP/#&/ ; s/^# CPP=gcc/CPP=gcc/' -i Makefile.camlidl
make
cd ../src
sed -e 's/NULL\\|FALSE/0/g' -i Mimetype_lib.c
sed -e 's@/usr/local/@'\$out/'@' -i Makefile
sed -e '/install:/a\\\tmkdir -p '\$out'/share' -i Makefile
make
mkdir -p \$out/bin
echo 'dropdb relfs_\$1 ;
rm -rf /tmp/relfs-\$1-tmp;
mkdir /tmp/relfs-\$1-tmp;
USER=\$1 relfs -f -s /tmp/relfs-raskin-tmp &
sleep 1 &&
kill -15 \${!};
rm -rf /tmp/relfs-\$1-tmp ;
psql -d relfs_\$1 <<< \"ALTER DATABASE relfs_raskin OWNER TO raskin;
ALTER TABLE obj OWNER TO \$1;
ALTER TABLE obj_mimetype OWNER TO \$1;
ALTER TABLE membership OWNER TO \$1;\"' > \$out/bin/relfs_grant;
chmod a+x \$out/bin/relfs_grant;
") [minInit doUnpack addInputs];
in
stdenv.mkDerivation rec {
name = "relfs-"+version;
builder = writeScript (name + "-builder")
(textClosure [build doMakeInstall doForceShare doPropagate]);
meta = {
description = "
Relational FS over FUSE.
";
};
}

View File

@ -674,13 +674,15 @@ rec {
zlibSupport = !stdenv ? isDietLibC;
};
/*relfsFun = lib.sumArgs (selectVersion ../tools/misc/relfs) {
inherit fetchcvs stdenv ocaml postgresql fuse builderDefs;
relfsFun = lib.sumArgs (selectVersion ../tools/misc/relfs) {
inherit fetchcvs stdenv ocaml postgresql fuse pcre
builderDefs e2fsprogs pkgconfig;
inherit (gnome) gnomevfs GConf;
};
relfs = relfsFun {
version = "cvs.2007.12.01";
} null;*/
} null;
replace = import ../tools/text/replace {
inherit fetchurl stdenv;

View File

@ -179,6 +179,7 @@ args: with args; with stringsWithDeps; with lib;
" else if (archiveType s) == "cvs-dir" then "
cp -r '${s}' .
cd \$(basename ${s})
chmod u+rwX -R .
" else (abort "unknown archive type : ${s}"))+
(if args ? goSrcDir then args.goSrcDir else "")
) [minInit];