From d083ebba5d1cdfdbede048a237fe6e9ef0c751c6 Mon Sep 17 00:00:00 2001 From: Dimitar Nestorov <8790386+dimitarnestorov@users.noreply.github.com> Date: Sun, 12 Jan 2025 21:54:13 +0200 Subject: [PATCH 1/4] mame: fix on darwin --- pkgs/applications/emulators/mame/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/emulators/mame/default.nix b/pkgs/applications/emulators/mame/default.nix index 86948a575ca9..de203d104413 100644 --- a/pkgs/applications/emulators/mame/default.nix +++ b/pkgs/applications/emulators/mame/default.nix @@ -7,6 +7,7 @@ SDL2_ttf, copyDesktopItems, expat, + fetchurl, flac, fontconfig, glm, @@ -18,7 +19,6 @@ libpulseaudio, makeDesktopItem, makeWrapper, - papirus-icon-theme, pkg-config, portaudio, portmidi, @@ -156,7 +156,10 @@ stdenv.mkDerivation rec { # to the final package after we figure out how they work installPhase = let - icon = "${papirus-icon-theme}/share/icons/Papirus/32x32/apps/mame.svg"; + icon = fetchurl { + url = "https://raw.githubusercontent.com/PapirusDevelopmentTeam/papirus-icon-theme/refs/heads/master/Papirus/32x32/apps/mame.svg"; + hash = "sha256-s44Xl9UGizmddd/ugwABovM8w35P0lW9ByB69MIpG+E="; + }; in '' runHook preInstall @@ -222,7 +225,6 @@ stdenv.mkDerivation rec { ]; maintainers = with maintainers; [ thiagokokada ]; platforms = platforms.unix; - broken = stdenv.hostPlatform.isDarwin; mainProgram = "mame"; }; } From 066979b2120333085c7e9fb38e7cfe44c497e7c0 Mon Sep 17 00:00:00 2001 From: Dimitar Nestorov <8790386+dimitarnestorov@users.noreply.github.com> Date: Sun, 12 Jan 2025 21:54:13 +0200 Subject: [PATCH 2/4] mame: remove `with lib;` --- pkgs/applications/emulators/mame/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/emulators/mame/default.nix b/pkgs/applications/emulators/mame/default.nix index de203d104413..dab6f657f4e2 100644 --- a/pkgs/applications/emulators/mame/default.nix +++ b/pkgs/applications/emulators/mame/default.nix @@ -201,7 +201,7 @@ stdenv.mkDerivation rec { update-source-version mame "''${latest_version/mame0/0.}" ''; - meta = with lib; { + meta = { homepage = "https://www.mamedev.org/"; description = "Multi-purpose emulation framework"; longDescription = '' @@ -219,12 +219,12 @@ stdenv.mkDerivation rec { focus. ''; changelog = "https://github.com/mamedev/mame/releases/download/mame${srcVersion}/whatsnew_${srcVersion}.txt"; - license = with licenses; [ + license = with lib.licenses; [ bsd3 gpl2Plus ]; - maintainers = with maintainers; [ thiagokokada ]; - platforms = platforms.unix; + maintainers = with lib.maintainers; [ thiagokokada ]; + platforms = lib.platforms.unix; mainProgram = "mame"; }; } From c72d6a4cca017a90c74dbb79a07727e3546fe362 Mon Sep 17 00:00:00 2001 From: Dimitar Nestorov <8790386+dimitarnestorov@users.noreply.github.com> Date: Sun, 12 Jan 2025 21:54:14 +0200 Subject: [PATCH 3/4] mame: add DimitarNestorov to maintainers --- pkgs/applications/emulators/mame/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/emulators/mame/default.nix b/pkgs/applications/emulators/mame/default.nix index dab6f657f4e2..f66e9144de38 100644 --- a/pkgs/applications/emulators/mame/default.nix +++ b/pkgs/applications/emulators/mame/default.nix @@ -223,7 +223,10 @@ stdenv.mkDerivation rec { bsd3 gpl2Plus ]; - maintainers = with lib.maintainers; [ thiagokokada ]; + maintainers = with lib.maintainers; [ + thiagokokada + DimitarNestorov + ]; platforms = lib.platforms.unix; mainProgram = "mame"; }; From 66ec56eddb0e1c152fcd8442b8790b65ec4f204c Mon Sep 17 00:00:00 2001 From: Dimitar Nestorov <8790386+dimitarnestorov@users.noreply.github.com> Date: Sun, 12 Jan 2025 21:54:14 +0200 Subject: [PATCH 4/4] mame: add version check hook --- pkgs/applications/emulators/mame/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/applications/emulators/mame/default.nix b/pkgs/applications/emulators/mame/default.nix index f66e9144de38..b5b760caa955 100644 --- a/pkgs/applications/emulators/mame/default.nix +++ b/pkgs/applications/emulators/mame/default.nix @@ -28,6 +28,7 @@ rapidjson, sqlite, utf8proc, + versionCheckHook, which, writeScript, zlib, @@ -191,6 +192,10 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + doInstallCheck = true; + nativeInstallCheckInputs = [ versionCheckHook ]; + versionCheckProgramArg = [ "-h" ]; + passthru.updateScript = writeScript "mame-update-script" '' #!/usr/bin/env nix-shell #!nix-shell -i bash -p curl common-updater-scripts jq