nixpkgs/pkgs/by-name/ri/rigsofrods-bin/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

70 lines
1.2 KiB
Nix

{ 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 = "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" ];
};
}