uefitoolPackages.new-engine: A62 -> A71

This commit upgrades uefiToolPackages.new-engine to the latest version
as of writing. Version A68 is now using Qt6 and no longer comes with
a custom build script, so the build logic compared to the old-engine
variant has become sufficiently divergent that I decided that it would
be easier to split them into two entirely different derivations.

Additionally, I:

- added myself as a maintainer
- added a patch that allows the new-engine variant to build on Darwin
- correctly set `mainProgram` in the old-engine variant

+69 -42
+17
pkgs/tools/system/uefitool/bundle-destination.patch
···
··· 1 + --- 2 + UEFITool/CMakeLists.txt | 2 +- 3 + 1 file changed, 1 insertion(+), 1 deletion(-) 4 + 5 + diff --git a/UEFITool/CMakeLists.txt b/UEFITool/CMakeLists.txt 6 + index aef60d0..98723ac 100644 7 + --- a/UEFITool/CMakeLists.txt 8 + +++ b/UEFITool/CMakeLists.txt 9 + @@ -143,4 +143,4 @@ IF(UNIX AND (NOT APPLE) AND (NOT CYGWIN)) 10 + INSTALL(FILES uefitool.desktop DESTINATION share/applications) 11 + ENDIF() 12 + 13 + -INSTALL(TARGETS UEFITool BUNDLE DESTINATION "/Applications" ) 14 + +INSTALL(TARGETS UEFITool BUNDLE DESTINATION "Applications" ) 15 + -- 16 + 2.40.1 17 +
+10 -19
pkgs/tools/system/uefitool/common.nix pkgs/tools/system/uefitool/old-engine.nix
··· 1 - { 2 - version, 3 - sha256, 4 - installFiles, 5 - }: 6 { 7 lib, 8 mkDerivation, ··· 14 }: 15 16 mkDerivation rec { 17 - passthru = { 18 - inherit version; 19 - inherit sha256; 20 - inherit installFiles; 21 - }; 22 pname = "uefitool"; 23 - inherit version; 24 25 src = fetchFromGitHub { 26 - inherit sha256; 27 owner = "LongSoft"; 28 - repo = pname; 29 - rev = version; 30 }; 31 32 buildInputs = [ qtbase ]; ··· 43 44 installPhase = '' 45 mkdir -p "$out"/bin 46 - cp ${lib.concatStringsSep " " installFiles} "$out"/bin 47 ''; 48 49 - meta = with lib; { 50 description = "UEFI firmware image viewer and editor"; 51 homepage = "https://github.com/LongSoft/uefitool"; 52 - license = licenses.bsd2; 53 - maintainers = [ ]; 54 # uefitool supposedly works on other platforms, but their build script only works on linux in nixpkgs 55 - platforms = platforms.linux; 56 }; 57 }
··· 1 { 2 lib, 3 mkDerivation, ··· 9 }: 10 11 mkDerivation rec { 12 pname = "uefitool"; 13 + version = "0.28.0"; 14 15 src = fetchFromGitHub { 16 + hash = "sha256-StqrOMsKst2X2yQQ/Xl7iLAuA4QXEOyj2KtE7ZtoUNg="; 17 owner = "LongSoft"; 18 + repo = "uefitool"; 19 + tag = version; 20 }; 21 22 buildInputs = [ qtbase ]; ··· 33 34 installPhase = '' 35 mkdir -p "$out"/bin 36 + cp UEFITool UEFIReplace/UEFIReplace UEFIPatch/UEFIPatch "$out"/bin 37 ''; 38 39 + meta = { 40 description = "UEFI firmware image viewer and editor"; 41 homepage = "https://github.com/LongSoft/uefitool"; 42 + license = lib.licenses.bsd2; 43 + maintainers = with lib.maintainers; [ athre0z ]; 44 # uefitool supposedly works on other platforms, but their build script only works on linux in nixpkgs 45 + platforms = lib.platforms.linux; 46 + mainProgram = "UEFITool"; 47 }; 48 }
+38
pkgs/tools/system/uefitool/new-engine.nix
···
··· 1 + { 2 + lib, 3 + stdenv, 4 + fetchFromGitHub, 5 + qtbase, 6 + cmake, 7 + wrapQtAppsHook, 8 + zip, 9 + }: 10 + 11 + stdenv.mkDerivation (finalAttrs: { 12 + pname = "uefitool"; 13 + version = "A71"; 14 + 15 + src = fetchFromGitHub { 16 + hash = "sha256-NRlrKm5+eED6oyvFRSEhn0EUbMsPJtuFAyv3vgY/IUI="; 17 + owner = "LongSoft"; 18 + repo = "uefitool"; 19 + tag = finalAttrs.version; 20 + }; 21 + 22 + buildInputs = [ qtbase ]; 23 + nativeBuildInputs = [ 24 + cmake 25 + zip 26 + wrapQtAppsHook 27 + ]; 28 + patches = lib.optionals stdenv.isDarwin [ ./bundle-destination.patch ]; 29 + 30 + meta = { 31 + description = "UEFI firmware image viewer and editor"; 32 + homepage = "https://github.com/LongSoft/uefitool"; 33 + license = lib.licenses.bsd2; 34 + maintainers = with lib.maintainers; [ athre0z ]; 35 + platforms = lib.platforms.unix; 36 + mainProgram = "uefitool"; 37 + }; 38 + })
+4 -23
pkgs/tools/system/uefitool/variants.nix
··· 1 - { libsForQt5 }: 2 - let 3 - common = opts: libsForQt5.callPackage (import ./common.nix opts) { }; 4 - in 5 - rec { 6 - new-engine = common { 7 - version = "A62"; 8 - sha256 = "sha256-U89j0BV57luv1c9hoYJtisKLxFezuaGFokZ29/NJ0xg="; 9 - installFiles = [ 10 - "build/UEFITool/UEFITool" 11 - "build/UEFIFind/UEFIFind" 12 - "build/UEFIExtract/UEFIExtract" 13 - ]; 14 - }; 15 - old-engine = common rec { 16 - version = "0.28.0"; 17 - sha256 = "1n2hd2dysi5bv2iyq40phh1jxc48gdwzs414vfbxvcharcwapnja"; 18 - installFiles = [ 19 - "UEFITool" 20 - "UEFIReplace/UEFIReplace" 21 - "UEFIPatch/UEFIPatch" 22 - ]; 23 - }; 24 }
··· 1 + { libsForQt5, qt6Packages }: 2 + { 3 + new-engine = qt6Packages.callPackage ./new-engine.nix { }; 4 + old-engine = libsForQt5.callPackage ./old-engine.nix { }; 5 }