1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-23 14:11:36 +00:00
nixpkgs/pkgs/tools/misc/memtest86/default.nix

32 lines
716 B
Nix
Raw Normal View History

{ stdenv, fetchurl }:
stdenv.mkDerivation {
2014-02-24 20:32:04 +00:00
name = "memtest86-4.3.3";
src = fetchurl {
2014-02-24 20:32:04 +00:00
url = http://www.memtest86.com/downloads/memtest86-4.3.3-src.tar.gz;
sha256 = "1fzpk0s97lx8h1wbv2bgr6m8v4ag8i58kzr8fa25bvwyl8hks9sl";
};
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
'';
NIX_CFLAGS_COMPILE = "-I.";
installPhase = ''
mkdir -p $out
cp memtest.bin $out/
'';
meta = {
homepage = http://memtest86.com/;
description = "A tool to detect memory errors, to be run from a bootloader";
};
}