2020-03-14 17:43:39 +01:00
|
|
|
{ stdenv, fetchFromGitHub, desktop-file-utils, libpng
|
|
|
|
, pkgconfig, SDL, freetype, zlib }:
|
2018-03-04 23:51:15 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
2019-05-01 21:20:47 +02:00
|
|
|
pname = "caprice32";
|
2020-03-14 16:33:54 +01:00
|
|
|
version = "4.6.0";
|
2018-03-04 23:51:15 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2019-05-01 21:20:47 +02:00
|
|
|
repo = "caprice32";
|
|
|
|
rev = "v${version}";
|
2018-03-04 23:51:15 +01:00
|
|
|
owner = "ColinPitrat";
|
2020-03-14 16:33:54 +01:00
|
|
|
sha256 = "0hng5krwgc1h9bz1xlkp2hwnvas965nd7sb3z9mb2m6x9ghxlacz";
|
2018-03-04 23:51:15 +01:00
|
|
|
};
|
|
|
|
|
2020-03-14 17:43:39 +01:00
|
|
|
nativeBuildInputs = [ desktop-file-utils pkgconfig ];
|
2019-05-01 21:20:47 +02:00
|
|
|
buildInputs = [ libpng SDL freetype zlib ];
|
|
|
|
|
2020-03-14 16:33:54 +01:00
|
|
|
makeFlags = [
|
|
|
|
"APP_PATH=${placeholder "out"}/share/caprice32"
|
|
|
|
"RELEASE=1"
|
|
|
|
"DESTDIR=${placeholder "out"}"
|
|
|
|
"prefix=/"
|
|
|
|
];
|
2018-03-04 23:51:15 +01:00
|
|
|
|
2020-03-14 17:43:39 +01:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/icons/
|
|
|
|
mv $out/share/caprice32/resources/freedesktop/caprice32.png $out/share/icons/
|
|
|
|
mv $out/share/caprice32/resources/freedesktop/emulators.png $out/share/icons/
|
|
|
|
|
|
|
|
desktop-file-install --dir $out/share/applications \
|
|
|
|
$out/share/caprice32/resources/freedesktop/caprice32.desktop
|
|
|
|
|
|
|
|
desktop-file-install --dir $out/share/desktop-directories \
|
|
|
|
$out/share/caprice32/resources/freedesktop/Emulators.directory
|
|
|
|
|
|
|
|
install -Dm644 $out/share/caprice32/resources/freedesktop/caprice32.menu -t $out/etc/xdg/menus/applications-merged/
|
|
|
|
'';
|
|
|
|
|
2018-03-04 23:51:15 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A complete emulation of CPC464, CPC664 and CPC6128";
|
2020-03-14 16:33:54 +01:00
|
|
|
homepage = "https://github.com/ColinPitrat/caprice32";
|
2018-03-04 23:51:15 +01:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = [ maintainers.genesis ];
|
|
|
|
platforms = platforms.linux;
|
2020-03-14 16:33:54 +01:00
|
|
|
};
|
2018-03-04 23:51:15 +01:00
|
|
|
}
|