From e727287d69759f55029e2642eaf46d33edcdb628 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Tue, 21 Mar 2023 11:40:49 +0200 Subject: [PATCH] rigsofrods-bin: init at 2022.12 --- pkgs/games/rigsofrods-bin/default.nix | 69 +++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 71 insertions(+) create mode 100644 pkgs/games/rigsofrods-bin/default.nix diff --git a/pkgs/games/rigsofrods-bin/default.nix b/pkgs/games/rigsofrods-bin/default.nix new file mode 100644 index 000000000000..fa9edfe72f45 --- /dev/null +++ b/pkgs/games/rigsofrods-bin/default.nix @@ -0,0 +1,69 @@ +{ lib +, stdenv +, fetchurl +, autoPatchelfHook +, makeWrapper +, unzip +, libGL +, libICE +, libSM +, libX11 +, libXrandr +, zlib +, alsa-lib +}: + +stdenv.mkDerivation rec { + pname = "rigsofrods-bin"; + version = "2022.12"; + + src = fetchurl { + url = "https://update.rigsofrods.org/rigs-of-rods-linux-2022-12.zip"; + hash = "sha256-jj152fd4YHlU6YCVCnN6DKRfmi5+ORpMQVDacy/TPeE="; + }; + + sourceRoot = "."; + + nativeBuildInputs = [ + autoPatchelfHook + makeWrapper + unzip + ]; + + buildInputs = [ + libGL + libICE + libSM + libX11 + libXrandr + stdenv.cc.cc + zlib + ]; + + runtimeDependencies = [ + alsa-lib + ]; + + noDumpEnvVars = true; + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin $out/share/rigsofrods + cp -a . $out/share/rigsofrods + for f in RoR RunRoR; do + makeWrapper $out/share/rigsofrods/$f $out/bin/$f \ + --chdir $out/share/rigsofrods + done + + runHook postInstall + ''; + + meta = with lib; { + description = "A free/libre soft-body physics simulator mainly targeted at simulating vehicle physics"; + homepage = "https://www.rigsofrods.org"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ raskin wegank ]; + platforms = [ "x86_64-linux" ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7afeef86bd2c..52c351633880 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -36068,6 +36068,8 @@ with pkgs; }; }; + rigsofrods-bin = callPackage ../games/rigsofrods-bin { }; + riko4 = callPackage ../games/riko4 { }; rili = callPackage ../games/rili { };