2010-05-16 20:25:57 +00:00
|
|
|
{ stdenv, fetchurl, groff }:
|
2007-01-10 21:47:03 +00:00
|
|
|
|
2010-05-15 18:43:24 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "mdadm-3.1.2";
|
2011-10-06 13:15:09 +00:00
|
|
|
|
2007-01-10 21:47:03 +00:00
|
|
|
src = fetchurl {
|
2010-05-15 18:43:24 +00:00
|
|
|
url = "mirror://kernel/linux/utils/raid/mdadm/${name}.tar.bz2";
|
|
|
|
sha256 = "0s2d2a01j8cizxqvbgd0sn5bpa1j46q8976078b3jq1q7i1ir0zz";
|
2007-01-10 21:47:03 +00:00
|
|
|
};
|
|
|
|
|
2010-05-16 20:25:57 +00:00
|
|
|
# Enable incremental activation of swraid arrays from udev.
|
|
|
|
patches = [ ./udev.patch ];
|
2007-01-10 21:47:03 +00:00
|
|
|
|
2010-05-16 20:25:57 +00:00
|
|
|
buildNativeInputs = [ groff ];
|
2010-05-15 18:43:24 +00:00
|
|
|
|
2011-10-06 13:15:05 +00:00
|
|
|
preConfigure = "sed -e 's@/lib/udev@\${out}/lib/udev@' -e 's@ -Werror @ @' -i Makefile";
|
2010-05-16 20:25:57 +00:00
|
|
|
|
|
|
|
# Force mdadm to use /var/run/mdadm.map for its map file (or
|
|
|
|
# /dev/.mdadm/map as a fallback).
|
2010-05-15 18:43:24 +00:00
|
|
|
preBuild =
|
|
|
|
''
|
2010-05-16 20:25:57 +00:00
|
|
|
makeFlagsArray=(INSTALL=install BINDIR=$out/sbin MANDIR=$out/share/man VAR_RUN=/var/run/mdadm ALT_RUN=/dev/.mdadm)
|
2010-05-15 18:43:24 +00:00
|
|
|
if [[ -n "$crossConfig" ]]; then
|
|
|
|
makeFlagsArray+=(CROSS_COMPILE=$crossConfig-)
|
|
|
|
fi
|
|
|
|
'';
|
2007-01-10 21:47:03 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Programs for managing RAID arrays under Linux";
|
2010-05-16 20:25:57 +00:00
|
|
|
homepage = http://neil.brown.name/blog/mdadm;
|
2007-01-10 21:47:03 +00:00
|
|
|
};
|
|
|
|
}
|