nixpkgs/pkgs/misc/emulators/mednaffe/default.nix
AndersonTorres 54a44777a9 mednaffe: small fixup
A fixup to the ubiquitous problem of "GTK variables not found". Now the app
doesn't segfault when opening a window.
2021-01-20 10:32:11 -03:00

44 lines
993 B
Nix

{ stdenv
, lib
, fetchFromGitHub
, autoreconfHook
, pkg-config
, mednafen
, gtk2 ? null
, gtk3 ? null
, wrapGAppsHook
}:
stdenv.mkDerivation rec {
pname = "mednaffe";
version = "0.8.8";
src = fetchFromGitHub {
owner = "AmatCoder";
repo = "mednaffe";
rev = version;
sha256 = "15qk3a3l1phr8bap2ayh3c0vyvw2jwhny1iz1ajq2adyjpm9fhr7";
};
nativeBuildInputs = [ autoreconfHook pkg-config wrapGAppsHook ];
buildInputs = [ gtk2 gtk3 mednafen ];
configureFlags = [ (lib.enableFeature (gtk3 != null) "gtk3") ];
dontWrapGApps = true;
postInstall = ''
wrapProgram $out/bin/mednaffe \
--prefix PATH ':' "${mednafen}/bin" \
"''${gappsWrapperArgs[@]}"
'';
meta = with lib; {
description = "GTK-based frontend for mednafen emulator";
homepage = "https://github.com/AmatCoder/mednaffe";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ sheenobu yegortimoshenko AndersonTorres ];
platforms = platforms.linux;
};
}