about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2022-06-06 14:29:51 +0200
committerGitHub <noreply@github.com>2022-06-06 14:29:51 +0200
commit2cdcb50406809d180f1339853fd07096fa1aae1f (patch)
treec6cf21d23658ea1a961958a01bfab9a6d344eb2c
parentc33d781d323fab232393a0dd73ec400587b29983 (diff)
parent8487b21ffbfaad8462dc1b37981d84cdc313a0de (diff)
Merge pull request #176049 from LunNova/lunnova/memtest-update
memtest86+: 5.01-coreboot-002 -> 6.00-beta2
-rw-r--r--nixos/doc/manual/from_md/release-notes/rl-2211.section.xml7
-rw-r--r--nixos/doc/manual/release-notes/rl-2211.section.md2
-rw-r--r--pkgs/tools/misc/memtest86+/default.nix33
3 files changed, 28 insertions, 14 deletions
diff --git a/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml
index 4a7ef8b71686e..65ba6033c8341 100644
--- a/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml
+++ b/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml
@@ -116,6 +116,13 @@
           and require manual remediation.
         </para>
       </listitem>
+      <listitem>
+        <para>
+          memtest86+ was updated from 5.00-coreboot-002 to 6.00-beta2.
+          It is now the upstream version from https://www.memtest.org/,
+          as coreboot’s fork is no longer available.
+        </para>
+      </listitem>
     </itemizedlist>
   </section>
 </section>
diff --git a/nixos/doc/manual/release-notes/rl-2211.section.md b/nixos/doc/manual/release-notes/rl-2211.section.md
index 89a799cafc507..864fe5c693460 100644
--- a/nixos/doc/manual/release-notes/rl-2211.section.md
+++ b/nixos/doc/manual/release-notes/rl-2211.section.md
@@ -51,4 +51,6 @@ In addition to numerous new and upgraded packages, this release has the followin
 
 - Matrix Synapse now requires entries in the `state_group_edges` table to be unique, in order to prevent accidentally introducing duplicate information (for example, because a database backup was restored multiple times). If your Synapse database already has duplicate rows in this table, this could fail with an error and require manual remediation.
 
+- memtest86+ was updated from 5.00-coreboot-002 to 6.00-beta2. It is now the upstream version from https://www.memtest.org/, as coreboot's fork is no longer available.
+
 <!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
diff --git a/pkgs/tools/misc/memtest86+/default.nix b/pkgs/tools/misc/memtest86+/default.nix
index 0db6f9f72872d..95985eb29956b 100644
--- a/pkgs/tools/misc/memtest86+/default.nix
+++ b/pkgs/tools/misc/memtest86+/default.nix
@@ -1,25 +1,29 @@
-{ lib, stdenv, fetchgit }:
+{ lib, stdenv, fetchFromGitHub }:
 
-stdenv.mkDerivation {
+stdenv.mkDerivation (finalAttrs: {
   pname = "memtest86+";
-  version = "5.01-coreboot-002";
+  version = "6.00-beta2";
 
-  src = fetchgit {
-    url = "https://review.coreboot.org/memtest86plus.git";
-    rev = "v002";
-    sha256 = "0cwx20yja24bfknqh1rjb5rl2c0kwnppzsisg1dibbak0l8mxchk";
+  src = fetchFromGitHub {
+    owner = "memtest86plus";
+    repo = "memtest86plus";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-U3++iJa0Zj3g2SZTJ0jom7raAu+LGqiOKZEputs/YfM=";
   };
 
-  NIX_CFLAGS_COMPILE = "-I. -std=gnu90";
+  # Binaries are booted directly by BIOS/UEFI or bootloader
+  # and should not be patched/stripped
+  dontPatchELF = true;
+  dontStrip = true;
 
-  hardeningDisable = [ "all" ];
+  passthru.efi = "${finalAttrs.finalPackage}/memtest.efi";
 
-  buildFlags = [ "memtest.bin" ];
-
-  doCheck = false; # fails
+  preBuild = ''
+    cd ${if stdenv.isi686 then "build32" else "build64"}
+  '';
 
   installPhase = ''
-    install -Dm0444 -t $out/ memtest.bin
+    install -Dm0444 -t $out/ memtest.bin memtest.efi
   '';
 
   meta = {
@@ -27,5 +31,6 @@ stdenv.mkDerivation {
     description = "A tool to detect memory errors";
     license = lib.licenses.gpl2;
     platforms = [ "x86_64-linux" "i686-linux" ];
+    maintainers = [ lib.maintainers.LunNova ];
   };
-}
+})