From aa98c7dc02493cd0051eebf364e5ff3f7e0ab535 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 1 Nov 2011 15:21:31 +0000 Subject: [PATCH] * Added drbd. svn path=/nixpkgs/trunk/; revision=30163 --- pkgs/os-specific/linux/drbd/default.nix | 33 +++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 pkgs/os-specific/linux/drbd/default.nix diff --git a/pkgs/os-specific/linux/drbd/default.nix b/pkgs/os-specific/linux/drbd/default.nix new file mode 100644 index 000000000000..a3c8c5606d66 --- /dev/null +++ b/pkgs/os-specific/linux/drbd/default.nix @@ -0,0 +1,33 @@ +{ stdenv, fetchurl, flex, udev }: + +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"; + }; + + buildInputs = [ flex ]; + + configureFlags = "--without-distro --without-legacy_utils --without-pacemaker --localstatedir=/var --sysconfdir=/etc"; + + preConfigure = + '' + export PATH=${udev}/sbin:$PATH + substituteInPlace user/Makefile.in --replace /sbin/ $out/sbin/ + 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; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cfb2a1b3a0a4..53909c374a33 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5126,6 +5126,8 @@ let inherit devicemapper; }; + drbd = callPackage ../os-specific/linux/drbd { }; + libuuid = if crossSystem != null && crossSystem.config == "i586-pc-gnu" then (utillinuxng // {