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+";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "7.00";
|
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}";
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-DVYiE9yi20IR2AZs8bya1h9vK4si7nKdg9Nqef4WTrw=";
|
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/";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Tool to detect memory errors";
|
2024-05-15 15:35:15 +00:00
|
|
|
license = lib.licenses.gpl2Only;
|
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
|
|
|
})
|