diff options
author | Nikolay Amiantov <ab@fmap.me> | 2016-10-08 01:39:40 +0300 |
---|---|---|
committer | Nikolay Amiantov <ab@fmap.me> | 2016-10-08 01:40:22 +0300 |
commit | bc0970f1e3f16efc8ed81240c3ac45340f81471c (patch) | |
tree | 5d58871ee609880ba81bec5cbd085990f6130a84 /pkgs/misc/emulators/zsnes | |
parent | 1dcfa0df6a7d5ec1755fc209cc567f6b0b4be512 (diff) | |
download | nixpkgs-bc0970f1e3f16efc8ed81240c3ac45340f81471c.tar nixpkgs-bc0970f1e3f16efc8ed81240c3ac45340f81471c.tar.gz nixpkgs-bc0970f1e3f16efc8ed81240c3ac45340f81471c.tar.bz2 nixpkgs-bc0970f1e3f16efc8ed81240c3ac45340f81471c.tar.lz nixpkgs-bc0970f1e3f16efc8ed81240c3ac45340f81471c.tar.xz nixpkgs-bc0970f1e3f16efc8ed81240c3ac45340f81471c.tar.zst nixpkgs-bc0970f1e3f16efc8ed81240c3ac45340f81471c.zip |
zsnes: use more debian patches
Fixes #19343
Diffstat (limited to 'pkgs/misc/emulators/zsnes')
-rw-r--r-- | pkgs/misc/emulators/zsnes/default.nix | 39 |
1 files changed, 13 insertions, 26 deletions
diff --git a/pkgs/misc/emulators/zsnes/default.nix b/pkgs/misc/emulators/zsnes/default.nix index 8ad0ca39b07..02f93eb931d 100644 --- a/pkgs/misc/emulators/zsnes/default.nix +++ b/pkgs/misc/emulators/zsnes/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, fetchpatch, nasm, SDL, zlib, libpng, ncurses, mesa +{stdenv, fetchFromGitHub, nasm, SDL, zlib, libpng, ncurses, mesa , makeDesktopItem }: let @@ -15,35 +15,22 @@ let in stdenv.mkDerivation { name = "zsnes-1.51"; - src = fetchurl { - url = mirror://sourceforge/zsnes/zsnes151src.tar.bz2; - sha256 = "08s64qsxziv538vmfv38fg1rfrz5k95dss5zdkbfxsbjlbdxwmi8"; + src = fetchFromGitHub { + owner = "emillon"; + repo = "zsnes"; + rev = "fc160b2538738995f600f8405d23a66b070dac02"; + sha256 = "1gy79d5wdaacph0cc1amw7mqm7i0716n6mvav16p1svi26iz193v"; }; - patches = [ (fetchpatch { - url = "https://raw.githubusercontent.com/emillon/zsnes/fc160b2538738995f600f8405d23a66b070dac02/debian/patches/0003-gcc-4.3-ftbfs.patch"; - sha256 = "1rlqjxnx21iz03414bamqrpysaxbvmfacfnk111233yxjd4vhq89"; - }) - (fetchpatch { - url = "https://raw.githubusercontent.com/emillon/zsnes/fc160b2538738995f600f8405d23a66b070dac02/debian/patches/0009-hat-events.patch"; - sha256 = "1az5vxjff22hqlsv0nmliax3ziwcr9kc75na805v9f66s8fmj5rf"; - }) - (fetchpatch { - url = "https://raw.githubusercontent.com/emillon/zsnes/fc160b2538738995f600f8405d23a66b070dac02/debian/patches/0010-Fix-build-with-libpng-1.5.patch"; - sha256 = "1vjfraxjw6f496j3w8r581m3lbn16s0nx3hskzj14hl9ycfskhnr"; - }) - (fetchpatch { - url = "https://raw.githubusercontent.com/emillon/zsnes/fc160b2538738995f600f8405d23a66b070dac02/debian/patches/0012-Fix-build-with-gcc-4.7.patch"; - sha256 = "1d8m0vxi8wf9z4wfjx2cc48p1wy2qadgvcm88dg1jncg334jwfrg"; - }) - (fetchpatch { - url = "https://raw.githubusercontent.com/emillon/zsnes/fc160b2538738995f600f8405d23a66b070dac02/debian/patches/zsnes-linux-resume-freeze-fix.patch"; - sha256 = "0gvf6gsqxxfah1s80ya2l5yils2kv9xa6faajdyby7xipzkc6qc7"; - }) - ]; - buildInputs = [ nasm SDL zlib libpng ncurses mesa ]; + prePatch = '' + for i in $(cat debian/patches/series); do + echo "applying $i" + patch -p1 < "debian/patches/$i" + done + ''; + preConfigure = '' cd src sed -i "/^STRIP/d" configure |