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
55
pkgs/games/dxx-rebirth/assets.nix
Normal file
55
pkgs/games/dxx-rebirth/assets.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{ lib, stdenv, requireFile, gogUnpackHook }:
|
||||
|
||||
let
|
||||
generic = ver: source: let
|
||||
pname = "descent${toString ver}";
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "${pname}-assets-${version}";
|
||||
version = "2.0.0.7";
|
||||
|
||||
src = requireFile rec {
|
||||
name = "setup_descent12_${version}.exe";
|
||||
sha256 = "1r1drbfda6czg21f9qqiiwgnkpszxgmcn5bafp5ljddh34swkn3f";
|
||||
message = ''
|
||||
While the Descent ${toString ver} game engine is free, the game assets are not.
|
||||
|
||||
Please purchase the game on gog.com and download the Windows installer.
|
||||
|
||||
Once you have downloaded the file, please use the following command and re-run the
|
||||
installation:
|
||||
|
||||
nix-prefetch-url file://\$PWD/${name}
|
||||
'';
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ gogUnpackHook ];
|
||||
|
||||
dontBuild = true;
|
||||
dontFixup = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/share/{games/${pname},doc/${pname}/examples}
|
||||
pushd "app/${source}"
|
||||
mv dosbox*.conf $out/share/doc/${pname}/examples
|
||||
mv *.txt *.pdf $out/share/doc/${pname}
|
||||
cp -r * $out/share/games/descent${toString ver}
|
||||
popd
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Descent ${toString ver} assets from GOG";
|
||||
homepage = "https://www.dxx-rebirth.com/";
|
||||
license = licenses.unfree;
|
||||
maintainers = with maintainers; [ peterhoeg ];
|
||||
hydraPlatforms = [];
|
||||
};
|
||||
};
|
||||
|
||||
in {
|
||||
descent1-assets = generic 1 "descent";
|
||||
descent2-assets = generic 2 "descent 2";
|
||||
}
|
||||
56
pkgs/games/dxx-rebirth/default.nix
Normal file
56
pkgs/games/dxx-rebirth/default.nix
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
{ lib, stdenv
|
||||
, fetchFromGitHub
|
||||
, fetchurl
|
||||
, fetchpatch
|
||||
, scons
|
||||
, pkg-config
|
||||
, SDL
|
||||
, SDL_mixer
|
||||
, libGLU
|
||||
, libGL
|
||||
, libpng
|
||||
, physfs
|
||||
}:
|
||||
|
||||
let
|
||||
music = fetchurl {
|
||||
url = "https://www.dxx-rebirth.com/download/dxx/res/d2xr-sc55-music.dxa";
|
||||
sha256 = "05mz77vml396mff43dbs50524rlm4fyds6widypagfbh5hc55qdc";
|
||||
};
|
||||
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dxx-rebirth";
|
||||
version = "0.59.20200202";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dxx-rebirth";
|
||||
repo = "dxx-rebirth";
|
||||
rev = "8ebb66c5c9c74ebb93d49741cc9545f2bb7fa05d";
|
||||
sha256 = "1lsrlp47aby2m9hh7i3nv5rb0srlkmnq1w2ca6vyvlga9m9h7jrk";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config scons ];
|
||||
|
||||
buildInputs = [ libGLU libGL libpng physfs SDL SDL_mixer ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
NIX_CFLAGS_COMPILE = [
|
||||
"-Wno-format-nonliteral"
|
||||
"-Wno-format-truncation"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
install -Dm644 ${music} $out/share/games/dxx-rebirth/${music.name}
|
||||
install -Dm644 -t $out/share/doc/dxx-rebirth *.txt
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Source Port of the Descent 1 and 2 engines";
|
||||
homepage = "https://www.dxx-rebirth.com/";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ peterhoeg ];
|
||||
platforms = with platforms; linux;
|
||||
};
|
||||
}
|
||||
30
pkgs/games/dxx-rebirth/full.nix
Normal file
30
pkgs/games/dxx-rebirth/full.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ lib, stdenv, makeWrapper
|
||||
, dxx-rebirth, descent1-assets, descent2-assets }:
|
||||
|
||||
let
|
||||
generic = ver: assets: stdenv.mkDerivation {
|
||||
name = "d${toString ver}x-rebirth-full-${assets.version}";
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
buildCommand = ''
|
||||
mkdir -p $out/bin
|
||||
|
||||
makeWrapper ${dxx-rebirth}/bin/d${toString ver}x-rebirth $out/bin/descent${toString ver} \
|
||||
--add-flags "-hogdir ${assets}/share/games/descent${toString ver}"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Descent ${toString ver} using the DXX-Rebirth project engine and game assets from GOG";
|
||||
homepage = "https://www.dxx-rebirth.com/";
|
||||
license = with licenses; [ free unfree ];
|
||||
maintainers = with maintainers; [ peterhoeg ];
|
||||
platforms = with platforms; linux;
|
||||
hydraPlatforms = [];
|
||||
};
|
||||
};
|
||||
|
||||
in {
|
||||
d1x-rebirth-full = generic 1 descent1-assets;
|
||||
d2x-rebirth-full = generic 2 descent2-assets;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue