2021-01-10 23:54:33 -08:00
|
|
|
{ lib, stdenv, fetchurl, flex, systemd, perl }:
|
2011-11-01 08:21:31 -07:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2013-11-20 18:23:40 -08:00
|
|
|
name = "drbd-8.4.4";
|
2011-11-01 08:21:31 -07:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://oss.linbit.com/drbd/8.4/${name}.tar.gz";
|
2015-04-20 08:19:06 -07:00
|
|
|
sha256 = "1w4889h1ak7gy9w33kd4fgjlfpgmp6hzfya16p1pkc13bjf22mm0";
|
2011-11-01 08:21:31 -07:00
|
|
|
};
|
|
|
|
|
2020-01-20 09:29:31 -08:00
|
|
|
patches = [ ./pass-force.patch ./fix-glibc-compilation.patch ];
|
2011-11-02 11:54:49 -07:00
|
|
|
|
2019-01-09 08:45:53 -08:00
|
|
|
nativeBuildInputs = [ flex ];
|
|
|
|
buildInputs = [ perl ];
|
2011-11-01 08:21:31 -07:00
|
|
|
|
2018-07-25 14:44:21 -07:00
|
|
|
configureFlags = [
|
|
|
|
"--without-distro"
|
|
|
|
"--without-pacemaker"
|
|
|
|
"--localstatedir=/var"
|
|
|
|
"--sysconfdir=/etc"
|
|
|
|
];
|
2011-11-01 08:21:31 -07:00
|
|
|
|
|
|
|
preConfigure =
|
|
|
|
''
|
2017-11-04 02:20:39 -07:00
|
|
|
export PATH=${systemd}/sbin:$PATH
|
2017-03-20 14:25:10 -07:00
|
|
|
substituteInPlace user/Makefile.in \
|
|
|
|
--replace /sbin '$(sbindir)'
|
2011-11-02 10:13:38 -07:00
|
|
|
substituteInPlace user/legacy/Makefile.in \
|
2017-03-20 14:25:10 -07:00
|
|
|
--replace '$(DESTDIR)/lib/drbd' '$(DESTDIR)$(LIBDIR)'
|
2011-11-02 10:13:38 -07:00
|
|
|
substituteInPlace user/drbdadm_usage_cnt.c --replace /lib/drbd $out/lib/drbd
|
2017-06-05 07:17:51 -07:00
|
|
|
substituteInPlace scripts/drbd.rules --replace /usr/sbin/drbdadm $out/sbin/drbdadm
|
2011-11-01 08:21:31 -07:00
|
|
|
'';
|
|
|
|
|
2019-10-27 06:03:25 -07:00
|
|
|
makeFlags = [ "SHELL=${stdenv.shell}" ];
|
2011-11-01 08:21:31 -07:00
|
|
|
|
2019-10-27 06:03:25 -07:00
|
|
|
installFlags = [
|
|
|
|
"localstatedir=$(TMPDIR)/var"
|
|
|
|
"sysconfdir=$(out)/etc"
|
|
|
|
"INITDIR=$(out)/etc/init.d"
|
|
|
|
];
|
2011-11-01 08:21:31 -07:00
|
|
|
|
2021-01-10 23:54:33 -08:00
|
|
|
meta = with lib; {
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "http://www.drbd.org/";
|
2011-11-01 08:21:31 -07:00
|
|
|
description = "Distributed Replicated Block Device, a distributed storage system for Linux";
|
2018-08-23 08:47:12 -07:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
2011-11-01 08:21:31 -07:00
|
|
|
};
|
|
|
|
}
|