2008-03-07 06:11:08 +00:00
|
|
|
|
|
|
|
args : with args;
|
2008-11-04 21:24:10 +00:00
|
|
|
let localDefs = builderDefs.passthru.function {
|
2008-03-07 06:11:08 +00:00
|
|
|
src = /* put a fetchurl here */
|
|
|
|
if args ? src then args.src else fetchcvs {
|
|
|
|
cvsRoot = ":pserver:anonymous@relfs.cvs.sourceforge.net:/cvsroot/relfs";
|
|
|
|
module = "relfs";
|
|
|
|
date = "2008-03-05";
|
|
|
|
sha256 = "949f8eff7e74ff2666cccf8a1efbfcce8d54bc41bec6ad6db8c029de7ca832a3";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ocaml fuse postgresql pcre
|
2009-08-14 07:32:18 +01:00
|
|
|
libuuid gnomevfs pkgconfig GConf];
|
2008-03-07 06:11:08 +00:00
|
|
|
configureFlags = [];
|
2009-05-12 17:01:38 +01:00
|
|
|
build = builderDefs.stringsWithDeps.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 '
|
|
|
|
createuser -A -D \$1
|
|
|
|
dropdb relfs_\$1 ;
|
|
|
|
rm -rf /tmp/relfs-\$1-tmp;
|
|
|
|
mkdir /tmp/relfs-\$1-tmp;
|
|
|
|
USER=\$1 relfs -f -s /tmp/relfs-\$1-tmp &
|
|
|
|
sleep 1 &&
|
|
|
|
kill -15 \${!};
|
|
|
|
rm -rf /tmp/relfs-\$1-tmp ;
|
|
|
|
psql -d relfs_\$1 <<< \"ALTER DATABASE relfs_\$1 OWNER TO \$1;
|
|
|
|
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"];
|
2008-08-19 06:54:09 +01:00
|
|
|
};
|
2008-03-07 06:11:08 +00:00
|
|
|
in with localDefs;
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "relfs-"+version;
|
|
|
|
builder = writeScript (name + "-builder")
|
2009-05-12 17:01:38 +01:00
|
|
|
(textClosure localDefs ["build" "doMakeInstall" "doForceShare" "doPropagate"]);
|
2008-03-07 06:11:08 +00:00
|
|
|
meta = {
|
2009-03-03 13:27:40 +00:00
|
|
|
description = "A relational filesystem on top of FUSE";
|
2008-03-07 06:11:08 +00:00
|
|
|
inherit src;
|
2009-07-07 16:05:15 +01:00
|
|
|
maintainers = [args.lib.maintainers.raskin];
|
2009-09-16 15:53:06 +01:00
|
|
|
platforms = args.lib.platforms.linux;
|
2008-03-07 06:11:08 +00:00
|
|
|
};
|
|
|
|
}
|