summary refs log tree commit diff
path: root/pkgs/misc/emulators/caprice32/default.nix
blob: 42b8e5229e99838c8ed0f4ca58a85e03e57e6a60 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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=/"];
}