22 lib ,
33 stdenv ,
44 fetchFromGitHub ,
5+ fetchpatch2 ,
56 SDL2 ,
67 callPackage ,
78 zlib ,
9+ nix-update-script ,
810} :
911
1012stdenv . mkDerivation ( finalAttrs : {
@@ -14,10 +16,19 @@ stdenv.mkDerivation (finalAttrs: {
1416 src = fetchFromGitHub {
1517 owner = "X16Community" ;
1618 repo = "x16-emulator" ;
17- rev = "r${ finalAttrs . version } " ;
19+ tag = "r${ finalAttrs . version } " ;
1820 hash = "sha256-E4TosRoORCWLotOIXROP9oqwqo1IRSa6X13GnmuxE9A=" ;
1921 } ;
2022
23+ # Fix build on GCC 14
24+ # TODO: Remove for next release as it should already be included in upstream
25+ patches = [
26+ ( fetchpatch2 {
27+ url = "https://github.com/X16Community/x16-emulator/commit/3da83c93d46a99635cf73a6f9fdcf1bd4a4ae04f.patch" ;
28+ hash = "sha256-DZItqq7B1lXZ6VFsQUdQKn0wt1HaX4ymq2pI2DamY3w=" ;
29+ } )
30+ ] ;
31+
2132 postPatch = ''
2233 substituteInPlace Makefile \
2334 --replace-fail '/bin/echo' 'echo'
@@ -48,14 +59,16 @@ stdenv.mkDerivation (finalAttrs: {
4859 run = ( callPackage ./run.nix { } ) {
4960 inherit ( finalAttrs . finalPackage ) emulator rom ;
5061 } ;
62+
63+ updateScript = nix-update-script { } ;
5164 } ;
5265
5366 meta = {
5467 homepage = "https://cx16forum.com/" ;
5568 description = "Official emulator of CommanderX16 8-bit computer" ;
56- changelog = "https://github.com/X16Community/x16-emulator/blob/r ${ finalAttrs . version } /RELEASES.md" ;
69+ changelog = "https://github.com/X16Community/x16-emulator/blob/${ finalAttrs . src . rev } /RELEASES.md" ;
5770 license = lib . licenses . bsd2 ;
58- maintainers = with lib . maintainers ; [ ] ;
71+ maintainers = with lib . maintainers ; [ pluiedev ] ;
5972 mainProgram = "x16emu" ;
6073 inherit ( SDL2 . meta ) platforms ;
6174 broken = stdenv . hostPlatform . isAarch64 ; # ofborg fails to compile it
0 commit comments