2011-11-02 19:54:49 +01:00
|
|
|
{ stdenv, fetchurl, flex, udev, perl }:
|
2011-11-01 16:21:31 +01:00
|
|
|
|
|
|
|
assert stdenv.isLinux;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "drbd-8.4.0";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://oss.linbit.com/drbd/8.4/${name}.tar.gz";
|
|
|
|
sha256 = "096njwxjpwvnl259gxq6cr6n0r6ba0h5aryvgk05hqi95jx927vg";
|
|
|
|
};
|
|
|
|
|
2011-11-02 19:54:49 +01:00
|
|
|
patches = [ ./pass-force.patch ];
|
|
|
|
|
|
|
|
buildInputs = [ flex perl ];
|
2011-11-01 16:21:31 +01:00
|
|
|
|
2011-11-02 18:13:38 +01:00
|
|
|
configureFlags = "--without-distro --without-pacemaker --localstatedir=/var --sysconfdir=/etc";
|
2011-11-01 16:21:31 +01:00
|
|
|
|
|
|
|
preConfigure =
|
|
|
|
''
|
|
|
|
export PATH=${udev}/sbin:$PATH
|
|
|
|
substituteInPlace user/Makefile.in --replace /sbin/ $out/sbin/
|
2011-11-02 18:13:38 +01:00
|
|
|
substituteInPlace user/legacy/Makefile.in \
|
|
|
|
--replace /sbin/ $out/sbin/ \
|
|
|
|
--replace '$(DESTDIR)/lib/drbd' $out/lib/drbd
|
|
|
|
substituteInPlace user/drbdadm_usage_cnt.c --replace /lib/drbd $out/lib/drbd
|
2011-11-01 16:21:31 +01:00
|
|
|
substituteInPlace scripts/drbd.rules --replace /sbin/drbdadm $out/sbin/drbdadm
|
|
|
|
'';
|
|
|
|
|
|
|
|
makeFlags = "SHELL=${stdenv.shell}";
|
|
|
|
|
|
|
|
installFlags = "localstatedir=$(TMPDIR)/var sysconfdir=$(out)/etc INITDIR=$(out)/etc/init.d";
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://www.drbd.org/;
|
|
|
|
description = "Distributed Replicated Block Device, a distributed storage system for Linux";
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|