From bef8321f9faaa9fa95b515dc32e4c7d74b2995cf Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Tue, 13 Mar 2018 01:02:18 +0300 Subject: [PATCH] kega-fusion: init at 3.63x --- pkgs/misc/emulators/kega-fusion/default.nix | 78 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 80 insertions(+) create mode 100644 pkgs/misc/emulators/kega-fusion/default.nix diff --git a/pkgs/misc/emulators/kega-fusion/default.nix b/pkgs/misc/emulators/kega-fusion/default.nix new file mode 100644 index 000000000000..bdc372c7ca23 --- /dev/null +++ b/pkgs/misc/emulators/kega-fusion/default.nix @@ -0,0 +1,78 @@ +{ stdenv, lib, writeText, fetchurl, upx, libGLU, glib, gtk2, alsaLib, libSM, libX11, gdk_pixbuf, pango, libXinerama, mpg123 }: + +let + libPath = lib.makeLibraryPath [ stdenv.cc.cc libGLU glib gtk2 alsaLib libSM libX11 gdk_pixbuf pango libXinerama ]; + +in stdenv.mkDerivation rec { + name = "kega-fusion-${version}"; + version = "3.63x"; + + src = fetchurl { + url = "http://www.carpeludum.com/download/Fusion363x.tar.gz"; + sha256 = "14s6czy20h5khyy7q95hd7k77v17ssafv9l6lafkiysvj2nmw94g"; + }; + + plugins = fetchurl { + url = "http://www.carpeludum.com/download/PluginsLinux.tar.gz"; + sha256 = "0d623cvh6n5ijj3wb64g93mxx2xbichsn7hj7brbb0ndw5cs70qj"; + }; + + runner = writeText "kega-fusion" '' + #!${stdenv.shell} -ex + + kega_libdir="@out@/lib/kega-fusion" + kega_localdir="$HOME/.Kega Fusion" + + # create local plugins directory if not present + mkdir -p "$kega_localdir/Plugins" + + # create links for every included plugin + if [ $(ls -1A $kega_libdir/plugins | wc -l) -gt 0 ]; then + for i in $kega_libdir/plugins/*; do + if [ ! -e "$kega_localdir/Plugins/$(basename "$i")" ]; then + ln -sf "$i" "$kega_localdir/Plugins/" + fi + done + fi + + # copy configuration file if not present + if ! [ -f "$kega_localdir/Fusion.ini" ]; then + cat > "$kega_localdir/Fusion.ini" <