nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 46 lines 1.0 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 nixosTests, 6}: 7 8stdenv.mkDerivation (finalAttrs: { 9 pname = "memtest86+"; 10 version = "8.00"; 11 12 src = fetchFromGitHub { 13 owner = "memtest86plus"; 14 repo = "memtest86plus"; 15 rev = "v${finalAttrs.version}"; 16 hash = "sha256-7oOe35TI+H8Nox2VJMrdoMGyTxzrJzebBH+DLanXtpo="; 17 }; 18 19 # Binaries are booted directly by BIOS/UEFI or bootloader 20 # and should not be patched/stripped 21 dontPatchELF = true; 22 dontStrip = true; 23 24 passthru.efi = "${finalAttrs.finalPackage}/mt86plus.efi"; 25 26 preBuild = '' 27 cd build/${if stdenv.hostPlatform.isi686 then "i586" else "x86_64"} 28 ''; 29 30 installPhase = '' 31 install -Dm0444 mt86plus $out/mt86plus.efi 32 ''; 33 34 passthru.tests.systemd-boot-memtest = nixosTests.systemd-boot.memtest86; 35 36 meta = { 37 homepage = "https://www.memtest.org/"; 38 description = "Tool to detect memory errors"; 39 license = lib.licenses.gpl2Only; 40 platforms = [ 41 "x86_64-linux" 42 "i686-linux" 43 ]; 44 maintainers = [ lib.maintainers.LunNova ]; 45 }; 46})