Merge pull request #329823 from ExpidusOS/fix/pkgsllvm/elfutils
[NixPkgs.git] / pkgs / by-name / et / etlegacy-unwrapped / package.nix
blob906ffa86c21830c2fe1a75f45eb5b2c40a255307
1 { lib
2 , stdenv
3 , writeShellApplication
4 , fetchFromGitHub
5 , cjson
6 , cmake
7 , git
8 , makeBinaryWrapper
9 , unzip
10 , curl
11 , freetype
12 , glew
13 , libjpeg
14 , libogg
15 , libpng
16 , libtheora
17 , lua5_4
18 , minizip
19 , openal
20 , SDL2
21 , sqlite
22 , zlib
24 let
25   version = "2.82.1";
26   fakeGit = writeShellApplication {
27     name = "git";
29     text = ''
30       if [ "$1" = "describe" ]; then
31         echo "${version}"
32       fi
33     '';
34   };
36 stdenv.mkDerivation {
37   pname = "etlegacy-unwrapped";
38   inherit version;
40   src = fetchFromGitHub {
41     owner = "etlegacy";
42     repo = "etlegacy";
43     rev = "refs/tags/v${version}";
44     hash = "sha256-DA5tudbehXIU+4hX3ggcxWZ7AAOa8LUkIvUHbgMgDY8=";
45   };
47   nativeBuildInputs = [
48     cjson
49     cmake
50     fakeGit
51     git
52     makeBinaryWrapper
53     unzip
54   ];
56   buildInputs = [
57     curl
58     freetype
59     glew
60     libjpeg
61     libogg
62     libpng
63     libtheora
64     lua5_4
65     minizip
66     openal
67     SDL2
68     sqlite
69     zlib
70   ];
72   preBuild = ''
73     # Required for build time to not be in 1980
74     export SOURCE_DATE_EPOCH=$(date +%s)
75     # This indicates the build was by a CI pipeline and prevents the resource
76     # files from being flagged as 'dirty' due to potentially being custom built.
77     export CI="true"
78   '';
80   cmakeFlags = [
81     "-DCROSS_COMPILE32=0"
82     "-DBUILD_SERVER=1"
83     "-DBUILD_CLIENT=1"
84     "-DBUNDLED_JPEG=0"
85     "-DBUNDLED_LIBS=0"
86     "-DINSTALL_EXTRA=0"
87     "-DINSTALL_OMNIBOT=0"
88     "-DINSTALL_GEOIP=0"
89     "-DINSTALL_WOLFADMIN=0"
90     "-DFEATURE_AUTOUPDATE=0"
91     "-DINSTALL_DEFAULT_BASEDIR=${placeholder "out"}/lib/etlegacy"
92     "-DINSTALL_DEFAULT_BINDIR=${placeholder "out"}/bin"
93   ];
95   hardeningDisable = [ "fortify" ];
97   meta = {
98     description = "ET: Legacy is an open source project based on the code of Wolfenstein: Enemy Territory which was released in 2010 under the terms of the GPLv3 license";
99     homepage = "https://etlegacy.com";
100     license = with lib.licenses; [ gpl3Plus ];
101     longDescription = ''
102       ET: Legacy, an open source project fully compatible client and server
103       for the popular online FPS game Wolfenstein: Enemy Territory - whose
104       gameplay is still considered unmatched by many, despite its great age.
105     '';
106     maintainers = with lib.maintainers; [ ashleyghooper drupol ];
107     platforms = lib.platforms.linux;
108   };