anchor.diff:      sha256 = "1kay7aj30x0vn8rkylspdycydrzsc0aidjbs0dd238hr5hid723b";
     };
   
  +  patches = [
  +    # Fix cross-compilation, otherwise it fails to detect host compiler features
  +    # Doesn't affect non CC builds
  +    (fetchpatch {
  +      url = "https://mirror.its.dal.ca/gentoo-portage/games-emulation/snes9x/files/snes9x-1.53-cross-compile.patch";
  +      sha256 = "sha256-ZCmnprimz8PtDIXkB1dYD0oura9icW81yKvJ4coKaDg=";
  +    })
  +  ];
  +
     nativeBuildInputs = [
       pkg-config
  +  ]
  +  ++ lib.optionals (!withGtk) [
  +    autoreconfHook
     ]
     ++ lib.optionals withGtk [
       meson
  
positive.code: { lib
  , stdenv
  , alsa-lib
  , fetchFromGitHub
  , gtkmm3
  , libepoxy
  , libpng
  
negative.code: 
    configureFlags =
      lib.optional stdenv.hostPlatform.sse4_1Support "--enable-sse41"
      ++ lib.optional stdenv.hostPlatform.avx2Support "--enable-avx2";
  
    installPhase = lib.optionalString (!withGtk) ''
      runHook preInstall
  