forgejo-lts: 7.0.10 -> 7.0.11
[NixPkgs.git] / pkgs / by-name / xm / xmoto / package.nix
blob181868d93347cef9283dff516bbe7f7826a1ebc1
1 { lib, stdenv, fetchFromGitHub, cmake, gettext, makeWrapper, bzip2
2 , curl, libjpeg, libxml2, xz, lua, ode, libGL, libGLU, libpng
3 , pkg-config, SDL2, SDL2_mixer, SDL2_net , SDL2_ttf
4 , sqlite, libxdg_basedir, zlib }:
6 stdenv.mkDerivation rec {
7   pname = "xmoto";
8   version = "0.6.2";
10   src = fetchFromGitHub {
11     owner = pname;
12     repo = pname;
13     rev = "v${version}";
14     hash = "sha256-n58GB5HA50ybSq0ssvJMq+p3I3JThHUGLZ5sHy/245M=";
15   };
17   nativeBuildInputs = [
18     cmake
19     gettext
20     makeWrapper
21   ];
23   buildInputs = [
24     bzip2
25     curl
26     libjpeg
27     libxml2
28     xz
29     lua
30     ode
31     libGL
32     libGLU
33     libpng
34     SDL2
35     SDL2_mixer
36     SDL2_net
37     SDL2_ttf
38     sqlite
39     libxdg_basedir
40     zlib
41   ];
43   # Should normally come from SDL2_ttf pkg-config, but xmoto does not
44   # use it and uses include directories directly. Let's re-inject the
45   # path here.
46   env.NIX_CFLAGS_COMPILE = "-I${lib.getDev SDL2}/include/SDL2";
48   preFixup = ''
49     wrapProgram "$out/bin/xmoto" \
50       --prefix XDG_DATA_DIRS : "$out/share/"
51   '';
53   meta = with lib; {
54     description = "Challenging 2D motocross platform game, where physics play an important role";
55     mainProgram = "xmoto";
56     longDescription = ''
57       X-Moto is a challenging 2D motocross platform game, where physics plays an all important role in the gameplay.
58       You need to control your bike to its limits, if you want to have a chance to finish the most difficult challenges.
59     '';
60     homepage = "https://xmoto.tuxfamily.org";
61     maintainers = with maintainers; [ raskin pSub ];
62     platforms = platforms.all;
63     license = licenses.gpl2Plus;
64   };