2018-07-17 21:11:16 +01:00
|
|
|
{ stdenv, fetchurl, fetchpatch, lvm2 }:
|
2009-09-20 09:38:30 +01:00
|
|
|
|
2012-07-18 14:25:58 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2014-08-31 18:16:07 +01:00
|
|
|
name = "dmraid-1.0.0.rc16";
|
2012-07-18 14:25:58 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-06-28 19:43:35 +01:00
|
|
|
url = "https://people.redhat.com/~heinzm/sw/dmraid/src/old/${name}.tar.bz2";
|
2014-08-31 18:16:07 +01:00
|
|
|
sha256 = "0m92971gyqp61darxbiri6a48jz3wq3gkp8r2k39320z0i6w8jgq";
|
2012-07-18 14:25:58 +01:00
|
|
|
};
|
|
|
|
|
2018-06-19 02:34:59 +01:00
|
|
|
patches = [ ./hardening-format.patch ]
|
|
|
|
++ stdenv.lib.optionals stdenv.hostPlatform.isMusl [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://raw.githubusercontent.com/void-linux/void-packages/fceed4b8e96b3c1da07babf6f67b6ed1588a28b2/srcpkgs/dmraid/patches/006-musl-libc.patch";
|
|
|
|
sha256 = "1j8xda0fpz8lxjxnqdidy7qb866qrzwpbca56yjdg6vf4x21hx6w";
|
|
|
|
stripLen = 2;
|
|
|
|
extraPrefix = "1.0.0.rc16/";
|
|
|
|
})
|
2018-06-24 02:21:02 +01:00
|
|
|
(fetchpatch {
|
|
|
|
url = "https://raw.githubusercontent.com/void-linux/void-packages/fceed4b8e96b3c1da07babf6f67b6ed1588a28b2/srcpkgs/dmraid/patches/007-fix-loff_t-musl.patch";
|
|
|
|
sha256 = "0msnq39qnzg3b1pdksnz1dgqwa3ak03g41pqh0lw3h7w5rjc016k";
|
|
|
|
stripLen = 2;
|
|
|
|
extraPrefix = "1.0.0.rc16/";
|
|
|
|
})
|
2018-06-19 02:34:59 +01:00
|
|
|
];
|
2016-01-29 05:25:51 +00:00
|
|
|
|
2014-10-03 00:09:07 +01:00
|
|
|
postPatch = ''
|
|
|
|
sed -i 's/\[\[[^]]*\]\]/[ "''$''${n##*.}" = "so" ]/' */lib/Makefile.in
|
2018-06-19 02:34:59 +01:00
|
|
|
'' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
|
|
|
|
NIX_CFLAGS_COMPILE+=" -D_GNU_SOURCE"
|
2014-10-03 00:09:07 +01:00
|
|
|
'';
|
|
|
|
|
2012-07-18 14:25:58 +01:00
|
|
|
preConfigure = "cd */";
|
|
|
|
|
2018-07-17 21:11:16 +01:00
|
|
|
buildInputs = [ lvm2 ];
|
2009-09-20 09:38:30 +01:00
|
|
|
|
|
|
|
meta = {
|
2012-07-18 14:25:58 +01:00
|
|
|
description = "Old-style RAID configuration utility";
|
2016-07-23 11:24:18 +01:00
|
|
|
longDescription = ''
|
2009-09-20 09:38:30 +01:00
|
|
|
Old RAID configuration utility (still under development, though).
|
|
|
|
It is fully compatible with modern kernels and mdadm recognizes
|
|
|
|
its volumes. May be needed for rescuing an older system or nuking
|
|
|
|
the metadata when reformatting.
|
|
|
|
'';
|
2012-07-18 14:25:58 +01:00
|
|
|
maintainers = [ stdenv.lib.maintainers.raskin ];
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2018-08-05 15:31:42 +01:00
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
2009-09-20 09:38:30 +01:00
|
|
|
};
|
|
|
|
}
|