mednaffe: 0.8 -> 0.8.6, add autoreconfHook, drop g_strdup from patch

This commit is contained in:
Yegor Timoshenko 2017-09-27 15:20:07 +00:00
parent cee657f9a3
commit 6e4c9b6294

View File

@ -1,28 +1,29 @@
{ stdenv, fetchFromGitHub, pkgconfig, gtk2, mednafen }: { stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, gtk2, mednafen }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "0.8";
name = "mednaffe-${version}"; name = "mednaffe-${version}";
version = "0.8.6";
src = fetchFromGitHub { src = fetchFromGitHub {
repo = "mednaffe"; owner = "AmatCoder";
owner = "AmatCoder"; repo = "mednaffe";
rev = "v${version}"; rev = "v${version}";
sha256 = "1j4py4ih14fa6dv0hka03rs4mq19ir83qkbxsz3695a4phmip0jr"; sha256 = "13l7gls430dcslpan39k0ymdnib2v6crdsmn6bs9k9g30nfnqi6m";
}; };
prePatch = '' patchPhase = ''
substituteInPlace src/mednaffe.c --replace "binpath = NULL" "binpath = g_strdup( \"${mednafen}/bin/mednafen\" )" substituteInPlace src/mednaffe.c \
--replace 'binpath = NULL' 'binpath = "${mednafen}/bin/mednafen"'
''; '';
buildInputs = [ pkgconfig gtk2 mednafen ]; nativeBuildInputs = [ autoreconfHook pkgconfig ];
buildInputs = [ gtk2 mednafen ];
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "A GTK based frontend for mednafen"; description = "A GTK based frontend for mednafen";
homepage = https://github.com/AmatCoder/mednaffe; homepage = https://github.com/AmatCoder/mednaffe;
license = licenses.gpl3; license = licenses.gpl3;
maintainers = [ maintainers.sheenobu ]; maintainers = with maintainers; [ sheenobu ];
platforms = platforms.linux; platforms = platforms.linux;
}; };
} }