2010-12-19 21:12:10 +01:00
|
|
|
{ stdenv, fetchurl }:
|
2008-01-03 16:14:37 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2010-12-19 21:12:10 +01:00
|
|
|
name = "memtest86+-4.10";
|
2008-01-03 16:14:37 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2010-12-19 21:12:10 +01:00
|
|
|
url = http://www.memtest.org/download/4.10/memtest86+-4.10.tar.gz;
|
|
|
|
sha256 = "0kxa2m7vfcm543wp53fv16sjjf5p12mzdz5rm87mrrr6hw43a6gq";
|
2008-01-03 16:14:37 +01: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 09:55:47 +02:00
|
|
|
|
2010-12-19 21:12:10 +01:00
|
|
|
NIX_CFLAGS_COMPILE = "-I.";
|
2008-01-03 16:14:37 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
ensureDir $out
|
|
|
|
cp memtest.bin $out/
|
|
|
|
'';
|
2009-04-01 11:07:11 +02:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://www.memtest.org/;
|
|
|
|
description = "A tool to detect memory errors";
|
|
|
|
};
|
2008-01-03 16:14:37 +01:00
|
|
|
}
|