depot/third_party/nixpkgs/pkgs/misc/emulators/mednaffe/default.nix
Default email 75ca762b89 Project import generated by Copybara.
GitOrigin-RevId: 29b0d4d0b600f8f5dd0b86e3362a33d4181938f9
2021-03-09 11:18:52 +08:00

43 lines
992 B
Nix

{ stdenv
, lib
, fetchFromGitHub
, autoreconfHook
, pkg-config
, mednafen
, gtk2 ? null
, gtk3 ? null
, wrapGAppsHook
}:
stdenv.mkDerivation rec {
pname = "mednaffe";
version = "0.9.1";
src = fetchFromGitHub {
owner = "AmatCoder";
repo = "mednaffe";
rev = version;
sha256 = "sha256-YU8PHnQHAsY90LN/WDugi4WhsuZGBj/z3BS4o69qMS4=";
};
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;
};
}