diff options
author | Robin Gloster <mail@glob.in> | 2016-02-28 16:32:57 +0000 |
---|---|---|
committer | Robin Gloster <mail@glob.in> | 2016-02-28 16:32:57 +0000 |
commit | 3b4765c9e59a34e7f48d2798cd4c4ef14d72e5a4 (patch) | |
tree | 04c567a4061b3adf6d1e0a898f39b67f27d37aea /pkgs/misc/emulators | |
parent | 8615f026a48cbf3f1c37b30e9b70bba6af013a12 (diff) | |
parent | a9d24cedeb3ba97a4e23ff93fadff32280ff0ab6 (diff) | |
download | nixlib-3b4765c9e59a34e7f48d2798cd4c4ef14d72e5a4.tar nixlib-3b4765c9e59a34e7f48d2798cd4c4ef14d72e5a4.tar.gz nixlib-3b4765c9e59a34e7f48d2798cd4c4ef14d72e5a4.tar.bz2 nixlib-3b4765c9e59a34e7f48d2798cd4c4ef14d72e5a4.tar.lz nixlib-3b4765c9e59a34e7f48d2798cd4c4ef14d72e5a4.tar.xz nixlib-3b4765c9e59a34e7f48d2798cd4c4ef14d72e5a4.tar.zst nixlib-3b4765c9e59a34e7f48d2798cd4c4ef14d72e5a4.zip |
Merge remote-tracking branch 'upstream/master' into hardened-stdenv
Diffstat (limited to 'pkgs/misc/emulators')
-rw-r--r-- | pkgs/misc/emulators/cdemu/base.nix | 2 | ||||
-rw-r--r-- | pkgs/misc/emulators/cdemu/vhba.nix | 2 | ||||
-rw-r--r-- | pkgs/misc/emulators/desmume/default.nix | 2 | ||||
-rw-r--r-- | pkgs/misc/emulators/retrofe/default.nix | 79 | ||||
-rw-r--r-- | pkgs/misc/emulators/retrofe/include-paths.patch | 11 | ||||
-rw-r--r-- | pkgs/misc/emulators/stella/default.nix | 2 |
6 files changed, 94 insertions, 4 deletions
diff --git a/pkgs/misc/emulators/cdemu/base.nix b/pkgs/misc/emulators/cdemu/base.nix index d7c91169ed3d..cfd2ad37cadf 100644 --- a/pkgs/misc/emulators/cdemu/base.nix +++ b/pkgs/misc/emulators/cdemu/base.nix @@ -4,7 +4,7 @@ let name = "${pkgName}-${version}"; in stdenv.mkDerivation ({ inherit name buildInputs; src = fetchurl { - url = "http://downloads.sourceforge.net/cdemu/${name}.tar.bz2"; + url = "mirror://sourceforge/cdemu/${name}.tar.bz2"; sha256 = pkgSha256; }; nativeBuildInputs = [ pkgconfig cmake ]; diff --git a/pkgs/misc/emulators/cdemu/vhba.nix b/pkgs/misc/emulators/cdemu/vhba.nix index d4596be03a69..2e163af1d5eb 100644 --- a/pkgs/misc/emulators/cdemu/vhba.nix +++ b/pkgs/misc/emulators/cdemu/vhba.nix @@ -3,7 +3,7 @@ let version = "20140928"; in stdenv.mkDerivation { name = "vhba-${version}"; src = fetchurl { - url = "http://downloads.sourceforge.net/cdemu/vhba-module-${version}.tar.bz2"; + url = "mirror://sourceforge/cdemu/vhba-module-${version}.tar.bz2"; sha256 = "18jmpg2kpx87f32b8aprr1pxla9dlhf901rkj1sp3ammf94nxxa5"; }; preBuild = '' diff --git a/pkgs/misc/emulators/desmume/default.nix b/pkgs/misc/emulators/desmume/default.nix index f322a96905fb..97cd6a9ca798 100644 --- a/pkgs/misc/emulators/desmume/default.nix +++ b/pkgs/misc/emulators/desmume/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { version = "0.9.11"; src = fetchurl { - url = "http://downloads.sourceforge.net/project/desmume/desmume/${version}/${name}.tar.gz"; + url = "mirror://sourceforge/project/desmume/desmume/${version}/${name}.tar.gz"; sha256 = "15l8wdw3q61fniy3h93d84dnm6s4pyadvh95a0j6d580rjk4pcrs"; }; diff --git a/pkgs/misc/emulators/retrofe/default.nix b/pkgs/misc/emulators/retrofe/default.nix new file mode 100644 index 000000000000..bf3091d1d706 --- /dev/null +++ b/pkgs/misc/emulators/retrofe/default.nix @@ -0,0 +1,79 @@ +{ stdenv, fetchhg, cmake, dos2unix, glib, gst_all_1, makeWrapper, pkgconfig +, python, SDL2, SDL2_image, SDL2_mixer, SDL2_ttf, sqlite, zlib +}: + +let + gstPlugins = with gst_all_1; [ gst-libav gst-plugins-base gst-plugins-good ]; + GST_PLUGIN_PATH = stdenv.lib.makeSearchPath "lib/gstreamer-1.0" gstPlugins; + +in stdenv.mkDerivation rec { + name = "retrofe-${version}"; + version = "0.6.169"; + + src = fetchhg { + url = https://bitbucket.org/teamretro/retrofe; + rev = "8793e03"; + sha256 = "0cvsg07ff0fdqh5zgiv2fs7s6c98hn150kpxmpw5fn6jilaszwkm"; + }; + + nativeBuildInputs = [ cmake makeWrapper pkgconfig python ]; + + buildInputs = [ + glib gst_all_1.gstreamer SDL2 SDL2_image SDL2_mixer SDL2_ttf sqlite zlib + ] ++ gstPlugins; + + patches = [ ./include-paths.patch ]; + + configurePhase = '' + cmake RetroFE/Source -BRetroFE/Build -DCMAKE_BUILD_TYPE=Release \ + -DVERSION_MAJOR=0 -DVERSION_MINOR=0 -DVERSION_BUILD=0 \ + -DGSTREAMER_BASE_INCLUDE_DIRS='${gst_all_1.gst-plugins-base}/include/gstreamer-1.0' + ''; + + buildPhase = '' + cmake --build RetroFE/Build + python Scripts/Package.py --os=linux --build=full + ''; + + installPhase = '' + mkdir -p $out/bin + mkdir -p $out/share/retrofe + cp -r Artifacts/linux/RetroFE $out/share/retrofe/example + mv $out/share/retrofe/example/retrofe $out/bin/ + + cat > $out/bin/retrofe-init << EOF + #!/bin/sh + + echo "This will install retrofe's example files into this directory" + echo "Example files location: $out/share/retrofe/example/" + + while true; do + read -p "Do you want to proceed? [yn] " yn + case \$yn in + [Yy]* ) cp -r --no-preserve=all $out/share/retrofe/example/* .; break;; + [Nn]* ) exit;; + * ) echo "Please answer with yes or no.";; + esac + done + EOF + + chmod +x $out/bin/retrofe-init + ''; + + # retrofe will look for config files in its install path ($out/bin). + # When set it will use $RETROFE_PATH instead. Sadly this behaviour isn't + # documented well. To make it behave more like as expected it's set to + # $PWD by default here. + fixupPhase = '' + wrapProgram "$out/bin/retrofe" \ + --prefix GST_PLUGIN_PATH : '${GST_PLUGIN_PATH}/lib/gstreamer-1.0' \ + --set RETROFE_PATH "\''${RETROFE_PATH:-\$PWD}" + ''; + + meta = with stdenv.lib; { + description = "A frontend for arcade cabinets and media PCs"; + license = licenses.gpl3Plus; + homepage = http://retrofe.com; + maintainers = with maintainers; [ hrdinka ]; + }; +} diff --git a/pkgs/misc/emulators/retrofe/include-paths.patch b/pkgs/misc/emulators/retrofe/include-paths.patch new file mode 100644 index 000000000000..02eef2594ea6 --- /dev/null +++ b/pkgs/misc/emulators/retrofe/include-paths.patch @@ -0,0 +1,11 @@ +diff -ur RetroFE.1/RetroFE/Source/CMakeLists.txt RetroFE.2/RetroFE/Source/CMakeLists.txt +--- RetroFE.1/RetroFE/Source/CMakeLists.txt 2016-02-21 14:52:36.726070602 +0100 ++++ RetroFE.2/RetroFE/Source/CMakeLists.txt 2016-02-21 14:38:43.036249029 +0100 +@@ -59,6 +59,7 @@ + set(RETROFE_INCLUDE_DIRS + "${GLIB2_INCLUDE_DIRS}" + "${GSTREAMER_INCLUDE_DIRS}" ++ "${GSTREAMER_BASE_INCLUDE_DIRS}" + "${SDL2_INCLUDE_DIRS}" + "${SDL2_IMAGE_INCLUDE_DIRS}" + "${SDL2_MIXER_INCLUDE_DIRS}" diff --git a/pkgs/misc/emulators/stella/default.nix b/pkgs/misc/emulators/stella/default.nix index 04976a2bb839..be872250d032 100644 --- a/pkgs/misc/emulators/stella/default.nix +++ b/pkgs/misc/emulators/stella/default.nix @@ -7,7 +7,7 @@ stdenv.mkDerivation rec { version = "4.6.1"; src = fetchurl { - url = "http://downloads.sourceforge.net/project/stella/stella/${version}/${name}-src.tar.gz"; + url = "mirror://sourceforge/project/stella/stella/${version}/${name}-src.tar.gz"; sha256 = "126jph21b70jlxapzmll8pq36i53lb304hbsiap25160vdqid4n1"; }; |