2010-05-16 22:25:57 +02:00
|
|
|
{ stdenv, fetchurl, groff }:
|
2007-01-10 22:47:03 +01:00
|
|
|
|
2016-01-18 15:00:39 +01:00
|
|
|
assert stdenv.isLinux;
|
|
|
|
|
2010-05-15 20:43:24 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2015-12-09 19:17:30 +01:00
|
|
|
name = "mdadm-3.3.4";
|
2011-10-06 15:15:09 +02:00
|
|
|
|
2007-01-10 22:47:03 +01:00
|
|
|
src = fetchurl {
|
2015-12-09 19:17:30 +01:00
|
|
|
url = "mirror://kernel/linux/utils/raid/mdadm/${name}.tar.xz";
|
|
|
|
sha256 = "0s6a4bq7v7zxiqzv6wn06fv9f6g502dp047lj471jwxq0r9z9rca";
|
2007-01-10 22:47:03 +01:00
|
|
|
};
|
|
|
|
|
2015-12-09 20:25:40 +01:00
|
|
|
# This is to avoid self-references, which causes the initrd to explode
|
|
|
|
# in size and in turn prevents mdraid systems from booting.
|
2016-01-20 10:00:35 +01:00
|
|
|
allowedReferences = [ stdenv.glibc.out ];
|
2015-12-09 20:25:40 +01:00
|
|
|
|
2015-12-09 19:17:30 +01:00
|
|
|
patches = [ ./no-self-references.patch ];
|
|
|
|
|
2015-12-09 20:02:37 +01:00
|
|
|
makeFlags = [
|
|
|
|
"NIXOS=1" "INSTALL=install" "INSTALL_BINDIR=$(out)/sbin"
|
|
|
|
"MANDIR=$(out)/share/man" "RUN_DIR=/dev/.mdadm"
|
|
|
|
] ++ stdenv.lib.optionals (stdenv ? cross) [
|
|
|
|
"CROSS_COMPILE=${stdenv.cross.config}-"
|
|
|
|
];
|
|
|
|
|
2012-12-28 19:20:09 +01:00
|
|
|
nativeBuildInputs = [ groff ];
|
2010-05-15 20:43:24 +02:00
|
|
|
|
2015-06-13 00:40:38 +02:00
|
|
|
# Attempt removing if building with gcc5 when updating
|
|
|
|
NIX_CFLAGS_COMPILE = "-std=gnu89";
|
|
|
|
|
2015-12-09 20:02:37 +01:00
|
|
|
preConfigure = ''
|
|
|
|
sed -e 's@/lib/udev@''${out}/lib/udev@' -e 's@ -Werror @ @' -i Makefile
|
|
|
|
'';
|
2007-01-10 22:47:03 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Programs for managing RAID arrays under Linux";
|
2010-05-16 22:25:57 +02:00
|
|
|
homepage = http://neil.brown.name/blog/mdadm;
|
2007-01-10 22:47:03 +01:00
|
|
|
};
|
|
|
|
}
|