nixpkgs/pkgs/os-specific/linux/drbd/default.nix
Vladimír Čunát b44d846990 udev: complete rework
- systemd puts all into one output now (except for man),
  because I wasn't able to fix all systemd/udev refernces
  for NixOS to work well
- libudev is now by default *copied* into another path,
  which is what most packages will use as build input :-)
- pkgs.udev = [ libudev.out libudev.dev ]; because there are too many
  references that just put `udev` into build inputs (to rewrite them all),
  also this made "${udev}/foo" fail at *evaluation* time
  so it's easier to catch and change to something more specific
2015-10-04 10:03:53 +02:00

40 lines
1.2 KiB
Nix

{ stdenv, fetchurl, flex, systemd, perl }:
assert stdenv.isLinux;
stdenv.mkDerivation rec {
name = "drbd-8.4.4";
src = fetchurl {
url = "http://oss.linbit.com/drbd/8.4/${name}.tar.gz";
sha256 = "1w4889h1ak7gy9w33kd4fgjlfpgmp6hzfya16p1pkc13bjf22mm0";
};
patches = [ ./pass-force.patch ];
buildInputs = [ flex perl ];
configureFlags = "--without-distro --without-pacemaker --localstatedir=/var --sysconfdir=/etc";
preConfigure =
''
export PATH=${systemd.udev.bin}/sbin:$PATH
substituteInPlace user/Makefile.in --replace /sbin/ $out/sbin/
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
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;
};
}