evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / ca / caprice32 / package.nix
blob54ebfc49964f520e688028f863cc72f8aaae36be
1 { lib, stdenv, fetchFromGitHub, desktop-file-utils, libpng
2 , pkg-config, SDL, freetype, zlib }:
4 stdenv.mkDerivation rec {
6   pname = "caprice32";
7   version = "4.6.0";
8   # NOTE: When bumping version beyond 4.6.0, you likely need to remove
9   #       string.patch below. The fix of this patch has already been
10   #       done upstream but is not yet part of a release
12   src = fetchFromGitHub {
13     repo = "caprice32";
14     rev = "v${version}";
15     owner = "ColinPitrat";
16     sha256 = "0hng5krwgc1h9bz1xlkp2hwnvas965nd7sb3z9mb2m6x9ghxlacz";
17   };
19   nativeBuildInputs = [ desktop-file-utils pkg-config ];
20   buildInputs = [ libpng SDL freetype zlib ];
22   patches = [ ./string.patch ];
24   makeFlags = [
25     "APP_PATH=${placeholder "out"}/share/caprice32"
26     "RELEASE=1"
27     "DESTDIR=${placeholder "out"}"
28     "prefix=/"
29   ];
31   postInstall = ''
32     mkdir -p $out/share/icons/
33     mv $out/share/caprice32/resources/freedesktop/caprice32.png $out/share/icons/
34     mv $out/share/caprice32/resources/freedesktop/emulators.png $out/share/icons/
36     desktop-file-install --dir $out/share/applications \
37       $out/share/caprice32/resources/freedesktop/caprice32.desktop
39     desktop-file-install --dir $out/share/desktop-directories \
40       $out/share/caprice32/resources/freedesktop/Emulators.directory
42     install -Dm644 $out/share/caprice32/resources/freedesktop/caprice32.menu -t $out/etc/xdg/menus/applications-merged/
43   '';
45   meta = with lib; {
46     description = "Complete emulation of CPC464, CPC664 and CPC6128";
47     homepage = "https://github.com/ColinPitrat/caprice32";
48     license = licenses.gpl2;
49     maintainers = [ ];
50     platforms = platforms.linux;
51     mainProgram = "cap32";
52   };