nixpkgs/pkgs/games/super-tux-kart/default.nix

64 lines
1.9 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, fetchsvn, cmake, pkgconfig, makeWrapper
2019-11-10 16:44:34 +00:00
, openal, freealut, libGLU, libGL, libvorbis, libogg, gettext, curl, freetype
2020-03-16 16:09:11 +00:00
, fribidi, libtool, bluez, libjpeg, libpng, zlib, libX11, libXrandr, enet, harfbuzz }:
let
dir = "stk-code";
assets = fetchsvn {
url = "https://svn.code.sf.net/p/supertuxkart/code/stk-assets";
rev = "18212";
sha256 = "1dyj8r5rfifhnhayga8w8irkpa99vw57xjmy74cp8xz8g7zvdzqf";
name = "stk-assets";
};
in stdenv.mkDerivation rec {
2019-04-21 16:56:28 +00:00
pname = "supertuxkart";
2020-03-16 16:09:11 +00:00
version = "1.1";
2018-01-19 15:05:41 +00:00
2015-05-17 02:02:43 +00:00
srcs = [
(fetchFromGitHub {
owner = "supertuxkart";
repo = "stk-code";
rev = version;
2020-03-16 16:09:11 +00:00
sha256 = "01vxxl94583ixswzmi4caz8dk64r56pn3zxh7v63zml60yfvxbvp";
name = dir;
2015-05-17 02:02:43 +00:00
})
];
nativeBuildInputs = [ cmake gettext libtool pkgconfig makeWrapper ];
2018-01-19 15:05:41 +00:00
buildInputs = [
libX11 libXrandr
2019-11-10 16:44:34 +00:00
openal freealut libGLU libGL libvorbis libogg zlib freetype
2020-03-16 16:09:11 +00:00
curl fribidi bluez libjpeg libpng enet harfbuzz
];
2013-01-10 19:55:46 +00:00
enableParallelBuilding = true;
2018-01-19 15:05:41 +00:00
cmakeFlags = [
"-DBUILD_RECORDER=OFF" # libopenglrecorder is not in nixpkgs
"-DUSE_SYSTEM_ANGELSCRIPT=OFF" # doesn't work with 2.31.2 or 2.32.0
"-DCHECK_ASSETS=OFF"
2018-01-19 15:05:41 +00:00
];
# Obtain the assets directly from the fetched store path, to avoid duplicating assets across multiple engine builds
preFixup = ''
wrapProgram $out/bin/supertuxkart --set-default SUPERTUXKART_ASSETS_DIR "${assets}"
'';
sourceRoot = dir;
meta = with stdenv.lib; {
description = "A Free 3D kart racing game";
longDescription = ''
SuperTuxKart is a Free 3D kart racing game, with many tracks,
characters and items for you to try, similar in spirit to Mario
Kart.
'';
homepage = "https://supertuxkart.net/";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ pyrolagus peterhoeg ];
platforms = with platforms; linux;
};
}