2015-10-03 21:52:03 +03:00
|
|
|
{ stdenv, fetchurl, flex, systemd, perl }:
|
2011-11-01 19:21:31 +04:00
|
|
|
|
|
|
|
assert stdenv.isLinux;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2013-11-21 06:23:40 +04:00
|
|
|
name = "drbd-8.4.4";
|
2011-11-01 19:21:31 +04:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://oss.linbit.com/drbd/8.4/${name}.tar.gz";
|
2015-04-20 18:19:06 +03:00
|
|
|
sha256 = "1w4889h1ak7gy9w33kd4fgjlfpgmp6hzfya16p1pkc13bjf22mm0";
|
2011-11-01 19:21:31 +04:00
|
|
|
};
|
|
|
|
|
2011-11-02 22:54:49 +04:00
|
|
|
patches = [ ./pass-force.patch ];
|
|
|
|
|
|
|
|
buildInputs = [ flex perl ];
|
2011-11-01 19:21:31 +04:00
|
|
|
|
2011-11-02 21:13:38 +04:00
|
|
|
configureFlags = "--without-distro --without-pacemaker --localstatedir=/var --sysconfdir=/etc";
|
2011-11-01 19:21:31 +04:00
|
|
|
|
|
|
|
preConfigure =
|
|
|
|
''
|
2015-10-03 21:52:03 +03:00
|
|
|
export PATH=${systemd.udev.bin}/sbin:$PATH
|
2017-03-21 00:25:10 +03:00
|
|
|
substituteInPlace user/Makefile.in \
|
|
|
|
--replace /sbin '$(sbindir)'
|
2011-11-02 21:13:38 +04:00
|
|
|
substituteInPlace user/legacy/Makefile.in \
|
2017-03-21 00:25:10 +03:00
|
|
|
--replace '$(DESTDIR)/lib/drbd' '$(DESTDIR)$(LIBDIR)'
|
2011-11-02 21:13:38 +04:00
|
|
|
substituteInPlace user/drbdadm_usage_cnt.c --replace /lib/drbd $out/lib/drbd
|
2017-06-05 17:17:51 +03:00
|
|
|
substituteInPlace scripts/drbd.rules --replace /usr/sbin/drbdadm $out/sbin/drbdadm
|
2011-11-01 19:21:31 +04:00
|
|
|
'';
|
|
|
|
|
|
|
|
makeFlags = "SHELL=${stdenv.shell}";
|
|
|
|
|
2017-03-21 00:25:10 +03:00
|
|
|
installFlags = "localstatedir=$(TMPDIR)/var sysconfdir=$(out)/etc INITDIR=$(out)/etc/init.d";
|
2011-11-01 19:21:31 +04:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://www.drbd.org/;
|
|
|
|
description = "Distributed Replicated Block Device, a distributed storage system for Linux";
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|