2010-05-16 21:25:57 +01:00
|
|
|
{ stdenv, fetchurl, groff }:
|
2007-01-10 21:47:03 +00:00
|
|
|
|
2010-05-15 19:43:24 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2015-04-01 16:47:37 +01:00
|
|
|
name = "mdadm-3.3";
|
2011-10-06 14:15:09 +01:00
|
|
|
|
2015-04-01 16:47:37 +01:00
|
|
|
# WARNING -- WARNING -- WARNING -- WARNING -- WARNING -- WARNING -- WARNING
|
|
|
|
# Do NOT update this if you're not ABSOLUTELY certain that it will work.
|
|
|
|
# Please check the update using the NixOS VM test, BEFORE pushing:
|
|
|
|
# nix-build nixos/release.nix -A tests.installer.swraid.x86_64-linux
|
|
|
|
# Discussion:
|
|
|
|
# https://github.com/NixOS/nixpkgs/commit/7719f7f
|
|
|
|
# https://github.com/NixOS/nixpkgs/commit/666cf99
|
|
|
|
# https://github.com/NixOS/nixpkgs/pull/6006
|
|
|
|
# WARNING -- WARNING -- WARNING -- WARNING -- WARNING -- WARNING -- WARNING
|
2007-01-10 21:47:03 +00:00
|
|
|
src = fetchurl {
|
2015-04-01 16:47:37 +01:00
|
|
|
url = "mirror://kernel/linux/utils/raid/mdadm/${name}.tar.bz2";
|
|
|
|
sha256 = "0igdqflihiq1dp5qlypzw0xfl44f4n3bckl7r2x2wfgkplcfa1ww";
|
2007-01-10 21:47:03 +00:00
|
|
|
};
|
|
|
|
|
2012-12-28 18:20:09 +00:00
|
|
|
nativeBuildInputs = [ groff ];
|
2010-05-15 19:43:24 +01:00
|
|
|
|
2011-10-06 14:15:05 +01:00
|
|
|
preConfigure = "sed -e 's@/lib/udev@\${out}/lib/udev@' -e 's@ -Werror @ @' -i Makefile";
|
2010-05-16 21:25:57 +01:00
|
|
|
|
|
|
|
# Force mdadm to use /var/run/mdadm.map for its map file (or
|
|
|
|
# /dev/.mdadm/map as a fallback).
|
2010-05-15 19:43:24 +01:00
|
|
|
preBuild =
|
|
|
|
''
|
2013-11-20 18:39:17 +00:00
|
|
|
makeFlagsArray=(INSTALL=install BINDIR=$out/sbin MANDIR=$out/share/man RUN_DIR=/dev/.mdadm)
|
2010-05-15 19:43:24 +01: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 21:25:57 +01:00
|
|
|
homepage = http://neil.brown.name/blog/mdadm;
|
2007-01-10 21:47:03 +00:00
|
|
|
};
|
|
|
|
}
|