mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 07:46:09 +01:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
49 lines
1.5 KiB
Nix
49 lines
1.5 KiB
Nix
{ lib, stdenv, fetchzip, SDL2, SDL2_image, SDL2_mixer
|
|
, zlib, makeWrapper
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "sauerbraten";
|
|
version = "2020-12-27";
|
|
|
|
src = fetchzip {
|
|
url = "mirror://sourceforge/sauerbraten/sauerbraten_${builtins.replaceStrings [ "-" ] [ "_" ] version}_linux.tar.bz2";
|
|
sha256 = "0llknzj23vx6f3y452by9c7wlhzclyq4bqi22qd52m3l916z2mn5";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
makeWrapper
|
|
];
|
|
|
|
buildInputs = [
|
|
SDL2 SDL2_mixer SDL2_image
|
|
zlib
|
|
];
|
|
|
|
sourceRoot = "source/src";
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/bin $out/share/sauerbraten $out/share/doc/sauerbraten
|
|
cp -rv "../docs/"* $out/share/doc/sauerbraten/
|
|
cp -v sauer_client sauer_server $out/share/sauerbraten/
|
|
cp -rv ../packages ../data $out/share/sauerbraten/
|
|
|
|
makeWrapper $out/share/sauerbraten/sauer_server $out/bin/sauerbraten_server \
|
|
--run "cd $out/share/sauerbraten"
|
|
makeWrapper $out/share/sauerbraten/sauer_client $out/bin/sauerbraten_client \
|
|
--run "cd $out/share/sauerbraten" \
|
|
--add-flags "-q\''${HOME}"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "A free multiplayer & singleplayer first person shooter, the successor of the Cube FPS";
|
|
maintainers = with maintainers; [ raskin ajs124 ];
|
|
hydraPlatforms =
|
|
# raskin: tested amd64-linux;
|
|
# not setting platforms because it is 0.5+ GiB of game data
|
|
[];
|
|
license = "freeware"; # as an aggregate - data files have different licenses
|
|
# code is under zlib license
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|