uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
90
pkgs/games/openttd/default.nix
Normal file
90
pkgs/games/openttd/default.nix
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
{ lib, stdenv, fetchurl, fetchzip, cmake, SDL2, libpng, zlib, xz, freetype, fontconfig
|
||||
, withOpenGFX ? true, withOpenSFX ? true, withOpenMSX ? true
|
||||
, withFluidSynth ? true, audioDriver ? "alsa", fluidsynth, soundfont-fluid, procps
|
||||
, writeScriptBin, makeWrapper, runtimeShell
|
||||
}:
|
||||
|
||||
let
|
||||
opengfx = fetchzip {
|
||||
url = "https://cdn.openttd.org/opengfx-releases/7.1/opengfx-7.1-all.zip";
|
||||
sha256 = "sha256-daJ/Qwg/okpmLQkXcCjruIiP8GEwyyp02YWcGQepxzs=";
|
||||
};
|
||||
|
||||
opensfx = fetchzip {
|
||||
url = "https://cdn.openttd.org/opensfx-releases/1.0.3/opensfx-1.0.3-all.zip";
|
||||
sha256 = "sha256-QmfXizrRTu/fUcVOY7tCndv4t4BVW+fb0yUi8LgSYzM=";
|
||||
};
|
||||
|
||||
openmsx = fetchzip {
|
||||
url = "https://cdn.openttd.org/openmsx-releases/0.4.2/openmsx-0.4.2-all.zip";
|
||||
sha256 = "sha256-Cgrg2m+uTODFg39mKgX+hE8atV7v5bVyZd716vSZB8M=";
|
||||
};
|
||||
|
||||
playmidi = writeScriptBin "playmidi" ''
|
||||
#!${runtimeShell}
|
||||
trap "${procps}/bin/pkill fluidsynth" EXIT
|
||||
${fluidsynth}/bin/fluidsynth -a ${audioDriver} -i ${soundfont-fluid}/share/soundfonts/FluidR3_GM2-2.sf2 $*
|
||||
'';
|
||||
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "openttd";
|
||||
version = "12.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://cdn.openttd.org/openttd-releases/${version}/${pname}-${version}-source.tar.xz";
|
||||
hash = "sha256-gVCPDek6DCZLIW71agX4OB//e/+m0BASGiFJC02s6Vw=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake makeWrapper ];
|
||||
buildInputs = [ SDL2 libpng xz zlib freetype fontconfig ]
|
||||
++ lib.optionals withFluidSynth [ fluidsynth soundfont-fluid ];
|
||||
|
||||
prefixKey = "--prefix-dir=";
|
||||
|
||||
configureFlags = [
|
||||
"--without-liblzo2"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
${lib.optionalString withOpenGFX ''
|
||||
cp ${opengfx}/*.tar $out/share/games/openttd/baseset
|
||||
''}
|
||||
|
||||
mkdir -p $out/share/games/openttd/data
|
||||
|
||||
${lib.optionalString withOpenSFX ''
|
||||
cp ${opensfx}/*.tar $out/share/games/openttd/data
|
||||
''}
|
||||
|
||||
mkdir $out/share/games/openttd/baseset/openmsx
|
||||
|
||||
${lib.optionalString withOpenMSX ''
|
||||
cp ${openmsx}/*.tar $out/share/games/openttd/baseset/openmsx
|
||||
''}
|
||||
|
||||
${lib.optionalString withFluidSynth ''
|
||||
wrapProgram $out/bin/openttd \
|
||||
--add-flags -m \
|
||||
--add-flags extmidi:cmd=${playmidi}/bin/playmidi
|
||||
''}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = ''Open source clone of the Microprose game "Transport Tycoon Deluxe"'';
|
||||
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/";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ jcumming fpletz ];
|
||||
};
|
||||
}
|
||||
28
pkgs/games/openttd/grfcodec.nix
Normal file
28
pkgs/games/openttd/grfcodec.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ stdenv, lib, fetchFromGitHub, boost, cmake, git }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
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 = with lib; {
|
||||
description = "Low-level (dis)assembler and linter for OpenTTD GRF files";
|
||||
homepage = "http://openttd.org/";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ ToxicFrog ];
|
||||
};
|
||||
}
|
||||
15
pkgs/games/openttd/jgrpp.nix
Normal file
15
pkgs/games/openttd/jgrpp.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ fetchFromGitHub, openttd, zstd, ... }:
|
||||
|
||||
openttd.overrideAttrs (oldAttrs: rec {
|
||||
pname = "openttd-jgrpp";
|
||||
version = "0.47.1";
|
||||
|
||||
src = fetchFromGitHub rec {
|
||||
owner = "JGRennison";
|
||||
repo = "OpenTTD-patches";
|
||||
rev = "jgrpp-${version}";
|
||||
hash = "sha256-AMd2KXy/ODByeV9CkEd51KbE/+fZ8Us3WzsWCnn7nh0=";
|
||||
};
|
||||
|
||||
buildInputs = oldAttrs.buildInputs ++ [ zstd ];
|
||||
})
|
||||
22
pkgs/games/openttd/nml.nix
Normal file
22
pkgs/games/openttd/nml.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{ stdenv, lib, fetchFromGitHub, python3Packages }:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "openttd-nml";
|
||||
version = "0.6.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "OpenTTD";
|
||||
repo = "nml";
|
||||
rev = version;
|
||||
sha256 = "0z0n4lqvnqigfjjhmmz7mvis7iivd4a8d287ya2yscfg5hznnqh2";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [ply pillow];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Compiler for OpenTTD NML files";
|
||||
homepage = "http://openttdcoop.org/";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ ToxicFrog ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue