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