diff options
Diffstat (limited to 'pkgs/games')
111 files changed, 1220 insertions, 641 deletions
diff --git a/pkgs/games/angband/default.nix b/pkgs/games/angband/default.nix index 3f706b42c32c4..c6dbb631767f8 100644 --- a/pkgs/games/angband/default.nix +++ b/pkgs/games/angband/default.nix @@ -1,4 +1,6 @@ -{ lib, stdenv, fetchFromGitHub, autoreconfHook, ncurses5 }: +{ lib, stdenv, fetchFromGitHub, autoreconfHook, ncurses5 +, enableSdl2 ? false, SDL2, SDL2_image, SDL2_sound, SDL2_mixer, SDL2_ttf +}: stdenv.mkDerivation rec { pname = "angband"; @@ -11,8 +13,19 @@ stdenv.mkDerivation rec { sha256 = "sha256-Fp3BGCZYYdQCKXOLYsT4zzlibNRlbELZi26ofrbGGPQ="; }; + nativeBuildInputs = [ autoreconfHook ]; - buildInputs = [ ncurses5 ]; + buildInputs = [ ncurses5 ] + ++ lib.optionals enableSdl2 [ + SDL2 + SDL2_image + SDL2_sound + SDL2_mixer + SDL2_ttf + ]; + + configureFlags = lib.optional enableSdl2 "--enable-sdl2"; + installFlags = [ "bindir=$(out)/bin" ]; meta = with lib; { diff --git a/pkgs/games/black-hole-solver/default.nix b/pkgs/games/black-hole-solver/default.nix index e859e72d96b15..601aaeb1d90d2 100644 --- a/pkgs/games/black-hole-solver/default.nix +++ b/pkgs/games/black-hole-solver/default.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation rec { pname = "black-hole-solver"; - version = "1.10.1"; + version = "1.12.0"; meta = with lib; { homepage = "https://www.shlomifish.org/open-source/projects/black-hole-solitaire-solver/"; @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://fc-solve.shlomifish.org/downloads/fc-solve/${pname}-${version}.tar.xz"; - sha256 = "1qhihmk4fwz6n16c7bnxnh3v7jhbb7xhkc9wk9484bp0k4x9bq9n"; + sha256 = "sha256-0y8yU291cykliPQbsNha5C1WE3bCGNxKtrrf5JBKN6c="; }; nativeBuildInputs = [ cmake perl pkg-config python3 ]; diff --git a/pkgs/games/brogue/default.nix b/pkgs/games/brogue/default.nix index 891c9a40ec129..e5b0f838be1af 100644 --- a/pkgs/games/brogue/default.nix +++ b/pkgs/games/brogue/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { prePatch = '' sed -i Makefile -e 's,LIBTCODDIR=.*,LIBTCODDIR=${libtcod},g' \ - -e 's,sdl-config,${SDL.dev}/bin/sdl-config,g' + -e 's,sdl-config,${lib.getDev SDL}/bin/sdl-config,g' sed -i src/platform/tcod-platform.c -e "s,fonts/font,$out/share/brogue/fonts/font,g" make clean rm -rf src/libtcod* diff --git a/pkgs/games/bugdom/default.nix b/pkgs/games/bugdom/default.nix index fd8935594696f..d1cadd04be05d 100644 --- a/pkgs/games/bugdom/default.nix +++ b/pkgs/games/bugdom/default.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { owner = "jorio"; repo = pname; rev = version; - sha256 = "sha256:1371inw11rzfrxmc3v4gv5axp56bxjbcr0mhqm4x839401bfq5mf"; + sha256 = "sha256-rhbsVgAkDdRJxbCCzJbsy5TbVdmP7MFqz+7nELiN4Yw="; fetchSubmodules = true; }; diff --git a/pkgs/games/cataclysm-dda/git.nix b/pkgs/games/cataclysm-dda/git.nix index 3dc0e944b5efd..9578480b79401 100644 --- a/pkgs/games/cataclysm-dda/git.nix +++ b/pkgs/games/cataclysm-dda/git.nix @@ -1,4 +1,4 @@ -{ lib, callPackage, CoreFoundation, fetchFromGitHub, pkgs, wrapCDDA, attachPkgs +{ stdenv, lib, callPackage, CoreFoundation, fetchFromGitHub, pkgs, wrapCDDA, attachPkgs , tiles ? true, Cocoa , debug ? false , useXdgDir ? false @@ -29,6 +29,8 @@ let meta = common.meta // { maintainers = with lib.maintainers; common.meta.maintainers ++ [ rardiol ]; + # /nix/store/s8xaq3x7mcysvd752in2nihb1nr6svsl-SDL2-2.0.20-dev/include/SDL2/SDL_events.h:645:65: error: use of old-style cast [-Werror,-Wold-style-cast] + broken = (stdenv.isDarwin && stdenv.isx86_64); }; }); in diff --git a/pkgs/games/cgoban/default.nix b/pkgs/games/cgoban/default.nix index 162de112fb554..3d202985f1b01 100644 --- a/pkgs/games/cgoban/default.nix +++ b/pkgs/games/cgoban/default.nix @@ -31,6 +31,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Client for the KGS Go Server"; homepage = "https://www.gokgs.com/"; + sourceProvenance = with sourceTypes; [ binaryBytecode ]; license = licenses.free; maintainers = with maintainers; [ savannidgerinel ]; platforms = adoptopenjdk-jre-bin.meta.platforms; diff --git a/pkgs/games/chocolate-doom/default.nix b/pkgs/games/chocolate-doom/default.nix index 28ef9b6417eab..fabb12fa71fac 100644 --- a/pkgs/games/chocolate-doom/default.nix +++ b/pkgs/games/chocolate-doom/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, autoreconfHook, pkg-config, SDL2, SDL2_mixer, SDL2_net, fetchFromGitHub }: +{ lib, stdenv, autoreconfHook, pkg-config, SDL2, SDL2_mixer, SDL2_net, fetchFromGitHub, fetchpatch }: stdenv.mkDerivation rec { pname = "chocolate-doom"; @@ -11,6 +11,16 @@ stdenv.mkDerivation rec { sha256 = "1zlcqhd49c5n8vaahgaqrc2y10z86xng51sbd82xm3rk2dly25jp"; }; + patches = [ + # Pull upstream patch to fix builx against gcc-10: + # https://github.com/chocolate-doom/chocolate-doom/pull/1257 + (fetchpatch { + name = "fno-common.patch"; + url = "https://github.com/chocolate-doom/chocolate-doom/commit/a8fd4b1f563d24d4296c3e8225c8404e2724d4c2.patch"; + sha256 = "1dmbygn952sy5n8qqp0asg11pmygwgygl17lrj7i0fxa0nrhixhj"; + }) + ]; + postPatch = '' sed -e 's#/games#/bin#g' -i src{,/setup}/Makefile.am ''; diff --git a/pkgs/games/cutemaze/default.nix b/pkgs/games/cutemaze/default.nix index 44c48af5c29ef..ae6ade155f257 100644 --- a/pkgs/games/cutemaze/default.nix +++ b/pkgs/games/cutemaze/default.nix @@ -1,17 +1,34 @@ -{ lib, stdenv, fetchurl, qmake, qttools, qtsvg, mkDerivation }: +{ lib +, stdenv +, fetchurl +, cmake +, qttools +, wrapQtAppsHook +, qtbase +, qtwayland +, qtsvg +}: -mkDerivation rec { +stdenv.mkDerivation rec { pname = "cutemaze"; - version = "1.3.0"; + version = "1.3.1"; src = fetchurl { url = "https://gottcode.org/cutemaze/${pname}-${version}-src.tar.bz2"; - sha256 = "sha256-h7+H2E37ZVSnlPa6ID+lNEvFtU5PfdMSlBjqBumojoU="; + sha256 = "6944931cd39e9ef202c11483b7b2b7409a068c52fa5fd4419ff938b1158c72ab"; }; - nativeBuildInputs = [ qmake qttools ]; + nativeBuildInputs = [ + cmake + qttools + wrapQtAppsHook + ]; - buildInputs = [ qtsvg ]; + buildInputs = [ + qtbase + qtwayland + qtsvg + ]; postInstall = lib.optionalString stdenv.isDarwin '' mkdir -p $out/Applications diff --git a/pkgs/games/ddnet/default.nix b/pkgs/games/ddnet/default.nix index 54335279fedab..a79f0cd77426f 100644 --- a/pkgs/games/ddnet/default.nix +++ b/pkgs/games/ddnet/default.nix @@ -26,13 +26,13 @@ stdenv.mkDerivation rec { pname = "ddnet"; - version = "16.0.3"; + version = "16.1"; src = fetchFromGitHub { owner = "ddnet"; repo = pname; rev = version; - sha256 = "sha256-9hjVAtnn+dTBNCu6E90CtjGTAStmVTsQFm2UYq68xcM="; + sha256 = "sha256-9qKGaISEHtfKLmTGWLgOz4vfq7BqvDr17AdjCqPDu+Q="; }; nativeBuildInputs = [ cmake ninja pkg-config ]; diff --git a/pkgs/games/domination/default.nix b/pkgs/games/domination/default.nix index 18153dec0fb02..8bba2d1f94e39 100644 --- a/pkgs/games/domination/default.nix +++ b/pkgs/games/domination/default.nix @@ -97,6 +97,10 @@ in stdenv.mkDerivation { It includes a map editor, a simple map format, multiplayer network play, single player, hotseat, 5 user interfaces and many more features. ''; + sourceProvenance = with sourceTypes; [ + fromSource + binaryBytecode # source bundles dependencies as jars + ]; license = licenses.gpl3; maintainers = with maintainers; [ fgaz ]; platforms = platforms.all; diff --git a/pkgs/games/dwarf-fortress/legends-browser/default.nix b/pkgs/games/dwarf-fortress/legends-browser/default.nix index 2a3da233b4506..3484db0cc8ff5 100644 --- a/pkgs/games/dwarf-fortress/legends-browser/default.nix +++ b/pkgs/games/dwarf-fortress/legends-browser/default.nix @@ -29,6 +29,7 @@ buildEnv { meta = with lib; { description = "A multi-platform, open source, java-based legends viewer for dwarf fortress"; maintainers = with maintainers; [ Baughn ]; + sourceProvenance = with sourceTypes; [ binaryBytecode ]; license = licenses.mit; platforms = platforms.all; homepage = "https://github.com/robertjanetzko/LegendsBrowser"; diff --git a/pkgs/games/factorio/default.nix b/pkgs/games/factorio/default.nix index 4cf335a613784..4ca92961bafd5 100644 --- a/pkgs/games/factorio/default.nix +++ b/pkgs/games/factorio/default.nix @@ -166,6 +166,7 @@ let version 1.0 in mid 2020. ''; homepage = "https://www.factorio.com/"; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; license = lib.licenses.unfree; maintainers = with lib.maintainers; [ Baughn elitak erictapen priegger lukegb ]; platforms = [ "x86_64-linux" ]; diff --git a/pkgs/games/fairymax/default.nix b/pkgs/games/fairymax/default.nix index 49a91e7a64d4a..b493f4dcfa27f 100644 --- a/pkgs/games/fairymax/default.nix +++ b/pkgs/games/fairymax/default.nix @@ -1,39 +1,49 @@ -{lib, stdenv, fetchurl}: +{ lib +, stdenv +, fetchurl +}: + stdenv.mkDerivation rec { pname = "fairymax"; version = "4.8"; + src = fetchurl { url = "http://home.hccnet.nl/h.g.muller/fmax4_8w.c"; - sha256 = "01vxhpa4z0613mkgkzmsln293wxmyp5kdzil93cd1ik51q4gwjca"; + hash = "sha256-ikn+CA5lxtDYSDT+Nsv1tfORhKW6/vlmHcGAT9SFfQc="; }; + ini = fetchurl { url = "http://home.hccnet.nl/h.g.muller/fmax.ini"; - sha256 = "1zwx70g3gspbqx1zf9gm1may8jrli9idalvskxbdg33qgjys47cn"; + hash = "sha256-lh2ivXx4jNdWn3pT1WKKNEvkVQ31JfdDx+vqNx44nf8="; }; + unpackPhase = '' cp ${src} fairymax.c cp ${ini} fmax.ini ''; + buildPhase = '' - $CC *.c -Wno-return-type -o fairymax -DINI_FILE='"'"$out/share/fairymax/fmax.ini"'"' + cc *.c -Wno-return-type \ + -o fairymax \ + -DINI_FILE='"'"$out/share/fairymax/fmax.ini"'"' ''; + installPhase = '' mkdir -p "$out"/{bin,share/fairymax} cp fairymax "$out/bin" cp fmax.ini "$out/share/fairymax" ''; - meta = { + + meta = with lib; { + homepage = "http://home.hccnet.nl/h.g.muller/dwnldpage.html"; description = "A small chess engine supporting fairy pieces"; longDescription = '' - A version of micro-Max that reads the piece description - from a file fmax.ini, so that arbitrary fairy pieces can be - implemented. This version (4.8J) supports up to 15 piece types, - and board sizes up to 12x8. A Linux port exists in the - format of a debian package. + A version of micro-Max that reads the piece description from a file + fmax.ini, so that arbitrary fairy pieces can be implemented. This version + (4.8J) supports up to 15 piece types, and board sizes up to 12x8. ''; - license = lib.licenses.free ; - maintainers = [lib.maintainers.raskin]; - platforms = lib.platforms.all; - homepage = "http://home.hccnet.nl/h.g.muller/dwnldpage.html"; + license = licenses.free; + maintainers = [ maintainers.raskin ]; + platforms = platforms.all; }; } diff --git a/pkgs/games/fheroes2/default.nix b/pkgs/games/fheroes2/default.nix index 2125a0ec8156d..26217015fe9df 100644 --- a/pkgs/games/fheroes2/default.nix +++ b/pkgs/games/fheroes2/default.nix @@ -7,13 +7,13 @@ stdenv.mkDerivation rec { pname = "fheroes2"; - version = "0.9.15"; + version = "0.9.16"; src = fetchFromGitHub { owner = "ihhub"; repo = "fheroes2"; rev = version; - sha256 = "sha256-bT6asrre16NuavG7X28aHdEPeHdxMBdz2o2KCB+mrbg="; + sha256 = "sha256-avN7InwC6YOWSRjV15HOKdAU8azZiFUfT6JjwfDAdCs="; }; buildInputs = [ gettext libpng SDL2 SDL2_image SDL2_mixer SDL2_ttf zlib ]; diff --git a/pkgs/games/freeciv/default.nix b/pkgs/games/freeciv/default.nix index f5c1ff0ea3f49..b1d215912a0a8 100644 --- a/pkgs/games/freeciv/default.nix +++ b/pkgs/games/freeciv/default.nix @@ -1,7 +1,8 @@ { 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 ? false, gtk3, wrapGAppsHook +, zlib, bzip2, curl, xz, gettext, libiconv, icu +, SDL2, SDL2_mixer, SDL2_image, SDL2_ttf, SDL2_gfx, freetype, fluidsynth +, sdl2Client ? false +, gtkClient ? true, gtk3, wrapGAppsHook , qtClient ? false, qt5 , server ? true, readline , enableSqlite ? true, sqlite @@ -9,13 +10,13 @@ stdenv.mkDerivation rec { pname = "freeciv"; - version = "2.6.6"; + version = "3.0.1"; src = fetchFromGitHub { owner = "freeciv"; repo = "freeciv"; rev = "R${lib.replaceStrings [ "." ] [ "_" ] version}"; - sha256 = "sha256-D5t6sMpm09jbixs5MCghBeDbeuRbGmrrfWR91VNolRM="; + sha256 = "sha256-Nzc6Tirj6TKLgTYN5XjZZut9HVYLKGOp1GZeaoqEtW8="; }; postPatch = '' @@ -29,8 +30,8 @@ stdenv.mkDerivation rec { ++ 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 ] + buildInputs = [ lua5_3 zlib bzip2 curl xz gettext libiconv icu ] + ++ [ SDL2 SDL2_mixer SDL2_image SDL2_ttf SDL2_gfx freetype fluidsynth ] ++ lib.optionals gtkClient [ gtk3 ] ++ lib.optionals qtClient [ qt5.qtbase ] ++ lib.optional server readline @@ -39,8 +40,16 @@ stdenv.mkDerivation rec { dontWrapQtApps = true; dontWrapGApps = true; + # configure is not smart enough to look for SDL2 headers under + # .../SDL2, but thankfully $SDL2_PATH is almost exactly what we want + preConfigure = '' + export CPPFLAGS="$(echo $SDL2_PATH | sed 's#/nix/store/#-I/nix/store/#g')" + ''; configureFlags = [ "--enable-shared" ] - ++ lib.optional sdlClient "--enable-client=sdl" + ++ lib.optionals sdl2Client [ + "--enable-client=sdl2" + "--enable-sdl-mixer=sdl2" + ] ++ lib.optionals qtClient [ "--enable-client=qt" "--with-qt5-includes=${qt5.qtbase.dev}/include" diff --git a/pkgs/games/garden-of-coloured-lights/default.nix b/pkgs/games/garden-of-coloured-lights/default.nix index 9e842acfa9a50..9f9e85905a0a9 100644 --- a/pkgs/games/garden-of-coloured-lights/default.nix +++ b/pkgs/games/garden-of-coloured-lights/default.nix @@ -18,6 +18,11 @@ stdenv.mkDerivation rec { sha256 = "1qsj4d7r22m5f9f5f6cyvam1y5q5pbqvy5058r7w0k4s48n77y6s"; }; + # Workaround build failure on -fno-common toolchains: + # ld: main.o:src/main.c:58: multiple definition of + # `eclass'; eclass.o:src/eclass.c:21: first defined here + NIX_CFLAGS_COMPILE = "-fcommon"; + meta = with lib; { description = "Old-school vertical shoot-em-up / bullet hell"; homepage = "http://garden.sourceforge.net/drupal/"; diff --git a/pkgs/games/gargoyle/default.nix b/pkgs/games/gargoyle/default.nix index bd592dbc55d94..f5d23091b482e 100644 --- a/pkgs/games/gargoyle/default.nix +++ b/pkgs/games/gargoyle/default.nix @@ -6,7 +6,7 @@ let jamenv = '' unset AR '' + (if stdenv.isDarwin then '' - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${SDL.dev}/include/SDL" + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${lib.getDev SDL}/include/SDL" export GARGLKINI="$out/Applications/Gargoyle.app/Contents/Resources/garglk.ini" '' else '' export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/libexec/gargoyle" @@ -35,6 +35,12 @@ stdenv.mkDerivation rec { buildInputs = [ SDL SDL_mixer SDL_sound gtk2 ] ++ lib.optionals stdenv.isDarwin [ smpeg libvorbis ]; + # Workaround build failure on -fno-common toolchains: + # ld: build/linux.release/alan3/Location.o:(.bss+0x0): multiple definition of + # `logFile'; build/linux.release/alan3/act.o:(.bss+0x0): first defined here + # TODO: drop once updated to 2022.1 or later. + NIX_CFLAGS_COMPILE = "-fcommon"; + buildPhase = jamenv + "jam -j$NIX_BUILD_CORES"; installPhase = @@ -59,6 +65,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; meta = with lib; { + broken = stdenv.isDarwin; homepage = "http://ccxvii.net/gargoyle/"; license = licenses.gpl2Plus; description = "Interactive fiction interpreter GUI"; diff --git a/pkgs/games/gcs/default.nix b/pkgs/games/gcs/default.nix index 9d8d74921e54e..be8bb7017863a 100644 --- a/pkgs/games/gcs/default.nix +++ b/pkgs/games/gcs/default.nix @@ -70,6 +70,10 @@ in stdenv.mkDerivation rec { meta = with lib; { description = "A stand-alone, interactive, character sheet editor for the GURPS 4th Edition roleplaying game system"; homepage = "https://gurpscharactersheet.com/"; + sourceProvenance = with sourceTypes; [ + fromSource + binaryBytecode # source bundles dependencies as jars + ]; license = licenses.mpl20; platforms = platforms.all; maintainers = with maintainers; []; diff --git a/pkgs/games/gmad/default.nix b/pkgs/games/gmad/default.nix index 8f43c75f06a84..97538679ee597 100644 --- a/pkgs/games/gmad/default.nix +++ b/pkgs/games/gmad/default.nix @@ -2,21 +2,21 @@ stdenv.mkDerivation rec { pname = "gmad"; - version = "unstable-2015-04-16"; + version = "unstable-2020-02-24"; meta = { description = "Garry's Mod Addon Creator and Extractor"; - homepage = "https://github.com/garrynewman/gmad"; + homepage = "https://github.com/Facepunch/gmad"; license = lib.licenses.unfree; maintainers = [ lib.maintainers.abigailbuccaneer ]; platforms = lib.platforms.all; }; src = fetchFromGitHub { - owner = "garrynewman"; + owner = "Facepunch"; repo = "gmad"; - rev = "377f3458bf1ecb8a1a2217c2194773e3c2a2dea0"; - sha256="0myi9njr100gxhxk1vrzr2sbij5kxl959sq0riiqgg01div338g0"; + rev = "5236973a2fcbb3043bdd3d4529ce68b6d938ad93"; + sha256="04an17nvnj38mpi0w005v41ib8ynb5qhgrdkmsda4hq7l1gn276s"; }; buildInputs = [ premake4 bootil ]; diff --git a/pkgs/games/grapejuice/default.nix b/pkgs/games/grapejuice/default.nix index 4ddb58c81482d..901045f750ffb 100644 --- a/pkgs/games/grapejuice/default.nix +++ b/pkgs/games/grapejuice/default.nix @@ -1,6 +1,7 @@ { lib , fetchFromGitLab , gobject-introspection +, pciutils , python3Packages , gtk3 , wrapGAppsHook @@ -9,21 +10,21 @@ , desktop-file-utils , xdg-utils , xdg-user-dirs -, wine +, gettext , winetricks -, pciutils +, wine , glxinfo }: python3Packages.buildPythonApplication rec { pname = "grapejuice"; - version = "4.10.2"; + version = "5.1.1"; src = fetchFromGitLab { owner = "BrinkerVII"; repo = "grapejuice"; - rev = "9a7cf806d35b4d53b3d3762339eba7d861b5043d"; - sha256 = "sha256-cKZv9qPCnl7i4kb6PG8RYx3HNLcwgI4d2zkw899MA6E="; + rev = "v${version}"; + sha256 = "sha256-31pxQtKw5sLGnnNdboF7AAIFqsan5pXKHIHtKq/ErRE="; }; nativeBuildInputs = [ @@ -36,16 +37,19 @@ python3Packages.buildPythonApplication rec { buildInputs = [ cairo + gettext ]; propagatedBuildInputs = with python3Packages; [ - requests - pygobject3 + psutil dbus-python + pygobject3 packaging - psutil + wheel setuptools + requests unidecode + click ]; dontWrapGApps = true; @@ -58,6 +62,7 @@ python3Packages.buildPythonApplication rec { postPatch = '' substituteInPlace src/grapejuice_common/assets/desktop/grapejuice.desktop \ --replace \$GRAPEJUICE_EXECUTABLE "$out/bin/grapejuice" \ + --replace \$GRAPEJUICE_GUI_EXECUTABLE "$out/bin/grapejuice-gui" \ --replace \$GRAPEJUICE_ICON grapejuice substituteInPlace src/grapejuice_common/assets/desktop/roblox-player.desktop \ @@ -71,6 +76,12 @@ python3Packages.buildPythonApplication rec { substituteInPlace src/grapejuice_common/assets/desktop/roblox-studio.desktop \ --replace \$GRAPEJUICE_EXECUTABLE "$out/bin/grapejuice" \ --replace \$STUDIO_ICON "grapejuice-roblox-studio" + + substituteInPlace src/grapejuice_common/paths.py \ + --replace 'return local_share() / "locale"' 'return Path("${placeholder "out"}/share/locale")' + + substituteInPlace src/grapejuice_common/features/settings.py \ + --replace 'k_default_wine_home: "",' 'k_default_wine_home: "${wine}",' ''; postInstall = '' @@ -78,6 +89,23 @@ python3Packages.buildPythonApplication rec { cp -r src/grapejuice_common/assets/desktop/* $out/share/applications/ cp -r src/grapejuice_common/assets/icons $out/share/ cp src/grapejuice_common/assets/mime_xml/*.xml $out/share/mime/packages/ + + # compile locales (*.po -> *.mo) + # from https://gitlab.com/brinkervii/grapejuice/-/blob/master/src/grapejuice_common/util/mo_util.py + LOCALE_DIR="$out/share/locale" + PO_DIR="src/grapejuice_common/assets/po" + LINGUAS_FILE="src/grapejuice_common/assets/po/LINGUAS" + + for lang in $(<"$LINGUAS_FILE") # extract langs from LINGUAS_FILE + do + po_file="$PO_DIR/$lang.po" + mo_file_dir="$LOCALE_DIR/$lang/LC_MESSAGES" + + mkdir -p $mo_file_dir + + mo_file="$mo_file_dir/grapejuice.mo" + msgfmt $po_file -o $mo_file # msgfmt from gettext + done ''; # No tests @@ -87,9 +115,9 @@ python3Packages.buildPythonApplication rec { meta = with lib; { homepage = "https://gitlab.com/brinkervii/grapejuice"; - description = "A wine+Roblox management application"; + description = "Simple Wine+Roblox management tool"; license = licenses.gpl3Plus; platforms = platforms.linux; - maintainers = with maintainers; [ artturin ]; + maintainers = with maintainers; [ artturin helium ]; }; } diff --git a/pkgs/games/gshogi/default.nix b/pkgs/games/gshogi/default.nix index c3479f6758af7..4b674ac129dfd 100644 --- a/pkgs/games/gshogi/default.nix +++ b/pkgs/games/gshogi/default.nix @@ -1,8 +1,12 @@ -{ lib, buildPythonApplication, fetchFromGitHub -, gtk3, gobject-introspection -, wrapGAppsHook, python3Packages }: +{ lib +, fetchFromGitHub +, gobject-introspection +, gtk3 +, python3 +, wrapGAppsHook +}: -buildPythonApplication rec { +python3.pkgs.buildPythonApplication rec { pname = "gshogi"; version = "0.5.1"; @@ -10,7 +14,7 @@ buildPythonApplication rec { owner = "johncheetham"; repo = "gshogi"; rev = "v${version}"; - sha256 = "06vgndfgwyfi50wg3cw92zspc9z0k7xn2pp6qsjih0l5yih8iwqh"; + hash = "sha256-EPOIYPSFAhilxuZeYfuZ4Cd29ReJs/E4KNF5/lyzbxs="; }; doCheck = false; # no tests available @@ -22,15 +26,15 @@ buildPythonApplication rec { nativeBuildInputs = [ wrapGAppsHook ]; - propagatedBuildInputs = with python3Packages; [ + propagatedBuildInputs = with python3.pkgs; [ pygobject3 pycairo ]; meta = with lib; { - description = "A graphical implementation of the Shogi board game, also known as Japanese Chess"; homepage = "http://johncheetham.com/projects/gshogi/"; - license = licenses.gpl3; + description = "A graphical implementation of the Shogi board game, also known as Japanese Chess"; + license = licenses.gpl3Plus; platforms = platforms.linux; maintainers = [ maintainers.ciil ]; }; diff --git a/pkgs/games/holdingnuts/default.nix b/pkgs/games/holdingnuts/default.nix deleted file mode 100644 index 2bda182092801..0000000000000 --- a/pkgs/games/holdingnuts/default.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ lib, stdenv, fetchurl, cmake, SDL, qt4 }: - -let mirror = "http://download.holdingnuts.net"; -in stdenv.mkDerivation rec { - pname = "holdingnuts"; - version = "0.0.5"; - - src = fetchurl { - url = "${mirror}/release/${version}/${pname}-${version}.tar.bz2"; - sha256 = "0iw25jmnqzscg34v66d4zz70lvgjp4l7gi16nna6491xnqha5a8g"; - }; - - patches = [ - (fetchurl { - url = "${mirror}/patches/holdingnuts-0.0.5-wheel.patch"; - sha256 = "0hap5anxgc19s5qi64mjpi3wpgphy4dqdxqw34q19dw3gwxw5g8n"; - }) - (fetchurl { - url = "${mirror}/patches/holdingnuts-qpixmapcache-workaround.patch"; - sha256 = "15cf9j9mdm85f0h7w5f5852ic7xpim0243yywkd2qrfp37mi93pd"; - }) - ]; - - postPatch = '' - substituteInPlace src/system/SysAccess.c --replace /usr/share $out/share - ''; - - nativeBuildInputs = [ cmake ]; - buildInputs = [ SDL qt4 ]; - - meta = with lib; { - homepage = "http://www.holdingnuts.net/"; - description = "Open Source Poker client and server"; - license = licenses.gpl3; - maintainers = with maintainers; [ obadz ]; - platforms = platforms.all; - }; -} diff --git a/pkgs/games/hyperrogue/default.nix b/pkgs/games/hyperrogue/default.nix index 0397bb474da3c..c1a3eddd25f48 100644 --- a/pkgs/games/hyperrogue/default.nix +++ b/pkgs/games/hyperrogue/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { sha256 = "0bijgbqpc867pq8lbwwvcnc713gm51mmz625xb5br0q2qw09nkyh"; }; - CPPFLAGS = "-I${SDL.dev}/include/SDL"; + CPPFLAGS = "-I${lib.getDev SDL}/include/SDL"; buildInputs = [ autoreconfHook SDL SDL_ttf SDL_gfx SDL_mixer libpng glew ]; diff --git a/pkgs/games/julius/default.nix b/pkgs/games/julius/default.nix index 84970d1105506..df1ff2bd1a065 100644 --- a/pkgs/games/julius/default.nix +++ b/pkgs/games/julius/default.nix @@ -1,4 +1,11 @@ -{ lib, stdenv, fetchFromGitHub, cmake, SDL2, SDL2_mixer, libpng }: +{ lib +, stdenv +, fetchFromGitHub +, SDL2 +, SDL2_mixer +, cmake +, libpng +}: stdenv.mkDerivation rec { pname = "julius"; @@ -8,18 +15,18 @@ stdenv.mkDerivation rec { owner = "bvschaik"; repo = "julius"; rev = "v${version}"; - sha256 = "0w7kmgz9ya0ck9cxhsyralarg7y6ydx4plmh33r4mkxkamlr7493"; + hash = "sha256-I5GTaVWzz0ryGLDSS3rzxp+XFVXZa9hZmgwon/6r83A="; }; nativeBuildInputs = [ cmake ]; buildInputs = [ SDL2 SDL2_mixer libpng ]; meta = with lib; { - description = "An open source re-implementation of Caesar III"; homepage = "https://github.com/bvschaik/julius"; + description = "An open source re-implementation of Caesar III"; license = licenses.agpl3; + maintainers = with maintainers; [ Thra11 ]; platforms = platforms.all; broken = stdenv.isDarwin; - maintainers = with maintainers; [ Thra11 ]; }; } diff --git a/pkgs/games/koules/default.nix b/pkgs/games/koules/default.nix index e2c7c55cbb702..360415dc2e1da 100644 --- a/pkgs/games/koules/default.nix +++ b/pkgs/games/koules/default.nix @@ -2,29 +2,28 @@ , lib , fetchurl , fetchzip -, makeDesktopItem , copyDesktopItems -, imake , gccmakedep +, imake +, installShellFiles , libX11 , libXext -, installShellFiles +, makeDesktopItem }: let debian-extras = fetchzip { url = "mirror://debian/pool/main/k/koules/koules_1.4-27.debian.tar.xz"; - sha256 = "0bq1rr6vxqmx2k0dhyrqnwwfiw4h2ycbj576v66vwr0jaq5plil3"; + hash = "sha256-g0Z6C1YSZL6N2eYUuZgXkPDoOLc4e9jAFL3ivk3OAS8="; }; in - stdenv.mkDerivation rec { pname = "koules"; version = "1.4"; src = fetchurl { url = "https://www.ucw.cz/~hubicka/koules/packages/${pname}${version}-src.tar.gz"; - sha256 = "06x2wkpns14kii9fxmxbmj5lma371qj00hgl7fc5kggfmzz96vy3"; + hash = "sha256-w2+T/q/uvVmYO/RBACQOZ6hKi6yr1+5SjJMEbe/kohs="; }; nativeBuildInputs = [ imake gccmakedep installShellFiles copyDesktopItems ]; @@ -57,20 +56,22 @@ stdenv.mkDerivation rec { runHook postInstall ''; - desktopItems = [ (makeDesktopItem { - desktopName = "Koules"; - name = "koules"; - exec = "xkoules"; - icon = "koules"; - comment = "Push your enemies away, but stay away from obstacles"; - categories = [ "Game" "ArcadeGame" ]; - }) ]; + desktopItems = [ + (makeDesktopItem { + desktopName = "Koules"; + name = "koules"; + exec = "xkoules"; + icon = "koules"; + comment = "Push your enemies away, but stay away from obstacles"; + categories = [ "Game" "ArcadeGame" ]; + }) + ]; meta = with lib; { - description = "Fast arcade game based on the fundamental law of body attraction"; homepage = "https://www.ucw.cz/~hubicka/koules/English/"; + description = "Fast arcade game based on the fundamental law of body attraction"; license = licenses.gpl2Plus; - platforms = platforms.linux; maintainers = [ maintainers.iblech ]; + platforms = platforms.linux; }; } diff --git a/pkgs/games/leela-zero/default.nix b/pkgs/games/leela-zero/default.nix index 13b423832e679..e7b6c79341881 100644 --- a/pkgs/games/leela-zero/default.nix +++ b/pkgs/games/leela-zero/default.nix @@ -1,5 +1,13 @@ -{ lib, stdenv, fetchFromGitHub, cmake, boost -, opencl-headers, ocl-icd, qtbase , zlib }: +{ lib +, stdenv +, fetchFromGitHub +, cmake +, boost +, opencl-headers +, ocl-icd +, qtbase +, zlib +}: stdenv.mkDerivation rec { pname = "leela-zero"; @@ -9,7 +17,7 @@ stdenv.mkDerivation rec { owner = "gcp"; repo = "leela-zero"; rev = "v${version}"; - sha256 = "1k04ld1ysabxb8ivci3ji5by9vb3yvnflkf2fscs1x0bp7d6j101"; + sha256 = "sha256-AQRp2rkL9KCZdsJN6uz2Y+3kV4lyRLYjWn0p7UOjBMw="; fetchSubmodules = true; }; @@ -21,9 +29,9 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Go engine modeled after AlphaGo Zero"; - homepage = "https://github.com/gcp/leela-zero"; - license = licenses.gpl3; + homepage = "https://github.com/gcp/leela-zero"; + license = licenses.gpl3Plus; maintainers = [ maintainers.averelld maintainers.omnipotententity ]; - platforms = platforms.linux; + platforms = platforms.linux; }; } diff --git a/pkgs/games/legendary-gl/default.nix b/pkgs/games/legendary-gl/default.nix index 082b9220c0e87..7025a9cb66eb3 100644 --- a/pkgs/games/legendary-gl/default.nix +++ b/pkgs/games/legendary-gl/default.nix @@ -7,13 +7,13 @@ buildPythonApplication rec { pname = "legendary-gl"; # Name in pypi - version = "0.20.25"; + version = "0.20.26"; src = fetchFromGitHub { owner = "derrod"; repo = "legendary"; - rev = version; - sha256 = "07z5ffi7lnvs64pksy30fbfv2i11dkkycyh31vyc4y7fsn1vd0vf"; + rev = "refs/tags/${version}"; + sha256 = "sha256-NqAdS5PN7Qj/HdZ2quemb0xJQsD3Ox1a/TVXj3QMq9c="; }; propagatedBuildInputs = [ requests ]; diff --git a/pkgs/games/lgames/lbreakouthd/default.nix b/pkgs/games/lgames/lbreakouthd/default.nix index 4a6e2c31bbf6b..59447f2d0029f 100644 --- a/pkgs/games/lgames/lbreakouthd/default.nix +++ b/pkgs/games/lgames/lbreakouthd/default.nix @@ -26,6 +26,7 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; meta = with lib; { + broken = stdenv.isDarwin; homepage = "https://lgames.sourceforge.io/LBreakoutHD/"; description = "A widescreen Breakout clone"; license = licenses.gpl2Plus; diff --git a/pkgs/games/lgames/lpairs2/default.nix b/pkgs/games/lgames/lpairs2/default.nix index 4011dd9a29486..7fcc03d8cce66 100644 --- a/pkgs/games/lgames/lpairs2/default.nix +++ b/pkgs/games/lgames/lpairs2/default.nix @@ -24,6 +24,7 @@ stdenv.mkDerivation rec { ]; meta = with lib; { + broken = stdenv.isDarwin; homepage = "http://lgames.sourceforge.net/LPairs/"; description = "Matching the pairs - a typical Memory Game"; license = licenses.gpl2Plus; diff --git a/pkgs/games/lincity/default.nix b/pkgs/games/lincity/default.nix index 397ca0cfe8ef0..c2ce8f3d82b24 100644 --- a/pkgs/games/lincity/default.nix +++ b/pkgs/games/lincity/default.nix @@ -25,9 +25,18 @@ stdenv.mkDerivation rec { }) ]; + # Workaround build failure on -fno-common toolchains like upstream + # gcc-10. Otherwise build fails as: + # ld: modules/.libs/libmodules.a(rocket_pad.o):/build/lincity-1.13.1/modules/../screen.h:23: + # multiple definition of `monthgraph_style'; ldsvguts.o:/build/lincity-1.13.1/screen.h:23: first defined here + NIX_CFLAGS_COMPILE = "-fcommon"; + meta = with lib; { description = "City simulation game"; license = licenses.gpl2Plus; homepage = "https://sourceforge.net/projects/lincity"; + maintainers = with maintainers; [ ]; + # ../lcintl.h:14:10: fatal error: 'libintl.h' file not found + broken = stdenv.isDarwin; }; } diff --git a/pkgs/games/lincity/ng.nix b/pkgs/games/lincity/ng.nix index 1fe2223886a7b..9901255be4dca 100644 --- a/pkgs/games/lincity/ng.nix +++ b/pkgs/games/lincity/ng.nix @@ -1,28 +1,57 @@ -{ lib, stdenv, fetchFromGitHub, autoreconfHook, jam, pkg-config -, zlib, libxml2, libxslt, xorgproto, libX11, libGLU, libGL, SDL -, SDL_mixer, SDL_image, SDL_ttf, SDL_gfx, physfs +{ stdenv +, SDL2 +, SDL2_gfx +, SDL2_image +, SDL2_mixer +, SDL2_ttf +, autoreconfHook +, fetchFromGitHub +, jam +, lib +, libGL +, libGLU +, libX11 +, libxml2 +, libxslt +, physfs +, pkg-config +, xorgproto +, zlib }: stdenv.mkDerivation { pname = "lincity-ng"; - version = "2.9beta.20170715"; + version = "2.9beta.20211125"; src = fetchFromGitHub { - owner = "lincity-ng"; - repo = "lincity-ng"; - rev = "0c19714b811225238f310633e59f428934185e6b"; - sha256 = "1gaj9fq97zmb0jsdw4rzrw34pimkmkwbfqps0glpqij4w3srz5f3"; + owner = "lincity-ng"; + repo = "lincity-ng"; + rev = "b9062bec252632ca5d26b98d71453b8762c63173"; + sha256 = "0l07cn8rmpmlqdppjc2ikh5c7xmwib27504zpmn3n9pryp394r46"; }; hardeningDisable = [ "format" ]; nativeBuildInputs = [ - autoreconfHook jam pkg-config + autoreconfHook + jam + pkg-config ]; buildInputs = [ - zlib libxml2 libxslt xorgproto libX11 libGLU libGL SDL SDL_mixer SDL_image - SDL_ttf SDL_gfx physfs + SDL2 + SDL2_gfx + SDL2_image + SDL2_mixer + SDL2_ttf + libGL + libGLU + libX11 + libxml2 + libxslt + physfs + xorgproto + zlib ]; autoreconfPhase = '' diff --git a/pkgs/games/liquidwar/default.nix b/pkgs/games/liquidwar/default.nix index 827c7d696c77f..e012886c884d3 100644 --- a/pkgs/games/liquidwar/default.nix +++ b/pkgs/games/liquidwar/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { ; # To avoid problems finding SDL_types.h. - configureFlags = [ "CFLAGS=-I${SDL.dev}/include/SDL" ]; + configureFlags = [ "CFLAGS=-I${lib.getDev SDL}/include/SDL" ]; meta = with lib; { description = "Quick tactics game"; diff --git a/pkgs/games/macopix/default.nix b/pkgs/games/macopix/default.nix index 8f226f3cef065..5541b3b9d0fa1 100644 --- a/pkgs/games/macopix/default.nix +++ b/pkgs/games/macopix/default.nix @@ -19,6 +19,11 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + # Workaround build failure on -fno-common toolchains: + # ld: dnd.o:src/main.h:136: multiple definition of + # `MENU_EXT'; main.o:src/main.h:136: first defined here + NIX_CFLAGS_COMPILE = "-fcommon"; + NIX_LDFLAGS = "-lX11"; meta = { diff --git a/pkgs/games/mars/default.nix b/pkgs/games/mars/default.nix index 0fa744677d83b..9b715b02ae09d 100644 --- a/pkgs/games/mars/default.nix +++ b/pkgs/games/mars/default.nix @@ -1,27 +1,22 @@ { lib, stdenv, fetchFromGitHub, cmake, libGLU, libGL, sfml, fribidi, taglib }: stdenv.mkDerivation rec { pname = "mars"; - version = "0.7.5"; + version = "unstable-17.10.2021"; src = fetchFromGitHub { owner = "thelaui"; repo = "M.A.R.S."; - rev = "c855d044094a1d92317e38935d81ba938946132e"; - sha256 = "1r4c5gap1z2zsv4yjd34qriqkxaq4lb4rykapyzkkdf4g36lc3nh"; + rev = "84664cda094efe6e49d9b1550e4f4f98c33eefa2"; + sha256 = "sha256-SWLP926SyVTjn+UT1DCaJSo4Ue0RbyzImVnlNJQksS0="; }; nativeBuildInputs = [ cmake ]; buildInputs = [ libGLU libGL sfml fribidi taglib ]; - patches = [ - ./unbind_fix.patch - ./fix-gluortho2d.patch - ]; installPhase = '' cd .. - find -name '*.svn' -exec rm -rf {} \; mkdir -p "$out/share/mars/" mkdir -p "$out/bin/" cp -rv data resources credits.txt license.txt "$out/share/mars/" - cp -v mars "$out/bin/mars.bin" + cp -v marsshooter "$out/bin/mars.bin" cat << EOF > "$out/bin/mars" #! ${stdenv.shell} cd "$out/share/mars/" diff --git a/pkgs/games/mars/fix-gluortho2d.patch b/pkgs/games/mars/fix-gluortho2d.patch deleted file mode 100644 index 15a5c07060e2b..0000000000000 --- a/pkgs/games/mars/fix-gluortho2d.patch +++ /dev/null @@ -1,113 +0,0 @@ -From 33d5affabf8ff84f2c028b9303c6a9e83cc824ad Mon Sep 17 00:00:00 2001 -From: James Cowgill <james410@cowgill.org.uk> -Date: Sat, 9 May 2015 01:54:14 +0100 -Subject: [PATCH] Remove dependency on GLU - fixes build with SFML 2.3 - ---- - premake4.lua | 8 ++++---- - src/Shaders/postFX.cpp | 2 +- - src/System/window.cpp | 12 ++++++------ - 3 files changed, 11 insertions(+), 11 deletions(-) - -diff --git a/premake4.lua b/premake4.lua -index 023dddd..5af4495 100755 ---- a/premake4.lua -+++ b/premake4.lua -@@ -11,11 +11,11 @@ project "mars" - defines { "NDEBUG" } - flags { "Optimize" } - if os.get() == "windows" then -- links { "sfml-graphics", "sfml-audio", "sfml-system", "sfml-window", "glu32", "opengl32", "fribidi-0", "tag" } -+ links { "sfml-graphics", "sfml-audio", "sfml-system", "sfml-window", "opengl32", "fribidi-0", "tag" } - elseif os.get() == "macosx" then - links { "sfml-graphics.framework", "sfml-audio.framework", "sfml-system.framework", "sfml-window.framework", "opengl.framework", "fribidi", "tag" } - else -- links { "GLU", "sfml-graphics", "sfml-audio", "sfml-system", "sfml-window", "fribidi", "tag" } -+ links { "sfml-graphics", "sfml-audio", "sfml-system", "sfml-window", "fribidi", "tag" } - libdirs { "/usr/lib", "/usr/local/lib" } - end - -@@ -23,10 +23,10 @@ project "mars" - defines { "_DEBUG", "DEBUG" } - flags { "Symbols" } - if os.get() == "windows" then -- links { "sfml-graphics", "sfml-audio", "sfml-system", "sfml-window", "glu32", "opengl32", "fribidi-0", "tag" } -+ links { "sfml-graphics", "sfml-audio", "sfml-system", "sfml-window", "opengl32", "fribidi-0", "tag" } - elseif os.get() == "macosx" then - links { "sfml-graphics.framework", "sfml-audio.framework", "sfml-system.framework", "sfml-window.framework", "opengl.framework", "fribidi", "tag" } - else -- links { "GLU", "sfml-graphics", "sfml-audio", "sfml-system", "sfml-window", "fribidi", "tag" } -+ links { "sfml-graphics", "sfml-audio", "sfml-system", "sfml-window", "fribidi", "tag" } - libdirs { "/usr/lib", "/usr/local/lib" } - end -diff --git a/src/Shaders/postFX.cpp b/src/Shaders/postFX.cpp -index 987f411..f767a47 100644 ---- a/src/Shaders/postFX.cpp -+++ b/src/Shaders/postFX.cpp -@@ -78,7 +78,7 @@ namespace postFX { - postFX_.loadFromFile(settings::C_dataPath + "shaders/bump.frag", sf::Shader::Fragment); - bumpMap_.create(SPACE_X_RESOLUTION*0.5f, SPACE_Y_RESOLUTION*0.5f); - glViewport(0,0,SPACE_X_RESOLUTION*0.5f,SPACE_Y_RESOLUTION*0.5f); -- gluOrtho2D(0, SPACE_X_RESOLUTION, SPACE_Y_RESOLUTION, 0); -+ glOrtho(0, SPACE_X_RESOLUTION, SPACE_Y_RESOLUTION, 0, -1, 1); - glEnable(GL_BLEND); - glMatrixMode(GL_MODELVIEW); - postFX_.setParameter("BumpMap", bumpMap_.getTexture()); -diff --git a/src/System/window.cpp b/src/System/window.cpp -index e9a099a..8e12dcc 100644 ---- a/src/System/window.cpp -+++ b/src/System/window.cpp -@@ -222,7 +222,7 @@ namespace window { - glLoadIdentity(); - - // Setup translation (according to left-upper corner) -- gluOrtho2D(0.f, SPACE_X_RESOLUTION, SPACE_Y_RESOLUTION, 0.f); -+ glOrtho(0.f, SPACE_X_RESOLUTION, SPACE_Y_RESOLUTION, 0.f, -1, 1); - - // probably improves performance... - glDisable(GL_LIGHTING); -@@ -247,7 +247,7 @@ namespace window { - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); -- gluOrtho2D(0.f, viewPort_.x_, viewPort_.y_, 0.f); -+ glOrtho(0.f, viewPort_.x_, viewPort_.y_, 0.f, -1, 1); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - -@@ -255,7 +255,7 @@ namespace window { - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); -- gluOrtho2D(0.f, SPACE_X_RESOLUTION, SPACE_Y_RESOLUTION, 0.f); -+ glOrtho(0.f, SPACE_X_RESOLUTION, SPACE_Y_RESOLUTION, 0.f, -1, 1); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - } -@@ -270,7 +270,7 @@ namespace window { - glLoadIdentity(); - setViewPort(); - -- gluOrtho2D(0.f, viewPort_.x_, viewPort_.y_, 0.f); -+ glOrtho(0.f, viewPort_.x_, viewPort_.y_, 0.f, -1, 1); - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -@@ -284,7 +284,7 @@ namespace window { - glLoadIdentity(); - setViewPort(); - -- gluOrtho2D(0.f, viewPort_.x_, viewPort_.y_, 0.f); -+ glOrtho(0.f, viewPort_.x_, viewPort_.y_, 0.f, -1, 1); - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -@@ -294,7 +294,7 @@ namespace window { - else { - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); -- gluOrtho2D(0.f, viewPort_.x_, viewPort_.y_, 0.f); -+ glOrtho(0.f, viewPort_.x_, viewPort_.y_, 0.f, -1, 1); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - } diff --git a/pkgs/games/mars/unbind_fix.patch b/pkgs/games/mars/unbind_fix.patch deleted file mode 100644 index 2aef6eb5cf662..0000000000000 --- a/pkgs/games/mars/unbind_fix.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/src/System/window.cpp b/src/System/window.cpp -index e9a099a..e3f6de9 100644 ---- a/src/System/window.cpp -+++ b/src/System/window.cpp -@@ -308,12 +308,12 @@ namespace window { - glEnable(GL_TEXTURE_2D); - - if (shader) -- shader->bind(); -+ sf::Shader::bind(shader); - - window_.draw(toBeDrawn, states); - - if (shader) -- shader->unbind(); -+ sf::Shader::bind(NULL); - - window_.popGLStates(); - glPopMatrix(); diff --git a/pkgs/games/megaglest/default.nix b/pkgs/games/megaglest/default.nix index 30383e5f4067e..6a21a74f70b4a 100644 --- a/pkgs/games/megaglest/default.nix +++ b/pkgs/games/megaglest/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, cmake, pkg-config, git, curl, SDL2, xercesc, openal, lua, libvlc , libjpeg, wxGTK, cppunit, ftgl, glew, libogg, libvorbis, buildEnv, libpng , fontconfig, freetype, xorg, makeWrapper, bash, which, gnome, libGLU, glib -, fetchFromGitHub +, fetchFromGitHub, fetchpatch }: let version = "3.13.0"; @@ -28,6 +28,15 @@ stdenv.mkDerivation { sha256 = "0fb58a706nic14ss89zrigphvdiwy5s9dwvhscvvgrfvjpahpcws"; }; + patches = [ + # Pull upstream fix for -fno-common toolchains + (fetchpatch { + name = "fno-common.patch"; + url = "https://github.com/MegaGlest/megaglest-source/commit/5a3520540276a6fd06f7c88e571b6462978e3eab.patch"; + sha256 = "0y554kjw56dikq87vs709pmq97hdx9hvqsk27f81v4g90m3b3qhi"; + }) + ]; + nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ git curl SDL2 xercesc openal lua libpng libjpeg libvlc wxGTK glib cppunit fontconfig freetype ftgl glew libogg libvorbis makeWrapper libGLU ]; diff --git a/pkgs/games/meritous/default.nix b/pkgs/games/meritous/default.nix index e7dd1bee70c92..c7631f2370db5 100644 --- a/pkgs/games/meritous/default.nix +++ b/pkgs/games/meritous/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation { prePatch = '' substituteInPlace Makefile \ --replace "CPPFLAGS +=" "CPPFLAGS += -DSAVES_IN_HOME -DDATADIR=\\\"$out/share/meritous\\\"" \ - --replace sld-config ${SDL.dev}/bin/sdl-config + --replace sld-config ${lib.getDev SDL}/bin/sdl-config substituteInPlace src/audio.c \ --replace "filename[64]" "filename[256]" ''; diff --git a/pkgs/games/mindustry/default.nix b/pkgs/games/mindustry/default.nix index ff77f08651a0e..9edc17f0bc080 100644 --- a/pkgs/games/mindustry/default.nix +++ b/pkgs/games/mindustry/default.nix @@ -199,6 +199,10 @@ stdenv.mkDerivation rec { homepage = "https://mindustrygame.github.io/"; downloadPage = "https://github.com/Anuken/Mindustry/releases"; description = "A sandbox tower defense game"; + sourceProvenance = with sourceTypes; [ + fromSource + binaryBytecode # deps + ]; license = licenses.gpl3Plus; maintainers = with maintainers; [ fgaz petabyteboy ]; platforms = platforms.x86_64; diff --git a/pkgs/games/minecraft-servers/derivation.nix b/pkgs/games/minecraft-servers/derivation.nix index eda7da943ca54..e5f11f71f2113 100644 --- a/pkgs/games/minecraft-servers/derivation.nix +++ b/pkgs/games/minecraft-servers/derivation.nix @@ -29,6 +29,7 @@ stdenv.mkDerivation { meta = with lib; { description = "Minecraft Server"; homepage = "https://minecraft.net"; + sourceProvenance = with sourceTypes; [ binaryBytecode ]; license = licenses.unfreeRedistributable; platforms = platforms.unix; maintainers = with maintainers; [ thoughtpolice tomberek costrouc jyooru ]; diff --git a/pkgs/games/minecraft-servers/versions.json b/pkgs/games/minecraft-servers/versions.json index af1b032bd781b..319c7cbac1475 100644 --- a/pkgs/games/minecraft-servers/versions.json +++ b/pkgs/games/minecraft-servers/versions.json @@ -1,4 +1,10 @@ { + "1.19": { + "url": "https://launcher.mojang.com/v1/objects/e00c4052dac1d59a1188b2aa9d5a87113aaf1122/server.jar", + "sha1": "e00c4052dac1d59a1188b2aa9d5a87113aaf1122", + "version": "1.19", + "javaVersion": 17 + }, "1.18": { "url": "https://launcher.mojang.com/v1/objects/c8f83c5655308435b3dcf03c06d9fe8740a77469/server.jar", "sha1": "c8f83c5655308435b3dcf03c06d9fe8740a77469", @@ -81,24 +87,24 @@ "url": "https://launcher.mojang.com/v1/objects/f9ae3f651319151ce99a0bfad6b34fa16eb6775f/server.jar", "sha1": "f9ae3f651319151ce99a0bfad6b34fa16eb6775f", "version": "1.5.2", - "javaVersion": null + "javaVersion": 8 }, "1.4": { "url": "https://launcher.mojang.com/v1/objects/2f0ec8efddd2f2c674c77be9ddb370b727dec676/server.jar", "sha1": "2f0ec8efddd2f2c674c77be9ddb370b727dec676", "version": "1.4.7", - "javaVersion": null + "javaVersion": 8 }, "1.3": { "url": "https://launcher.mojang.com/v1/objects/3de2ae6c488135596e073a9589842800c9f53bfe/server.jar", "sha1": "3de2ae6c488135596e073a9589842800c9f53bfe", "version": "1.3.2", - "javaVersion": null + "javaVersion": 8 }, "1.2": { "url": "https://launcher.mojang.com/v1/objects/d8321edc9470e56b8ad5c67bbd16beba25843336/server.jar", "sha1": "d8321edc9470e56b8ad5c67bbd16beba25843336", "version": "1.2.5", - "javaVersion": null + "javaVersion": 8 } } diff --git a/pkgs/games/minecraft/default.nix b/pkgs/games/minecraft/default.nix index dc4cd9087fc2c..a8e883acae37b 100644 --- a/pkgs/games/minecraft/default.nix +++ b/pkgs/games/minecraft/default.nix @@ -149,6 +149,7 @@ stdenv.mkDerivation rec { description = "Official launcher for Minecraft, a sandbox-building game"; homepage = "https://minecraft.net"; maintainers = with maintainers; [ cpages ryantm infinisil ]; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; license = licenses.unfree; platforms = [ "x86_64-linux" ]; }; diff --git a/pkgs/games/neverball/default.nix b/pkgs/games/neverball/default.nix index ba1d403207a98..5e8e3f41c784f 100644 --- a/pkgs/games/neverball/default.nix +++ b/pkgs/games/neverball/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, SDL2, libGL, libpng, libjpeg, SDL2_ttf, libvorbis, gettext +{ lib, stdenv, fetchurl, fetchpatch, SDL2, libGL, libpng, libjpeg, SDL2_ttf, libvorbis, gettext , physfs }: stdenv.mkDerivation rec { @@ -8,12 +8,21 @@ stdenv.mkDerivation rec { url = "https://neverball.org/neverball-${version}.tar.gz"; sha256 = "184gm36c6p6vaa6gwrfzmfh86klhnb03pl40ahsjsvprlk667zkk"; }; + patches = [ + # Pull upstream fix for -fno-common toolchains + # https://github.com/Neverball/neverball/pull/198 + (fetchpatch { + name = "fno-common.patch"; + url = "https://github.com/Neverball/neverball/commit/a42492b8db06934c7a794630db92e3ff6ebaadaa.patch"; + sha256 = "0sqyxfwpl4xxra8iz87j5rxzwani16xra2xl4l5z61shvq30308h"; + }) + ]; buildInputs = [ libpng SDL2 libGL libjpeg SDL2_ttf libvorbis gettext physfs ]; dontPatchELF = true; - patchPhase = '' + postPatch = '' sed -i -e 's@\./data@'$out/share/neverball/data@ share/base_config.h Makefile sed -i -e 's@\./locale@'$out/share/neverball/locale@ share/base_config.h Makefile sed -i -e 's@-lvorbisfile@-lvorbisfile -lX11 -lgcc_s@' Makefile diff --git a/pkgs/games/npush/default.nix b/pkgs/games/npush/default.nix index d4124557f6e6d..25748a9983c8a 100644 --- a/pkgs/games/npush/default.nix +++ b/pkgs/games/npush/default.nix @@ -38,6 +38,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { + broken = stdenv.isDarwin; homepage = "http://npush.sourceforge.net/"; description = "A Sokoban-like game"; license = licenses.gpl2Plus; diff --git a/pkgs/games/oh-my-git/default.nix b/pkgs/games/oh-my-git/default.nix index 57fbad34057b1..0da53bbf9aa1c 100644 --- a/pkgs/games/oh-my-git/default.nix +++ b/pkgs/games/oh-my-git/default.nix @@ -19,6 +19,7 @@ , libXrender , libglvnd , libpulseaudio +, perl , zlib , udev # for libudev }: @@ -54,6 +55,7 @@ stdenv.mkDerivation rec { libXrender libglvnd libpulseaudio + perl zlib udev ]; @@ -70,6 +72,13 @@ stdenv.mkDerivation rec { }) ]; + # patch shebangs so that e.g. the fake-editor script works: + # error: /usr/bin/env 'perl': No such file or directory + # error: There was a problem with the editor + postPatch = '' + patchShebangs scripts + ''; + buildPhase = '' runHook preBuild diff --git a/pkgs/games/onscripter-en/default.nix b/pkgs/games/onscripter-en/default.nix index 82de61e418931..a1a2d4ed7d9fb 100644 --- a/pkgs/games/onscripter-en/default.nix +++ b/pkgs/games/onscripter-en/default.nix @@ -27,6 +27,7 @@ stdenv.mkDerivation { ''; meta = with lib; { + broken = stdenv.isDarwin; description = "Japanese visual novel scripting engine"; homepage = "http://unclemion.com/onscripter/"; license = licenses.gpl2; diff --git a/pkgs/games/openra/default.nix b/pkgs/games/openra/default.nix index 22d3c6c879ed0..d996630914740 100644 --- a/pkgs/games/openra/default.nix +++ b/pkgs/games/openra/default.nix @@ -43,7 +43,7 @@ let callWithName = name: value: if isFunction value then value name else value; buildOpenRASet = f: args: pkgs.recurseIntoAttrs (mapAttrs callWithName (f ({ inherit (pkgs) fetchFromGitHub; - extraPostFetch = '' + postFetch = '' sed -i 's/curl/curl --insecure/g' $out/thirdparty/{fetch-thirdparty-deps,noget}.sh $out/thirdparty/fetch-thirdparty-deps.sh ''; diff --git a/pkgs/games/openra/engines.nix b/pkgs/games/openra/engines.nix index 933f8411f75a0..bbb4947acd237 100644 --- a/pkgs/games/openra/engines.nix +++ b/pkgs/games/openra/engines.nix @@ -1,4 +1,4 @@ -{ buildOpenRAEngine, fetchFromGitHub, extraPostFetch }: +{ buildOpenRAEngine, fetchFromGitHub, postFetch }: let buildUpstreamOpenRAEngine = { version, rev, sha256 }: name: (buildOpenRAEngine { @@ -9,7 +9,7 @@ let src = fetchFromGitHub { owner = "OpenRA"; repo = "OpenRA" ; - inherit rev sha256 extraPostFetch; + inherit rev sha256 postFetch; }; } name).overrideAttrs (origAttrs: { postInstall = '' diff --git a/pkgs/games/openra/mods.nix b/pkgs/games/openra/mods.nix index cf8cd433c2942..47e86fd09a7d2 100644 --- a/pkgs/games/openra/mods.nix +++ b/pkgs/games/openra/mods.nix @@ -1,4 +1,4 @@ -{ buildOpenRAMod, fetchFromGitHub, extraPostFetch }: +{ buildOpenRAMod, fetchFromGitHub, postFetch }: let unsafeBuildOpenRAMod = attrs: name: (buildOpenRAMod attrs name).overrideAttrs (_: { @@ -25,7 +25,7 @@ in { rev = "b8a7dd52ff893ed8225726d4ed4e14ecad748404"; sha256 = "0dyk861qagibx8ldshz7d2nrki9q550f6f0wy8pvayvf1gv1dbxj"; name = "engine"; - inherit extraPostFetch; + inherit postFetch; }; }; }; @@ -50,7 +50,7 @@ in { rev = version; sha256 = "0p0izykjnz7pz02g2khp7msqa00jhjsrzk9y0g29dirmdv75qa4r"; name = "engine"; - inherit extraPostFetch; + inherit postFetch; }; }; assetsError = '' @@ -78,7 +78,7 @@ in { rev = "f91d3f2603bbf51afaa89357e4defcdc36138102"; sha256 = "05g900ri6q0zrkrk8rmjaz576vjggmi2y6jm0xz3cwli54prn11w"; name = "engine"; - inherit extraPostFetch; + inherit postFetch; }; }; }; @@ -102,7 +102,7 @@ in { rev = version; sha256 = "1x6byz37s8qcpqj902zvkvbv95rv2mv2kj35c12gbpyc92xkqkq0"; name = "generals-alpha-engine"; - inherit extraPostFetch; + inherit postFetch; }; }; }; @@ -127,7 +127,7 @@ in { rev = "4e8eab4ca00d1910203c8a103dfd2c002714daa8"; sha256 = "1yyqparf93x8yzy1f46gsymgkj5jls25v2yc7ighr3f7mi3igdvq"; name = "engine"; - inherit extraPostFetch; + inherit postFetch; }; }; } name).overrideAttrs (origAttrs: { @@ -156,7 +156,7 @@ in { rev = "52109c0910f479753704c46fb19e8afaab353c83"; sha256 = "0ga3855j6bc7h81q03cw6laiaiz12915zg8aqah1idvxbzicfy7l"; name = "engine"; - inherit extraPostFetch; + inherit postFetch; }; }; }; @@ -180,7 +180,7 @@ in { rev = version; sha256 = "1pgi3zaq9fwwdq6yh19bwxscslqgabjxkvl9bcn1a5agy4bfbqk5"; name = "engine"; - inherit extraPostFetch; + inherit postFetch; }; }; assetsError = '' @@ -208,7 +208,7 @@ in { rev = version; sha256 = "15pvn5cx3g0nzbrgpsfz8dngad5wkzp5dz25ydzn8bmxafiijvcr"; name = "engine"; - inherit extraPostFetch; + inherit postFetch; }; }; }; @@ -233,7 +233,7 @@ in { rev = "f3873ae242803051285994d77eb26f4b951594b5"; sha256 = "02rv29wja0p5d083pd087daz7x7pp5b9ym7sci2fhg3mrnaqgwkp"; name = "engine"; - inherit extraPostFetch; + inherit postFetch; }; }; assetsError = '' @@ -262,7 +262,7 @@ in { rev = "bb0930008a57c07f3002421023f6b446e3e3af69"; sha256 = "1jvgpbf56hd02ikhklv49br4d1jiv5hphc5kl79qnjlaacnj222x"; name = "engine"; - inherit extraPostFetch; + inherit postFetch; }; }; }; @@ -286,7 +286,7 @@ in { rev = "6de92de8d982094a766eab97a92225c240d85493"; sha256 = "0ps9x379plrrj1hnj4fpr26lc46mzgxknv5imxi0bmrh5y4781ql"; name = "engine"; - inherit extraPostFetch; + inherit postFetch; }; }; }; @@ -310,7 +310,7 @@ in { rev = version; sha256 = "1p5hgxxvxlz8480vj0qkmnxjh7zj3hahk312m0zljxfdb40652w1"; name = "engine"; - inherit extraPostFetch; + inherit postFetch; }; }; }; @@ -334,7 +334,7 @@ in { rev = version; sha256 = "15pvn5cx3g0nzbrgpsfz8dngad5wkzp5dz25ydzn8bmxafiijvcr"; name = "engine"; - inherit extraPostFetch; + inherit postFetch; }; }; assetsError = '' diff --git a/pkgs/games/openra/packages.nix b/pkgs/games/openra/packages.nix index 2f4c83c7d5a32..e98ebcaee44fb 100644 --- a/pkgs/games/openra/packages.nix +++ b/pkgs/games/openra/packages.nix @@ -32,7 +32,7 @@ let */ buildOpenRASet = f: args: builtins.mapAttrs (name: value: if builtins.isFunction value then value name else value) (f ({ inherit (pkgs) fetchFromGitHub; - extraPostFetch = '' + postFetch = '' sed -i 's/curl/curl --insecure/g' $out/thirdparty/{fetch-thirdparty-deps,noget}.sh $out/thirdparty/fetch-thirdparty-deps.sh ''; diff --git a/pkgs/games/openspades/default.nix b/pkgs/games/openspades/default.nix index 58ac3f8df7994..488301a1b555b 100644 --- a/pkgs/games/openspades/default.nix +++ b/pkgs/games/openspades/default.nix @@ -58,6 +58,7 @@ stdenv.mkDerivation rec { NIX_CFLAGS_LINK = "-lopenal"; meta = with lib; { + broken = stdenv.isDarwin; description = "A compatible client of Ace of Spades 0.75"; homepage = "https://github.com/yvt/openspades/"; license = licenses.gpl3; diff --git a/pkgs/games/openttd/nml.nix b/pkgs/games/openttd/nml.nix index bb44d9eee0b6d..2f7405725ab95 100644 --- a/pkgs/games/openttd/nml.nix +++ b/pkgs/games/openttd/nml.nix @@ -1,6 +1,10 @@ -{ stdenv, lib, fetchFromGitHub, python3Packages }: +{ stdenv +, lib +, fetchFromGitHub +, python3 +}: -python3Packages.buildPythonApplication rec { +python3.pkgs.buildPythonApplication rec { pname = "openttd-nml"; version = "0.6.1"; @@ -8,15 +12,18 @@ python3Packages.buildPythonApplication rec { owner = "OpenTTD"; repo = "nml"; rev = version; - sha256 = "0z0n4lqvnqigfjjhmmz7mvis7iivd4a8d287ya2yscfg5hznnqh2"; + hash = "sha256-AmJrPyzPMe2F8geJhhRpO8aj467n1wqldC9iuzElFnw="; }; - propagatedBuildInputs = with python3Packages; [ply pillow]; + propagatedBuildInputs = with python3.pkgs; [ + pillow + ply + ]; meta = with lib; { + homepage = "http://openttdcoop.org/"; description = "Compiler for OpenTTD NML files"; - homepage = "http://openttdcoop.org/"; - license = licenses.gpl2; + license = licenses.gpl2; maintainers = with maintainers; [ ToxicFrog ]; }; } diff --git a/pkgs/games/openxcom/default.nix b/pkgs/games/openxcom/default.nix index b877c3aac2fd4..61f209aae4dca 100644 --- a/pkgs/games/openxcom/default.nix +++ b/pkgs/games/openxcom/default.nix @@ -1,26 +1,38 @@ -{lib, stdenv, fetchFromGitHub, cmake, libGLU, libGL, zlib, openssl, libyamlcpp, boost -, SDL, SDL_image, SDL_mixer, SDL_gfx }: +{ lib +, stdenv +, fetchFromGitHub +, cmake +, libGLU +, libGL +, zlib +, openssl +, libyamlcpp +, boost +, SDL +, SDL_image +, SDL_mixer +, SDL_gfx +}: -let version = "1.0.0.2019.10.18"; in -stdenv.mkDerivation { +stdenv.mkDerivation rec { pname = "openxcom"; - inherit version; + version = "1.0.0.2019.10.18"; + src = fetchFromGitHub { owner = "OpenXcom"; repo = "OpenXcom"; rev = "f9853b2cb8c8f741ac58707487ef493416d890a3"; - sha256 = "0kbfawj5wsp1mwfcm5mwpkq6s3d13pailjm5w268gqpxjksziyq0"; + hash = "sha256-APv49ZT94oeM4KVKGtUdoQ1t8Ly8lsocr+FqXiRXbk0="; }; nativeBuildInputs = [ cmake ]; buildInputs = [ SDL SDL_gfx SDL_image SDL_mixer boost libyamlcpp libGLU libGL openssl zlib ]; - meta = { + meta = with lib; { description = "Open source clone of UFO: Enemy Unknown"; homepage = "https://openxcom.org"; - maintainers = [ lib.maintainers.cpages ]; - platforms = lib.platforms.linux; - license = lib.licenses.gpl3; + maintainers = with maintainers; [ cpages ]; + platforms = platforms.linux; + license = licenses.gpl3; }; - } diff --git a/pkgs/games/openxray/default.nix b/pkgs/games/openxray/default.nix index 58c82aec3659c..2340f14edc615 100644 --- a/pkgs/games/openxray/default.nix +++ b/pkgs/games/openxray/default.nix @@ -1,20 +1,34 @@ -{ lib, stdenv, fetchFromGitHub, cmake, glew, freeimage, liblockfile -, openal, libtheora, SDL2, lzo, libjpeg, libogg, tbb -, pcre, makeWrapper, fetchpatch }: +{ lib +, stdenv +, fetchFromGitHub +, cmake +, glew +, freeimage +, liblockfile +, openal +, libtheora +, SDL2 +, lzo +, libjpeg +, libogg +, pcre +, makeWrapper +, enableMultiplayer ? false # Requires old, insecure Crypto++ version +}: let - version = "822-december-preview"; + version = "1144-december-2021-rc1"; src = fetchFromGitHub { owner = "OpenXRay"; repo = "xray-16"; rev = version; fetchSubmodules = true; - sha256 = "06f3zjnib7hipyl3hnc6mwcj9f50kbwn522wzdjydz8qgdg60h3m"; + sha256 = "07qj1lpp21g4p583gvz5h66y2q71ymbsz4g5nr6dcys0vm7ph88v"; }; # https://github.com/OpenXRay/xray-16/issues/518 - cryptopp = stdenv.mkDerivation { + ancientCryptopp = stdenv.mkDerivation { pname = "cryptopp"; version = "5.6.5"; @@ -22,47 +36,59 @@ let sourceRoot = "source/Externals/cryptopp"; - makeFlags = [ "PREFIX=${placeholder "out"}" ]; + installFlags = [ "PREFIX=${placeholder "out"}" ]; + enableParallelBuilding = true; doCheck = true; + dontStrip = true; + meta = with lib; { description = "Crypto++, a free C++ class library of cryptographic schemes"; homepage = "https://cryptopp.com/"; license = with licenses; [ boost publicDomain ]; platforms = platforms.all; + knownVulnerabilities = [ + "CVE-2019-14318" + ]; }; }; -in stdenv.mkDerivation rec { +in +stdenv.mkDerivation rec { pname = "openxray"; + inherit version src; - # TODO https://github.com/OpenXRay/GameSpy/pull/6, check if merged in version > 822 - # Fixes format hardening - patches = [ - (fetchpatch { - url = "https://github.com/OpenXRay/GameSpy/pull/6/commits/155af876281f5d94f0142886693314d97deb2d4c.patch"; - sha256 = "1l0vcgvzzx8n56shpblpfdhvpr6c12fcqf35r0mflaiql8q7wn88"; - stripLen = 1; - extraPrefix = "Externals/GameSpy/"; - }) + nativeBuildInputs = [ + cmake + makeWrapper ]; - cmakeFlags = [ "-DCMAKE_INCLUDE_PATH=${cryptopp}/include/cryptopp" ]; - buildInputs = [ - glew freeimage liblockfile openal cryptopp libtheora SDL2 lzo - libjpeg libogg tbb pcre + glew + freeimage + liblockfile + openal + libtheora + SDL2 + lzo + libjpeg + libogg + pcre + ] ++ lib.optionals enableMultiplayer [ + ancientCryptopp ]; - nativeBuildInputs = [ cmake makeWrapper ]; + # Crashes can happen, we'd like them to be reasonably debuggable + cmakeBuildType = "RelWithDebInfo"; + dontStrip = true; - # https://github.com/OpenXRay/xray-16/issues/786 - preConfigure = '' - substituteInPlace src/xrCore/xrCore.cpp \ - --replace /usr/share $out/share - ''; + cmakeFlags = [ + "-DUSE_CRYPTOPP=${if enableMultiplayer then "ON" else "OFF"}" + ] ++ lib.optionals enableMultiplayer [ + "-DCMAKE_INCLUDE_PATH=${ancientCryptopp}/include/cryptopp" + ]; postInstall = '' # needed because of SDL_LoadObject library loading code @@ -71,8 +97,9 @@ in stdenv.mkDerivation rec { ''; meta = with lib; { + mainProgram = "xray-16"; description = "Improved version of the X-Ray Engine, the game engine used in the world-famous S.T.A.L.K.E.R. game series by GSC Game World"; - homepage = src.meta.homepage; + homepage = "https://github.com/OpenXRay/xray-16/"; license = licenses.unfree // { url = "https://github.com/OpenXRay/xray-16/blob/xd_dev/License.txt"; }; diff --git a/pkgs/games/osu-lazer/default.nix b/pkgs/games/osu-lazer/default.nix index 268090a4e5d67..a05f7ae2c7774 100644 --- a/pkgs/games/osu-lazer/default.nix +++ b/pkgs/games/osu-lazer/default.nix @@ -26,9 +26,6 @@ buildDotnetModule rec { projectFile = "osu.Desktop/osu.Desktop.csproj"; nugetDeps = ./deps.nix; - dotnet-sdk = dotnetCorePackages.sdk_6_0; - dotnet-runtime = dotnetCorePackages.runtime_6_0; - nativeBuildInputs = [ copyDesktopItems ]; dotnetFlags = [ diff --git a/pkgs/games/osu-lazer/deps.nix b/pkgs/games/osu-lazer/deps.nix index 2ceafca07b015..b2c1e1ceb99ad 100644 --- a/pkgs/games/osu-lazer/deps.nix +++ b/pkgs/games/osu-lazer/deps.nix @@ -66,7 +66,7 @@ (fetchNuGet { pname = "Markdig"; version = "0.23.0"; sha256 = "1bwn885w7balwncmr764vidyyp9bixqlq6r3lhsapj8ykrpxxa70"; }) (fetchNuGet { pname = "MessagePack"; version = "2.3.85"; sha256 = "0n7kv4i6knhv1dd35cv45sfpidsiy9albfdmbrdschykd1mzxmiy"; }) (fetchNuGet { pname = "MessagePack.Annotations"; version = "2.3.85"; sha256 = "0axjgy9r533bw00lflnc6acjyza76mf2x1nn6fw7qacvak9rqxm3"; }) - (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-x64"; version = "6.0.4"; sha256 = "1fvv5ri32pbl43628zqnim6fbv6hjxf66p0v793xdh57dzkdyh0j"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-x64"; version = "6.0.5"; sha256 = "0br5ms806jsgc2jghcjb6lm2h1ifq8wa3cgxp5ginrhzzj3p145i"; }) (fetchNuGet { pname = "Microsoft.AspNetCore.Connections.Abstractions"; version = "6.0.3"; sha256 = "0mc84qjsbsi7m1yx42w4zh8bdkqyqlvvx9iw80g4wsbrflkq5pwi"; }) (fetchNuGet { pname = "Microsoft.AspNetCore.Http.Connections.Client"; version = "6.0.3"; sha256 = "1vadkmcxj2nv01mg8027z0ywxk2fddyj5aqflanslbfclsz4779i"; }) (fetchNuGet { pname = "Microsoft.AspNetCore.Http.Connections.Common"; version = "6.0.3"; sha256 = "11a5w8p0nkfyp21aafpmrf0lvjpbg2p4yqay4dxbjg0w99w2kwq6"; }) @@ -115,7 +115,7 @@ (fetchNuGet { pname = "Microsoft.Extensions.Options"; version = "6.0.0"; sha256 = "008pnk2p50i594ahz308v81a41mbjz9mwcarqhmrjpl2d20c868g"; }) (fetchNuGet { pname = "Microsoft.Extensions.Primitives"; version = "5.0.0"; sha256 = "0swqcknyh87ns82w539z1mvy804pfwhgzs97cr3nwqk6g5s42gd6"; }) (fetchNuGet { pname = "Microsoft.Extensions.Primitives"; version = "6.0.0"; sha256 = "1kjiw6s4yfz9gm7mx3wkhp06ghnbs95icj9hi505shz9rjrg42q2"; }) - (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-x64"; version = "6.0.4"; sha256 = "1gibwhplbanv6bz3l71w8vhzlgqsh21bms30dbf1n60v7p02fl3h"; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-x64"; version = "6.0.5"; sha256 = "0hzsvhk5hzk0iav7cc2i8dgyx02a5jks2g0jljychw18ck9s2ilg"; }) (fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "1.0.1"; sha256 = "01al6cfxp68dscl15z7rxfw9zvhm64dncsw09a1vmdkacsa2v6lr"; }) (fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "1.1.0"; sha256 = "08vh1r12g6ykjygq5d3vq09zylgb84l63k49jc4v8faw9g93iqqm"; }) (fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "2.0.0"; sha256 = "1fk2fk2639i7nzy58m9dvpdnzql4vb8yl8vr19r2fp8lmj9w2jr0"; }) diff --git a/pkgs/games/otto-matic/default.nix b/pkgs/games/otto-matic/default.nix index 5dd7f98e4569f..2257b50e0c8d6 100644 --- a/pkgs/games/otto-matic/default.nix +++ b/pkgs/games/otto-matic/default.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { owner = "jorio"; repo = pname; rev = version; - sha256 = "sha256:1yd4clks7kr2hn69c4q1ykc92sw6axbspambm03viapr834bjz3q"; + sha256 = "sha256-eHy5yED5qrgHqKuqq1dXhmuR2PQBE5aMhSLPoydlpPk="; fetchSubmodules = true; }; diff --git a/pkgs/games/papermc/default.nix b/pkgs/games/papermc/default.nix index 7b7d66f6188c1..31c9467109e95 100644 --- a/pkgs/games/papermc/default.nix +++ b/pkgs/games/papermc/default.nix @@ -29,6 +29,7 @@ in stdenv.mkDerivation { meta = { description = "High-performance Minecraft Server"; homepage = "https://papermc.io/"; + sourceProvenance = with lib.sourceTypes; [ binaryBytecode ]; license = lib.licenses.gpl3Only; platforms = lib.platforms.unix; maintainers = with lib.maintainers; [ aaronjanse neonfuz ]; diff --git a/pkgs/games/performous/default.nix b/pkgs/games/performous/default.nix index c4af373cdcddb..10ce4dd06fcd2 100644 --- a/pkgs/games/performous/default.nix +++ b/pkgs/games/performous/default.nix @@ -1,32 +1,57 @@ -{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, gettext -, glibmm, libxmlxx, pango, librsvg -, SDL2, glew, boost, ffmpeg, portaudio, libepoxy +{ lib +, stdenv +, fetchFromGitHub +, SDL2 +, boost +, cmake +, ffmpeg +, gettext +, glew +, glibmm +, libepoxy +, librsvg +, libxmlxx +, pango +, pkg-config +, portaudio }: stdenv.mkDerivation rec { pname = "performous"; version = "1.1"; - meta = with lib; { - description = "Karaoke, band and dancing game"; - homepage = "http://performous.org/"; - license = licenses.gpl2Plus; - platforms = platforms.linux; - }; - src = fetchFromGitHub { owner = "performous"; repo = "performous"; rev = version; - sha256 = "08j0qhr65l7qnd5vxl4l07523qpvdwi31h4vzl3lfiinx1zcgr4x"; + hash = "sha256-neTHfug2RkcH/ZvAMCJv++IhygGU0L5Ls/jQYjLEQCI="; }; patches = [ ./performous-cmake.patch ]; - nativeBuildInputs = [ cmake pkg-config gettext ]; + nativeBuildInputs = [ + cmake + gettext + pkg-config + ]; buildInputs = [ - glibmm libxmlxx pango librsvg - SDL2 glew boost ffmpeg portaudio libepoxy + SDL2 + boost + ffmpeg + glew + glibmm + libepoxy + librsvg + libxmlxx + pango + portaudio ]; + + meta = with lib; { + homepage = "http://performous.org/"; + description = "Karaoke, band and dancing game"; + license = licenses.gpl2Plus; + platforms = platforms.linux; + }; } diff --git a/pkgs/games/planetaryannihilation/default.nix b/pkgs/games/planetaryannihilation/default.nix index 2debd15f814eb..73adffab475ae 100644 --- a/pkgs/games/planetaryannihilation/default.nix +++ b/pkgs/games/planetaryannihilation/default.nix @@ -23,12 +23,12 @@ stdenv.mkDerivation rec { ln -s ${systemd}/lib/libudev.so.1 $out/lib/libudev.so.0 patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$out/PA" - patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath "${lib.makeLibraryPath [ stdenv.cc.cc.lib xorg.libXdamage xorg.libXfixes gtk2 glib stdenv.glibc.out "$out" xorg.libXext pango udev xorg.libX11 xorg.libXcomposite alsa-lib atk nspr fontconfig cairo pango nss freetype gnome2.GConf gdk-pixbuf xorg.libXrender ]}:{stdenv.cc.cc.lib}/lib64:${stdenv.glibc.out}/lib64" "$out/host/CoherentUI_Host" + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath "${lib.makeLibraryPath [ stdenv.cc.cc.lib xorg.libXdamage xorg.libXfixes gtk2 glib stdenv.cc.libc "$out" xorg.libXext pango udev xorg.libX11 xorg.libXcomposite alsa-lib atk nspr fontconfig cairo pango nss freetype gnome2.GConf gdk-pixbuf xorg.libXrender ]}:{stdenv.cc.cc.lib}/lib64:${stdenv.cc.libc}/lib64" "$out/host/CoherentUI_Host" - wrapProgram $out/PA --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc.lib stdenv.glibc.out xorg.libX11 xorg.libXcursor gtk2 glib curl "$out" ]}:${stdenv.cc.cc.lib}/lib64:${stdenv.glibc.out}/lib64" + wrapProgram $out/PA --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc.lib stdenv.cc.libc xorg.libX11 xorg.libXcursor gtk2 glib curl "$out" ]}:${stdenv.cc.cc.lib}/lib64:${stdenv.cc.libc}/lib64" for f in $out/lib/*; do - patchelf --set-rpath "${lib.makeLibraryPath [ stdenv.cc.cc.lib curl xorg.libX11 stdenv.glibc.out xorg.libXcursor "$out" ]}:${stdenv.cc.cc.lib}/lib64:${stdenv.glibc.out}/lib64" $f + patchelf --set-rpath "${lib.makeLibraryPath [ stdenv.cc.cc.lib curl xorg.libX11 stdenv.cc.libc xorg.libXcursor "$out" ]}:${stdenv.cc.cc.lib}/lib64:${stdenv.cc.libc}/lib64" $f done ''; diff --git a/pkgs/games/pokerth/default.nix b/pkgs/games/pokerth/default.nix index ffae1b5cd8f64..f07b2a614d48d 100644 --- a/pkgs/games/pokerth/default.nix +++ b/pkgs/games/pokerth/default.nix @@ -59,7 +59,7 @@ mkDerivation rec { "pokerth.pro" ]; - NIX_CFLAGS_COMPILE = "-I${SDL.dev}/include/SDL"; + NIX_CFLAGS_COMPILE = "-I${lib.getDev SDL}/include/SDL"; meta = with lib; { homepage = "https://www.pokerth.net"; diff --git a/pkgs/games/polymc/default.nix b/pkgs/games/polymc/default.nix index 4bb749db59f02..2fa5ce7cf06fe 100644 --- a/pkgs/games/polymc/default.nix +++ b/pkgs/games/polymc/default.nix @@ -1,45 +1,39 @@ { lib -, mkDerivation +, stdenv , fetchFromGitHub , cmake , jdk8 , jdk , zlib , file -, makeWrapper +, wrapQtAppsHook , xorg , libpulseaudio , qtbase , libGL +, quazip , glfw , openal , msaClientID ? "" +, jdks ? [ jdk jdk8 ] }: -mkDerivation rec { +stdenv.mkDerivation rec { pname = "polymc"; - version = "1.2.2"; + version = "1.3.2"; src = fetchFromGitHub { owner = "PolyMC"; repo = "PolyMC"; rev = version; - sha256 = "sha256-lxiMz7vuq+BkNVjWWJbPUk68DSe8zVZPcvZ1iXDsfCY="; + sha256 = "sha256-hqsyS82UzgCUZ9HjoPKjOLE49fwLntRAh3mVrTsmi3o="; fetchSubmodules = true; }; - nativeBuildInputs = [ cmake file makeWrapper ]; - buildInputs = [ qtbase jdk zlib ]; + nativeBuildInputs = [ cmake file jdk wrapQtAppsHook ]; + buildInputs = [ qtbase zlib quazip ]; - postPatch = '' - # hardcode jdk paths - substituteInPlace launcher/java/JavaUtils.cpp \ - --replace 'scanJavaDir("/usr/lib/jvm")' 'javas.append("${jdk}/lib/openjdk/bin/java")' \ - --replace 'scanJavaDir("/usr/lib32/jvm")' 'javas.append("${jdk8}/lib/openjdk/bin/java")' - ''; - - cmakeFlags = [ "-DLauncher_PORTABLE=0" ] ++ - lib.optionals (msaClientID != "") [ "-DLauncher_MSA_CLIENT_ID=${msaClientID}" ]; + cmakeFlags = lib.optionals (msaClientID != "") [ "-DLauncher_MSA_CLIENT_ID=${msaClientID}" ]; dontWrapQtApps = true; @@ -57,9 +51,9 @@ mkDerivation rec { ]; in '' # xorg.xrandr needed for LWJGL [2.9.2, 3) https://github.com/LWJGL/lwjgl/issues/128 - wrapProgram $out/bin/polymc \ - "''${qtWrapperArgs[@]}" \ + wrapQtApp $out/bin/polymc \ --set GAME_LIBRARY_PATH /run/opengl-driver/lib:${libpath} \ + --prefix POLYMC_JAVA_PATHS : ${lib.makeSearchPath "bin/java" jdks} \ --prefix PATH : ${lib.makeBinPath [ xorg.xrandr ]} ''; diff --git a/pkgs/games/purpur/default.nix b/pkgs/games/purpur/default.nix index 4f08010b45555..e28106183e85e 100644 --- a/pkgs/games/purpur/default.nix +++ b/pkgs/games/purpur/default.nix @@ -34,6 +34,7 @@ stdenv.mkDerivation rec { gameplay features, and performance built on top of Airplane. ''; homepage = "https://purpurmc.org/"; + sourceProvenance = with sourceTypes; [ binaryBytecode ]; license = licenses.mit; platforms = platforms.unix; maintainers = with maintainers; [ jyooru ]; diff --git a/pkgs/games/quantumminigolf/default.nix b/pkgs/games/quantumminigolf/default.nix index 26a327dd3f524..d0e50a361582e 100644 --- a/pkgs/games/quantumminigolf/default.nix +++ b/pkgs/games/quantumminigolf/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { ]; preBuild = '' - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${SDL.dev}/include/SDL -I${SDL_ttf}/include/SDL" + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${lib.getDev SDL}/include/SDL -I${SDL_ttf}/include/SDL" sed -re 's@"(gfx|fonts|tracks)/@"'"$out"'/share/quantumminigolf/\1/@g' -i *.cpp ''; diff --git a/pkgs/games/rili/default.nix b/pkgs/games/rili/default.nix index 3a87fc0523c7b..9c6252a6dda30 100644 --- a/pkgs/games/rili/default.nix +++ b/pkgs/games/rili/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { }) ]; - CPPFLAGS = "-I${SDL.dev}/include -I${SDL.dev}/include/SDL -I${SDL_mixer}/include"; + CPPFLAGS = "-I${lib.getDev SDL}/include -I${lib.getDev SDL}/include/SDL -I${SDL_mixer}/include"; nativeBuildInputs = [ autoreconfHook ]; buildInputs = [ SDL SDL_mixer ]; diff --git a/pkgs/games/rocksndiamonds/default.nix b/pkgs/games/rocksndiamonds/default.nix index b01d616452bbb..39df9615154c7 100644 --- a/pkgs/games/rocksndiamonds/default.nix +++ b/pkgs/games/rocksndiamonds/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, makeDesktopItem, SDL2, SDL2_image, SDL2_mixer, SDL2_net }: +{ lib, stdenv, fetchurl, fetchpatch, makeDesktopItem, SDL2, SDL2_image, SDL2_mixer, SDL2_net }: stdenv.mkDerivation rec { pname = "rocksndiamonds"; @@ -9,6 +9,20 @@ stdenv.mkDerivation rec { sha256 = "1k0m6l5g886d9mwwh6q0gw75qsb85mpf8i0rglh047app56nsk72"; }; + patches = [ + # Pull upstream fix for -fno-common toolchain. + (fetchpatch { + name = "fno-common-p1.patch"; + url = "https://git.artsoft.org/?p=rocksndiamonds.git;a=patch;h=b4271393b10b7c664a58f3db7349a3875c1676fe"; + sha256 = "0bdy4d2ril917radmm0c2yh2gqfyh7q1c8kahig5xknn2rkf2iac"; + }) + (fetchpatch { + name = "fno-common-p2.patch"; + url = "https://git.artsoft.org/?p=rocksndiamonds.git;a=patch;h=81dbde8a570a94dd2e938eff2f52dc5a3ecced21"; + sha256 = "1mk5yb8pxrpxvvsxw3pjcbgx2c658baq9vmqqipbj5byhkkw7v2l"; + }) + ]; + desktopItem = makeDesktopItem { name = "rocksndiamonds"; exec = "rocksndiamonds"; diff --git a/pkgs/games/rott/default.nix b/pkgs/games/rott/default.nix index b3a517dab02b3..131745ac03eb0 100644 --- a/pkgs/games/rott/default.nix +++ b/pkgs/games/rott/default.nix @@ -1,5 +1,26 @@ -{stdenv, lib, fetchurl, SDL, SDL_mixer, makeDesktopItem, copyDesktopItems, runtimeShell, buildShareware ? false}: +{ stdenv +, lib +, fetchurl +, writeShellScript +, SDL +, SDL_mixer +, makeDesktopItem +, copyDesktopItems +, runtimeShell +, buildShareware ? false +}: +let + # Allow the game to be launched from a user's PATH and load the game data from the user's home directory. + launcher = writeShellScript "rott" '' + set -eEuo pipefail + dir=$HOME/.rott/data + test -e $dir || mkdir -p $dir + cd $dir + exec @out@/libexec/rott "$@" + ''; + +in stdenv.mkDerivation rec { pname = "rott"; version = "1.1.2"; @@ -10,27 +31,27 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ copyDesktopItems ]; + buildInputs = [ SDL SDL_mixer ]; - preBuild = '' - cd rott - make clean - make SHAREWARE=${if buildShareware then "1" else "0"} - ''; + sourceRoot = "rott-${version}/rott"; - # Include a wrapper script to allow the game to be launched from a user's PATH and load the game data from the user's home directory. + makeFlags = [ + "SHAREWARE=${if buildShareware then "1" else "0"}" + ]; - installPhase = '' - mkdir -p $out/bin - cp rott $out/bin + # when using SDL_compat instead of SDL_classic, SDL_mixer isn't correctly + # detected, but there is no harm just specifying it + NIX_CFLAGS_COMPILE = [ + "-I${lib.getDev SDL_mixer}/include/SDL" + ]; - cat > $out/bin/launch-rott <<EOF - #! ${runtimeShell} -e - cd ~/.rott/data - exec $out/bin/rott - EOF + installPhase = '' + runHook preInstall - chmod +x $out/bin/launch-rott + install -Dm555 -t $out/libexec rott + install -Dm555 ${launcher} $out/bin/${launcher.name} + substituteInPlace $out/bin/rott --subst-var out runHook postInstall ''; @@ -38,7 +59,7 @@ stdenv.mkDerivation rec { desktopItems = [ (makeDesktopItem { name = "rott"; - exec = "launch-rott"; + exec = "rott"; desktopName = "Rise of the Triad: ${if buildShareware then "The HUNT Begins" else "Dark War"}"; categories = [ "Game" ]; }) diff --git a/pkgs/games/runelite/default.nix b/pkgs/games/runelite/default.nix index 39ff9c137dfb8..a3c686eee9fe0 100644 --- a/pkgs/games/runelite/default.nix +++ b/pkgs/games/runelite/default.nix @@ -58,6 +58,10 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Open source Old School RuneScape client"; homepage = "https://runelite.net/"; + sourceProvenance = with sourceTypes; [ + binaryBytecode + binaryNativeCode + ]; license = licenses.bsd2; maintainers = with maintainers; [ kmeakin ]; platforms = [ "x86_64-linux" ]; diff --git a/pkgs/games/runescape-launcher/default.nix b/pkgs/games/runescape-launcher/default.nix index 3208aa3b46122..e671e5589b826 100644 --- a/pkgs/games/runescape-launcher/default.nix +++ b/pkgs/games/runescape-launcher/default.nix @@ -77,6 +77,7 @@ let meta = with lib; { description = "Launcher for RuneScape 3, the current main RuneScape"; homepage = "https://www.runescape.com/"; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; license = licenses.unfree; maintainers = with maintainers; [ grburst ]; platforms = [ "x86_64-linux" ]; diff --git a/pkgs/games/shattered-pixel-dungeon/default.nix b/pkgs/games/shattered-pixel-dungeon/default.nix index d8bf9d5f32351..81baf3b664ba6 100644 --- a/pkgs/games/shattered-pixel-dungeon/default.nix +++ b/pkgs/games/shattered-pixel-dungeon/default.nix @@ -80,6 +80,10 @@ in stdenv.mkDerivation rec { homepage = "https://shatteredpixel.com/"; downloadPage = "https://github.com/00-Evan/shattered-pixel-dungeon/releases"; description = "Traditional roguelike game with pixel-art graphics and simple interface"; + sourceProvenance = with sourceTypes; [ + fromSource + binaryBytecode # deps + ]; license = licenses.gpl3Plus; maintainers = with maintainers; [ fgaz ]; platforms = platforms.all; diff --git a/pkgs/games/sil-q/default.nix b/pkgs/games/sil-q/default.nix new file mode 100644 index 0000000000000..1676f8da55a90 --- /dev/null +++ b/pkgs/games/sil-q/default.nix @@ -0,0 +1,66 @@ +{ lib, stdenv, fetchFromGitHub, writeScript, makeWrapper, ncurses, libX11 }: + +let + setup = writeScript "setup" '' + mkdir -p "$ANGBAND_PATH" + # copy all the data files into place + cp -ar $1/* "$ANGBAND_PATH" + # the copied files need to be writable + chmod +w -R "$ANGBAND_PATH" + ''; +in stdenv.mkDerivation rec { + pname = "sil-q"; + version = "1.5.0"; + + src = fetchFromGitHub { + owner = "sil-quirk"; + repo = "sil-q"; + rev = "v${version}"; + sha256 = "sha256-v/sWhPWF9cCKD8N0RHpwzChMM1t9G2yrMDmi1cZxdOs="; + }; + + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ ncurses libX11 ]; + + # Makefile(s) and config are not top-level + sourceRoot = "source/src"; + + postPatch = '' + # allow usage of ANGBAND_PATH + substituteInPlace config.h --replace "#define FIXED_PATHS" "" + + # change Makefile.std for ncurses according to its own comment + substituteInPlace Makefile.std --replace "-lcurses" "-lncurses" + ''; + + makefile = "Makefile.std"; + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin + cp sil $out/bin/sil-q + wrapProgram $out/bin/sil-q \ + --run "export ANGBAND_PATH=\$HOME/.sil" \ + --run "${setup} ${src}/lib" + + runHook postInstall + ''; + + meta = { + description = "A roguelike game set in the First Age of Middle-earth"; + longDescription = '' + A game of adventure set in the First Age of Middle-earth, when the world still + rang with Elven song and gleamed with Dwarven mail. + + Walk the dark halls of Angband. Slay creatures black and fell. Wrest a shining + Silmaril from Morgoth’s iron crown. + + A fork of Sil that's still actively developed. + ''; + homepage = "https://github.com/sil-quirk/sil-q"; + license = lib.licenses.gpl2; + maintainers = [ lib.maintainers.kenran ]; + platforms = lib.platforms.linux; + }; +} diff --git a/pkgs/games/sil/default.nix b/pkgs/games/sil/default.nix index 5f589ede2bc45..2e6c50daa8236 100644 --- a/pkgs/games/sil/default.nix +++ b/pkgs/games/sil/default.nix @@ -34,6 +34,12 @@ stdenv.mkDerivation rec { buildFlagsArray+=("LIBS=-lXaw -lXext -lSM -lICE -lXmu -lXt -lX11 -lncurses") ''; + # Workaround build failure on -fno-common toolchains like upstream + # gcc-10. Otherwise build fails as: + # ld: main.o:/build/source/Sil/src/externs.h:57: multiple definition of + # `mini_screenshot_char'; variable.o:/build/source/Sil/src/externs.h:57: first defined here + NIX_CFLAGS_COMPILE = "-fcommon"; + installPhase = '' # the makefile doesn't have a sensible install target, so we hav to do it ourselves mkdir -p $out/bin diff --git a/pkgs/games/space-orbit/default.nix b/pkgs/games/space-orbit/default.nix index 6794a340310a4..7e51d7a4b290c 100644 --- a/pkgs/games/space-orbit/default.nix +++ b/pkgs/games/space-orbit/default.nix @@ -38,6 +38,7 @@ EOF ''; meta = with lib; { + broken = stdenv.isDarwin; description = "A space combat simulator"; license = licenses.gpl2; platforms = platforms.all; diff --git a/pkgs/games/speed-dreams/default.nix b/pkgs/games/speed-dreams/default.nix index c0bb7b67e04bc..b97e755b27530 100644 --- a/pkgs/games/speed-dreams/default.nix +++ b/pkgs/games/speed-dreams/default.nix @@ -3,7 +3,7 @@ libXext, libSM, libICE, libXi, libXt, libXrender, libXxf86vm, openscenegraph, ex libpng, zlib, bash, SDL2, enet, libjpeg, cmake, pkg-config, libvorbis, runtimeShell, curl }: let - version = "2.2.2-r6553"; + version = "2.2.3-r7616"; shortVersion = builtins.substring 0 5 version; in stdenv.mkDerivation rec { @@ -12,22 +12,22 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://sourceforge/speed-dreams/${shortVersion}/speed-dreams-src-base-${version}.tar.xz"; - sha256 = "1l47d2619kpfkvdwbkwr311qss6jjfwvgl5h9z2w3bwdgz0mbaij"; + sha256 = "sha256-GvB8SDZB9UivJSsQfMMon9N5MURdxTOwsaN4F0XQUCE="; }; cars-and-tracks = fetchurl { url = "mirror://sourceforge/speed-dreams/${shortVersion}/speed-dreams-src-hq-cars-and-tracks-${version}.tar.xz"; - sha256 = "0l8ba5pzqqcfy4inyxy2lrrhhgfs43xab7fy751xz2xqpqpfksyq"; + sha256 = "sha256-BuryCUvBD7rKmApCNsTkRN0UJ1q6P3sdYrSzpTqdTHc="; }; more-cars-and-tracks = fetchurl { url = "mirror://sourceforge/speed-dreams/${shortVersion}/speed-dreams-src-more-hq-cars-and-tracks-${version}.tar.xz"; - sha256 = "10w180mhhk6dw4cza6mqa0hp5qgym9lcizfwykqbgcvs01yl2yqb"; + sha256 = "sha256-GSCHYbJS352yAMczzss7tYSQXwLQV68rv/XkyGy+GoY="; }; wip-cars-and-tracks = fetchurl { url = "mirror://sourceforge/speed-dreams/${shortVersion}/speed-dreams-src-wip-cars-and-tracks-${version}.tar.xz"; - sha256 = "1wad9yaydaryhyi7ckyaii124h0z7kziqgcl475a5jr7ggbxc24q"; + sha256 = "sha256-r/IOSf+UZg2e+WIHn2QNDO6qQUhpIJvh7EF2jQ7lyyA="; }; sourceRoot = "."; diff --git a/pkgs/games/srb2/default.nix b/pkgs/games/srb2/default.nix new file mode 100644 index 0000000000000..ff5e0f4303628 --- /dev/null +++ b/pkgs/games/srb2/default.nix @@ -0,0 +1,93 @@ +{ lib +, stdenv +, fetchurl +, fetchFromGitHub +, substituteAll +, cmake +, curl +, nasm +, openmpt123 +, p7zip +, libgme +, libpng +, SDL2 +, SDL2_mixer +, zlib +}: + +let + +assets_version = "2.2.5"; + +assets = fetchurl { + url = "https://github.com/mazmazz/SRB2/releases/download/SRB2_assets_220/srb2-${assets_version}-assets.7z"; + sha256 = "1m9xf3vraq9nipsi09cyvvfa4i37gzfxg970rnqfswd86z9v6v00"; +}; + +assets_optional = fetchurl { + url = "https://github.com/mazmazz/SRB2/releases/download/SRB2_assets_220/srb2-${assets_version}-optional-assets.7z"; + sha256 = "1j29jrd0r1k2bb11wyyl6yv9b90s2i6jhrslnh77qkrhrwnwcdz4"; +}; + +in stdenv.mkDerivation rec { + pname = "srb2"; + version = "2.2.10"; + + src = fetchFromGitHub { + owner = "STJr"; + repo = "SRB2"; + rev = "SRB2_release_${version}"; + sha256 = "03388n094d2yr5si6ngnggbqhm8b2l0s0qvfnkz49li9bd6a81gg"; + }; + + nativeBuildInputs = [ + cmake + nasm + p7zip + ]; + + buildInputs = [ + curl + libgme + libpng + openmpt123 + SDL2 + SDL2_mixer + zlib + ]; + + cmakeFlags = [ + "-DSRB2_ASSET_DIRECTORY=/build/source/assets" + "-DGME_INCLUDE_DIR=${libgme}/include" + "-DOPENMPT_INCLUDE_DIR=${openmpt123}/include" + "-DSDL2_MIXER_INCLUDE_DIR=${SDL2_mixer}/include/SDL2" + "-DSDL2_INCLUDE_DIR=${SDL2.dev}/include/SDL2" + ]; + + patches = [ + ./wadlocation.patch + ]; + + postPatch = '' + substituteInPlace src/sdl/i_system.c \ + --replace '@wadlocation@' $out + ''; + + preConfigure = '' + 7z x ${assets} -o"/build/source/assets" -aos + 7z x ${assets_optional} -o"/build/source/assets" -aos + ''; + + postInstall = '' + mkdir $out/bin + mv $out/lsdlsrb2-${version} $out/bin/srb2 + ''; + + meta = with lib; { + description = "Sonic Robo Blast 2 is a 3D Sonic the Hedgehog fangame based on a modified version of Doom Legacy"; + homepage = "https://www.srb2.org/"; + platforms = platforms.linux; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ zeratax ]; + }; +} diff --git a/pkgs/games/srb2/wadlocation.patch b/pkgs/games/srb2/wadlocation.patch new file mode 100644 index 0000000000000..ee3e1111e6f0b --- /dev/null +++ b/pkgs/games/srb2/wadlocation.patch @@ -0,0 +1,72 @@ +diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c +index 10c0747bf..861f00728 100644 +--- a/src/sdl/i_system.c ++++ b/src/sdl/i_system.c +@@ -145,13 +145,7 @@ int TimeFunction(int requested_frequency); + + // Locations for searching the srb2.pk3 + #if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON) +-#define DEFAULTWADLOCATION1 "/usr/local/share/games/SRB2" +-#define DEFAULTWADLOCATION2 "/usr/local/games/SRB2" +-#define DEFAULTWADLOCATION3 "/usr/share/games/SRB2" +-#define DEFAULTWADLOCATION4 "/usr/games/SRB2" +-#define DEFAULTSEARCHPATH1 "/usr/local/games" +-#define DEFAULTSEARCHPATH2 "/usr/games" +-#define DEFAULTSEARCHPATH3 "/usr/local" ++#define DEFAULTWADLOCATION1 "@wadlocation@" + #elif defined (_WIN32) + #define DEFAULTWADLOCATION1 "c:\\games\\srb2" + #define DEFAULTWADLOCATION2 "\\games\\srb2" +@@ -2812,34 +2806,6 @@ static const char *locateWad(void) + if (((envstr = I_GetEnv("SRB2WADDIR")) != NULL) && isWadPathOk(envstr)) + return envstr; + +-#ifndef NOCWD +- I_OutputMsg(",."); +- // examine current dir +- strcpy(returnWadPath, "."); +- if (isWadPathOk(returnWadPath)) +- return NULL; +-#endif +- +- +-#ifdef CMAKECONFIG +-#ifndef NDEBUG +- I_OutputMsg(","CMAKE_ASSETS_DIR); +- strcpy(returnWadPath, CMAKE_ASSETS_DIR); +- if (isWadPathOk(returnWadPath)) +- { +- return returnWadPath; +- } +-#endif +-#endif +- +-#ifdef __APPLE__ +- OSX_GetResourcesPath(returnWadPath); +- I_OutputMsg(",%s", returnWadPath); +- if (isWadPathOk(returnWadPath)) +- { +- return returnWadPath; +- } +-#endif + + // examine default dirs + #ifdef DEFAULTWADLOCATION1 +@@ -2884,16 +2850,7 @@ static const char *locateWad(void) + if (isWadPathOk(returnWadPath)) + return returnWadPath; + #endif +-#ifndef NOHOME +- // find in $HOME +- I_OutputMsg(",HOME"); +- if ((envstr = I_GetEnv("HOME")) != NULL) +- { +- WadPath = searchWad(envstr); +- if (WadPath) +- return WadPath; +- } +-#endif ++ + #ifdef DEFAULTSEARCHPATH1 + // find in /usr/local + I_OutputMsg(", in:"DEFAULTSEARCHPATH1); diff --git a/pkgs/games/srb2kart/default.nix b/pkgs/games/srb2kart/default.nix new file mode 100644 index 0000000000000..62f2915098de7 --- /dev/null +++ b/pkgs/games/srb2kart/default.nix @@ -0,0 +1,88 @@ +{ lib +, stdenv +, fetchurl +, fetchFromGitHub +, substituteAll +, cmake +, curl +, nasm +, unzip +, libgme +, libpng +, SDL2 +, SDL2_mixer +, zlib +}: + +let + +release_tag = "v1.3"; + +installer = fetchurl { + url = "https://github.com/STJr/Kart-Public/releases/download/${release_tag}/srb2kart-v13-Installer.exe"; + sha256 = "0bk36y7wf6xfdg6j0b8qvk8671hagikzdp5nlfqg478zrj0qf6cs"; +}; + +in stdenv.mkDerivation rec { + pname = "srb2kart"; + version = "1.3.0"; + + src = fetchFromGitHub { + owner = "STJr"; + repo = "Kart-Public"; + rev = release_tag; + sha256 = "131g9bmc9ihvz0klsc3yzd0pnkhx3mz1vzm8y7nrrsgdz5278y49"; + }; + + nativeBuildInputs = [ + cmake + nasm + unzip + ]; + + buildInputs = [ + curl + libgme + libpng + SDL2 + SDL2_mixer + zlib + ]; + + cmakeFlags = [ + #"-DSRB2_ASSET_DIRECTORY=/build/source/assets" + "-DGME_INCLUDE_DIR=${libgme}/include" + "-DSDL2_MIXER_INCLUDE_DIR=${SDL2_mixer}/include/SDL2" + "-DSDL2_INCLUDE_DIR=${SDL2.dev}/include/SDL2" + ]; + + patches = [ + ./wadlocation.patch + ]; + + postPatch = '' + substituteInPlace src/sdl/i_system.c \ + --replace '@wadlocation@' $out + ''; + + preConfigure = '' + mkdir assets/installer + pushd assets/installer + unzip ${installer} "*.kart" srb2.srb + popd + ''; + + postInstall = '' + mkdir -p $out/bin $out/share/games/SRB2Kart + mv $out/srb2kart* $out/bin/ + mv $out/*.kart $out/share/games/SRB2Kart + ''; + + meta = with lib; { + description = "SRB2Kart is a classic styled kart racer"; + homepage = "https://mb.srb2.org/threads/srb2kart.25868/"; + platforms = platforms.linux; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ viric ]; + }; +} diff --git a/pkgs/games/srb2kart/wadlocation.patch b/pkgs/games/srb2kart/wadlocation.patch new file mode 100644 index 0000000000000..1923cda041d25 --- /dev/null +++ b/pkgs/games/srb2kart/wadlocation.patch @@ -0,0 +1,61 @@ +diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c +index 51f708d0..c4d971f7 100644 +--- a/src/sdl/i_system.c ++++ b/src/sdl/i_system.c +@@ -139,7 +139,7 @@ typedef LPVOID (WINAPI *p_MapViewOfFile) (HANDLE, DWORD, DWORD, DWORD, SIZE_T); + + // Locations for searching the srb2.srb + #if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON) +-#define DEFAULTWADLOCATION1 "/usr/local/share/games/SRB2Kart" ++#define DEFAULTWADLOCATION1 "@wadlocation@" + #define DEFAULTWADLOCATION2 "/usr/local/games/SRB2Kart" + #define DEFAULTWADLOCATION3 "/usr/share/games/SRB2Kart" + #define DEFAULTWADLOCATION4 "/usr/games/SRB2Kart" +@@ -3646,47 +3646,6 @@ static const char *locateWad(void) + if (((envstr = I_GetEnv("SRB2WADDIR")) != NULL) && isWadPathOk(envstr)) + return envstr; + +-#ifndef NOCWD +- I_OutputMsg(",."); +- // examine current dir +- strcpy(returnWadPath, "."); +- if (isWadPathOk(returnWadPath)) +- return NULL; +-#endif +- +- +-#ifdef DEFAULTDIR +- I_OutputMsg(",HOME/" DEFAULTDIR); +- // examine user jart directory +- if ((envstr = I_GetEnv("HOME")) != NULL) +- { +- sprintf(returnWadPath, "%s" PATHSEP DEFAULTDIR, envstr); +- if (isWadPathOk(returnWadPath)) +- return returnWadPath; +- } +-#endif +- +- +-#ifdef CMAKECONFIG +-#ifndef NDEBUG +- I_OutputMsg(","CMAKE_ASSETS_DIR); +- strcpy(returnWadPath, CMAKE_ASSETS_DIR); +- if (isWadPathOk(returnWadPath)) +- { +- return returnWadPath; +- } +-#endif +-#endif +- +-#ifdef __APPLE__ +- OSX_GetResourcesPath(returnWadPath); +- I_OutputMsg(",%s", returnWadPath); +- if (isWadPathOk(returnWadPath)) +- { +- return returnWadPath; +- } +-#endif +- + // examine default dirs + #ifdef DEFAULTWADLOCATION1 + I_OutputMsg(","DEFAULTWADLOCATION1); diff --git a/pkgs/games/starsector/default.nix b/pkgs/games/starsector/default.nix index efba43e92dd4f..e929ef98fbf6b 100644 --- a/pkgs/games/starsector/default.nix +++ b/pkgs/games/starsector/default.nix @@ -75,6 +75,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Open-world single-player space-combat, roleplaying, exploration, and economic game"; homepage = "https://fractalsoftworks.com"; + sourceProvenance = with sourceTypes; [ binaryBytecode ]; license = licenses.unfree; maintainers = with maintainers; [ bbigras ]; }; diff --git a/pkgs/games/steam/fhsenv.nix b/pkgs/games/steam/fhsenv.nix index d18accd0d546a..86c04b5757a25 100644 --- a/pkgs/games/steam/fhsenv.nix +++ b/pkgs/games/steam/fhsenv.nix @@ -155,7 +155,7 @@ in buildFHSUserEnv rec { xorg.libSM xorg.libICE gnome2.GConf - (curl.override { gnutlsSupport = true; opensslSupport = false; }) + curlWithGnuTls nspr nss cups diff --git a/pkgs/games/stockfish/default.nix b/pkgs/games/stockfish/default.nix index 5a35ac51754c4..2f40b2a346976 100644 --- a/pkgs/games/stockfish/default.nix +++ b/pkgs/games/stockfish/default.nix @@ -11,23 +11,23 @@ let if stdenv.isAarch64 then "armv8" else "unknown"; - nnueFile = "nn-13406b1dcbe0.nnue"; + nnueFile = "nn-6877cd24400e.nnue"; nnue = fetchurl { name = nnueFile; url = "https://tests.stockfishchess.org/api/nn/${nnueFile}"; - sha256 = "sha256-E0BrHcvgo238XgfaUdjbOLekXX2kMHjsJadiTCuDI28="; + sha256 = "sha256-aHfNJEAOAbGf8SrjBoriQhUoAr3TMOZve2cDhlJR1uM="; }; in stdenv.mkDerivation rec { pname = "stockfish"; - version = "14.1"; + version = "15"; src = fetchFromGitHub { owner = "official-stockfish"; repo = "Stockfish"; rev = "sf_${version}"; - sha256 = "sha256-bb62yezHKXu0J7NKavX8xhHghaUjUFYNG5U6dh/D+Co="; + sha256 = "sha256-sK4Jw9BPGRvlm9oIcgGcmHe8G4GR4cEuD8MtDrHZKew="; }; # This addresses a linker issue with Darwin diff --git a/pkgs/games/stuntrally/default.nix b/pkgs/games/stuntrally/default.nix index 64e2dcc379b15..537a3f83a0360 100644 --- a/pkgs/games/stuntrally/default.nix +++ b/pkgs/games/stuntrally/default.nix @@ -18,25 +18,21 @@ stdenv.mkDerivation rec { pname = "stunt-rally"; - version = "2.6.1"; + version = "2.6.2"; src = fetchFromGitHub { owner = "stuntrally"; repo = "stuntrally"; rev = version; - hash = "sha256-1+Cc9I6TTa3b++/7Z2V+vAXcmFb2+wX7TnXEH6CRDWU="; + hash = "sha256-9I6hXsosqx+yYiEOEnPXQJHZkGtSU+JqThorwjemlc0="; }; tracks = fetchFromGitHub { owner = "stuntrally"; repo = "tracks"; rev = version; - hash = "sha256-FbZc87j/9cp4LxNaEO2wNTvwk1Aq/IWcKD3rTGkzqj0="; + hash = "sha256-eZJAvkKe3PrXDzxTa5WFBHfltB3jhQh8puzOFDO9lso="; }; - # include/OGRE/OgreException.h:265:126: error: invalid conversion from - # 'int' to 'Ogre::Exception::ExceptionCodes' [-fpermissive] - NIX_CFLAGS_COMPILE = "-fpermissive"; - preConfigure = '' ln -s ${tracks} data/tracks ''; diff --git a/pkgs/games/system-syzygy/default.nix b/pkgs/games/system-syzygy/default.nix index 67bb6b716616b..bdaded982adde 100644 --- a/pkgs/games/system-syzygy/default.nix +++ b/pkgs/games/system-syzygy/default.nix @@ -1,4 +1,4 @@ -{lib, rustPlatform, fetchFromGitHub, fetchurl, SDL2, makeWrapper, makeDesktopItem}: +{ stdenv, lib, rustPlatform, fetchFromGitHub, fetchurl, SDL2, makeWrapper, makeDesktopItem}: let desktopFile = makeDesktopItem { @@ -35,6 +35,7 @@ rustPlatform.buildRustPackage rec { meta = with lib; { + broken = stdenv.isDarwin; description = "A story and a puzzle game, where you solve a variety of puzzle"; homepage = "https://mdsteele.games/syzygy"; license = licenses.gpl3Plus; diff --git a/pkgs/games/t4kcommon/default.nix b/pkgs/games/t4kcommon/default.nix index 74757c236c51b..4a7a2e92b106a 100644 --- a/pkgs/games/t4kcommon/default.nix +++ b/pkgs/games/t4kcommon/default.nix @@ -19,6 +19,13 @@ stdenv.mkDerivation rec { }) ]; + # Workaround build failure on -fno-common toolchains like upstream + # gcc-10. Otherwise build fails as: + # ld: CMakeFiles/t4k_common.dir/t4k_throttle.c.o:(.bss+0x0): multiple definition of + # `wrapped_lines'; CMakeFiles/t4k_common.dir/t4k_audio.c.o:(.bss+0x0): first defined here + # TODO: revisit https://github.com/tux4kids/t4kcommon/pull/10 when merged. + NIX_CFLAGS_COMPILE = "-fcommon"; + nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ SDL SDL_image SDL_mixer SDL_net SDL_ttf libpng librsvg libxml2 ]; diff --git a/pkgs/games/taisei/default.nix b/pkgs/games/taisei/default.nix index 4bc04a336f831..886768786c10c 100644 --- a/pkgs/games/taisei/default.nix +++ b/pkgs/games/taisei/default.nix @@ -3,16 +3,16 @@ , docutils, meson, ninja, pkg-config, python3 # Runtime depends , glfw, SDL2, SDL2_mixer -, freetype, libpng, libwebp, libzip, zlib +, cglm, freetype, libpng, libwebp, libzip, zlib }: stdenv.mkDerivation rec { pname = "taisei"; - version = "1.3.1"; + version = "1.3.2"; src = fetchurl { url = "https://github.com/taisei-project/${pname}/releases/download/v${version}/${pname}-v${version}.tar.xz"; - sha256 = "11f9mlqmzy1lszwcc1nsbar9q1hs4ml6pbm52hqfd4q0f4x3ln46"; + sha256 = "1g53fcyrlzmvlsb40pw90gaglysv6n1w42hk263iv61ibhdmzh6v"; }; nativeBuildInputs = [ @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { buildInputs = [ glfw SDL2 SDL2_mixer - freetype libpng libwebp libzip zlib + cglm freetype libpng libwebp libzip zlib ]; patches = [ ./0001-lto-fix.patch ]; @@ -31,6 +31,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { + broken = stdenv.isDarwin; description = "A free and open-source Touhou Project clone and fangame"; longDescription = '' Taisei is an open clone of the Tōhō Project series. Tōhō is a one-man @@ -43,4 +44,3 @@ stdenv.mkDerivation rec { platforms = platforms.all; }; } - diff --git a/pkgs/games/tinyfugue/default.nix b/pkgs/games/tinyfugue/default.nix index 763241f2909dd..e75d2f12b9451 100644 --- a/pkgs/games/tinyfugue/default.nix +++ b/pkgs/games/tinyfugue/default.nix @@ -23,6 +23,12 @@ stdenv.mkDerivation rec { [ ncurses zlib ] ++ optional sslSupport openssl; + # Workaround build failure on -fno-common toolchains like upstream + # gcc-10. Otherwise build fails as: + # ld: world.o:/build/tf-50b8/src/socket.h:24: multiple definition of + # `world_decl'; command.o:/build/tf-50b8/src/socket.h:24: first defined here + NIX_CFLAGS_COMPILE="-fcommon"; + meta = { homepage = "http://tinyfugue.sourceforge.net/"; description = "A terminal UI, screen-oriented MUD client"; diff --git a/pkgs/games/tr-patcher/default.nix b/pkgs/games/tr-patcher/default.nix index 68e3eb6089542..0336ed1ac02f1 100644 --- a/pkgs/games/tr-patcher/default.nix +++ b/pkgs/games/tr-patcher/default.nix @@ -29,6 +29,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Allow to update dependancies of the Tamriel-Data mod for morrowind"; homepage = "https://gitlab.com/bmwinger/tr-patcher"; + sourceProvenance = with sourceTypes; [ binaryBytecode ]; license = licenses.gpl3; maintainers = [ maintainers.marius851000 ]; platforms = platforms.linux; diff --git a/pkgs/games/tremulous/default.nix b/pkgs/games/tremulous/default.nix deleted file mode 100644 index e07697f7c0e1a..0000000000000 --- a/pkgs/games/tremulous/default.nix +++ /dev/null @@ -1,82 +0,0 @@ -{ lib, stdenv, fetchurl, unzip, libGLU, libGL, libX11, SDL, openal, runtimeShell }: -stdenv.mkDerivation rec { - pname = "tremulous"; - version = "1.1.0"; - src1 = fetchurl { - url = "mirror://sourceforge/tremulous/${pname}-${version}.zip"; - sha256 = "11w96y7ggm2sn5ncyaffsbg0vy9pblz2av71vqp9725wbbsndfy7"; - }; - # http://tremulous.net/wiki/Client_versions - src2 = fetchurl { - url = "http://releases.mercenariesguild.net/client/mgclient_source_Release_1.011.tar.gz"; - sha256 = "1vrsi7va7hdp8k824663s1pyw9zpsd4bwwr50j7i1nn72b0v9a26"; - }; - src3 = fetchurl { - url = "http://releases.mercenariesguild.net/tremded/mg_tremded_source_1.01.tar.gz"; - sha256 = "1njrqlhzjvy9myddzkagszwdcf3m4h08wip888w2rmbshs6kz6ql"; - }; - nativeBuildInputs = [ unzip ]; - buildInputs = [ libGLU libGL libX11 SDL openal ]; - unpackPhase = '' - unzip $src1 - cd tremulous - tar xvf $src2 - mkdir mg_tremded_source - cd mg_tremded_source - tar xvf $src3 - cd .. - ''; - patches = [ ./parse.patch ]; - patchFlags = [ "-p" "0" ]; - NIX_LD_FLAGS = '' - -rpath ${stdenv.cc}/lib - -rpath ${stdenv.cc}/lib64 - ''; - buildPhase = '' - cd Release_1.011 - make - cd .. - cd mg_tremded_source - make - cd .. - ''; - installPhase = '' - arch=$(uname -m | sed -e s/i.86/x86/) - mkdir -p $out/opt/tremulous - cp -v Release_1.011/build/release-linux-$arch/tremulous.$arch $out/opt/tremulous/ - cp -v mg_tremded_source/build/release-linux-$arch/tremded.$arch $out/opt/tremulous/ - cp -rv base $out/opt/tremulous - mkdir -p $out/bin - for b in tremulous tremded - do - cat << EOF > $out/bin/$b - #!${runtimeShell} - cd $out/opt/tremulous - exec ./$b.$arch "\$@" - EOF - chmod +x $out/bin/$b - done - ''; - dontPatchELF = true; - meta = with lib; { - description = "A game that blends a team based FPS with elements of an RTS"; - longDescription = '' - Tremulous is a free, open source game that blends a team based FPS with - elements of an RTS. Players can choose from 2 unique races, aliens and - humans. Players on both teams are able to build working structures - in-game like an RTS. These structures provide many functions, the most - important being spawning. The designated builders must ensure there are - spawn structures or other players will not be able to rejoin the game - after death. Other structures provide automated base defense (to some - degree), healing functions and much more... - ''; - homepage = "http://www.tremulous.net"; - license = with licenses; [ - gpl2 - cc-by-sa-25 /* media */ - ]; - maintainers = with maintainers; [ astsmtl ]; - platforms = platforms.linux; - broken = true; - }; -} diff --git a/pkgs/games/tremulous/parse.patch b/pkgs/games/tremulous/parse.patch deleted file mode 100644 index 12a73138c099d..0000000000000 --- a/pkgs/games/tremulous/parse.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -ruN Release_1.011-old/src/qcommon/parse.c Release_1.011/src/qcommon/parse.c ---- Release_1.011-old/src/qcommon/parse.c 2011-12-02 19:11:49.307368651 -0500 -+++ Release_1.011/src/qcommon/parse.c 2011-12-02 19:13:27.556836387 -0500 -@@ -981,7 +981,7 @@ - { - if (*string == '\"') - { -- strcpy(string, string+1); -+ memmove(string, string+1, strlen(string)); - } - if (string[strlen(string)-1] == '\"') - { -@@ -1784,7 +1784,7 @@ - if ((*ptr == '\\' || *ptr == '/') && - (*(ptr+1) == '\\' || *(ptr+1) == '/')) - { -- strcpy(ptr, ptr+1); -+ memmove(ptr, ptr+1, strlen(ptr)); - } - else - { diff --git a/pkgs/games/tworld2/default.nix b/pkgs/games/tworld2/default.nix index 1db1dcf5f0652..158d494fb32d8 100644 --- a/pkgs/games/tworld2/default.nix +++ b/pkgs/games/tworld2/default.nix @@ -1,8 +1,8 @@ { stdenv , lib , fetchurl -, qt4 , SDL +, qt4 }: stdenv.mkDerivation rec { @@ -11,10 +11,11 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://tw2.bitbusters.club/downloads/tworld-${version}-src.tar.gz"; - sha256 = "sha256:1y55v2shk2xxcds7bdwdjaq9lka31sgdp2469zqnvldchwbvcb2i"; + hash = "sha256-USy2F4es0W3xT4aI254OQ02asJKNt3V0Y72LCbXYpfg="; }; - buildInputs = [ qt4 SDL ]; + buildInputs = [ SDL qt4 ]; + enableParallelBuilding = true; postConfigure = '' @@ -36,10 +37,10 @@ stdenv.mkDerivation rec { ''; meta = with lib; { - description = "Tile World 2: Tile World is a reimplementation of the game Chip's Challenge"; homepage = "https://tw2.bitbusters.club/"; + description = "Tile World 2: Tile World is a reimplementation of the game Chip's Challenge"; license = licenses.gpl2Plus; - platforms = platforms.linux; maintainers = with maintainers; [ drperceptron ]; + platforms = platforms.linux; }; } diff --git a/pkgs/games/typespeed/default.nix b/pkgs/games/typespeed/default.nix index 1581ab1389454..0c2d928dd5ea4 100644 --- a/pkgs/games/typespeed/default.nix +++ b/pkgs/games/typespeed/default.nix @@ -11,6 +11,12 @@ stdenv.mkDerivation rec { patches = [ ./typespeed-config-in-home.patch ]; + # Workaround build failure on -fno-common toolchains like upstream + # gcc-10. Otherwise build fails as: + # ld: typespeed-typespeed.o:/build/typespeed-0.6.5/src/typespeed.h:69: multiple definition of + # `opt'; typespeed-file.o:/build/typespeed-0.6.5/src/typespeed.h:69: first defined here + NIX_CFLAGS_COMPILE = "-fcommon"; + configureFlags = [ "--datadir=\${out}/share/" ]; makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ]; diff --git a/pkgs/games/ue4demos/default.nix b/pkgs/games/ue4demos/default.nix index 51148e42e8e16..ce3f3ad38f8db 100644 --- a/pkgs/games/ue4demos/default.nix +++ b/pkgs/games/ue4demos/default.nix @@ -24,7 +24,7 @@ let cd $out unzip $src - interpreter=$(echo ${stdenv.glibc.out}/lib/ld-linux*.so.2) + interpreter=$(echo ${stdenv.cc.libc}/lib/ld-linux*.so.2) binary=$(find . -executable -type f) patchelf \ --set-interpreter $interpreter \ diff --git a/pkgs/games/ufoai/default.nix b/pkgs/games/ufoai/default.nix index 1dc2abbf7624d..f596ac2756b61 100644 --- a/pkgs/games/ufoai/default.nix +++ b/pkgs/games/ufoai/default.nix @@ -14,6 +14,13 @@ stdenv.mkDerivation rec { sha256 = "1drhh08cqqkwv1yz3z4ngkplr23pqqrdx6cp8c3isy320gy25cvb"; }; + # Workaround build failure on -fno-common toolchains: + # ld: r_gl.h:52: multiple definition of `qglGenBuffers'; + # r_gl.h:52: first defined here + # TODO: drop once release contains upstream fix: + # https://github.com/ufoai/ufoai/commit/8a3075fffdad294e + NIX_CFLAGS_COMPILE = "-fcommon"; + preConfigure = ''tar xvf "${srcData}"''; configureFlags = [ "--enable-release" "--enable-sse" ] diff --git a/pkgs/games/uhexen2/default.nix b/pkgs/games/uhexen2/default.nix index 78c38753f790d..c76dd9ec25244 100644 --- a/pkgs/games/uhexen2/default.nix +++ b/pkgs/games/uhexen2/default.nix @@ -51,6 +51,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { + broken = stdenv.isDarwin; description = "A cross-platform port of Hexen II game"; longDescription = '' Hammer of Thyrion (uHexen2) is a cross-platform port of Raven Software's Hexen II source. diff --git a/pkgs/games/umoria/default.nix b/pkgs/games/umoria/default.nix new file mode 100644 index 0000000000000..1114d47b7be56 --- /dev/null +++ b/pkgs/games/umoria/default.nix @@ -0,0 +1,80 @@ +{ lib +, gcc9Stdenv +, fetchFromGitHub +, autoreconfHook +, cmake +, ncurses6 +, runtimeShell +}: + +let + savesDir = "~/.umoria/"; +in +gcc9Stdenv.mkDerivation rec { + pname = "umoria"; + version = "5.7.15"; + + src = fetchFromGitHub { + owner = "dungeons-of-moria"; + repo = "umoria"; + rev = "v${version}"; + sha256 = "sha256-1j4QkE33UcTzM06qAjk1/PyK5uNA7E/kyDe3bZcFKUM="; + }; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ ncurses6 ]; + enableParallelBuilding = true; + + installPhase = '' + runHook preInstall + + mkdir -p $out/data $out/bin + cp -r umoria/data/* $out/data + cp umoria/umoria $out/.umoria-unwrapped + + mkdir -p $out/bin + cat <<EOF >$out/bin/umoria + #! ${runtimeShell} -e + + RUNDIR=\$(mktemp -d) + + cleanup() { + rm -rf \$RUNDIR + } + + trap cleanup EXIT + + cd \$RUNDIR + mkdir data + + for i in $out/data/*; do + ln -s \$i "data/\$(basename \$i)" + done + + mkdir -p ${savesDir} + [[ ! -f ${savesDir}/scores.dat ]] && touch ${savesDir}/scores.dat + ln -s ${savesDir}/scores.dat scores.dat + + $out/.umoria-unwrapped + EOF + + chmod +x $out/bin/umoria + + runHook postInstall + ''; + + meta = with lib; { + homepage = "https://umoria.org/"; + description = "The Dungeons of Moria - the original roguelike"; + longDescription = '' + The Dungeons of Moria is a single player dungeon simulation originally written + by Robert Alan Koeneke, with its first public release in 1983. + The game was originally developed using VMS Pascal before being ported to the C + language by James E. Wilson in 1988, and released a Umoria. + ''; + platforms = platforms.unix; + badPlatforms = [ "aarch64-darwin" ]; + maintainers = [ maintainers.aciceri ]; + license = licenses.gpl3Plus; + }; +} diff --git a/pkgs/games/unciv/default.nix b/pkgs/games/unciv/default.nix index e8b5d748b932c..49b07f3ad654c 100644 --- a/pkgs/games/unciv/default.nix +++ b/pkgs/games/unciv/default.nix @@ -53,6 +53,7 @@ stdenv.mkDerivation rec { description = "An open-source Android/Desktop remake of Civ V"; homepage = "https://github.com/yairm210/Unciv"; maintainers = with maintainers; [ tex ]; + sourceProvenance = with sourceTypes; [ binaryBytecode ]; license = licenses.mpl20; platforms = [ "x86_64-linux" ]; }; diff --git a/pkgs/games/unvanquished/default.nix b/pkgs/games/unvanquished/default.nix index 191d8c2180705..ca6af48bbb318 100644 --- a/pkgs/games/unvanquished/default.nix +++ b/pkgs/games/unvanquished/default.nix @@ -1,8 +1,34 @@ -{ lib, stdenv, fetchzip, fetchFromGitHub, buildFHSUserEnv, makeDesktopItem -, copyDesktopItems, gcc, cmake, gmp , libGL, zlib, ncurses, geoip, lua5 -, nettle, curl, SDL2, freetype, glew , openal, libopus, opusfile, libogg -, libvorbis, libjpeg, libwebp, libpng -, cacert, aria2 # to download assets +{ lib +, stdenv +, fetchzip +, fetchFromGitHub +, SDL2 +, buildFHSUserEnv +, cmake +, copyDesktopItems +, curl +, freetype +, gcc +, geoip +, glew +, gmp +, libGL +, libjpeg +, libogg +, libopus +, libpng +, libvorbis +, libwebp +, lua5 +, makeDesktopItem +, ncurses +, nettle +, openal +, opusfile +, zlib +# to download assets +, aria2 +, cacert }: let @@ -14,18 +40,21 @@ let repo = "Unvanquished"; rev = "v${version}"; fetchSubmodules = true; - sha256 = "1fiqn9f6nsh4cfjy7gfsv950hphwi9ca0ddgsjvn77g7yc0arp6c"; + sha256 = "sha256-zNysAPPnnWO31K81oFiKHF4IStraveOlYwRqa1yyOLo="; }; unvanquished-binary-deps = stdenv.mkDerivation rec { # DISCLAIMER: this is selected binary crap from the NaCl SDK name = "unvanquished-binary-deps"; version = binary-deps-version; + src = fetchzip { url = "https://dl.unvanquished.net/deps/linux64-${version}.tar.bz2"; - sha256 = "08bpyavbh5lmyprvqqi59gnm8s1fjmlk9f1785wlv7f52d9f9z1p"; + sha256 = "sha256-N/zkUhPFnU15QSe4NGmVLmhU7UslYrzz9ZUWuLbydyE="; }; + dontPatchELF = true; + preFixup = '' # We are not using the autoPatchelfHook, because it would make # nacl_bootstrap_helper unable to load nacl_loader: @@ -38,7 +67,12 @@ let fi done ''; - preCheck = "pnacl/bin/clang -v"; # check it links correctly + + preCheck = '' + # check it links correctly + pnacl/bin/clang -v + ''; + installPhase = '' runHook preInstall @@ -51,15 +85,18 @@ let libstdcpp-preload-for-unvanquished-nacl = stdenv.mkDerivation { name = "libstdcpp-preload-for-unvanquished-nacl"; + + propagatedBuildInputs = [ gcc.cc.lib ]; + buildCommand = '' mkdir $out/etc -p echo ${gcc.cc.lib}/lib/libstdc++.so.6 > $out/etc/ld-nix.so.preload ''; - propagatedBuildInputs = [ gcc.cc.lib ]; }; fhsEnv = buildFHSUserEnv { name = "unvanquished-fhs-wrapper"; + targetPkgs = pkgs: [ libstdcpp-preload-for-unvanquished-nacl ]; }; @@ -81,10 +118,14 @@ let pname = "unvanquished-assets"; inherit version src; - outputHash = "sha256:084jdisb48xyk9agjifn0nlnsdnjgg32si8zd1khsywd0kffplzx"; + outputHash = "sha256-/dPr3ASNew1naB9FLcZ70jZtqQXWRflUmr4jsnRskiA="; outputHashMode = "recursive"; + nativeBuildInputs = [ aria2 cacert ]; - buildCommand = "bash $src/download-paks --cache=$(pwd) --version=${version} $out"; + + buildCommand = '' + bash $src/download-paks --cache=$(pwd) --version=${version} $out + ''; }; # this really is the daemon game engine, the game itself is in the assets @@ -98,7 +139,12 @@ in stdenv.mkDerivation rec { chmod +w -R daemon/external_deps/linux64-${binary-deps-version}/ ''; - nativeBuildInputs = [ cmake unvanquished-binary-deps copyDesktopItems ]; + nativeBuildInputs = [ + cmake + unvanquished-binary-deps + copyDesktopItems + ]; + buildInputs = [ gmp libGL @@ -168,17 +214,22 @@ in stdenv.mkDerivation rec { runHook postInstall ''; + meta = { - platforms = [ "x86_64-linux" ]; homepage = "https://unvanquished.net/"; downloadPage = "https://unvanquished.net/download/"; description = "A fast paced, first person strategy game"; - maintainers = with lib.maintainers; [ afontain ]; # don't replace the following lib.licenses.zlib with just "zlib", # or you would end up with the package instead license = with lib.licenses; [ mit gpl3Plus lib.licenses.zlib bsd3 # engine cc-by-sa-25 cc-by-sa-30 cc-by-30 cc-by-sa-40 cc0 # assets ]; + sourceProvenance = with lib.sourceTypes; [ + fromSource + binaryNativeCode # unvanquished-binary-deps + ]; + maintainers = with lib.maintainers; [ afontain ]; + platforms = [ "x86_64-linux" ]; }; } diff --git a/pkgs/games/vassal/default.nix b/pkgs/games/vassal/default.nix index 905d51438b687..d94a24e528c26 100644 --- a/pkgs/games/vassal/default.nix +++ b/pkgs/games/vassal/default.nix @@ -33,6 +33,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "A free, open-source boardgame engine"; homepage = "https://vassalengine.org/"; + sourceProvenance = with sourceTypes; [ binaryBytecode ]; license = licenses.lgpl21Only; maintainers = with maintainers; [ tvestelind ]; platforms = platforms.unix; diff --git a/pkgs/games/vectoroids/default.nix b/pkgs/games/vectoroids/default.nix index 765f214658052..82c1571044399 100644 --- a/pkgs/games/vectoroids/default.nix +++ b/pkgs/games/vectoroids/default.nix @@ -1,14 +1,25 @@ -{lib, stdenv, fetchurl, SDL, SDL_image, SDL_mixer}: +{ lib +, stdenv +, fetchurl +, SDL +, SDL_image +, SDL_mixer +}: stdenv.mkDerivation rec { pname = "vectoroids"; version = "1.1.0"; + src = fetchurl { url = "ftp://ftp.tuxpaint.org/unix/x/vectoroids/src/vectoroids-${version}.tar.gz"; sha256 = "0bkvd4a1v496w0vlvqyi1a6p25ssgpkchxxxi8899sb72wlds54d"; }; - buildInputs = [ SDL SDL_image SDL_mixer]; + buildInputs = [ + SDL + SDL_image + SDL_mixer + ]; preConfigure = '' sed -i s,/usr/local,$out, Makefile diff --git a/pkgs/games/wargus/stratagus.nix b/pkgs/games/wargus/stratagus.nix index f029e284f3367..aa050442bfdb3 100644 --- a/pkgs/games/wargus/stratagus.nix +++ b/pkgs/games/wargus/stratagus.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { buildInputs = [ zlib bzip2 libpng lua5_1 toluapp - SDL.dev SDL_image SDL_mixer libGL + (lib.getDev SDL) SDL_image SDL_mixer libGL ]; cmakeFlags = [ "-DCMAKE_CXX_FLAGS=-Wno-error=format-overflow" diff --git a/pkgs/games/warsow/engine.nix b/pkgs/games/warsow/engine.nix index e796c589290a0..51974034b3f08 100644 --- a/pkgs/games/warsow/engine.nix +++ b/pkgs/games/warsow/engine.nix @@ -25,6 +25,11 @@ stdenv.mkDerivation rec { libpng ]; + # Workaround build failure on -fno-common toolchains: + # ld: CMakeFiles/wswtv_server.dir/__/unix/unix_time.c.o:(.bss+0x8): multiple definition of + # `c_pointcontents'; CMakeFiles/wswtv_server.dir/__/null/ascript_null.c.o:(.bss+0x8): first defined here + NIX_CFLAGS_COMPILE = "-fcommon"; + cmakeFlags = [ "-DQFUSION_GAME=Warsow" ]; preConfigure = '' diff --git a/pkgs/games/xboard/default.nix b/pkgs/games/xboard/default.nix index 663207bd23c42..eefbb90114ffa 100644 --- a/pkgs/games/xboard/default.nix +++ b/pkgs/games/xboard/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchurl +, fetchpatch , libX11 , xorgproto , libXt @@ -28,6 +29,16 @@ stdenv.mkDerivation rec { sha256 = "sha256-Ky5T6EKK2bbo3IpVs6UYM4GRGk2uLABy+pYpa7sZcNY="; }; + patches = [ + # Pull patch pending upstream inclusion for -fno-common toolchain support: + # https://savannah.gnu.org/patch/index.php?10211 + (fetchpatch { + name = "fno-common.patch"; + url = "https://savannah.gnu.org/patch/download.php?file_id=53275"; + sha256 = "sha256-ZOo9jAy1plFjhC5HXJQvXL+Zf7FL14asV3G4AwfgqTY="; + }) + ]; + buildInputs = [ libX11 xorgproto diff --git a/pkgs/games/xivlauncher/default.nix b/pkgs/games/xivlauncher/default.nix index f13654dcbbefd..1da8e48389566 100644 --- a/pkgs/games/xivlauncher/default.nix +++ b/pkgs/games/xivlauncher/default.nix @@ -21,9 +21,6 @@ in projectFile = "src/XIVLauncher.Core/XIVLauncher.Core.csproj"; nugetDeps = ./deps.nix; # File generated with `nuget-to-nix path/to/src > deps.nix` - dotnet-sdk = dotnetCorePackages.sdk_6_0; - dotnet-runtime = dotnetCorePackages.runtime_6_0; - dotnetFlags = [ "--runtime linux-x64" "-p:BuildHash=${rev}" diff --git a/pkgs/games/xivlauncher/deps.nix b/pkgs/games/xivlauncher/deps.nix index 24d4d2f43887e..76a0b696ad15f 100644 --- a/pkgs/games/xivlauncher/deps.nix +++ b/pkgs/games/xivlauncher/deps.nix @@ -13,13 +13,13 @@ (fetchNuGet { pname = "goaaats.Veldrid.StartupUtilities"; version = "4.9.0-beta1-g70f642e82e"; sha256 = "03r3x9h0fyb07d6d28ny6r5s688m50xc0lgc6zf2cy684kfnvmp5"; }) (fetchNuGet { pname = "ImGui.NET"; version = "1.87.2"; sha256 = "0rv0n18fvz1gbh45crhzn1f8xw8zkc8qyiyj91vajjcry8mq1x7q"; }) (fetchNuGet { pname = "KeySharp"; version = "1.0.5"; sha256 = "1ic10v0a174fw6w89iyg4yzji36bsj15573y676cj5n09n6s75d4"; }) - (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-x64"; version = "6.0.4"; sha256 = "1fvv5ri32pbl43628zqnim6fbv6hjxf66p0v793xdh57dzkdyh0j"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-x64"; version = "6.0.5"; sha256 = "0br5ms806jsgc2jghcjb6lm2h1ifq8wa3cgxp5ginrhzzj3p145i"; }) (fetchNuGet { pname = "Microsoft.CodeAnalysis.Analyzers"; version = "3.3.3"; sha256 = "09m4cpry8ivm9ga1abrxmvw16sslxhy2k5sl14zckhqb1j164im6"; }) (fetchNuGet { pname = "Microsoft.CodeAnalysis.BannedApiAnalyzers"; version = "3.3.3"; sha256 = "1z6x0d8lpcfjr3sxy25493i17vvcg5bsay6c03qan6mnj5aqzw2k"; }) (fetchNuGet { pname = "Microsoft.CodeAnalysis.Common"; version = "4.0.1"; sha256 = "0axjv1nhk1z9d4c51d9yxdp09l8yqqnqaifhqcwnxnv0r4y5cka9"; }) (fetchNuGet { pname = "Microsoft.CodeAnalysis.CSharp"; version = "4.0.1"; sha256 = "1h6jfifg7pw2vacpdds4v4jqnaydg9b108irf315wzx6rh8yv9cb"; }) (fetchNuGet { pname = "Microsoft.CodeAnalysis.NetAnalyzers"; version = "6.0.0"; sha256 = "06zy947m5lrbwb684g42ijb07r5jsqycvfnphc6cqfdrfnzqv6k9"; }) - (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-x64"; version = "6.0.4"; sha256 = "1gibwhplbanv6bz3l71w8vhzlgqsh21bms30dbf1n60v7p02fl3h"; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-x64"; version = "6.0.5"; sha256 = "0hzsvhk5hzk0iav7cc2i8dgyx02a5jks2g0jljychw18ck9s2ilg"; }) (fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "1.0.1"; sha256 = "01al6cfxp68dscl15z7rxfw9zvhm64dncsw09a1vmdkacsa2v6lr"; }) (fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "1.1.0"; sha256 = "08vh1r12g6ykjygq5d3vq09zylgb84l63k49jc4v8faw9g93iqqm"; }) (fetchNuGet { pname = "Microsoft.NETCore.Targets"; version = "1.0.1"; sha256 = "0ppdkwy6s9p7x9jix3v4402wb171cdiibq7js7i13nxpdky7074p"; }) diff --git a/pkgs/games/xmage/default.nix b/pkgs/games/xmage/default.nix index 7552ce700f32d..cc359f78822e7 100644 --- a/pkgs/games/xmage/default.nix +++ b/pkgs/games/xmage/default.nix @@ -32,6 +32,7 @@ EOS meta = with lib; { description = "Magic Another Game Engine"; + sourceProvenance = with sourceTypes; [ binaryBytecode ]; license = licenses.mit; maintainers = with maintainers; [ matthiasbeyer ]; homepage = "http://xmage.de/"; diff --git a/pkgs/games/xonotic/default.nix b/pkgs/games/xonotic/default.nix index 208608f0c15b4..ab9cc14dc9bdf 100644 --- a/pkgs/games/xonotic/default.nix +++ b/pkgs/games/xonotic/default.nix @@ -147,7 +147,7 @@ in rec { name = "xonotic-data"; url = "https://dl.xonotic.org/xonotic-${version}.zip"; sha256 = "15caj11v9hhr7w55w3rs1rspblzr9lg1crqivbn9pyyq0rif8cpl"; - extraPostFetch = '' + postFetch = '' cd $out rm -rf $(ls | grep -v "^data$" | grep -v "^key_0.d0pk$") ''; diff --git a/pkgs/games/zandronum/sqlite.nix b/pkgs/games/zandronum/sqlite.nix index e38dedbb7f73a..c7687f89589d7 100644 --- a/pkgs/games/zandronum/sqlite.nix +++ b/pkgs/games/zandronum/sqlite.nix @@ -1,4 +1,7 @@ -{ lib, stdenv, fetchurl }: +{ lib +, stdenv +, fetchurl +}: stdenv.mkDerivation { pname = "sqlite-zandronum"; @@ -6,7 +9,7 @@ stdenv.mkDerivation { src = fetchurl { url = "https://www.sqlite.org/2017/sqlite-autoconf-3180000.tar.gz"; - sha256 = "0p5cx7nbjxk7glcm277ypi5w4gv144qazw79ql47svlpccj62mrp"; + hash = "sha256-N1dhJGOXbn0IxenwrzAhYT/CS7z+HFEZfWd2uezprFw="; }; buildPhase = '' diff --git a/pkgs/games/zangband/default.nix b/pkgs/games/zangband/default.nix deleted file mode 100644 index 7548b082a13ba..0000000000000 --- a/pkgs/games/zangband/default.nix +++ /dev/null @@ -1,59 +0,0 @@ -{ lib, stdenv, fetchurl, ncurses, flex, bison, autoconf, automake, m4, coreutils }: - -stdenv.mkDerivation rec { - pname = "zangband"; - version = "2.7.4b"; - - src = fetchurl { - url = "mirror://sourceforge/project/${pname}/${pname}-src/${version}/${pname}-${version}.tar.gz"; - sha256 = "0kkz6f9myhjnr3308sdab8q186rd55lapvcp38w8qmakdbhc828j"; - }; - - nativeBuildInputs = [ autoconf automake ]; - buildInputs = [ - ncurses flex bison m4 - ]; - - preConfigure = '' - sed -re 's/ch(own|grp|mod)/true/' -i lib/*/makefile.zb makefile.in - sed -e '/FIXED_PATHS/d' -i src/z-config.h - autoconf - ''; - - preInstall = '' - mkdir -p $out/share/games/zangband - mkdir -p $out/share/man - mkdir -p $out/bin - ''; - - postInstall = '' - mv $out/bin/zangband $out/bin/.zangband.real - echo '#! ${stdenv.shell} - PATH="$PATH:${coreutils}/bin" - - ZANGBAND_PATH="$HOME/.zangband" - ORIG_PATH="'$out'"/share/games/zangband - mkdir -p "$ZANGBAND_PATH" - cd "$ZANGBAND_PATH" - for i in $(find "$ORIG_PATH" -type f); do - REL_PATH="''${i#$ORIG_PATH/}" - mkdir -p "$(dirname "$REL_PATH")" - ln -s "$i" "$REL_PATH" &>/dev/null - done - mkdir -p lib/user lib/save - for i in lib/*/*.raw; do - test -L "$i" && rm "$i"; - done - for i in $(find lib -type l); do if ! test -e $(readlink "$i"); then rm "$i"; fi; done; - export ANGBAND_PATH="$PWD" - "'$out'/bin/.zangband.real" "$@" - ' > $out/bin/zangband - chmod +x $out/bin/zangband - ''; - - meta = { - description = "Rogue-like game"; - license = lib.licenses.unfree; - broken = true; # broken in runtime, will not get pass character generation - }; -} diff --git a/pkgs/games/zaz/default.nix b/pkgs/games/zaz/default.nix index 1925d6417175a..81d42b1b29416 100644 --- a/pkgs/games/zaz/default.nix +++ b/pkgs/games/zaz/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { pkg-config ]; buildInputs = [ - SDL.dev + (lib.getDev SDL) SDL_image mesa libtheora @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { ]; # Fix SDL include problems - NIX_CFLAGS_COMPILE="-I${SDL.dev}/include/SDL -I${SDL_image}/include/SDL"; + NIX_CFLAGS_COMPILE="-I${lib.getDev SDL}/include/SDL -I${SDL_image}/include/SDL"; # Fix linking errors makeFlags = [ "ZAZ_LIBS+=-lSDL" @@ -48,6 +48,7 @@ stdenv.mkDerivation rec { ]; meta = with lib; { + broken = stdenv.isDarwin; description = "A puzzle game about arranging balls in triplets, like Luxor, Zuma, or Puzzle Bobble"; homepage = "http://zaz.sourceforge.net/"; license = licenses.gpl3; diff --git a/pkgs/games/zdoom/zdbsp.nix b/pkgs/games/zdoom/zdbsp.nix index e688b908e1268..d18eb144292fd 100644 --- a/pkgs/games/zdoom/zdbsp.nix +++ b/pkgs/games/zdoom/zdbsp.nix @@ -1,4 +1,9 @@ -{ lib, stdenv, fetchzip, cmake, zlib }: +{ lib +, stdenv +, fetchzip +, cmake +, zlib +}: stdenv.mkDerivation rec { pname = "zdbsp"; @@ -6,7 +11,7 @@ stdenv.mkDerivation rec { src = fetchzip { url = "https://zdoom.org/files/utils/zdbsp/zdbsp-${version}-src.zip"; - sha256 = "1j6k0appgjjj3ffbll9hy9nnbqr17szd1s66q08zrbkfqf6g8f0d"; + sha256 = "sha256-DTj0jMNurvwRwMbo0L4+IeNlbfIwUbqcG1LKd68C08g="; stripRoot = false; }; @@ -23,8 +28,8 @@ stdenv.mkDerivation rec { ''; meta = with lib; { - description = "ZDoom's internal node builder for DOOM maps"; homepage = "https://zdoom.org/wiki/ZDBSP"; + description = "ZDoom's internal node builder for DOOM maps"; license = licenses.gpl2Plus; maintainers = with maintainers; [ lassulus siraben ]; platforms = platforms.unix; diff --git a/pkgs/games/zoom/default.nix b/pkgs/games/zoom/default.nix index 02cfc28ebeef2..e281caee72a23 100644 --- a/pkgs/games/zoom/default.nix +++ b/pkgs/games/zoom/default.nix @@ -1,4 +1,11 @@ -{ lib, stdenv, fetchurl, perl, expat, xlibsWrapper, freetype }: +{ lib +, stdenv +, fetchurl +, perl +, expat +, xlibsWrapper +, freetype +}: # !!! assert freetype == xorg.freetype @@ -8,7 +15,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://www.logicalshift.co.uk/unix/zoom/zoom-${version}.tar.gz"; - sha256 = "1g6van7f7sg3zfcz80mncnnbccyg2hnm0hq4x558vpsm0lf7z5pj"; + hash = "sha256-8pZ/HAVV341K6QRDUC0UzzO2rGW2AvSZ++Pp445V27w="; }; buildInputs = [ perl expat xlibsWrapper freetype ]; @@ -16,6 +23,7 @@ stdenv.mkDerivation rec { NIX_CFLAGS_COMPILE = "-I${freetype}/include/freetype2 -fgnu89-inline"; meta = with lib; { + homepage = "https://www.logicalshift.co.uk/unix/zoom/"; description = "Player for Z-Code, TADS and HUGO stories or games"; longDescription = '' Zoom is a player for Z-Code, TADS and HUGO stories or games. These are |