1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/os-specific/linux/drbd/default.nix

49 lines
1.3 KiB
Nix
Raw Normal View History

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