m1n1: 1.4.21 → 1.5.0; add check phase; add branding (#430738)

authored by Felix Bühler and committed by GitHub 4066d84d 10d392c7

+44 -2
+44 -2
pkgs/by-name/m1/m1n1/package.nix
··· 4 4 fetchFromGitHub, 5 5 imagemagick, 6 6 source-code-pro, 7 + python3Packages, 7 8 nix-update-script, 9 + nixos-icons, 10 + withBranding ? true, 8 11 }: 9 12 stdenv.mkDerivation (finalAttrs: { 10 13 pname = "m1n1"; 11 - version = "1.4.21"; 14 + version = "1.5.0"; 12 15 13 16 src = fetchFromGitHub { 14 17 owner = "AsahiLinux"; 15 18 repo = "m1n1"; 16 19 tag = "v${finalAttrs.version}"; 17 - hash = "sha256-0ZnDexY/Sf2TJFfUv/YelCctFJVENffWqBU0r0azD0M="; 20 + hash = "sha256-J1PZVaEdI6gx/qzsoVW1ehRQ/ZDKzdC1NgIGgBqxQ+0="; 18 21 }; 22 + 23 + postPatch = lib.optionalString withBranding '' 24 + ln -s ${nixos-icons}/share/icons/hicolor/128x128/apps/nix-snowflake.png data/custom_128.png 25 + ln -s ${nixos-icons}/share/icons/hicolor/256x256/apps/nix-snowflake.png data/custom_256.png 26 + ''; 19 27 20 28 nativeBuildInputs = [ 21 29 imagemagick ··· 32 40 makeFlags = [ 33 41 "ARCH=${stdenv.cc.targetPrefix}" 34 42 "RELEASE=1" 43 + (lib.optionalString withBranding "LOGO=custom") 35 44 ]; 36 45 37 46 enableParallelBuilding = true; ··· 47 56 runHook postInstall 48 57 ''; 49 58 59 + doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; 60 + 61 + nativeCheckInputs = with python3Packages; [ 62 + pytest 63 + ]; 64 + 65 + checkInputs = with python3Packages; [ 66 + construct 67 + pyserial 68 + ]; 69 + 70 + checkPhase = '' 71 + runHook preCheck 72 + 73 + pytest 74 + 75 + runHook postCheck 76 + ''; 77 + 50 78 passthru = { 51 79 updateScript = nix-update-script { }; 52 80 }; 53 81 54 82 meta = { 55 83 description = "Bootloader to bridge the Apple (XNU) boot to Linux boot"; 84 + longDescription = '' 85 + m1n1 is the bootloader developed by the Asahi Linux project to 86 + bridge the Apple (XNU) boot ecosystem to the Linux boot ecosystem. 87 + 88 + What it does: 89 + 90 + - Initializes hardware 91 + - Puts up a pretty Nix logo 92 + - Loads embedded (appended) payloads, which can be: 93 + - Device Trees (FDTs), with automatic selection based on the platform 94 + - Initramfs images (compressed CPIO archives) 95 + - Kernel images in Linux ARM64 boot format (optionally compressed) 96 + - Configuration statements 97 + ''; 56 98 homepage = "https://github.com/AsahiLinux/m1n1"; 57 99 changelog = "https://github.com/AsahiLinux/m1n1/releases/tag/${finalAttrs.src.tag}"; 58 100 license = with lib.licenses; [