nixpkgs/pkgs/applications/emulators/caprice32/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

54 lines
1.7 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, desktop-file-utils, libpng
2021-01-17 02:30:45 +00:00
, pkg-config, SDL, freetype, zlib }:
stdenv.mkDerivation rec {
pname = "caprice32";
2020-03-14 15:33:54 +00:00
version = "4.6.0";
2021-05-13 23:06:34 +00:00
# NOTE: When bumping version beyond 4.6.0, you likely need to remove
# string.patch below. The fix of this patch has already been
# done upstream but is not yet part of a release
src = fetchFromGitHub {
repo = "caprice32";
rev = "v${version}";
owner = "ColinPitrat";
2020-03-14 15:33:54 +00:00
sha256 = "0hng5krwgc1h9bz1xlkp2hwnvas965nd7sb3z9mb2m6x9ghxlacz";
};
2021-01-17 02:30:45 +00:00
nativeBuildInputs = [ desktop-file-utils pkg-config ];
buildInputs = [ libpng SDL freetype zlib ];
2021-05-13 23:06:34 +00:00
patches = [ ./string.patch ];
2020-03-14 15:33:54 +00:00
makeFlags = [
"APP_PATH=${placeholder "out"}/share/caprice32"
"RELEASE=1"
"DESTDIR=${placeholder "out"}"
"prefix=/"
];
2020-03-14 16:43:39 +00: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/
'';
meta = with lib; {
description = "A complete emulation of CPC464, CPC664 and CPC6128";
2020-03-14 15:33:54 +00:00
homepage = "https://github.com/ColinPitrat/caprice32";
license = licenses.gpl2;
maintainers = [ ];
platforms = platforms.linux;
2024-02-11 02:19:15 +00:00
mainProgram = "cap32";
2020-03-14 15:33:54 +00:00
};
}