2018-04-22 19:04:51 +02:00
|
|
|
{ stdenv, fetchgit }:
|
2012-04-09 21:54:34 +02:00
|
|
|
|
2013-10-02 11:37:43 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2018-04-22 19:04:51 +02:00
|
|
|
name = "memtest86+-5.01+coreboot-20180113";
|
2013-10-02 11:37:43 +02:00
|
|
|
|
2018-04-22 19:04:51 +02:00
|
|
|
src = fetchgit {
|
|
|
|
url = "https://review.coreboot.org/memtest86plus";
|
|
|
|
rev = "5ca4eb9544e51254254d09ae6e70f93403469ec3";
|
|
|
|
sha256 = "08m4rjr0chhhb1whgggknz926zv9hm8bisnxqp8lffqiwhb55rgk";
|
2012-04-09 21:54:34 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
# Really dirty hack to get Memtest to build without needing a Glibc
|
|
|
|
# with 32-bit libraries and headers.
|
|
|
|
if test "$system" = x86_64-linux; then
|
|
|
|
mkdir gnu
|
|
|
|
touch gnu/stubs-32.h
|
|
|
|
fi
|
|
|
|
'';
|
|
|
|
|
2015-06-28 00:49:30 +02:00
|
|
|
NIX_CFLAGS_COMPILE = "-I. -std=gnu90";
|
2013-10-02 11:37:43 +02:00
|
|
|
|
2018-04-22 18:38:27 +02:00
|
|
|
hardeningDisable = [ "all" ];
|
2016-03-04 14:48:06 +01:00
|
|
|
|
2013-10-02 11:37:43 +02:00
|
|
|
buildFlags = "memtest.bin";
|
|
|
|
|
2018-08-08 23:35:07 +02:00
|
|
|
doCheck = false; # fails
|
|
|
|
|
2012-04-09 21:54:34 +02:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
2013-10-02 12:09:42 +02:00
|
|
|
chmod -x memtest.bin
|
2012-04-09 21:54:34 +02:00
|
|
|
cp memtest.bin $out/
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://www.memtest.org/;
|
2013-10-02 11:37:43 +02:00
|
|
|
description = "A tool to detect memory errors";
|
|
|
|
license = stdenv.lib.licenses.gpl2;
|
2017-12-03 18:47:03 +01:00
|
|
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
2012-04-09 21:54:34 +02:00
|
|
|
};
|
|
|
|
}
|