about summary refs log tree commit diff
path: root/nixpkgs/pkgs/misc/emulators/caprice32/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/misc/emulators/caprice32/default.nix')
-rw-r--r--nixpkgs/pkgs/misc/emulators/caprice32/default.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/misc/emulators/caprice32/default.nix b/nixpkgs/pkgs/misc/emulators/caprice32/default.nix
new file mode 100644
index 000000000000..42b8e5229e99
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/caprice32/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchFromGitHub, libpng, pkgconfig, SDL, freetype, zlib }:
+
+stdenv.mkDerivation rec {
+
+  repo = "caprice32";
+  version = "unstable-2018-03-05";
+  rev = "317fe638111e245d67e301f6f295094d3c859a70";
+  name = "${repo}-${version}";
+
+  src = fetchFromGitHub {
+    inherit rev repo;
+    owner = "ColinPitrat";
+    sha256 = "1bywpmkizixcnr057k8zq9nlw0zhcmwkiriln0krgdcm7d3h9b86";
+  };
+
+  postPatch = "substituteInPlace cap32.cfg --replace /usr/local $out";
+
+  meta = with stdenv.lib; {
+    description = "A complete emulation of CPC464, CPC664 and CPC6128";
+    homepage = https://github.com/ColinPitrat/caprice32 ;
+    license = licenses.gpl2;
+    maintainers = [ maintainers.genesis ];
+    platforms = platforms.linux;
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ libpng SDL freetype zlib ];
+  makeFlags = [ "GIT_HASH=${src.rev}" "DESTDIR=$(out)" "prefix=/"];
+}