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
56 lines
1.1 KiB
Nix
56 lines
1.1 KiB
Nix
{ lib, stdenv, fetchFromGitHub, autoreconfHook, jam, pkgconfig
|
|
, zlib, libxml2, libxslt, xorgproto, libX11, libGLU, libGL, SDL
|
|
, SDL_mixer, SDL_image, SDL_ttf, SDL_gfx, physfs
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
pname = "lincity-ng";
|
|
version = "2.9beta.20170715";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "lincity-ng";
|
|
repo = "lincity-ng";
|
|
rev = "0c19714b811225238f310633e59f428934185e6b";
|
|
sha256 = "1gaj9fq97zmb0jsdw4rzrw34pimkmkwbfqps0glpqij4w3srz5f3";
|
|
};
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
nativeBuildInputs = [
|
|
autoreconfHook jam pkgconfig
|
|
];
|
|
|
|
buildInputs = [
|
|
zlib libxml2 libxslt xorgproto libX11 libGLU libGL SDL SDL_mixer SDL_image
|
|
SDL_ttf SDL_gfx physfs
|
|
];
|
|
|
|
autoreconfPhase = ''
|
|
./autogen.sh
|
|
'';
|
|
|
|
buildPhase = ''
|
|
runHook preBuild
|
|
|
|
AR='ar r' jam -j $NIX_BUILD_CORES
|
|
|
|
runHook postBuild
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
touch CREDITS
|
|
AR='ar r' jam install
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "City building game";
|
|
license = licenses.gpl2;
|
|
maintainers = with maintainers; [ raskin ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|