Change:
<!-- Note that these are hard requirements --<!-- You can use the "Go to file" functionality on github to find the package Then you can go to the history for this package Find the latest "packagename: oldversion -newversion" commit The "newversion" is the the current version of the package --- <!-- 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! --- name: devilutionx <!-- The current version can be found easily with the same process than above for checking the master branch If an open PR is present for the package, take this version as the current one and link to the PR --current version: 1.2.1 desired version: 1.3.0 <!-- Search your package here: If no maintainer is listed for your package, tag the person that last updated the package --maintainers: Please tag this issue in your PR. There are a number of changes in the new version, many of which make it difficult to package for nixpkgs.

Discussion:
<ins> { lib, stdenv, fetchurl, cmake, StormLib }: stdenv.mkDerivation { pname = "smpq"; version = "1.6"; src = fetchurl { url = "https://launchpad.net/smpq/trunk/1.6/+download/smpq_1.6.orig.tar.gz"; sha256 = "1jqq5x3b17jy66x3kkf5hs5l322dx2v14djxxrqrnqp8bn5drlmm"; }; cmakeFlags = [ "-DWITH_KDE=OFF" ]; nativeBuildInputs = [ cmake ]; buildInputs = [ StormLib ]; meta = with lib; { description = "StormLib MPQ archiving utility"; homepage = "https://launchpad.net/smpq"; license = licenses.gpl3Only; platforms = platforms.all; maintainers = with maintainers; [ aanderse karolchmist ]; }; } </ins>

<ins> { lib, stdenv, fetchFromGitHub, cmake, bzip2, libtomcrypt, zlib }: stdenv.mkDerivation rec { pname = "StormLib"; version = "9.22"; src = fetchFromGitHub { owner = "ladislav-zezula"; repo = "StormLib"; rev = "v${version}"; sha256 = "1rcdl6ryrr8fss5z5qlpl4prrw8xpbcdgajg2hpp0i7fpk21ymcc"; }; cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" "-DWITH_LIBTOMCRYPT=ON" ]; nativeBuildInputs = [ cmake ]; buildInputs = [ bzip2 libtomcrypt zlib ]; meta = with lib; { homepage = "https://github.com/ladislav-zezula/StormLib"; license = licenses.mit; description = "An open-source project that can work with Blizzard MPQ archives"; platforms = platforms.all; maintainers = with maintainers; [ aanderse karolchmist ]; }; } </ins>

<del> { lib, stdenv, fetchFromGitHub, cmake, SDL2, SDL2_mixer, SDL2_ttf, libsodium, pkg-config }: </del> <ins> { lib , stdenv , fetchFromGitHub , fetchpatch , fetchurl , fetchzip , cmake , pkg-config , gettext , SDL2 , SDL2_image , fmt , libpng , smpq }: let # TODO: submit a PR upstream to allow system copies of these libraries where possible asio = fetchurl { url = "https://github.com/diasurgical/asio/archive/ebeff99f539da23d27c2e8d4bdbc1ee011968644.tar.gz"; sha256 = "0vhb4cig40mm0a98i74grpmfkcmby8zxg6vqa38dpryxpgvp5fw8"; }; SDL_audiolib = fetchurl { url = "https://github.com/realnc/SDL_audiolib/archive/aa79660eba4467a44f9dcaecf26b0f0a000abfd7.tar.gz"; sha256 = "0z4rizncp6gqsy72b3709zc9fr915wgcwnlx1fhhy7mrczsly630"; }; simpleini = fetchzip { url = "https://github.com/brofield/simpleini/archive/7bca74f6535a37846162383e52071f380c99a43a.zip"; sha256 = "07kf1jjbc9v04hsysa6v2wh1m9csf5qz0b1wmlkf9sj00kf47zj7"; }; in </ins> stdenv.mkDerivation rec { pname = "devilutionx"; <del> version = "1.2.1"; </del> <ins> version = "1.3.0"; </ins> src = fetchFromGitHub { owner = "diasurgical"; repo = "devilutionX"; rev = version; <del> sha256 = "sha256-PgYlNO1p78d0uiL474bDJOL++SxJfeBLK65czdaylHU="; </del> <ins> sha256 = "0acrkqi0pr3cbr5i1a1vfrnxv1n3xmql5d86bm2gywvpdb94xads"; </ins> }; <ins> patches = [ # allow building with system SDL2_image instead of vendored version # this patch can be removed on the next release of devilutionx # see https://github.com/diasurgical/devilutionX/pull/3386 (fetchpatch { url = "https://github.com/diasurgical/devilutionX/commit/41ff03e94c02477bffb2d62764e8624c0e06854d.patch"; sha256 = "1lrnb9d0dcdyd78rix5rl4p8kkwbnl91llr9fgb86ysm3q58qkvj"; }) ]; </ins> postPatch = '' substituteInPlace Source/init.cpp --replace "/usr/share/diasurgical/devilutionx/" "${placeholder "out"}/share/diasurgical/devilutionx/" <del> ''; NIX_CFLAGS_COMPILE = [ "-I${SDL2_ttf}/include/SDL2" ''-DTTF_FONT_PATH="${placeholder "out"}/share/fonts/truetype/CharisSILB.ttf"'' ]; </del> <ins> # download dependencies ahead of time substituteInPlace 3rdParty/asio/CMakeLists.txt --replace "https://github.com/diasurgical/asio/archive/ebeff99f539da23d27c2e8d4bdbc1ee011968644.tar.gz" "${asio}" substituteInPlace 3rdParty/SDL_audiolib/CMakeLists.txt --replace "https://github.com/realnc/SDL_audiolib/archive/aa79660eba4467a44f9dcaecf26b0f0a000abfd7.tar.gz" "${SDL_audiolib}" substituteInPlace 3rdParty/simpleini/CMakeLists.txt --replace "https://github.com/brofield/simpleini/archive/7bca74f6535a37846162383e52071f380c99a43a.zip" "${simpleini}" ''; </ins> cmakeFlags = [ "-DBINARY_RELEASE=ON" "-DVERSION_NUM=${version}" <ins> "-DPACKET_ENCRYPTION=OFF" # FIXME: build with libsodium "-DDISABLE_ZERO_TIER=ON" # FIXME: build with libzt </ins> ]; <del> nativeBuildInputs = [ pkg-config cmake ]; buildInputs = [ libsodium SDL2 SDL2_mixer SDL2_ttf ]; </del> <ins> nativeBuildInputs = [ cmake pkg-config gettext smpq # used to build devilutionx.mpq ]; buildInputs = [ fmt libpng (SDL2.override { withStatic = true; }) SDL2_image ]; </ins> installPhase = '' runHook preInstall

mv devilutionx.app $out/Applications '' else '' install -Dm755 -t $out/bin devilutionx <del> install -Dt $out/share/fonts/truetype ../Packaging/resources/CharisSILB.ttf install -Dt $out/share/diasurgical/devilutionx ../Packaging/resources/devilutionx.mpq # TODO: icons and .desktop (see Packages/{debian,fedora}/*) </del> <ins> install -Dm755 -t $out/share/diasurgical/devilutionx devilutionx.mpq install -Dm755 -t $out/share/applications ../Packaging/nix/devilutionx-hellfire.desktop ../Packaging/nix/devilutionx.desktop install -Dm755 ../Packaging/resources/icon.png $out/share/icons/hicolor/512x512/apps/devilution.png install -Dm755 ../Packaging/resources/hellfire.png $out/share/icons/hicolor/512x512/apps/devilution-hellfire.png </ins> '') + '' runHook postInstall

description = "Diablo build for modern operating systems"; longDescription = "In order to play this game a copy of diabdat.mpq is required. Place a copy of diabdat.mpq in ~/.local/share/diasurgical/devilution before executing the game."; license = licenses.unlicense; <del> maintainers = [ maintainers.karolchmist ]; </del> <ins> maintainers = with maintainers; [ karolchmist aanderse ]; </ins> platforms = platforms.linux ++ platforms.windows; }; }

smu = callPackage ../tools/text/smu { }; <ins> smpq = callPackage ../applications/misc/smpq { }; </ins> sn0int = callPackage ../tools/security/sn0int { }; snabb = callPackage ../tools/networking/snabb { };

stb = callPackage ../development/libraries/stb { }; <ins> StormLib = callPackage ../development/libraries/StormLib { }; </ins> stxxl = callPackage ../development/libraries/stxxl { parallel = true; }; sqlite = lowPrio (callPackage ../development/libraries/sqlite { });