diff --git a/pkgs/misc/emulators/sameboy/default.nix b/pkgs/misc/emulators/sameboy/default.nix index d23129eba7e..1253bd346a6 100644 --- a/pkgs/misc/emulators/sameboy/default.nix +++ b/pkgs/misc/emulators/sameboy/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "sameboy"; - version = "0.13.6"; + version = "0.14"; src = fetchFromGitHub { owner = "LIJI32"; repo = "SameBoy"; rev = "v${version}"; - sha256 = "04w8lybi7ssnax37ka4qw7pmcm7cgnmk90p9m73zbyp5chgpqqzc"; + sha256 = "1faggrp0hka0dy97n4skdcxj1fcv8dy072fpbpiw7144x0byy5mn"; }; enableParallelBuilding = true; @@ -16,20 +16,22 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ rgbds glib wrapGAppsHook ]; buildInputs = [ SDL2 ]; - makeFlags = "CONF=release DATA_DIR=$(out)/share/sameboy/"; + makeFlags = [ + "CONF=release" + "CAN_INSTALL=true" + "PREFIX=$(out)" + "DATA_DIR=$(out)/share/sameboy/" + ]; - patchPhase = '' - sed 's/-Werror //g' -i Makefile - sed 's@"libgtk-3.so"@"${gtk3}/lib/libgtk-3.so"@g' -i OpenDialog/gtk.c + postPatch = '' + substituteInPlace Makefile \ + --replace "-Werror " "" + substituteInPlace OpenDialog/gtk.c \ + --replace '"libgtk-3.so"' '"${gtk3}/lib/libgtk-3.so"' ''; - installPhase = '' - pushd build/bin/SDL - install -Dm755 sameboy $out/bin/sameboy - rm sameboy - mkdir -p $out/share/sameboy - cp -r * $out/share/sameboy - popd + preInstall = '' + mkdir -p $out/bin ''; meta = with lib; {