2015-04-20 19:42:55 +01:00
|
|
|
{ stdenv, autoconf, automake, makeWrapper, pkgconfig, libtool, which
|
|
|
|
, boost, btrfsProgs, cryptopp, curl, expat, fcgi, fuse, gperftools, keyutils
|
|
|
|
, leveldb, libaio, libatomic_ops, libedit, libuuid, linuxHeaders, openssl
|
|
|
|
, python, snappy, udev, xfsprogs, xz
|
|
|
|
, zfs ? null
|
|
|
|
|
|
|
|
# Version specific arguments
|
2015-04-20 20:01:40 +01:00
|
|
|
, version, src, patches ? []
|
2015-04-20 19:42:55 +01:00
|
|
|
, ...
|
|
|
|
}:
|
|
|
|
|
|
|
|
with stdenv.lib;
|
|
|
|
let
|
|
|
|
wrapArgs = "--prefix PYTHONPATH : \"$(toPythonPath $out)\""
|
|
|
|
+ " --prefix PYTHONPATH : \"$(toPythonPath ${python.modules.readline})\""
|
|
|
|
+ " --prefix PATH : \"$out/bin\""
|
|
|
|
+ " --prefix LD_LIBRARY_PATH : \"$out/lib\"";
|
|
|
|
in
|
2015-04-20 20:01:40 +01:00
|
|
|
stdenv.mkDerivation {
|
2015-04-20 19:42:55 +01:00
|
|
|
name="ceph-${version}";
|
|
|
|
|
|
|
|
inherit src;
|
|
|
|
|
2015-04-20 20:01:40 +01:00
|
|
|
patches = patches ++ [
|
2015-04-20 19:42:55 +01:00
|
|
|
./0001-Makefile-env-Don-t-force-sbin.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoconf automake makeWrapper pkgconfig libtool which ];
|
|
|
|
buildInputs = [
|
|
|
|
boost btrfsProgs cryptopp curl expat fcgi fuse gperftools keyutils
|
|
|
|
libatomic_ops leveldb libaio libedit libuuid linuxHeaders openssl python
|
|
|
|
snappy udev xfsprogs.lib xz zfs
|
|
|
|
];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
./autogen.sh
|
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--exec_prefix=\${out}"
|
|
|
|
"--sysconfdir=/etc"
|
|
|
|
"--localstatedir=/var"
|
|
|
|
] ++ optional (zfs != null) "--with-zfs=${zfs}";
|
|
|
|
|
|
|
|
installFlags = [ "sysconfdir=\${out}/etc" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/ceph ${wrapArgs}
|
|
|
|
wrapProgram $out/bin/ceph-brag ${wrapArgs}
|
|
|
|
wrapProgram $out/bin/ceph-rest-api ${wrapArgs}
|
|
|
|
wrapProgram $out/sbin/ceph-create-keys ${wrapArgs}
|
|
|
|
wrapProgram $out/sbin/ceph-disk ${wrapArgs}
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://ceph.com/;
|
|
|
|
description = "Distributed storage system";
|
|
|
|
license = licenses.lgpl21;
|
|
|
|
maintainers = with maintainers; [ ak wkennington ];
|
|
|
|
platforms = with platforms; linux;
|
|
|
|
};
|
|
|
|
|
|
|
|
passthru.version = version;
|
|
|
|
}
|