diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-09-13 11:53:06 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-09-13 17:18:49 +0000 |
commit | c3e005913d59b8ad64004e60888a71816688af1f (patch) | |
tree | f65b32f0d16acaa40f2ee82ac736d150de4b6cf5 /nixpkgs/pkgs/games | |
parent | 1c8034da05499ca3d999f57ba1f6b235e7711ee1 (diff) | |
parent | db88608d8c811a93b74c99cfa1224952afc78200 (diff) | |
download | nixlib-c3e005913d59b8ad64004e60888a71816688af1f.tar nixlib-c3e005913d59b8ad64004e60888a71816688af1f.tar.gz nixlib-c3e005913d59b8ad64004e60888a71816688af1f.tar.bz2 nixlib-c3e005913d59b8ad64004e60888a71816688af1f.tar.lz nixlib-c3e005913d59b8ad64004e60888a71816688af1f.tar.xz nixlib-c3e005913d59b8ad64004e60888a71816688af1f.tar.zst nixlib-c3e005913d59b8ad64004e60888a71816688af1f.zip |
Merge commit 'db88608d8c811a93b74c99cfa1224952afc78200'
Conflicts: nixpkgs/nixos/modules/config/update-users-groups.pl
Diffstat (limited to 'nixpkgs/pkgs/games')
25 files changed, 627 insertions, 41 deletions
diff --git a/nixpkgs/pkgs/games/airshipper/default.nix b/nixpkgs/pkgs/games/airshipper/default.nix new file mode 100644 index 000000000000..1fe33a86f978 --- /dev/null +++ b/nixpkgs/pkgs/games/airshipper/default.nix @@ -0,0 +1,74 @@ +{ lib +, rustPlatform +, fetchFromGitLab +, openssl +, vulkan-loader +, wayland +, wayland-protocols +, libxkbcommon +, libX11 +, libXrandr +, libXi +, libXcursor +, pkg-config +, makeWrapper +}: + +rustPlatform.buildRustPackage rec { + pname = "airshipper"; + version = "0.6.0"; + + src = fetchFromGitLab { + owner = "Veloren"; + repo = "airshipper"; + rev = "v${version}"; + sha256 = "sha256-m3H2FE1DoV/uk9PGgf9PCagwmWWSQO/gCi7zpS02/WY="; + }; + + cargoSha256 = "sha256-ddy4TjT/ia+sLBnpwcXBVUzAS07ar+Jjc04KS5/arlU="; + + buildInputs = [ + openssl + wayland + wayland-protocols + libxkbcommon + libX11 + libXrandr + libXi + libXcursor + ]; + nativeBuildInputs = [ pkg-config makeWrapper ]; + + postInstall = '' + mkdir -p "$out/share/applications" && mkdir -p "$out/share/icons" + cp "client/assets/net.veloren.airshipper.desktop" "$out/share/applications" + cp "client/assets/logo.ico" "$out/share/icons/net.veloren.airshipper.ico" + ''; + + postFixup = + let + libPath = lib.makeLibraryPath [ + vulkan-loader + wayland + wayland-protocols + libxkbcommon + libX11 + libXrandr + libXi + libXcursor + ]; + in '' + patchelf --set-rpath "${libPath}" "$out/bin/airshipper" + ''; + + doCheck = false; + cargoBuildFlags = [ "--package" "airshipper" ]; + cargoTestFlags = [ "--package" "airshipper" ]; + + meta = with lib; { + description = "Provides automatic updates for the voxel RPG Veloren."; + homepage = "https://www.veloren.net"; + license = licenses.gpl3; + maintainers = with maintainers; [ yusdacra ]; + }; +} diff --git a/nixpkgs/pkgs/games/astromenace/default.nix b/nixpkgs/pkgs/games/astromenace/default.nix index cbe2385ea125..16b087d1e4d0 100644 --- a/nixpkgs/pkgs/games/astromenace/default.nix +++ b/nixpkgs/pkgs/games/astromenace/default.nix @@ -33,5 +33,6 @@ stdenv.mkDerivation rec { homepage = "https://www.viewizard.com/"; license = lib.licenses.gpl3; platforms = lib.platforms.linux; + mainProgram = "AstroMenace"; }; } diff --git a/nixpkgs/pkgs/games/crossfire/crossfire-arch.nix b/nixpkgs/pkgs/games/crossfire/crossfire-arch.nix new file mode 100644 index 000000000000..ff9e0f9dea6d --- /dev/null +++ b/nixpkgs/pkgs/games/crossfire/crossfire-arch.nix @@ -0,0 +1,27 @@ +{ stdenv, lib, fetchsvn, + version, rev, sha256 }: + +stdenv.mkDerivation rec { + pname = "crossfire-arch"; + version = "r${toString rev}"; + + src = fetchsvn { + url = "http://svn.code.sf.net/p/crossfire/code/arch/trunk/"; + sha256 = sha256; + rev = rev; + }; + + installPhase = '' + mkdir -p "$out" + cp -a . "$out/" + ''; + + meta = with lib; { + description = "Archetype data for the Crossfire free MMORPG"; + homepage = "http://crossfire.real-time.com/"; + license = licenses.gpl2Plus; + platforms = platforms.linux; + hydraPlatforms = []; + maintainers = with maintainers; [ ToxicFrog ]; + }; +} diff --git a/nixpkgs/pkgs/games/crossfire/crossfire-client.nix b/nixpkgs/pkgs/games/crossfire/crossfire-client.nix new file mode 100644 index 000000000000..799ae4ab6ee7 --- /dev/null +++ b/nixpkgs/pkgs/games/crossfire/crossfire-client.nix @@ -0,0 +1,32 @@ +{ stdenv, lib, fetchsvn +, cmake, pkg-config, perl, vala +, gtk2, pcre, zlib, libpng, fribidi, harfbuzzFull, xorg, util-linux, curl +, SDL, SDL_image, SDL_mixer, libselinux, libsepol +, version, rev, sha256 +}: + +stdenv.mkDerivation rec { + pname = "crossfire-client"; + version = "r${toString rev}"; + + src = fetchsvn { + url = "http://svn.code.sf.net/p/crossfire/code/client/trunk/"; + sha256 = sha256; + rev = rev; + }; + + nativeBuildInputs = [ cmake pkg-config perl vala ]; + buildInputs = [ + gtk2 pcre zlib libpng fribidi harfbuzzFull xorg.libpthreadstubs + xorg.libXdmcp curl SDL SDL_image SDL_mixer util-linux libselinux libsepol + ]; + hardeningDisable = [ "format" ]; + + meta = with lib; { + description = "GTKv2 client for the Crossfire free MMORPG"; + homepage = "http://crossfire.real-time.com/"; + license = licenses.gpl2Plus; + platforms = platforms.linux; + maintainers = with maintainers; [ ToxicFrog ]; + }; +} diff --git a/nixpkgs/pkgs/games/crossfire/crossfire-maps.nix b/nixpkgs/pkgs/games/crossfire/crossfire-maps.nix new file mode 100644 index 000000000000..0521b038d361 --- /dev/null +++ b/nixpkgs/pkgs/games/crossfire/crossfire-maps.nix @@ -0,0 +1,27 @@ +{ stdenv, lib, fetchsvn, + version, rev, sha256 }: + +stdenv.mkDerivation rec { + pname = "crossfire-maps"; + version = "r${toString rev}"; + + src = fetchsvn { + url = "http://svn.code.sf.net/p/crossfire/code/maps/trunk/"; + sha256 = sha256; + rev = rev; + }; + + installPhase = '' + mkdir -p "$out" + cp -a . "$out/" + ''; + + meta = with lib; { + description = "Map data for the Crossfire free MMORPG"; + homepage = "http://crossfire.real-time.com/"; + license = licenses.gpl2Plus; + platforms = platforms.linux; + hydraPlatforms = []; + maintainers = with maintainers; [ ToxicFrog ]; + }; +} diff --git a/nixpkgs/pkgs/games/crossfire/crossfire-server.nix b/nixpkgs/pkgs/games/crossfire/crossfire-server.nix new file mode 100644 index 000000000000..9259e8e52faa --- /dev/null +++ b/nixpkgs/pkgs/games/crossfire/crossfire-server.nix @@ -0,0 +1,37 @@ +{ stdenv, lib, fetchsvn, autoreconfHook, + autoconf, automake, libtool, flex, perl, check, pkg-config, python3, + version, rev, sha256, maps, arch }: + +stdenv.mkDerivation rec { + pname = "crossfire-server"; + version = "r${toString rev}"; + + src = fetchsvn { + url = "http://svn.code.sf.net/p/crossfire/code/server/trunk/"; + sha256 = sha256; + rev = rev; + }; + + nativeBuildInputs = [ autoconf automake libtool flex perl check pkg-config python3 ]; + hardeningDisable = [ "format" ]; + + preConfigure = '' + ln -s ${arch} lib/arch + ln -s ${maps} lib/maps + sh autogen.sh + ''; + + configureFlags = [ "--with-python=${python3}" ]; + + postInstall = '' + ln -s ${maps} "$out/share/crossfire/maps" + ''; + + meta = with lib; { + description = "Server for the Crossfire free MMORPG"; + homepage = "http://crossfire.real-time.com/"; + license = licenses.gpl2Plus; + platforms = platforms.linux; + maintainers = with maintainers; [ ToxicFrog ]; + }; +} diff --git a/nixpkgs/pkgs/games/crossfire/default.nix b/nixpkgs/pkgs/games/crossfire/default.nix new file mode 100644 index 000000000000..bc74c00bcce4 --- /dev/null +++ b/nixpkgs/pkgs/games/crossfire/default.nix @@ -0,0 +1,28 @@ +{ callPackage, ... }: + +rec { + crossfire-client = callPackage ./crossfire-client.nix { + version = "1.75.0"; + rev = 21760; + sha256 = "0b42sak8hj60nywfswkps777asy9p8r9wsn7pmj2nqbd29ng1p9d"; + }; + + crossfire-server = callPackage ./crossfire-server.nix { + version = "latest"; + rev = 22111; + sha256 = "04fjif6zv642n2zlw27cgzkak2kknwrxqzg42bvzl7q901bsr9l7"; + maps = crossfire-maps; arch = crossfire-arch; + }; + + crossfire-arch = callPackage ./crossfire-arch.nix { + version = "latest"; + rev = 22111; + sha256 = "0l4rp3idvbhknpxxs0w4i4nqfg01wblzm4v4j375xwxxbf00j0ms"; + }; + + crossfire-maps = callPackage ./crossfire-maps.nix { + version = "latest"; + rev = 22111; + sha256 = "1dwfc84acjvbjgjakkb8z8pdlksbsn90j0z8z8rq37lqx0kx1sap"; + }; +} diff --git a/nixpkgs/pkgs/games/deliantra/0001-abs.patch b/nixpkgs/pkgs/games/deliantra/0001-abs.patch new file mode 100644 index 000000000000..d116317e243a --- /dev/null +++ b/nixpkgs/pkgs/games/deliantra/0001-abs.patch @@ -0,0 +1,17 @@ +--- a/utils/cfhq2xa.C ++++ b/utils/cfhq2xa.C +@@ -182,10 +182,10 @@ static inline bool Diff (pixel w1, pixel w2) + pixel YUV1 = RGBAtoYUVA (w1); + pixel YUV2 = RGBAtoYUVA (w2); + +- return ((abs (((YUV1 >> Rshift) & Cmask) - ((YUV2 >> Rshift) & Cmask)) > trY) || +- (abs (((YUV1 >> Gshift) & Cmask) - ((YUV2 >> Gshift) & Cmask)) > trU) || +- (abs (((YUV1 >> Bshift) & Cmask) - ((YUV2 >> Bshift) & Cmask)) > trV) || +- (abs (((YUV1 >> Ashift) & Cmask) - ((YUV2 >> Ashift) & Cmask)) > trA) ); ++ return ((abs ((signed int)((YUV1 >> Rshift) & Cmask) - (signed int)((YUV2 >> Rshift) & Cmask)) > trY) || ++ (abs ((signed int)((YUV1 >> Gshift) & Cmask) - (signed int)((YUV2 >> Gshift) & Cmask)) > trU) || ++ (abs ((signed int)((YUV1 >> Bshift) & Cmask) - (signed int)((YUV2 >> Bshift) & Cmask)) > trV) || ++ (abs ((signed int)((YUV1 >> Ashift) & Cmask) - (signed int)((YUV2 >> Ashift) & Cmask)) > trA) ); + } + + static void diff --git a/nixpkgs/pkgs/games/deliantra/0002-datadir.patch b/nixpkgs/pkgs/games/deliantra/0002-datadir.patch new file mode 100644 index 000000000000..1c8e847d88c6 --- /dev/null +++ b/nixpkgs/pkgs/games/deliantra/0002-datadir.patch @@ -0,0 +1,11 @@ +--- a/utils/cfutil.in ++++ b/utils/cfutil.in +@@ -27,7 +27,7 @@ use common::sense; + my $prefix = "@prefix@"; + my $exec_prefix = "@exec_prefix@"; + my $datarootdir = "@datarootdir@"; +-my $DATADIR = "@datadir@/@PACKAGE@"; ++my $DATADIR = $ENV{'DELIANTRA_DATADIR'} || "@datadir@/@PACKAGE@"; + + my $CONVERT = "@CONVERT@"; + my $IDENTIFY = "@IDENTIFY@"; diff --git a/nixpkgs/pkgs/games/deliantra/default.nix b/nixpkgs/pkgs/games/deliantra/default.nix new file mode 100644 index 000000000000..76a06c960187 --- /dev/null +++ b/nixpkgs/pkgs/games/deliantra/default.nix @@ -0,0 +1,10 @@ +pkgs: + +let + callPackage = pkgs.callPackage; +in { + deliantra-server = callPackage ./deliantra-server.nix {}; + deliantra-arch = callPackage ./deliantra-arch.nix {}; + deliantra-maps = callPackage ./deliantra-maps.nix {}; + deliantra-data = callPackage ./deliantra-data.nix {}; +} diff --git a/nixpkgs/pkgs/games/deliantra/deliantra-arch.nix b/nixpkgs/pkgs/games/deliantra/deliantra-arch.nix new file mode 100644 index 000000000000..2201ca2d1f5f --- /dev/null +++ b/nixpkgs/pkgs/games/deliantra/deliantra-arch.nix @@ -0,0 +1,25 @@ +{ stdenv, lib, fetchurl, deliantra-server }: + +stdenv.mkDerivation rec { + pname = "deliantra-arch"; + version = "3.1"; + + src = fetchurl { + url = "http://dist.schmorp.de/deliantra/${pname}-${version}.tar.xz"; + sha256 = "1xzhv48g90hwkzgx9nfjm81ivg6hchkik9ldimi8ijb4j393kvsz"; + }; + + installPhase = '' + mkdir -p "$out" + export DELIANTRA_DATADIR="$out" + ${deliantra-server}/bin/cfutil --install-arch . + ''; + + meta = with lib; { + description = "Archetype data for the Deliantra free MMORPG"; + homepage = "http://www.deliantra.net/"; + license = with licenses; [ gpl2Plus agpl3Plus ]; + platforms = platforms.linux; + maintainers = with maintainers; [ ToxicFrog ]; + }; +} diff --git a/nixpkgs/pkgs/games/deliantra/deliantra-data.nix b/nixpkgs/pkgs/games/deliantra/deliantra-data.nix new file mode 100644 index 000000000000..31ed7d0f0118 --- /dev/null +++ b/nixpkgs/pkgs/games/deliantra/deliantra-data.nix @@ -0,0 +1,21 @@ +{ stdenv, lib, fetchurl, deliantra-maps, deliantra-arch, deliantra-server, symlinkJoin }: + +symlinkJoin rec { + name = "deliantra-data-${version}"; + version = "M${deliantra-maps.version}+A${deliantra-arch.version}"; + + paths = [ + deliantra-maps + deliantra-arch + "${deliantra-server}/share/deliantra-server" + ]; + + meta = with lib; { + description = "Combined game data (maps + archetypes) for the Deliantra free MMORPG"; + homepage = "http://www.deliantra.net/"; + license = with licenses; [ gpl2Plus agpl3Plus ]; + platforms = platforms.linux; + maintainers = with maintainers; [ ToxicFrog ]; + hydraPlatforms = []; + }; +} diff --git a/nixpkgs/pkgs/games/deliantra/deliantra-maps.nix b/nixpkgs/pkgs/games/deliantra/deliantra-maps.nix new file mode 100644 index 000000000000..1f87178102a0 --- /dev/null +++ b/nixpkgs/pkgs/games/deliantra/deliantra-maps.nix @@ -0,0 +1,25 @@ +{ stdenv, lib, fetchurl, deliantra-server }: + +stdenv.mkDerivation rec { + pname = "deliantra-maps"; + version = "3.1"; + + src = fetchurl { + url = "http://dist.schmorp.de/deliantra/${pname}-${version}.tar.xz"; + sha256 = "0zbwzya28s1xpnbrmqkqvfrzns03zdjd8a9w9nk665aif6rw2zbz"; + }; + + installPhase = '' + mkdir -p "$out/maps" + export DELIANTRA_DATADIR="$out" + ${deliantra-server}/bin/cfutil --install-maps . + ''; + + meta = with lib; { + description = "Map data for the Deliantra free MMORPG"; + homepage = "http://www.deliantra.net/"; + license = with licenses; [ gpl2Plus agpl3Plus ]; + platforms = platforms.linux; + maintainers = with maintainers; [ ToxicFrog ]; + }; +} diff --git a/nixpkgs/pkgs/games/deliantra/deliantra-server.nix b/nixpkgs/pkgs/games/deliantra/deliantra-server.nix new file mode 100644 index 000000000000..e333b7a472f5 --- /dev/null +++ b/nixpkgs/pkgs/games/deliantra/deliantra-server.nix @@ -0,0 +1,48 @@ +{ stdenv, lib, fetchurl, perlPackages +, autoconf, perl, gperf, optipng, pngnq, rsync, imagemagick, blitz +, pkg-config, glib, boost, makeWrapper +}: + +let + perl-deps = with perlPackages; [ + AnyEvent AnyEventAIO AnyEventBDB AnyEventIRC + CompressLZF commonsense Coro CoroEV + Deliantra DigestSHA1 EV PodPOM SafeHole URI YAMLLibYAML + ]; +in +stdenv.mkDerivation rec { + pname = "deliantra-server"; + version = "3.1"; + + src = fetchurl { + url = "http://dist.schmorp.de/deliantra/${pname}-${version}.tar.xz"; + sha256 = "0v0m2m9fxq143aknh7jb3qj8bnpjrs3bpbbx07c18516y3izr71d"; + }; + + nativeBuildInputs = [ + autoconf perl gperf optipng pngnq rsync imagemagick + pkg-config makeWrapper + ]; + propagatedBuildInputs = perl-deps; + buildInputs = [ + blitz boost glib + ]; + + hardeningDisable = [ "format" ]; + patches = [ + ./0001-abs.patch + ./0002-datadir.patch + ]; + postFixup = '' + wrapProgram $out/bin/cfutil --prefix PERL5LIB : $PERL5LIB + wrapProgram $out/bin/deliantra-server --prefix PERL5LIB : $PERL5LIB + ''; + + meta = with lib; { + description = "Server for the Deliantra free MMORPG"; + homepage = "http://www.deliantra.net/"; + license = with licenses; [ gpl2Plus agpl3Plus ]; + platforms = platforms.linux; + maintainers = with maintainers; [ ToxicFrog ]; + }; +} diff --git a/nixpkgs/pkgs/games/eduke32/default.nix b/nixpkgs/pkgs/games/eduke32/default.nix index 8c7a79ff9822..c34922349612 100644 --- a/nixpkgs/pkgs/games/eduke32/default.nix +++ b/nixpkgs/pkgs/games/eduke32/default.nix @@ -1,6 +1,8 @@ { lib, stdenv, fetchurl, makeWrapper, pkg-config, nasm, makeDesktopItem , alsa-lib, flac, gtk2, libvorbis, libvpx, libGLU, libGL -, SDL2, SDL2_mixer }: +, SDL2, SDL2_mixer +, AGL, Cocoa, GLUT, OpenGL +}: let desktopItem = makeDesktopItem { @@ -16,21 +18,37 @@ let in stdenv.mkDerivation rec { pname = "eduke32"; - version = "20210722"; - rev = "9484"; - revExtra = "f3fea8c15"; + version = "20210910"; + rev = "9603"; + revExtra = "6c289cce4"; src = fetchurl { - url = "http://dukeworld.duke4.net/eduke32/synthesis/${version}-${rev}-${revExtra}/eduke32_src_${version}-${rev}-${revExtra}.tar.xz"; - sha256 = "0fdl2i465cl5x7129772ksx97lvim98m9009q5cfmf6scagj9pvz"; + url = "https://dukeworld.com/eduke32/synthesis/${version}-${rev}-${revExtra}/eduke32_src_${version}-${rev}-${revExtra}.tar.xz"; + sha256 = "sha256-/NQMsmT9z2N3KWBrP8hlGngQKJUgSP+vrNoFqJscRCk="; }; - buildInputs = [ alsa-lib flac gtk2 libvorbis libvpx libGL libGLU SDL2 SDL2_mixer ]; + buildInputs = [ + flac + libvorbis + libvpx + SDL2 + SDL2_mixer + ] ++ lib.optionals stdenv.isLinux [ + alsa-lib + gtk2 + libGL + libGLU + ] ++ lib.optionals stdenv.isDarwin [ + AGL + Cocoa + GLUT + OpenGL + ]; nativeBuildInputs = [ makeWrapper pkg-config ] ++ lib.optional (stdenv.hostPlatform.system == "i686-linux") nasm; - postPatch = '' + postPatch = lib.optionalString stdenv.isLinux '' substituteInPlace source/build/src/glbuild.cpp \ --replace libGLU.so ${libGLU}/lib/libGLU.so @@ -44,6 +62,9 @@ in stdenv.mkDerivation rec { makeFlags = [ "SDLCONFIG=${SDL2}/bin/sdl2-config" + ] ++ lib.optionals stdenv.isDarwin [ + # broken, see: https://github.com/NixOS/nixpkgs/issues/19098 + "LTO=0" ]; enableParallelBuilding = true; @@ -52,7 +73,7 @@ in stdenv.mkDerivation rec { runHook preInstall install -Dm755 -t $out/bin eduke32 mapster32 - + '' + lib.optionalString stdenv.isLinux '' makeWrapper $out/bin/eduke32 $out/bin/${wrapper} \ --set-default EDUKE32_DATA_DIR /var/lib/games/eduke32 \ --add-flags '-g "$EDUKE32_DATA_DIR/DUKE3D.GRP"' @@ -60,7 +81,16 @@ in stdenv.mkDerivation rec { cp -rv ${desktopItem}/share $out substituteInPlace $out/share/applications/eduke32.desktop \ --subst-var out + '' + lib.optionalString stdenv.isDarwin '' + mkdir -p $out/Applications/EDuke32.app/Contents/MacOS + mkdir -p $out/Applications/Mapster32.app/Contents/MacOS + + cp -r platform/Apple/bundles/EDuke32.app/* $out/Applications/EDuke32.app/ + cp -r platform/Apple/bundles/Mapster32.app/* $out/Applications/Mapster32.app/ + ln -sf $out/bin/eduke32 $out/Applications/EDuke32.app/Contents/MacOS/eduke32 + ln -sf $out/bin/mapster32 $out/Applications/Mapster32.app/Contents/MacOS/mapster32 + '' + '' runHook postInstall ''; @@ -68,8 +98,7 @@ in stdenv.mkDerivation rec { description = "Enhanched port of Duke Nukem 3D for various platforms"; homepage = "http://eduke32.com"; license = licenses.gpl2Plus; - maintainers = with maintainers; [ sander ]; - # Darwin is untested (supported by upstream) + maintainers = with maintainers; [ mikroskeem sander ]; platforms = platforms.all; }; } diff --git a/nixpkgs/pkgs/games/fheroes2/default.nix b/nixpkgs/pkgs/games/fheroes2/default.nix index fabfdeea8ce6..799557c4c149 100644 --- a/nixpkgs/pkgs/games/fheroes2/default.nix +++ b/nixpkgs/pkgs/games/fheroes2/default.nix @@ -4,13 +4,13 @@ stdenv.mkDerivation rec { pname = "fheroes2"; - version = "0.9.6"; + version = "0.9.7"; src = fetchFromGitHub { owner = "ihhub"; repo = "fheroes2"; rev = version; - sha256 = "sha256-zm7yR87pJY26USHocT7HnPNQK5xYjFPNo4RT2Lr3C/k="; + sha256 = "sha256-1hnkcsz+uGK3knWEryOvltBTmBm+zl0ym9F1jxSCf2w="; }; buildInputs = [ gettext libpng SDL2 SDL2_image SDL2_mixer SDL2_ttf zlib ]; diff --git a/nixpkgs/pkgs/games/freeciv/default.nix b/nixpkgs/pkgs/games/freeciv/default.nix index 051266fa8007..4b022615e6c0 100644 --- a/nixpkgs/pkgs/games/freeciv/default.nix +++ b/nixpkgs/pkgs/games/freeciv/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchFromGitHub, autoreconfHook, lua5_3, pkg-config, python3 , zlib, bzip2, curl, xz, gettext, libiconv , sdlClient ? true, SDL, SDL_mixer, SDL_image, SDL_ttf, SDL_gfx, freetype, fluidsynth -, gtkClient ? stdenv.isLinux, gtk3 +, gtkClient ? false, gtk3, wrapGAppsHook , qtClient ? false, qt5 , server ? true, readline , enableSqlite ? true, sqlite @@ -26,7 +26,8 @@ stdenv.mkDerivation rec { ''; nativeBuildInputs = [ autoreconfHook pkg-config ] - ++ lib.optional qtClient [ qt5.wrapQtAppsHook ]; + ++ lib.optional qtClient [ qt5.wrapQtAppsHook ] + ++ lib.optional gtkClient [ wrapGAppsHook ]; buildInputs = [ lua5_3 zlib bzip2 curl xz gettext libiconv ] ++ lib.optionals sdlClient [ SDL SDL_mixer SDL_image SDL_ttf SDL_gfx freetype fluidsynth ] @@ -36,6 +37,7 @@ stdenv.mkDerivation rec { ++ lib.optional enableSqlite sqlite; dontWrapQtApps = true; + dontWrapGApps = true; configureFlags = [ "--enable-shared" ] ++ lib.optional sdlClient "--enable-client=sdl" @@ -47,6 +49,12 @@ stdenv.mkDerivation rec { ++ lib.optional (!gtkClient) "--enable-fcmp=cli" ++ lib.optional (!server) "--disable-server"; + postFixup = lib.optionalString qtClient '' + wrapQtApp $out/bin/freeciv-qt + '' + lib.optionalString gtkClient '' + wrapGApp $out/bin/freeciv-gtk3.22 + ''; + enableParallelBuilding = true; meta = with lib; { diff --git a/nixpkgs/pkgs/games/legendary-gl/default.nix b/nixpkgs/pkgs/games/legendary-gl/default.nix index eb2f3f38cea4..f09503ea8b9d 100644 --- a/nixpkgs/pkgs/games/legendary-gl/default.nix +++ b/nixpkgs/pkgs/games/legendary-gl/default.nix @@ -7,13 +7,13 @@ buildPythonApplication rec { pname = "legendary-gl"; # Name in pypi - version = "0.20.6"; + version = "0.20.10"; src = fetchFromGitHub { owner = "derrod"; repo = "legendary"; rev = version; - sha256 = "1v6jbnasz2ilcafs6qyl6na4a8cxy2lgwr0hqsja6d846rfqa8ad"; + sha256 = "sha256-/OttNHwS08gHx/ZpOuB6yxfK2cX3BbMeQLZC7iXKKrk="; }; propagatedBuildInputs = [ requests ]; diff --git a/nixpkgs/pkgs/games/lgogdownloader/default.nix b/nixpkgs/pkgs/games/lgogdownloader/default.nix index d92484cfef27..93f17dbb8135 100644 --- a/nixpkgs/pkgs/games/lgogdownloader/default.nix +++ b/nixpkgs/pkgs/games/lgogdownloader/default.nix @@ -1,4 +1,5 @@ -{ lib, stdenv +{ lib +, stdenv , fetchFromGitHub , cmake , pkg-config @@ -23,14 +24,37 @@ stdenv.mkDerivation rec { sha256 = "sha256-LywFJCZevlhthOkAZo7JkXcPT9V6Zh28VD/MVQnMQjo="; }; - nativeBuildInputs = [ cmake pkg-config help2man ]; + nativeBuildInputs = [ + cmake + pkg-config + help2man + ]; - buildInputs = [ boost curl htmlcxx jsoncpp liboauth rhash tinyxml-2 ]; + buildInputs = [ + boost + curl + htmlcxx + jsoncpp + liboauth + rhash + tinyxml-2 + ]; + + doInstallCheck = true; + installCheckPhase = '' + if [[ "$("$out/bin/${pname}" --version)" == "LGOGDownloader ${version}" ]]; then + echo '${pname} smoke check passed' + else + echo '${pname} smoke check failed' + return 1 + fi + ''; meta = with lib; { description = "Unofficial downloader to GOG.com for Linux users. It uses the same API as the official GOGDownloader"; homepage = "https://github.com/Sude-/lgogdownloader"; license = licenses.wtfpl; + maintainers = with maintainers; [ _0x4A6F ]; platforms = platforms.linux; }; } diff --git a/nixpkgs/pkgs/games/mudlet/default.nix b/nixpkgs/pkgs/games/mudlet/default.nix index 139baece4a6f..9d8898b119e1 100644 --- a/nixpkgs/pkgs/games/mudlet/default.nix +++ b/nixpkgs/pkgs/games/mudlet/default.nix @@ -2,7 +2,9 @@ , boost, libGLU, lua, cmake, which, pkg-config, }: let - luaEnv = lua.withPackages(ps: with ps; [ luazip luafilesystem lrexlib-pcre luasql-sqlite3 lua-yajl luautf8 ]); + luaEnv = lua.withPackages(ps: with ps; [ + luazip luafilesystem lrexlib-pcre luasql-sqlite3 lua-yajl luautf8 + ]); in stdenv.mkDerivation rec { pname = "mudlet"; @@ -39,8 +41,6 @@ stdenv.mkDerivation rec { cp -r ../mudlet.png $out/share/pixmaps/ makeQtWrapper $out/mudlet $out/bin/mudlet \ - --set LUA_CPATH "${luaEnv}/lib/lua/${lua.luaversion}/?.so" \ - --prefix LUA_PATH : "$NIX_LUA_PATH" \ --prefix LD_LIBRARY_PATH : "${libsForQt5.qtkeychain}/lib/" \ --run "cd $out"; ''; diff --git a/nixpkgs/pkgs/games/quakespasm/default.nix b/nixpkgs/pkgs/games/quakespasm/default.nix index 87ecd4601339..7dda3b40ae3a 100644 --- a/nixpkgs/pkgs/games/quakespasm/default.nix +++ b/nixpkgs/pkgs/games/quakespasm/default.nix @@ -1,27 +1,72 @@ -{ lib, stdenv, SDL, fetchurl, gzip, libvorbis, libmad, copyDesktopItems, makeDesktopItem }: +{ lib, stdenv, SDL, SDL2, fetchurl, gzip, libvorbis, libmad +, Cocoa, CoreAudio, CoreFoundation, IOKit, OpenGL +, copyDesktopItems, makeDesktopItem +, useSDL2 ? stdenv.isDarwin # TODO: CoreAudio fails to initialize with SDL 1.x for some reason. +}: stdenv.mkDerivation rec { pname = "quakespasm"; - majorVersion = "0.93"; - version = "${majorVersion}.2"; + version = "0.94.1"; src = fetchurl { - url = "mirror://sourceforge/quakespasm/quakespasm-${version}.tgz"; - sha256 = "0qm0j5drybvvq8xadfyppkpk3rxqsxbywzm6iwsjwdf0iia3gss5"; + url = "mirror://sourceforge/quakespasm/quakespasm-${version}.tar.gz"; + sha256 = "19grpvsk3ikjypx9j0gpfsx5wanrqxkgf8dwl9h6ab5c8wwmjcjp"; }; sourceRoot = "${pname}-${version}/Quake"; + patches = lib.optionals stdenv.isDarwin [ + # Makes Darwin Makefile use system libraries instead of ones from app bundle + ./quakespasm-darwin-makefile-improvements.patch + ]; + nativeBuildInputs = [ copyDesktopItems ]; buildInputs = [ - gzip SDL libvorbis libmad + gzip libvorbis libmad (if useSDL2 then SDL2 else SDL) + ] ++ lib.optionals stdenv.isDarwin [ + Cocoa CoreAudio IOKit OpenGL + ] ++ lib.optionals (stdenv.isDarwin && useSDL2) [ + CoreFoundation + ]; + + buildFlags = [ + "DO_USERDIRS=1" + # Makefile defaults, set here to enforce consistency on Darwin build + "USE_CODEC_WAVE=1" + "USE_CODEC_MP3=1" + "USE_CODEC_VORBIS=1" + "USE_CODEC_FLAC=0" + "USE_CODEC_OPUS=0" + "USE_CODEC_MIKMOD=0" + "USE_CODEC_UMX=0" + "MP3LIB=mad" + "VORBISLIB=vorbis" + ] ++ lib.optionals useSDL2 [ + "SDL_CONFIG=sdl2-config" + "USE_SDL2=1" ]; - buildFlags = [ "DO_USERDIRS=1" ]; + makefile = if (stdenv.isDarwin) then "Makefile.darwin" else "Makefile"; preInstall = '' mkdir -p "$out/bin" substituteInPlace Makefile --replace "/usr/local/games" "$out/bin" + substituteInPlace Makefile.darwin --replace "/usr/local/games" "$out/bin" + ''; + + postInstall = lib.optionalString stdenv.isDarwin '' + # Let's build app bundle + mkdir -p $out/Applications/Quake.app/Contents/MacOS + mkdir -p $out/Applications/Quake.app/Contents/Resources + cp ../MacOSX/Info.plist $out/Applications/Quake.app/Contents/ + cp ../MacOSX/QuakeSpasm.icns $out/Applications/Quake.app/Contents/Resources/ + cp -r ../MacOSX/English.lproj $out/Applications/Quake.app/Contents/Resources/ + ln -sf $out/bin/quake $out/Applications/Quake.app/Contents/MacOS/quake + + substituteInPlace $out/Applications/Quake.app/Contents/Info.plist \ + --replace '>''${EXECUTABLE_NAME}' '>quake' + substituteInPlace $out/Applications/Quake.app/Contents/Info.plist \ + --replace '>''${PRODUCT_NAME}' '>QuakeSpasm' ''; enableParallelBuilding = true; @@ -47,7 +92,7 @@ stdenv.mkDerivation rec { and smoother mouse input - though no CD support. ''; - platforms = platforms.linux; - maintainers = with maintainers; [ m3tti ]; + platforms = platforms.unix; + maintainers = with maintainers; [ mikroskeem m3tti ]; }; } diff --git a/nixpkgs/pkgs/games/quakespasm/quakespasm-darwin-makefile-improvements.patch b/nixpkgs/pkgs/games/quakespasm/quakespasm-darwin-makefile-improvements.patch new file mode 100644 index 000000000000..0f8af7550ea4 --- /dev/null +++ b/nixpkgs/pkgs/games/quakespasm/quakespasm-darwin-makefile-improvements.patch @@ -0,0 +1,92 @@ +--- a/Makefile.darwin 2021-09-12 14:42:51.000000000 +0300 ++++ b/Makefile.darwin 2021-09-12 15:09:16.000000000 +0300 +@@ -49,6 +49,7 @@ + LIPO ?= lipo + + STRIP ?= strip ++PKG_CONFIG ?= pkg-config + + CPUFLAGS= + LDFLAGS = +@@ -84,9 +85,6 @@ + USE_RPATH=1 + endif + CFLAGS += $(CPUFLAGS) +-ifeq ($(USE_RPATH),1) +-LDFLAGS+=-Wl,-rpath,@executable_path/../Frameworks +-endif + + ifneq ($(DEBUG),0) + DFLAGS += -DDEBUG +@@ -115,19 +113,14 @@ + # not relying on sdl-config command and assuming + # /Library/Frameworks/SDL.framework is available + SDL_CFLAGS =-D_GNU_SOURCE=1 -D_THREAD_SAFE +-SDL_CFLAGS+=-DSDL_FRAMEWORK -DNO_SDL_CONFIG + ifeq ($(USE_SDL2),1) +-SDL_FRAMEWORK_NAME = SDL2 ++SDL_CONFIG ?= sdl2-config + else +-SDL_FRAMEWORK_NAME = SDL +-endif +-# default to our local SDL[2].framework for build +-SDL_FRAMEWORK_PATH ?=../MacOSX +-ifneq ($(SDL_FRAMEWORK_PATH),) +-SDL_LIBS +=-F$(SDL_FRAMEWORK_PATH) +-SDL_CFLAGS+=-F$(SDL_FRAMEWORK_PATH) ++SDL_CONFIG ?= sdl2-config + endif +-SDL_LIBS +=-Wl,-framework,$(SDL_FRAMEWORK_NAME) -Wl,-framework,Cocoa ++SDL_CFLAGS := $(shell $(SDL_CONFIG) --cflags) ++SDL_LIBS := $(shell $(SDL_CONFIG) --libs) ++SDL_LIBS += -Wl,-framework,Cocoa + + NET_LIBS := + +@@ -164,38 +157,26 @@ + endif + ifeq ($(USE_CODEC_FLAC),1) + CFLAGS+= -DUSE_CODEC_FLAC +-CODEC_INC = -I../MacOSX/codecs/include +-CODEC_LINK= -L../MacOSX/codecs/lib + CODECLIBS+= -lFLAC + endif + ifeq ($(USE_CODEC_OPUS),1) +-CFLAGS+= -DUSE_CODEC_OPUS +-CODEC_INC = -I../MacOSX/codecs/include +-CODEC_LINK= -L../MacOSX/codecs/lib +-CODECLIBS+= -lopusfile -lopus -logg ++CFLAGS+= -DUSE_CODEC_OPUS $(shell $(PKG_CONFIG) --cflags opusfile) ++CODECLIBS+= $(shell $(PKG_CONFIG) --libs opusfile) + endif + ifeq ($(USE_CODEC_VORBIS),1) + CFLAGS+= -DUSE_CODEC_VORBIS $(cpp_vorbisdec) +-CODEC_INC = -I../MacOSX/codecs/include +-CODEC_LINK= -L../MacOSX/codecs/lib + CODECLIBS+= $(lib_vorbisdec) + endif + ifeq ($(USE_CODEC_MP3),1) + CFLAGS+= -DUSE_CODEC_MP3 +-CODEC_INC = -I../MacOSX/codecs/include +-CODEC_LINK= -L../MacOSX/codecs/lib + CODECLIBS+= $(lib_mp3dec) + endif + ifeq ($(USE_CODEC_MIKMOD),1) + CFLAGS+= -DUSE_CODEC_MIKMOD +-CODEC_INC = -I../MacOSX/codecs/include +-CODEC_LINK= -L../MacOSX/codecs/lib + CODECLIBS+= -lmikmod + endif + ifeq ($(USE_CODEC_XMP),1) + CFLAGS+= -DUSE_CODEC_XMP +-CODEC_INC = -I../MacOSX/codecs/include +-CODEC_LINK= -L../MacOSX/codecs/lib + CODECLIBS+= -lxmp + endif + ifeq ($(USE_CODEC_UMX),1) +@@ -332,3 +313,5 @@ + clean: + rm -f $(shell find . \( -name '*~' -o -name '#*#' -o -name '*.o' -o -name '*.res' -o -name $(DEFAULT_TARGET) \) -print) + ++install: quakespasm ++ install -D -m 755 quakespasm /usr/local/games/quake diff --git a/nixpkgs/pkgs/games/sdlpop/default.nix b/nixpkgs/pkgs/games/sdlpop/default.nix index cef321fdce4e..f9b91e3dc158 100644 --- a/nixpkgs/pkgs/games/sdlpop/default.nix +++ b/nixpkgs/pkgs/games/sdlpop/default.nix @@ -8,22 +8,25 @@ stdenv.mkDerivation rec { pname = "sdlpop"; - version = "1.21"; + version = "1.22"; src = fetchFromGitHub { owner = "NagyD"; repo = "SDLPoP"; rev = "v${version}"; - sha256 = "1q4mnyg8v4420f1bp24v8lgi335vijdv61yi3fan14jgfzl38l7w"; + sha256 = "1yy5r1r0hv0xggk8qd8bwk2zy7abpv89nikq4flqgi53fc5q9xl7"; }; nativeBuildInputs = [ pkg-config makeWrapper copyDesktopItems ]; + buildInputs = [ SDL2 SDL2_image ]; makeFlags = [ "-C" "src" ]; preBuild = '' - substituteInPlace src/Makefile --replace "CC = gcc" "CC = ${stdenv.cc.targetPrefix}gcc" + substituteInPlace src/Makefile \ + --replace "CC = gcc" "CC = ${stdenv.cc.targetPrefix}cc" \ + --replace "CFLAGS += -I/opt/local/include" "CFLAGS += -I${SDL2.dev}/include/SDL2 -I${SDL2_image}/include/SDL2" ''; # The prince binary expects two things of the working directory it is called from: @@ -63,6 +66,5 @@ stdenv.mkDerivation rec { license = licenses.gpl3Plus; maintainers = with maintainers; [ iblech ]; platforms = platforms.unix; - broken = stdenv.isDarwin; }; } diff --git a/nixpkgs/pkgs/games/steam/fhsenv.nix b/nixpkgs/pkgs/games/steam/fhsenv.nix index b2c303caa54f..63da5d7a2b78 100644 --- a/nixpkgs/pkgs/games/steam/fhsenv.nix +++ b/nixpkgs/pkgs/games/steam/fhsenv.nix @@ -100,6 +100,11 @@ in buildFHSUserEnv rec { libva pipewire.lib + # steamwebhelper + harfbuzz + libthai + pango + # Not formally in runtime but needed by some games at-spi2-atk at-spi2-core # CrossCode @@ -114,7 +119,7 @@ in buildFHSUserEnv rec { xorg.libpciaccess udev # shadow of the tomb raider - ## screeps dependencies + # screeps dependencies gtk3 dbus zlib @@ -123,7 +128,6 @@ in buildFHSUserEnv rec { cairo freetype gdk-pixbuf - pango fontconfig # friends options won't display "Launch Game" without it @@ -188,7 +192,6 @@ in buildFHSUserEnv rec { nss fontconfig cairo - pango expat dbus cups diff --git a/nixpkgs/pkgs/games/tome4/default.nix b/nixpkgs/pkgs/games/tome4/default.nix index ace9b384663e..581220c339c4 100644 --- a/nixpkgs/pkgs/games/tome4/default.nix +++ b/nixpkgs/pkgs/games/tome4/default.nix @@ -3,11 +3,11 @@ stdenv.mkDerivation rec { pname = "tome4"; - version = "1.6.7"; + version = "1.7.4"; src = fetchurl { url = "https://te4.org/dl/t-engine/t-engine4-src-${version}.tar.bz2"; - sha256 = "0283hvms5hr29zr0grd6gq059k0hg8hcz3fsmwjmysiih8790i68"; + sha256 = "sha256-w1NPM/SMnPAnAl6z9E6Xsj3mEqZtXzFe1IMPmlKr8qQ="; }; desktop = makeDesktopItem { |