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
45 lines
1.5 KiB
Nix
45 lines
1.5 KiB
Nix
{ lib, stdenv, fetchsvn, boost, cmake, ffmpeg_3, freeglut, glib,
|
|
gtk2, libjpeg, libpng, libpthreadstubs, libvorbis, libXau, libXdmcp,
|
|
libXmu, libGLU, libGL, openal, pixman, pkg-config, python27, SDL }:
|
|
|
|
stdenv.mkDerivation {
|
|
name = "privateer-1.03";
|
|
|
|
src = fetchsvn {
|
|
#url = "mirror://sourceforge/project/privateer/Wing%20Commander%20Privateer/Privateer%20Gemini%20Gold%201.03/PrivateerGold1.03.bz2.bin";
|
|
url = "https://privateer.svn.sourceforge.net/svnroot/privateer/privgold/trunk/engine";
|
|
rev = "294";
|
|
sha256 = "e1759087d4565d3fc95e5c87d0f6ddf36b2cd5befec5695ec56ed5f3cd144c63";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
buildInputs =
|
|
[ boost ffmpeg_3 freeglut glib gtk2 libjpeg libpng
|
|
libpthreadstubs libvorbis libXau libXdmcp libXmu libGLU libGL openal
|
|
pixman python27 SDL ];
|
|
|
|
patches = [ ./0001-fix-VSFile-constructor.patch ];
|
|
|
|
preConfigure = ''
|
|
NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags gtk+-2.0)"
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/bin
|
|
cp vegastrike $out/bin
|
|
cp vegaserver $out/bin
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "http://privateer.sourceforge.net/";
|
|
description = "Adventure space flight simulation computer game";
|
|
license = licenses.gpl2Plus; # and a special license for art data
|
|
# https://sourceforge.net/p/privateer/code/HEAD/tree/privgold/trunk/data/art-license.txt
|
|
|
|
maintainers = with maintainers; [ ];
|
|
platforms = with platforms; linux ++ darwin;
|
|
hydraPlatforms = [];
|
|
broken = true; # it won't build
|
|
};
|
|
}
|