1{ lib, buildPythonPackage, fetchFromGitHub, GitPython 2, libpcap, meson, ninja, pillow, pkg-config, pygobject3, SDL2 3, alsa-lib, soundtouch, openal 4}: 5 6let 7 desmume = fetchFromGitHub { 8 owner = "SkyTemple"; 9 repo = "desmume"; 10 rev = "8e7af8ada883b7e91344985236f7c7c04ee795d7"; 11 sha256 = "0svmv2rch9q347gbpbws4agymas8n014gh1ssaf91wx7jwn53842"; 12 }; 13in 14buildPythonPackage rec { 15 pname = "py-desmume"; 16 version = "0.0.3.post2"; 17 18 src = fetchFromGitHub { 19 owner = "SkyTemple"; 20 repo = pname; 21 rev = version; 22 sha256 = "1chsg70k8kqnlasn88b04ww3yl0lay1bjxvz6lhp6s2cvsxv03x1"; 23 }; 24 25 postPatch = '' 26 cp -R --no-preserve=mode ${desmume} __build_desmume 27 ''; 28 29 buildInputs = [ GitPython libpcap SDL2 alsa-lib soundtouch openal ]; 30 nativeBuildInputs = [ meson ninja pkg-config ]; 31 propagatedBuildInputs = [ pillow pygobject3 ]; 32 33 hardeningDisable = [ "format" ]; 34 35 doCheck = false; # there are no tests 36 pythonImportsCheck = [ "desmume" ]; 37 38 meta = with lib; { 39 homepage = "https://github.com/SkyTemple/py-desmume"; 40 description = "Python library to interface with DeSmuME, the Nintendo DS emulator"; 41 license = licenses.gpl3Plus; 42 maintainers = with maintainers; [ xfix ]; 43 }; 44}