Change:
Package name: shipwright Latest released version: 8.0.4 <!-- Search your package here: --- Current version on the unstable channel: 7.1.1 Current version on the stable/release channel: 7.0.2 <!-- Type the name of your package and try to find an open pull request for the package If you find an open pull request, you can review it! There's a high chance that you'll have the new version right away while helping the community! --- Notify maintainers I tried updating myself and found 8.0.4 fails building with error I bisected to upstream commit and the file but I'm not sure how to resolve right now. <!-- If the result shows no maintainers, tag the person that last updated the package. --Note for maintainers: Please tag this issue in your PR. Add a :+1: [reaction] to [issues you find important]. [reaction]: [issues you find important]:

Discussion:
, lib , fetchFromGitHub , fetchurl <ins> , copyDesktopItems </ins> , makeDesktopItem , python3 , libX11

, libpulseaudio , libpng , imagemagick <del> , requireFile , oot ? rec { enable = true; variant = "debug"; rom = requireFile { name = "oot-${variant}.z64"; message = '' This nix expression requires that oot-${variant}.z64 is already part of the store. To get this file you can dump your Ocarina of Time's cartridge to a file, and add it to the nix store with nix-store --add-fixed sha1 <FILE>, or override the package: shipwright.override { oot = { enable = true; variant = "debug"; rom = path/to/oot-debug-mq.z64; } } The supported variants are: - debug: Ocarina of Time Debug PAL GC (not Master Quest) - pal-gc: Ocarina of Time PAL GameCube (may lead to crashes and instability) This is optional if you have imported an Ocarina of Time Master Quest ROM. If so, please set oot.enable to false and ootMq.enable to true. If both are enabled, Ship of Harkinian will be built with both ROMs. ''; # From upstream: https://github.com/HarbourMasters/Shipwright/blob/e46c60a7a1396374e23f7a1f7122ddf9efcadff7/README.md#1-check-your-sha1 sha1 = { debug = "cee6bc3c2a634b41728f2af8da54d9bf8cc14099"; pal-gc = "0227d7c0074f2d0ac935631990da8ec5914597b4"; }.${variant} or (throw "Unsupported romVariant ${variant}. Valid options are 'debug' and 'pal-gc'."); }; } , ootMq ? rec { enable = false; variant = "debug-mq"; rom = requireFile { name = "oot-${variant}.z64"; message = '' This nix expression requires that oot-${variant}.z64 is already part of the store. To get this file you can dump your Ocarina of Time Master Quest's cartridge to a file, and add it to the nix store with nix-store --add-fixed sha1 <FILE>, or override the package: shipwright.override { ootMq = { enable = true; variant = "debug-mq"; rom = path/to/oot-debug-mq.z64; } } The supported variants are: - debug-mq: Ocarina of Time Debug PAL GC MQ (Dungeons will be Master Quest) - debug-mq-alt: Alternate ROM, not produced by decompilation. This is optional if you have imported an Ocarina of Time ROM. If so, please set oot.enable to true and ootMq.enable to false. If both are enabled, Ship of Harkinian will be built with both ROMs. ''; # From upstream: https://github.com/HarbourMasters/Shipwright/blob/e46c60a7a1396374e23f7a1f7122ddf9efcadff7/README.md#1-check-your-sha1 sha1 = { debug-mq = "079b855b943d6ad8bd1eb026c0ed169ecbdac7da"; debug-mq-alt = "50bebedad9e0f10746a52b07239e47fa6c284d03"; }.${variant} or (throw "Unsupported mqRomVariant ${variant}. Valid options are 'debug-mq' and 'debug-mq-alt'."); }; } </del> <ins> , gnome , makeWrapper </ins> }: <del> let checkAttrs = attrs: let validAttrs = [ "enable" "rom" "variant" ]; in lib.all (name: lib.elem name validAttrs) (lib.attrNames attrs); in assert (lib.assertMsg (checkAttrs oot) "oot must have the attributes 'enable' and 'rom', and none other"); assert (lib.assertMsg (checkAttrs ootMq) "ootMq must have the attributes 'enable' and 'rom', and none other"); assert (lib.assertMsg (oot.enable || ootMq.enable) "At least one of 'oot.enable' and 'ootMq.enable' must be true"); stdenv.mkDerivation rec { </del> <ins> stdenv.mkDerivation (finalAttrs: { </ins> pname = "shipwright"; <del> version = "7.1.1"; </del> <ins> version = "8.0.4"; </ins> src = fetchFromGitHub { owner = "harbourmasters"; repo = "shipwright"; <del> rev = version; hash = "sha256-zgxJj65wKsQWvVxeCspyHG9YqoYqZxd6GrYptOA8Byk="; </del> <ins> rev = finalAttrs.version; hash = "sha256-OoDToHCVNzccbKdsmek1kqCsW2HmVzA2vy3BtVW1DuM="; </ins> fetchSubmodules = true; };

# https://github.com/HarbourMasters/Shipwright/blob/e46c60a7a1396374e23f7a1f7122ddf9efcadff7/soh/CMakeLists.txt#L736 gamecontrollerdb = fetchurl { name = "gamecontrollerdb.txt"; <del> url = "https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/c5b4df0e1061175cb11e3ebbf8045178339864a5/gamecontrollerdb.txt"; hash = "sha256-2VFCsaalXoe+JYWCH6IbgjnLXNKxe0UqSyJNGZMn5Ko="; </del> <ins> url = "https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/81d89fd1e2bd5878e57dfa629abeed3a8feea438/gamecontrollerdb.txt"; hash = "sha256-m1XzDc2dS0hkBTEGABgW4J/jjIw1TXtvHHtsvui6Bcc="; </ins> }; nativeBuildInputs = [

lsb-release python3 imagemagick <ins> copyDesktopItems makeWrapper </ins> ]; buildInputs = [

SDL2_net libpulseaudio libpng <ins> gnome.zenity </ins> ]; cmakeFlags = [ "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}/lib" <ins> (lib.cmakeBool "NON_PORTABLE" true) </ins> ]; dontAddPrefix = true;

hardeningDisable = [ "format" ]; postBuild = '' <del> cp ${gamecontrollerdb} ${gamecontrollerdb.name} </del> <ins> cp ${finalAttrs.gamecontrollerdb} ${finalAttrs.gamecontrollerdb.name} </ins> pushd ../OTRExporter <del> ${lib.optionalString oot.enable "python3 ./extract_assets.py -z ../build/ZAPD/ZAPD.out ${oot.rom}"} ${lib.optionalString ootMq.enable "python3 ./extract_assets.py -z ../build/ZAPD/ZAPD.out ${ootMq.rom}"} </del> <ins> python3 ./extract_assets.py -z ../build/ZAPD/ZAPD.out --norom --xml-root ../soh/assets/xml --custom-assets-path ../soh/assets/custom --custom-otr-file soh.otr --port-ver ${finalAttrs.version} </ins> popd '';

postInstall = '' mkdir -p $out/bin <del> # Copy the extracted assets, required to be in the same directory as the executable ${lib.optionalString oot.enable "cp ../OTRExporter/oot.otr $out/lib"} ${lib.optionalString ootMq.enable "cp ../OTRExporter/oot-mq.otr $out/lib"} </del> ln -s $out/lib/soh.elf $out/bin/soh <ins> install -Dm644 ../soh/macosx/sohIcon.png $out/share/pixmaps/soh.png ''; fixupPhase = '' wrapProgram $out/lib/soh.elf --prefix PATH ":" ${lib.makeBinPath [ gnome.zenity ]} </ins> ''; desktopItems = [

name = "soh"; icon = "soh"; exec = "soh"; <ins> comment = finalAttrs.meta.description; </ins> genericName = "Ship of Harkinian"; desktopName = "soh"; categories = [ "Game" ]; }) ]; <del> meta = with lib; { </del> <ins> meta = { </ins> homepage = "https://github.com/HarbourMasters/Shipwright"; description = "A PC port of Ocarina of Time with modern controls, widescreen, high-resolution, and more"; <del> longDescription = '' An PC port of Ocarina of Time with modern controls, widescreen, high-resolution and more, based off of decompilation. Note that you must supply an OoT rom yourself to use this package because propietary assets are extracted from it. You can change the game variant like this: shipwright.override { oot.enable = false; ootMq.enable = true } The default ROM variants for Oot and OotMq are debug and debug-mq respectively. If you have a pal-gc rom, you should override like this: shipwright.override { oot = { enable = true; variant = "pal-gc"; rom = path/to/oot-pal-gc.z64; } } The supported Oot variants are: - debug: Ocarina of Time Debug PAL GC (not Master Quest) - pal-gc: Ocarina of Time PAL GameCube (may lead to crashes and instability) The supported OotMq variants are: - debug-mq: Ocarina of Time Debug PAL GC MQ (Dungeons will be Master Quest) - debug-mq-alt: Alternate ROM, not produced by decompilation. ''; </del> mainProgram = "soh"; platforms = [ "x86_64-linux" ]; <del> maintainers = with maintainers; [ ivar j0lol ]; license = with licenses; [ </del> <ins> maintainers = with lib.maintainers; [ ivar j0lol ]; license = with lib.licenses; [ </ins> # OTRExporter, OTRGui, ZAPDTR, libultraship mit # Ship of Harkinian itself unfree ]; }; <del> } </del> <ins> }) </ins>