about summary refs log tree commit diff
path: root/pkgs/misc/emulators
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2017-11-25 15:55:27 +0000
committerGitHub <noreply@github.com>2017-11-25 15:55:27 +0000
commitf2a689b7f643796b9f419f5b344d69ee8d4eb04b (patch)
tree13f0c62d12fbcd31fdf112f260785c319220d9f2 /pkgs/misc/emulators
parent3ea493430ad0f52b2b60da5f82aac793b8819c9c (diff)
parent9e7b916852307da557334d42fe1616b8e632f0e4 (diff)
downloadnixlib-f2a689b7f643796b9f419f5b344d69ee8d4eb04b.tar
nixlib-f2a689b7f643796b9f419f5b344d69ee8d4eb04b.tar.gz
nixlib-f2a689b7f643796b9f419f5b344d69ee8d4eb04b.tar.bz2
nixlib-f2a689b7f643796b9f419f5b344d69ee8d4eb04b.tar.lz
nixlib-f2a689b7f643796b9f419f5b344d69ee8d4eb04b.tar.xz
nixlib-f2a689b7f643796b9f419f5b344d69ee8d4eb04b.tar.zst
nixlib-f2a689b7f643796b9f419f5b344d69ee8d4eb04b.zip
Merge pull request #31184 from AndersonTorres/upload/openmsx
openmsx: init at git-2017-11-02
Diffstat (limited to 'pkgs/misc/emulators')
-rw-r--r--pkgs/misc/emulators/openmsx/custom-nixos.mk9
-rw-r--r--pkgs/misc/emulators/openmsx/default.nix48
2 files changed, 57 insertions, 0 deletions
diff --git a/pkgs/misc/emulators/openmsx/custom-nixos.mk b/pkgs/misc/emulators/openmsx/custom-nixos.mk
new file mode 100644
index 000000000000..9098762e40d5
--- /dev/null
+++ b/pkgs/misc/emulators/openmsx/custom-nixos.mk
@@ -0,0 +1,9 @@
+# This file substitutes $sourceRoot/build/custom.mk
+
+VERSION_EXEC:=false
+SYMLINK_FOR_BINARY:=false
+INSTALL_CONTRIB:=true
+INSTALL_BASE:=${out}
+INSTALL_DOC_DIR:=${INSTALL_BASE}/share/doc/openmsx
+INSTALL_SHARE_DIR:=${INSTALL_BASE}/share/openmsx
+INSTALL_BINARY_DIR:=${INSTALL_BASE}/bin
diff --git a/pkgs/misc/emulators/openmsx/default.nix b/pkgs/misc/emulators/openmsx/default.nix
new file mode 100644
index 000000000000..bb954582de5d
--- /dev/null
+++ b/pkgs/misc/emulators/openmsx/default.nix
@@ -0,0 +1,48 @@
+{ stdenv, fetchFromGitHub, pkgconfig
+, python
+, alsaLib, glew, mesa_noglu, libpng
+, libogg, libtheora, libvorbis
+, SDL, SDL_image, SDL_ttf
+, freetype, tcl, zlib
+}:
+
+stdenv.mkDerivation rec {
+
+  name = "openmsx-${version}";
+  version = "git-2017-11-02";
+
+  src = fetchFromGitHub {
+    owner = "openMSX";
+    repo = "openMSX";
+    rev = "eeb74206ae347a3b17e9b99f91f2b4682c5db22c";
+    sha256 = "170amj7k6wjhwx6psbplqljvckvhxxbv3aw72jrdxl1fb8zlnq3s";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ pkgconfig python ];
+
+  buildInputs = [ alsaLib glew mesa_noglu libpng
+    libogg libtheora libvorbis freetype
+    SDL SDL_image SDL_ttf tcl zlib ];
+
+  postPatch = ''
+    cp ${./custom-nixos.mk} build/custom.mk
+  '';
+
+  dontAddPrefix = true;
+
+  # Many thanks @mthuurne from OpenMSX project
+  # for providing support to Nixpkgs :)
+  TCL_CONFIG="${tcl}/lib/";
+
+  meta = with stdenv.lib; {
+    description = "A MSX emulator";
+    longDescription = ''
+      OpenMSX is an emulator for the MSX home computer system. Its goal is
+      to emulate all aspects of the MSX with 100% accuracy.
+    '';
+    homepage = https://openmsx.org;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = platforms.unix;
+  };
+}