diff --git a/pkgs/by-name/cr/crispy-doom/package.nix b/pkgs/by-name/cr/crispy-doom/package.nix index 16964496ce15..e2d5632915c5 100644 --- a/pkgs/by-name/cr/crispy-doom/package.nix +++ b/pkgs/by-name/cr/crispy-doom/package.nix @@ -1,54 +1,71 @@ { lib, stdenv, + fetchFromGitHub, autoreconfHook, + libpng, + libsamplerate, pkg-config, + python3, SDL2, SDL2_mixer, SDL2_net, - fetchFromGitHub, - python3, + zlib, + + enableTruecolor ? false, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "crispy-doom"; version = "7.0"; src = fetchFromGitHub { owner = "fabiangreffrath"; repo = "crispy-doom"; - rev = "crispy-doom-${version}"; - sha256 = "sha256-+rNZsb4GAjzNcIU5xZGBpmP+nXNOP16oVg68nfecMrw="; + tag = "crispy-doom-${finalAttrs.version}"; + hash = "sha256-+rNZsb4GAjzNcIU5xZGBpmP+nXNOP16oVg68nfecMrw="; }; postPatch = '' - sed -e 's#/games#/bin#g' -i src{,/setup}/Makefile.am for script in $(grep -lr '^#!/usr/bin/env python3$'); do patchShebangs $script; done ''; + configureFlags = lib.optional enableTruecolor [ "--enable-truecolor" ]; + nativeBuildInputs = [ autoreconfHook pkg-config python3 ]; + buildInputs = [ + libpng + libsamplerate SDL2 SDL2_mixer SDL2_net + zlib ]; + enableParallelBuilding = true; strictDeps = true; meta = { - homepage = "http://fabiangreffrath.github.io/crispy-doom"; + homepage = "https://fabiangreffrath.github.io/crispy-homepage"; + changelog = "https://github.com/fabiangreffrath/crispy-doom/releases/tag/crispy-doom-${finalAttrs.version}"; description = "Limit-removing enhanced-resolution Doom source port based on Chocolate Doom"; longDescription = '' Crispy Doom is a limit-removing enhanced-resolution Doom source port based on Chocolate Doom. Its name means that 640x400 looks \"crisp\" and is also a slight reference to its origin. ''; + mainProgram = "crispy-doom"; license = lib.licenses.gpl2Plus; platforms = lib.platforms.unix; - maintainers = with lib.maintainers; [ neonfuz ]; + maintainers = with lib.maintainers; [ + Gliczy + keenanweaver + neonfuz + ]; }; -} +})