nixpkgs/pkgs/games/racer/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
1023 B
Nix
Raw Normal View History

2021-01-15 04:31:39 +00:00
{ fetchurl, lib, stdenv, allegro, libjpeg, makeWrapper }:
2021-06-22 21:44:58 +00:00
stdenv.mkDerivation rec {
pname = "racer";
version = "1.1";
src = if stdenv.hostPlatform.system == "i686-linux" then fetchurl {
2021-06-22 21:44:58 +00:00
url = "http://hippo.nipax.cz/src/racer-${version}.tar.gz";
sha256 = "0fll1qkqfcjq87k0jzsilcw701z92lfxn2y5ga1n038772lymxl9";
} else if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl {
2021-06-22 21:44:58 +00:00
url = "https://hippo.nipax.cz/src/racer-${version}.64.tar.gz";
sha256 = "0rjy3gmlhwfkb9zs58j0mc0dar0livwpbc19r6zw5r2k6r7xdan0";
} else
throw "System not supported";
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ allegro libjpeg ];
prePatch = ''
sed -i s,/usr/local,$out, Makefile src/HGFX.cpp src/STDH.cpp
sed -i s,/usr/share,$out/share, src/HGFX.cpp src/STDH.cpp
'';
patches = [ ./mkdir.patch ];
meta = {
description = "Car racing game";
homepage = "http://hippo.nipax.cz/download.en.php";
2021-01-15 04:31:39 +00:00
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.linux;
};
}