2022-06-16 17:23:12 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "memtest86+";
|
2023-02-09 11:40:11 +00:00
|
|
|
version = "6.10";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "memtest86plus";
|
|
|
|
repo = "memtest86plus";
|
|
|
|
rev = "v${finalAttrs.version}";
|
2023-02-09 11:40:11 +00:00
|
|
|
hash = "sha256-f40blxh/On/mC4m+eLNeWzdYzYoYpFOSBndVnREx68U=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
# Binaries are booted directly by BIOS/UEFI or bootloader
|
|
|
|
# and should not be patched/stripped
|
|
|
|
dontPatchELF = true;
|
|
|
|
dontStrip = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
passthru.efi = "${finalAttrs.finalPackage}/memtest.efi";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
preBuild = ''
|
|
|
|
cd ${if stdenv.isi686 then "build32" else "build64"}
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2022-06-16 17:23:12 +00:00
|
|
|
install -Dm0444 -t $out/ memtest.bin memtest.efi
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2023-02-02 18:25:31 +00:00
|
|
|
homepage = "https://www.memtest.org/";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A tool to detect memory errors";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = lib.licenses.gpl2;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
2022-06-16 17:23:12 +00:00
|
|
|
maintainers = [ lib.maintainers.LunNova ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2022-06-16 17:23:12 +00:00
|
|
|
})
|