python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / games / chocolate-doom / default.nix
blob30fe2010b022f3c29d60d8b8811a5ab5c58bbfb5
1 { lib, stdenv, autoreconfHook, pkg-config, SDL2, SDL2_mixer, SDL2_net
2 , fetchFromGitHub, fetchpatch, python3 }:
4 stdenv.mkDerivation rec {
5   pname = "chocolate-doom";
6   version = "3.0.1";
8   src = fetchFromGitHub {
9     owner = "chocolate-doom";
10     repo = pname;
11     rev = "${pname}-${version}";
12     sha256 = "1zlcqhd49c5n8vaahgaqrc2y10z86xng51sbd82xm3rk2dly25jp";
13   };
15   patches = [
16     # Pull upstream patch to fix builx against gcc-10:
17     #   https://github.com/chocolate-doom/chocolate-doom/pull/1257
18     (fetchpatch {
19       name = "fno-common.patch";
20       url = "https://github.com/chocolate-doom/chocolate-doom/commit/a8fd4b1f563d24d4296c3e8225c8404e2724d4c2.patch";
21       sha256 = "1dmbygn952sy5n8qqp0asg11pmygwgygl17lrj7i0fxa0nrhixhj";
22     })
23   ];
25   outputs = [ "out" "man" ];
27   postPatch = ''
28     sed -e 's#/games#/bin#g' -i src{,/setup}/Makefile.am
29     patchShebangs --build man/{simplecpp,docgen}
30   '';
32   nativeBuildInputs = [
33     autoreconfHook
34     pkg-config
35     # for documentation
36     python3
37   ];
38   buildInputs = [ SDL2 SDL2_mixer SDL2_net ];
39   enableParallelBuilding = true;
41   meta = {
42     homepage = "http://chocolate-doom.org/";
43     description = "A Doom source port that accurately reproduces the experience of Doom as it was played in the 1990s";
44     license = lib.licenses.gpl2Plus;
45     platforms = lib.platforms.unix;
46     hydraPlatforms = lib.platforms.linux; # darwin times out
47     maintainers = with lib.maintainers; [ MP2E ];
48   };