nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, stdenv
2, fetchFromGitHub
3, makeDesktopItem, copyDesktopItems
4, imagemagick
5, autoreconfHook
6, SDL, SDL_mixer, SDL_image, SDL_gfx
7, libvorbis
8, libjpeg, libpng
9, zlib
10}:
11
12stdenv.mkDerivation rec {
13 pname = "freedroid";
14 version = "1.2.1";
15
16 src = fetchFromGitHub {
17 owner = "ReinhardPrix";
18 repo = "FreedroidClassic";
19 rev = "release-${version}";
20 sha256 = "027wns25nyyc8afyhyp5a8wn13x9nlzmnqzqyyma1055xjy5imis";
21 };
22
23 nativeBuildInputs = [ copyDesktopItems imagemagick autoreconfHook ];
24 buildInputs = [ SDL SDL_image SDL_gfx SDL_mixer libjpeg libpng libvorbis zlib ];
25
26 postPatch = ''
27 touch NEWS
28 '';
29
30 postInstall = ''
31 mkdir -p $out/share/icons/hicolor/32x32/apps
32 convert graphics/paraicon.bmp $out/share/icons/hicolor/32x32/apps/freedroid.png
33 '';
34
35 desktopItems = [ (makeDesktopItem {
36 name = pname;
37 exec = pname;
38 icon = pname;
39 desktopName = "Freedroid Classic";
40 comment = "A clone of the classic game 'Paradroid' on Commodore 64";
41 categories = [ "Game" "ArcadeGame" ];
42 }) ];
43
44 meta = with lib; {
45 description = "A clone of the classic game 'Paradroid' on Commodore 64";
46 homepage = "https://github.com/ReinhardPrix/FreedroidClassic";
47 license = licenses.gpl2Only;
48 maintainers = with maintainers; [ iblech ];
49 platforms = platforms.unix;
50 # Builds but fails to render to the screen at runtime.
51 broken = stdenv.isDarwin;
52 };
53}