fishPlugins.nvm: init at 2.2.16 (#379076)
[NixPkgs.git] / pkgs / by-name / et / etlegacy-unwrapped / package.nix
bloba9b1b93c20419d6c9bb991c6d269b655fb6c8447
2   lib,
3   stdenv,
4   writeShellApplication,
5   fetchFromGitHub,
6   cjson,
7   cmake,
8   git,
9   makeBinaryWrapper,
10   unzip,
11   curl,
12   freetype,
13   glew,
14   libjpeg,
15   libogg,
16   libpng,
17   libtheora,
18   lua5_4,
19   minizip,
20   openal,
21   SDL2,
22   sqlite,
23   zlib,
25 let
26   version = "2.83.2";
27   fakeGit = writeShellApplication {
28     name = "git";
30     text = ''
31       if [ "$1" = "describe" ]; then
32         echo "${version}"
33       fi
34     '';
35   };
37 stdenv.mkDerivation {
38   pname = "etlegacy-unwrapped";
39   inherit version;
41   src = fetchFromGitHub {
42     owner = "etlegacy";
43     repo = "etlegacy";
44     tag = "v${version}";
45     hash = "sha256-hZwLYaYV0j3YwFi8KRr4DZV73L2yIwFJ3XqCyq6L7hE=";
46   };
48   nativeBuildInputs = [
49     cjson
50     cmake
51     fakeGit
52     git
53     makeBinaryWrapper
54     unzip
55   ];
57   buildInputs = [
58     curl
59     freetype
60     glew
61     libjpeg
62     libogg
63     libpng
64     libtheora
65     lua5_4
66     minizip
67     openal
68     SDL2
69     sqlite
70     zlib
71   ];
73   preBuild = ''
74     # Required for build time to not be in 1980
75     export SOURCE_DATE_EPOCH=$(date +%s)
76     # This indicates the build was by a CI pipeline and prevents the resource
77     # files from being flagged as 'dirty' due to potentially being custom built.
78     export CI="true"
79   '';
81   cmakeFlags = [
82     "-DCROSS_COMPILE32=0"
83     "-DCMAKE_BUILD_TYPE=Release"
84     "-DBUILD_SERVER=1"
85     "-DBUILD_CLIENT=1"
86     "-DBUNDLED_ZLIB=0"
87     "-DBUNDLED_CJSON=0"
88     "-DBUNDLED_JPEG=0"
89     "-DBUNDLED_LIBS=0"
90     "-DBUNDLED_FREETYPE=0"
91     "-DBUNDLED_OGG_VORBIS=0"
92     "-DBUNDLED_OPENAL=0"
93     "-DBUNDLED_PNG=0"
94     "-DBUNDLED_THEORA=0"
95     "-DBUNDLED_MINIZIP=0"
96     "-DINSTALL_EXTRA=0"
97     "-DINSTALL_OMNIBOT=0"
98     "-DINSTALL_GEOIP=0"
99     "-DINSTALL_WOLFADMIN=0"
100     "-DFEATURE_AUTOUPDATE=0"
101     "-DINSTALL_DEFAULT_BASEDIR=${placeholder "out"}/lib/etlegacy"
102     "-DINSTALL_DEFAULT_BINDIR=${placeholder "out"}/bin"
103   ];
105   hardeningDisable = [ "fortify" ];
107   meta = {
108     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";
109     homepage = "https://etlegacy.com";
110     license = with lib.licenses; [ gpl3Plus ];
111     longDescription = ''
112       ET: Legacy, an open source project fully compatible client and server
113       for the popular online FPS game Wolfenstein: Enemy Territory - whose
114       gameplay is still considered unmatched by many, despite its great age.
115     '';
116     maintainers = with lib.maintainers; [
117       ashleyghooper
118       drupol
119     ];
120   };