Files
nixpkgs/pkgs/by-name/ra/racer/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

49 lines
1.1 KiB
Nix

{
fetchurl,
lib,
stdenv,
allegro,
libjpeg,
makeWrapper,
}:
stdenv.mkDerivation rec {
pname = "racer";
version = "1.1";
src =
if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
url = "http://hippo.nipax.cz/src/racer-${version}.tar.gz";
sha256 = "0fll1qkqfcjq87k0jzsilcw701z92lfxn2y5ga1n038772lymxl9";
}
else if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
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";
mainProgram = "racer";
homepage = "http://hippo.nipax.cz/download.en.php";
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.linux;
};
}