From 8487b21ffbfaad8462dc1b37981d84cdc313a0de Mon Sep 17 00:00:00 2001 From: Luna Nova Date: Thu, 2 Jun 2022 20:36:03 -0700 Subject: [PATCH] memtest86+: 5.01-coreboot-002 -> 6.00-beta2 The previous version from review.coreboot.org is no longer available at that address. This reverts to using the upstream, which is also a rewrite and currently in beta. The full release is expected before 22.11. --- .../from_md/release-notes/rl-2211.section.xml | 7 ++++ .../manual/release-notes/rl-2211.section.md | 2 ++ pkgs/tools/misc/memtest86+/default.nix | 33 +++++++++++-------- 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 6181d2c3eeb7..b0a98b116766 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 @@ -109,6 +109,13 @@ 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. + + diff --git a/nixos/doc/manual/release-notes/rl-2211.section.md b/nixos/doc/manual/release-notes/rl-2211.section.md index 145393d0debb..d6b9a892e573 100644 --- a/nixos/doc/manual/release-notes/rl-2211.section.md +++ b/nixos/doc/manual/release-notes/rl-2211.section.md @@ -48,4 +48,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. + diff --git a/pkgs/tools/misc/memtest86+/default.nix b/pkgs/tools/misc/memtest86+/default.nix index 0db6f9f72872..95985eb29956 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 ]; }; -} +})