2022-05-12 21:24:53 +00:00
|
|
|
{ lib, stdenv, autoreconfHook, pkg-config, SDL2, SDL2_mixer, SDL2_net, fetchFromGitHub, fetchpatch }:
|
2014-09-02 08:36:47 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 06:12:05 +00:00
|
|
|
pname = "chocolate-doom";
|
2020-07-03 04:23:16 +00:00
|
|
|
version = "3.0.1";
|
2020-04-24 06:12:05 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "chocolate-doom";
|
|
|
|
repo = pname;
|
|
|
|
rev = "${pname}-${version}";
|
2020-07-03 04:23:16 +00:00
|
|
|
sha256 = "1zlcqhd49c5n8vaahgaqrc2y10z86xng51sbd82xm3rk2dly25jp";
|
2014-09-02 08:36:47 +00:00
|
|
|
};
|
2020-04-24 06:12:05 +00:00
|
|
|
|
2022-05-12 21:24:53 +00:00
|
|
|
patches = [
|
|
|
|
# Pull upstream patch to fix builx against gcc-10:
|
|
|
|
# https://github.com/chocolate-doom/chocolate-doom/pull/1257
|
|
|
|
(fetchpatch {
|
|
|
|
name = "fno-common.patch";
|
|
|
|
url = "https://github.com/chocolate-doom/chocolate-doom/commit/a8fd4b1f563d24d4296c3e8225c8404e2724d4c2.patch";
|
|
|
|
sha256 = "1dmbygn952sy5n8qqp0asg11pmygwgygl17lrj7i0fxa0nrhixhj";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-04-24 06:12:05 +00:00
|
|
|
postPatch = ''
|
2014-09-02 08:36:47 +00:00
|
|
|
sed -e 's#/games#/bin#g' -i src{,/setup}/Makefile.am
|
|
|
|
'';
|
|
|
|
|
2021-01-17 02:04:36 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
2020-04-24 06:12:05 +00:00
|
|
|
buildInputs = [ SDL2 SDL2_mixer SDL2_net ];
|
2014-09-02 08:36:47 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://chocolate-doom.org/";
|
2014-09-09 05:11:14 +00:00
|
|
|
description = "A Doom source port that accurately reproduces the experience of Doom as it was played in the 1990s";
|
2021-01-15 04:31:39 +00:00
|
|
|
license = lib.licenses.gpl2Plus;
|
|
|
|
platforms = lib.platforms.unix;
|
|
|
|
hydraPlatforms = lib.platforms.linux; # darwin times out
|
|
|
|
maintainers = with lib.maintainers; [ MP2E ];
|
2014-09-02 08:36:47 +00:00
|
|
|
};
|
|
|
|
}
|