summaryrefslogtreecommitdiff
path: root/pkgs/games
diff options
context:
space:
mode:
authorquantenzitrone <general@dev.quantenzitrone.eu>2026-01-22 07:58:24 +0100
committerquantenzitrone <general@dev.quantenzitrone.eu>2026-01-22 09:51:25 +0100
commit1b86376d8886fcfb9815abfb2ffd1a0a9689307e (patch)
tree1335191ec3488357e2873aa4f77cebab0795c6b9 /pkgs/games
parentcurseofwar: move to pkgs/by-name (diff)
downloadnixpkgs-1b86376d8886fcfb9815abfb2ffd1a0a9689307e.tar.gz
openttd{,-jgrpp,-grfcodec,nml}: move to pkgs/by-name
this shouldn't create any rebuilds
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/openttd/default.nix155
-rw-r--r--pkgs/games/openttd/grfcodec.nix38
-rw-r--r--pkgs/games/openttd/jgrpp.nix28
-rw-r--r--pkgs/games/openttd/nml.nix30
4 files changed, 0 insertions, 251 deletions
diff --git a/pkgs/games/openttd/default.nix b/pkgs/games/openttd/default.nix
deleted file mode 100644
index 90a4948960e6..000000000000
--- a/pkgs/games/openttd/default.nix
+++ /dev/null
@@ -1,155 +0,0 @@
-{
- lib,
- stdenv,
- fetchzip,
- fetchpatch,
- cmake,
- pkg-config,
- SDL2,
- libpng,
- zlib,
- xz,
- freetype,
- fontconfig,
- curl,
- icu,
- harfbuzz,
- expat,
- glib,
- pcre2,
- withOpenGFX ? true,
- withOpenSFX ? true,
- withOpenMSX ? true,
- withFluidSynth ? true,
- fluidsynth,
- soundfont-fluid,
- soundfont-name ? "FluidR3_GM2-2",
- libsndfile,
- flac,
- libogg,
- libvorbis,
- libopus,
- libmpg123,
- pulseaudio,
- alsa-lib,
- libjack2,
- makeWrapper,
- buildPackages,
-}:
-
-let
- opengfx = fetchzip {
- url = "https://cdn.openttd.org/opengfx-releases/7.1/opengfx-7.1-all.zip";
- hash = "sha256-daJ/Qwg/okpmLQkXcCjruIiP8GEwyyp02YWcGQepxzs=";
- };
-
- opensfx = fetchzip {
- url = "https://cdn.openttd.org/opensfx-releases/1.0.3/opensfx-1.0.3-all.zip";
- hash = "sha256-QmfXizrRTu/fUcVOY7tCndv4t4BVW+fb0yUi8LgSYzM=";
- };
-
- openmsx = fetchzip {
- url = "https://cdn.openttd.org/openmsx-releases/0.4.2/openmsx-0.4.2-all.zip";
- hash = "sha256-ysNFIvo7iaLN8XoaeZuZQFLpBZlYUDLDg7rH6TabaHY=";
- };
-
- # OpenTTD builds and uses some of its own tools during the build and we need those to be available for cross-compilation.
- # Build the tools for buildPlatform with minimal dependencies, using the "OPTION_TOOLS_ONLY" flag.
- crossTools = buildPackages.openttd.overrideAttrs (oldAttrs: {
- pname = "openttd-tools";
- buildInputs = [ ];
- cmakeFlags = oldAttrs.cmakeFlags or [ ] ++ [ (lib.cmakeBool "OPTION_TOOLS_ONLY" true) ];
- installPhase = ''
- install -Dm555 src/strgen/strgen -t $out/bin
- install -Dm555 src/settingsgen/settingsgen -t $out/bin
- '';
- });
-in
-stdenv.mkDerivation (finalAttrs: {
- pname = "openttd";
- version = "15.0";
-
- src = fetchzip {
- url = "https://cdn.openttd.org/openttd-releases/${finalAttrs.version}/openttd-${finalAttrs.version}-source.tar.xz";
- hash = "sha256-J4M0n5dLM04Xtx3WMxWKVgDbo92QjuuJgPbESpwf1e8=";
- };
-
- nativeBuildInputs = [
- cmake
- pkg-config
- makeWrapper
- ]
- ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
- crossTools
- ];
-
- buildInputs = [
- SDL2
- libpng
- xz
- zlib
- freetype
- fontconfig
- curl
- icu
- harfbuzz
- expat
- glib
- pcre2
- ]
- ++ lib.optionals withFluidSynth [
- fluidsynth
- soundfont-fluid
- libsndfile
- flac
- libogg
- libvorbis
- libopus
- libmpg123
- pulseaudio
- alsa-lib
- libjack2
- ];
-
- strictDeps = true;
-
- postPatch = ''
- substituteInPlace src/music/fluidsynth.cpp \
- --replace-fail "/usr/share/soundfonts/default.sf2" \
- "${soundfont-fluid}/share/soundfonts/${soundfont-name}.sf2"
- '';
-
- postInstall =
- lib.optionalString withOpenGFX ''
- cp ${opengfx}/*.tar $out/share/games/openttd/baseset
- ''
- + lib.optionalString withOpenSFX ''
- cp ${opensfx}/*.tar $out/share/games/openttd/baseset
- ''
- + lib.optionalString withOpenMSX ''
- tar -xf ${openmsx}/*.tar -C $out/share/games/openttd/baseset
- '';
-
- meta = {
- description = ''Open source clone of the Microprose game "Transport Tycoon Deluxe"'';
- mainProgram = "openttd";
- longDescription = ''
- OpenTTD is a transportation economics simulator. In single player mode,
- players control a transportation business, and use rail, road, sea, and air
- transport to move goods and people around the simulated world.
-
- In multiplayer networked mode, players may:
- - play competitively as different businesses
- - play cooperatively controlling the same business
- - observe as spectators
- '';
- homepage = "https://www.openttd.org/";
- changelog = "https://cdn.openttd.org/openttd-releases/${finalAttrs.version}/changelog.md";
- license = lib.licenses.gpl2Only;
- platforms = lib.platforms.linux;
- maintainers = with lib.maintainers; [
- jcumming
- fpletz
- ];
- };
-})
diff --git a/pkgs/games/openttd/grfcodec.nix b/pkgs/games/openttd/grfcodec.nix
deleted file mode 100644
index 292fa0de4a7f..000000000000
--- a/pkgs/games/openttd/grfcodec.nix
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- stdenv,
- lib,
- fetchFromGitHub,
- boost,
- cmake,
- git,
-}:
-
-stdenv.mkDerivation {
- pname = "openttd-grfcodec";
- version = "unstable-2021-03-10";
-
- src = fetchFromGitHub {
- owner = "OpenTTD";
- repo = "grfcodec";
- rev = "045774dee7cab1a618a3e0d9b39bff78a12b6efa";
- sha256 = "0b4xnnkqc01d3r834lhkq744ymar6c8iyxk51wc4c7hvz0vp9vmy";
- };
-
- buildInputs = [ boost ];
- nativeBuildInputs = [
- cmake
- git
- ];
-
- installPhase = ''
- mkdir -p $out/bin
- cp -a grfcodec grfid grfstrip nforenum $out/bin/
- '';
-
- meta = {
- description = "Low-level (dis)assembler and linter for OpenTTD GRF files";
- homepage = "http://openttd.org/";
- license = lib.licenses.gpl2Plus;
- maintainers = with lib.maintainers; [ ToxicFrog ];
- };
-}
diff --git a/pkgs/games/openttd/jgrpp.nix b/pkgs/games/openttd/jgrpp.nix
deleted file mode 100644
index e875fcf8956b..000000000000
--- a/pkgs/games/openttd/jgrpp.nix
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- fetchFromGitHub,
- openttd,
- zstd,
- ...
-}:
-
-openttd.overrideAttrs (oldAttrs: rec {
- pname = "openttd-jgrpp";
- version = "0.67.1";
-
- src = fetchFromGitHub {
- owner = "JGRennison";
- repo = "OpenTTD-patches";
- rev = "jgrpp-${version}";
- hash = "sha256-GMkcf3XBotPXjZC4TdtOXzutyyIiW4haE+jNIfgozbg=";
- };
- patches = [ ];
-
- buildInputs = oldAttrs.buildInputs ++ [ zstd ];
-
- meta = {
- homepage = "https://github.com/JGRennison/OpenTTD-patches";
- changelog = "https://github.com/JGRennison/OpenTTD-patches/blob/jgrpp-${version}/jgrpp-changelog.md";
- mainProgram = "openttd";
- };
-
-})
diff --git a/pkgs/games/openttd/nml.nix b/pkgs/games/openttd/nml.nix
deleted file mode 100644
index a0672b15e996..000000000000
--- a/pkgs/games/openttd/nml.nix
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- lib,
- fetchFromGitHub,
- python3,
-}:
-
-python3.pkgs.buildPythonApplication rec {
- pname = "openttd-nml";
- version = "0.8.0";
- format = "setuptools";
-
- src = fetchFromGitHub {
- owner = "OpenTTD";
- repo = "nml";
- tag = version;
- hash = "sha256-LZhkyYTtolB9/1ZvwYa+TJJRBIifyuqlMawK7vhPV0k=";
- };
-
- propagatedBuildInputs = with python3.pkgs; [
- pillow
- ];
-
- meta = {
- homepage = "http://openttdcoop.org/";
- description = "Compiler for OpenTTD NML files";
- mainProgram = "nmlc";
- license = lib.licenses.gpl2Plus;
- maintainers = with lib.maintainers; [ ToxicFrog ];
- };
-}