2016-08-29 00:06:35 +01:00
|
|
|
{ stdenv, fetchcvs, ocaml, fuse, postgresql, pcre
|
2011-10-08 13:06:03 +01:00
|
|
|
, libuuid, gnome_vfs, pkgconfig, GConf }:
|
2008-03-07 06:11:08 +00:00
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
stdenv.mkDerivation {
|
2016-08-29 00:06:35 +01:00
|
|
|
name = "relfs-2008.03.05";
|
|
|
|
|
2010-07-29 19:55:16 +01:00
|
|
|
src = fetchcvs {
|
2008-03-07 06:11:08 +00:00
|
|
|
cvsRoot = ":pserver:anonymous@relfs.cvs.sourceforge.net:/cvsroot/relfs";
|
|
|
|
module = "relfs";
|
|
|
|
date = "2008-03-05";
|
|
|
|
sha256 = "949f8eff7e74ff2666cccf8a1efbfcce8d54bc41bec6ad6db8c029de7ca832a3";
|
|
|
|
};
|
2009-10-08 14:07:56 +01:00
|
|
|
|
2017-09-05 22:26:13 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ ocaml fuse postgresql pcre libuuid gnome_vfs GConf ];
|
2016-08-29 00:06:35 +01:00
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
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;
|
|
|
|
'';
|
|
|
|
|
2018-09-07 21:34:31 +01:00
|
|
|
meta = with stdenv.lib; {
|
2009-03-03 13:27:40 +00:00
|
|
|
description = "A relational filesystem on top of FUSE";
|
2018-09-07 21:34:31 +01:00
|
|
|
homepage = http://relfs.sourceforge.net;
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = [ maintainers.raskin ];
|
|
|
|
platforms = platforms.linux;
|
2016-08-29 00:06:35 +01:00
|
|
|
broken = true;
|
2008-03-07 06:11:08 +00:00
|
|
|
};
|
|
|
|
}
|