git.iko.soy/typeable/nixpkgs
on master help sign in
mednaffe: small fixup

A fixup to the ubiquitous problem of "GTK variables not found". Now the app doesn't segfault when opening a window.

commit54a44777a957848289e0467b1f87e2df4081a053 authorAndersonTorres <torres.anderson.85@protonmail.com> dateWed 20 Jan 2021, 10:30 (6 years ago) parent107bf0e
1 file changed+21−8
pkgs/misc/emulators/mednaffe/default.nix+21−8
pkgs/misc/emulators/mednaffe/default.nix+21−8
@@ -1,7 +1,13 @@
1−{ lib, stdenv, fetchFromGitHub, makeWrapper, autoreconfHook, pkg-config, wrapGAppsHook
2−, gtk2 ? null, gtk3 ? null, mednafen }:
3−
4−with lib;
1+{ stdenv
2+, lib
3+, fetchFromGitHub
4+, autoreconfHook
5+, pkg-config
6+, mednafen
7+, gtk2 ? null
8+, gtk3 ? null
9+, wrapGAppsHook
10+}:
511
612stdenv.mkDerivation rec {
713 pname = "mednaffe";
@@ -14,13 +20,20 @@ stdenv.mkDerivation rec {
1420 sha256 = "15qk3a3l1phr8bap2ayh3c0vyvw2jwhny1iz1ajq2adyjpm9fhr7";
1521 };
1622
17− nativeBuildInputs = [ autoreconfHook makeWrapper pkg-config wrapGAppsHook ];
23+ nativeBuildInputs = [ autoreconfHook pkg-config wrapGAppsHook ];
1824 buildInputs = [ gtk2 gtk3 mednafen ];
1925
20− configureFlags = [ (enableFeature (gtk3 != null) "gtk3") ];
21− postInstall = "wrapProgram $out/bin/mednaffe --set PATH ${mednafen}/bin";
26+ configureFlags = [ (lib.enableFeature (gtk3 != null) "gtk3") ];
27+
28+ dontWrapGApps = true;
29+
30+ postInstall = ''
31+ wrapProgram $out/bin/mednaffe \
32+ --prefix PATH ':' "${mednafen}/bin" \
33+ "''${gappsWrapperArgs[@]}"
34+ '';
2235
23− meta = {
36+ meta = with lib; {
2437 description = "GTK-based frontend for mednafen emulator";
2538 homepage = "https://github.com/AmatCoder/mednaffe";
2639 license = licenses.gpl3Plus;