1{
2 lib,
3 stdenv,
4 fetchurl,
5 autoPatchelfHook,
6 makeWrapper,
7 unzip,
8 libGL,
9 libICE,
10 libSM,
11 libX11,
12 libXrandr,
13 zlib,
14 alsa-lib,
15}:
16
17stdenv.mkDerivation {
18 pname = "rigsofrods-bin";
19 version = "2022.12";
20
21 src = fetchurl {
22 url = "https://update.rigsofrods.org/rigs-of-rods-linux-2022-12.zip";
23 hash = "sha256-jj152fd4YHlU6YCVCnN6DKRfmi5+ORpMQVDacy/TPeE=";
24 };
25
26 sourceRoot = ".";
27
28 nativeBuildInputs = [
29 autoPatchelfHook
30 makeWrapper
31 unzip
32 ];
33
34 buildInputs = [
35 libGL
36 libICE
37 libSM
38 libX11
39 libXrandr
40 stdenv.cc.cc
41 zlib
42 ];
43
44 runtimeDependencies = [
45 alsa-lib
46 ];
47
48 noDumpEnvVars = true;
49
50 installPhase = ''
51 runHook preInstall
52
53 mkdir -p $out/bin $out/share/rigsofrods
54 cp -a . $out/share/rigsofrods
55 for f in RoR RunRoR; do
56 makeWrapper $out/share/rigsofrods/$f $out/bin/$f \
57 --chdir $out/share/rigsofrods
58 done
59
60 runHook postInstall
61 '';
62
63 meta = with lib; {
64 description = "Free/libre soft-body physics simulator mainly targeted at simulating vehicle physics";
65 homepage = "https://www.rigsofrods.org";
66 license = licenses.gpl3Plus;
67 maintainers = with maintainers; [
68 raskin
69 wegank
70 ];
71 platforms = [ "x86_64-linux" ];
72 };
73}