2010-12-18 09:42:55 -08:00
|
|
|
{ stdenv, fetchurl }:
|
2008-01-03 07:14:37 -08:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2014-02-24 12:32:04 -08:00
|
|
|
name = "memtest86-4.3.3";
|
2008-01-03 07:14:37 -08:00
|
|
|
|
|
|
|
src = fetchurl {
|
2014-02-24 12:32:04 -08:00
|
|
|
url = http://www.memtest86.com/downloads/memtest86-4.3.3-src.tar.gz;
|
|
|
|
sha256 = "1fzpk0s97lx8h1wbv2bgr6m8v4ag8i58kzr8fa25bvwyl8hks9sl";
|
2008-01-03 07:14:37 -08: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
|
|
|
|
'';
|
2009-04-02 00:55:47 -07:00
|
|
|
|
2010-12-18 09:42:55 -08:00
|
|
|
NIX_CFLAGS_COMPILE = "-I.";
|
2008-01-03 07:14:37 -08:00
|
|
|
|
|
|
|
installPhase = ''
|
2012-01-18 12:16:00 -08:00
|
|
|
mkdir -p $out
|
2008-01-03 07:14:37 -08:00
|
|
|
cp memtest.bin $out/
|
|
|
|
'';
|
2009-04-01 02:07:11 -07:00
|
|
|
|
|
|
|
meta = {
|
2012-04-09 12:54:34 -07:00
|
|
|
homepage = http://memtest86.com/;
|
|
|
|
description = "A tool to detect memory errors, to be run from a bootloader";
|
2009-04-01 02:07:11 -07:00
|
|
|
};
|
2008-01-03 07:14:37 -08:00
|
|
|
}
|