diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2021-01-28 15:31:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-28 15:31:01 +0100 |
commit | 8d2a780501b0b94e6775dcd2410e7cd2bae34883 (patch) | |
tree | 80baca2b12bcddbe001dd3cfe471732194528b6b | |
parent | 9ce7db057cb9ba21edaa1a624e4586a83c2085e8 (diff) | |
parent | 85007d94fbf4837ab776c2c6cef6dd6d2e003b39 (diff) |
Merge pull request #110433 from iblech/patch-freedroid
-rw-r--r-- | pkgs/development/libraries/SDL_mixer/default.nix | 10 | ||||
-rw-r--r-- | pkgs/games/freedroid/default.nix | 53 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
3 files changed, 62 insertions, 3 deletions
diff --git a/pkgs/development/libraries/SDL_mixer/default.nix b/pkgs/development/libraries/SDL_mixer/default.nix index 7f5e38f39b8d..291e9790e442 100644 --- a/pkgs/development/libraries/SDL_mixer/default.nix +++ b/pkgs/development/libraries/SDL_mixer/default.nix @@ -1,4 +1,8 @@ -{ stdenv, lib, fetchurl, SDL, libogg, libvorbis, smpeg, enableNativeMidi ? false, fluidsynth ? null }: +{ stdenv, lib, fetchurl +, SDL, libogg, libvorbis, smpeg, libmikmod +, fluidsynth +, enableNativeMidi ? false +}: stdenv.mkDerivation rec { pname = "SDL_mixer"; @@ -9,9 +13,9 @@ stdenv.mkDerivation rec { sha256 = "0alrhqgm40p4c92s26mimg9cm1y7rzr6m0p49687jxd9g6130i0n"; }; - buildInputs = [ SDL libogg libvorbis fluidsynth smpeg ]; + buildInputs = [ SDL libogg libvorbis fluidsynth smpeg libmikmod ]; - configureFlags = [ "--disable-music-ogg-shared" ] + configureFlags = [ "--disable-music-ogg-shared" "--disable-music-mod-shared" ] ++ lib.optional enableNativeMidi " --enable-music-native-midi-gpl" ++ lib.optionals stdenv.isDarwin [ "--disable-sdltest" "--disable-smpegtest" ]; diff --git a/pkgs/games/freedroid/default.nix b/pkgs/games/freedroid/default.nix new file mode 100644 index 000000000000..266407d17dba --- /dev/null +++ b/pkgs/games/freedroid/default.nix @@ -0,0 +1,53 @@ +{ lib, stdenv +, fetchFromGitHub +, makeDesktopItem, copyDesktopItems +, imagemagick +, autoreconfHook +, SDL, SDL_mixer, SDL_image, SDL_gfx +, libvorbis +, libjpeg, libpng +, zlib +}: + +stdenv.mkDerivation rec { + pname = "freedroid"; + version = "1.2.1"; + + src = fetchFromGitHub { + owner = "ReinhardPrix"; + repo = "FreedroidClassic"; + rev = "release-${version}"; + sha256 = "027wns25nyyc8afyhyp5a8wn13x9nlzmnqzqyyma1055xjy5imis"; + }; + + nativeBuildInputs = [ copyDesktopItems imagemagick autoreconfHook ]; + buildInputs = [ SDL SDL_image SDL_gfx SDL_mixer libjpeg libpng libvorbis zlib ]; + + postPatch = '' + touch NEWS + ''; + + postInstall = '' + mkdir -p $out/share/icons/hicolor/32x32/apps + convert graphics/paraicon.bmp $out/share/icons/hicolor/32x32/apps/freedroid.png + ''; + + desktopItems = [ (makeDesktopItem { + name = pname; + exec = pname; + icon = pname; + desktopName = "Freedroid Classic"; + comment = "A clone of the classic game 'Paradroid' on Commodore 64"; + categories = "Game;ArcadeGame;"; + }) ]; + + meta = with lib; { + description = "A clone of the classic game 'Paradroid' on Commodore 64"; + homepage = "https://github.com/ReinhardPrix/FreedroidClassic"; + license = licenses.gpl2Only; + maintainers = with maintainers; [ iblech ]; + platforms = platforms.unix; + # Builds but fails to render to the screen at runtime. + broken = stdenv.isDarwin; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 72269704ed17..0a863bac1a73 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4233,6 +4233,8 @@ in mkFranzDerivation = callPackage ../applications/networking/instant-messengers/franz/generic.nix { }; }; + freedroid = callPackage ../games/freedroid { }; + freedroidrpg = callPackage ../games/freedroidrpg { }; freenukum = callPackage ../games/freenukum { }; |