nixpkgs/pkgs/games/scorched3d/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
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
2021-01-11 10:38:22 +01:00

41 lines
1.3 KiB
Nix

{ lib, stdenv, fetchurl, libGLU, libGL, glew, pkgconfig, openalSoft, freealut, wxGTK, libogg
, freetype, libvorbis, fftwSinglePrec, SDL, SDL_net, expat, libjpeg, libpng }:
stdenv.mkDerivation rec {
version = "44";
pname = "scorched3d";
src = fetchurl {
url = "mirror://sourceforge/scorched3d/Scorched3D-${version}-src.tar.gz";
sha256 = "1fldi9pn7cz6hc9h70pacgb7sbykzcac44yp3pkhn0qh4axj10qw";
};
buildInputs =
[ libGLU libGL glew openalSoft freealut wxGTK libogg freetype libvorbis
SDL SDL_net expat libjpeg libpng fftwSinglePrec
];
nativeBuildInputs = [ pkgconfig ];
patches = [
./file-existence.patch
(fetchurl {
url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/games-strategy/scorched3d/files/scorched3d-44-fix-c++14.patch?id=1bbcfc9ae3dfdfcbdd35151cb7b6050776215e4d";
sha256 = "1farmjxbc2wm4scsdbdnvh29fipnb6mp6z85hxz4bx6n9kbc8y7n";
})
];
sourceRoot = "scorched";
configureFlags = [ "--with-fftw=${fftwSinglePrec.dev}" ];
NIX_LDFLAGS = "-lopenal";
meta = with lib; {
homepage = "http://scorched3d.co.uk/";
description = "3D Clone of the classic Scorched Earth";
license = licenses.gpl2Plus;
platforms = platforms.linux; # maybe more
maintainers = with maintainers; [ abbradar ];
};
}