13 stdenv.mkDerivation (finalAttrs: {
15 version = "0.6.2-unstable-2024-08-14";
18 url = "https://www.retrodev.com/repos/blastem";
20 hash = "sha256-0xw9O0o1pkJiXHyZer4nMJeLlRXS3Z4YYoLgfkrz3Yo=";
23 # will probably be fixed in https://github.com/NixOS/nixpkgs/pull/302481
24 postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
25 substituteInPlace Makefile \
26 --replace-fail "-flto" ""
40 # Note: menu.bin cannot be generated yet, because it would
41 # need the `vasmm68k_mot` executable (part of vbcc for amigaos68k
42 # Luckily, menu.bin doesn't need to be present for the emulator to function
44 makeFlags = [ "HOST_ZLIB=1" ];
46 env.NIX_CFLAGS_COMPILE = "-I${lib.getDev SDL2}/include/SDL2";
51 # not sure if any executable other than blastem is really needed here
52 install -Dm755 blastem dis zdis termhelper -t $out/share/blastem
53 install -Dm644 gamecontrollerdb.txt default.cfg rom.db -t $out/share/blastem
54 cp -r shaders $out/share/blastem/shaders
56 # wrapping instead of sym-linking makes sure argv0 stays at the original location
57 makeWrapper $out/share/blastem/blastem $out/bin/blastem
62 passthru.tests.version = testers.testVersion {
63 package = finalAttrs.finalPackage;
64 command = "blastem -v";
65 version = "0.6.3-pre"; # remove line when moving to a stable version
69 description = "The fast and accurate Genesis emulator";
70 homepage = "https://www.retrodev.com/blastem/";
71 license = lib.licenses.gpl3Plus;
72 mainProgram = "blastem";
73 maintainers = with lib.maintainers; [ tomasajt ];