diff options
Diffstat (limited to 'pkgs/games')
29 files changed, 583 insertions, 363 deletions
diff --git a/pkgs/games/BeatSaberModManager/add-runtime-identifier.patch b/pkgs/games/BeatSaberModManager/add-runtime-identifier.patch new file mode 100644 index 0000000000000..a7d17b59a35be --- /dev/null +++ b/pkgs/games/BeatSaberModManager/add-runtime-identifier.patch @@ -0,0 +1,12 @@ +--- a/BeatSaberModManager/BeatSaberModManager.csproj ++++ b/BeatSaberModManager/BeatSaberModManager.csproj +@@ -14,6 +14,7 @@ + <EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild> + <GenerateDocumentationFile>true</GenerateDocumentationFile> + <ApplicationIcon>Resources/Icons/Icon.ico</ApplicationIcon> ++ <RuntimeIdentifier>@runtimeIdentifier@</RuntimeIdentifier> + </PropertyGroup> + + <PropertyGroup Condition="'$(Configuration)'=='Debug'"> + +Diff finished. Tue Oct 18 23:16:23 2022 diff --git a/pkgs/games/BeatSaberModManager/default.nix b/pkgs/games/BeatSaberModManager/default.nix new file mode 100644 index 0000000000000..eec57d7cf0dd2 --- /dev/null +++ b/pkgs/games/BeatSaberModManager/default.nix @@ -0,0 +1,68 @@ +{ + lib, + dotnet-sdk, + targetPlatform, + substituteAll, + + buildDotnetModule, + fetchFromGitHub, + + libX11, + libICE, + libSM, + fontconfig, +}: + +buildDotnetModule rec { + pname = "BeatSaberModManager"; + version = "0.0.2"; + + src = fetchFromGitHub { + owner = "affederaffe"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-6+9pWr8jJzs430Ai2ddh/2DK3C2bQA1e1+BNDrKhyzY="; + fetchSubmodules = true; # It vendors BSIPA-Linux + }; + + # This _must_ be specified in the project file and it can only be one so + # obviously you wouldn't specify it as an upstream project. Typical M$. + # https://github.com/NixOS/nixpkgs/pull/196648#discussion_r998709996 + # https://github.com/affederaffe/BeatSaberModManager/issues/5 + patches = [ + (substituteAll { + src = ./add-runtime-identifier.patch; + runtimeIdentifier = dotnet-sdk.passthru.systemToDotnetRid targetPlatform.system; + }) + ]; + + nugetDeps = ./deps.nix; + + runtimeDeps = [ + libX11 + libICE + libSM + fontconfig + ]; + + meta = with lib; { + description = "Yet another mod installer for Beat Saber, heavily inspired by ModAssistant"; + homepage = "https://github.com/affederaffe/BeatSaberModManager"; + longDescription = '' + BeatSaberModManager is yet another mod installer for Beat Saber, heavily inspired by ModAssistant + It strives to look more visually appealing and support both Windows and Linux, while still being as feature-rich as ModAssistant. + + Features + + - Windows and Linux support + - Dependency resolution + - Installed mod detection + - Mod uninstallation + - Theming support + - OneClick⢠support for BeatSaver, ModelSaber and Playlists + ''; + license = licenses.mit; + maintainers = with maintainers; [ atemu ]; + platforms = with platforms; linux; + }; +} diff --git a/pkgs/games/BeatSaberModManager/deps.nix b/pkgs/games/BeatSaberModManager/deps.nix new file mode 100644 index 0000000000000..8a0f34b7cabe6 --- /dev/null +++ b/pkgs/games/BeatSaberModManager/deps.nix @@ -0,0 +1,73 @@ +# This file was automatically generated by passthru.fetch-deps. +# Please dont edit it manually, your changes might get overwritten! + +{ fetchNuGet }: [ + (fetchNuGet { pname = "Avalonia"; version = "0.10.16"; sha256 = "1197xyswinazahjd8mhfsrjszhcv4mdj48c56bmdlcsf6zbpravz"; }) + (fetchNuGet { pname = "Avalonia.Angle.Windows.Natives"; version = "2.1.0.2020091801"; sha256 = "04jm83cz7vkhhr6n2c9hya2k8i2462xbf6np4bidk55as0jdq43a"; }) + (fetchNuGet { pname = "Avalonia.Controls.DataGrid"; version = "0.10.16"; sha256 = "1xlg7r9r77fc9bcjw3rnnknncny7mcnkin6nwhg0sig4ab6givd2"; }) + (fetchNuGet { pname = "Avalonia.Desktop"; version = "0.10.16"; sha256 = "09fg9j411kq0012wvix1bxiybif3pm1if624mwg4ng7w2z97dfl3"; }) + (fetchNuGet { pname = "Avalonia.FreeDesktop"; version = "0.10.16"; sha256 = "1rxcbsbszgyb77gxp4zvg9k1cxw40vbm1z04dn5dqp4bfam9gnnh"; }) + (fetchNuGet { pname = "Avalonia.Markup.Xaml.Loader"; version = "0.10.16"; sha256 = "10p93y3zr8aq8malahdllknk28afr0p2n7fz1c7hbhbkdpfjz01a"; }) + (fetchNuGet { pname = "Avalonia.Native"; version = "0.10.16"; sha256 = "1m6cgql12rkzxxzvyxd1d0f5z2k4myby6d90li5p3nhblswx6jpk"; }) + (fetchNuGet { pname = "Avalonia.ReactiveUI"; version = "0.10.16"; sha256 = "1cp1i07v1pkbff2qm046r1g517lw14q3vrli6f2k0i6aw7naay80"; }) + (fetchNuGet { pname = "Avalonia.Remote.Protocol"; version = "0.10.16"; sha256 = "00iv96n2q2qg34zgqzcaja39396fbk8fj373d7zld46c64kf8g4h"; }) + (fetchNuGet { pname = "Avalonia.Skia"; version = "0.10.16"; sha256 = "1rla042nc9mc36qnpipszrf0sffwi5d83cr9dmihpa015bby42pz"; }) + (fetchNuGet { pname = "Avalonia.Win32"; version = "0.10.16"; sha256 = "171jv4hdi2r0wgmrjv8ajnjmwrf9j2d0g4ffyhhmmjnaclckgzgv"; }) + (fetchNuGet { pname = "Avalonia.X11"; version = "0.10.16"; sha256 = "0yr8vkn59phlgcjkhzyygn2i3ghzhvd64sy84qyxxxyfm376cyxr"; }) + (fetchNuGet { pname = "DryIoc.dll"; version = "5.1.0"; sha256 = "0vim3xmaajnvhwz01028lizjl2j0y2r2cbiwz0ga7n903pncrahw"; }) + (fetchNuGet { pname = "DynamicData"; version = "7.9.4"; sha256 = "0mfmlsdd48dpwiphqhq8gsix2528mc6anp7rakd6vyzmig60f520"; }) + (fetchNuGet { pname = "HarfBuzzSharp"; version = "2.8.2-preview.178"; sha256 = "1p5nwzl7jpypsd6df7hgcf47r977anjlyv21wacmalsj6lvdgnvn"; }) + (fetchNuGet { pname = "HarfBuzzSharp.NativeAssets.Linux"; version = "2.8.2-preview.178"; sha256 = "1402ylkxbgcnagcarqlfvg4gppy2pqs3bmin4n5mphva1g7bqb2p"; }) + (fetchNuGet { pname = "HarfBuzzSharp.NativeAssets.macOS"; version = "2.8.2-preview.178"; sha256 = "0p8miaclnbfpacc1jaqxwfg0yfx9byagi4j4k91d9621vd19i8b2"; }) + (fetchNuGet { pname = "HarfBuzzSharp.NativeAssets.WebAssembly"; version = "2.8.2-preview.178"; sha256 = "1n9jay9sji04xly6n8bzz4591fgy8i65p21a8mv5ip9lsyj1c320"; }) + (fetchNuGet { pname = "HarfBuzzSharp.NativeAssets.Win32"; version = "2.8.2-preview.178"; sha256 = "1r5syii96wv8q558cvsqw3lr10cdw6677lyiy82p6i3if51v3mr7"; }) + (fetchNuGet { pname = "JetBrains.Annotations"; version = "10.3.0"; sha256 = "1grdx28ga9fp4hwwpwv354rizm8anfq4lp045q4ss41gvhggr3z8"; }) + (fetchNuGet { pname = "Microsoft.CSharp"; version = "4.5.0"; sha256 = "01i28nvzccxbqmiz217fxs6hnjwmd5fafs37rd49a6qp53y6623l"; }) + (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"; }) + (fetchNuGet { pname = "Microsoft.NETCore.Targets"; version = "1.0.1"; sha256 = "0ppdkwy6s9p7x9jix3v4402wb171cdiibq7js7i13nxpdky7074p"; }) + (fetchNuGet { pname = "Microsoft.NETCore.Targets"; version = "1.1.0"; sha256 = "193xwf33fbm0ni3idxzbr5fdq3i2dlfgihsac9jj7whj0gd902nh"; }) + (fetchNuGet { pname = "Microsoft.Win32.SystemEvents"; version = "4.5.0"; sha256 = "0fnkv3ky12227zqg4zshx4kw2mvysq2ppxjibfw02cc3iprv4njq"; }) + (fetchNuGet { pname = "ReactiveUI"; version = "18.2.9"; sha256 = "156747759npb2dgsnd2y1bq2vnmmssizsz78kf80mr8pd60wlbj4"; }) + (fetchNuGet { pname = "runtime.any.System.IO"; version = "4.1.0"; sha256 = "0kasfkjiml2kk8prnyn1990nhsahnjggvqwszqjdsfwfl43vpcb5"; }) + (fetchNuGet { pname = "runtime.any.System.Reflection"; version = "4.1.0"; sha256 = "06kcs059d5czyakx75rvlwa2mr86156w18fs7chd03f7084l7mq6"; }) + (fetchNuGet { pname = "runtime.any.System.Reflection.Primitives"; version = "4.0.1"; sha256 = "1zxrpvixr5fqzkxpnin6g6gjq6xajy1snghz99ds2dwbhm276rhz"; }) + (fetchNuGet { pname = "runtime.any.System.Runtime"; version = "4.1.0"; sha256 = "0mjr2bi7wvnkphfjqgkyf8vfyvy15a829jz6mivl6jmksh2bx40m"; }) + (fetchNuGet { pname = "runtime.any.System.Text.Encoding"; version = "4.0.11"; sha256 = "0m4vgmzi1ky8xlj0r7xcyazxln3j9dlialnk6d2gmgrfnzf8f9m7"; }) + (fetchNuGet { pname = "runtime.any.System.Threading.Tasks"; version = "4.0.11"; sha256 = "1qzdp09qs8br5qxzlm1lgbjn4n57fk8vr1lzrmli2ysdg6x1xzvk"; }) + (fetchNuGet { pname = "runtime.native.System"; version = "4.0.0"; sha256 = "1ppk69xk59ggacj9n7g6fyxvzmk1g5p4fkijm0d7xqfkig98qrkf"; }) + (fetchNuGet { pname = "runtime.unix.System.Private.Uri"; version = "4.0.1"; sha256 = "0ic5dgc45jkhcr1g9xmmzjm7ffiw4cymm0fprczlx4fnww4783nm"; }) + (fetchNuGet { pname = "Serilog"; version = "2.10.0"; sha256 = "08bih205i632ywryn3zxkhb15dwgyaxbhmm1z3b5nmby9fb25k7v"; }) + (fetchNuGet { pname = "Serilog.Sinks.File"; version = "5.0.0"; sha256 = "097rngmgcrdfy7jy8j7dq3xaq2qky8ijwg0ws6bfv5lx0f3vvb0q"; }) + (fetchNuGet { pname = "SkiaSharp"; version = "2.88.1-preview.1"; sha256 = "1i1px67hcr9kygmbfq4b9nqzlwm7v2gapsp4isg9i19ax5g8dlhm"; }) + (fetchNuGet { pname = "SkiaSharp.NativeAssets.Linux"; version = "2.88.1-preview.1"; sha256 = "1r9qr3civk0ws1z7hg322qyr8yjm10853zfgs03szr2lvdqiy7d1"; }) + (fetchNuGet { pname = "SkiaSharp.NativeAssets.macOS"; version = "2.88.1-preview.1"; sha256 = "1w55nrwpl42psn6klia5a9aw2j1n25hpw2fdhchypm9f0v2iz24h"; }) + (fetchNuGet { pname = "SkiaSharp.NativeAssets.WebAssembly"; version = "2.88.1-preview.1"; sha256 = "0mwj2yl4gn40lry03yqkj7sbi1drmm672dv88481sgah4c21lzrq"; }) + (fetchNuGet { pname = "SkiaSharp.NativeAssets.Win32"; version = "2.88.1-preview.1"; sha256 = "1k50abd147pif9z9lkckbbk91ga1vv6k4skjz2n7wpll6fn0fvlv"; }) + (fetchNuGet { pname = "Splat"; version = "14.3.4"; sha256 = "1j5riry4hc6gmw6zkwqq4fsw4rcddnb8kwyhnb321qp60z8v8pv4"; }) + (fetchNuGet { pname = "System.ComponentModel.Annotations"; version = "4.5.0"; sha256 = "1jj6f6g87k0iwsgmg3xmnn67a14mq88np0l1ys5zkxhkvbc8976p"; }) + (fetchNuGet { pname = "System.Drawing.Common"; version = "4.5.0"; sha256 = "0knqa0zsm91nfr34br8gx5kjqq4v81zdhqkacvs2hzc8nqk0ddhc"; }) + (fetchNuGet { pname = "System.IO"; version = "4.3.0"; sha256 = "05l9qdrzhm4s5dixmx68kxwif4l99ll5gqmh7rqgw554fx0agv5f"; }) + (fetchNuGet { pname = "System.Memory"; version = "4.5.3"; sha256 = "0naqahm3wljxb5a911d37mwjqjdxv9l0b49p5dmfyijvni2ppy8a"; }) + (fetchNuGet { pname = "System.Numerics.Vectors"; version = "4.5.0"; sha256 = "1kzrj37yzawf1b19jq0253rcs8hsq1l2q8g69d7ipnhzb0h97m59"; }) + (fetchNuGet { pname = "System.Private.Uri"; version = "4.0.1"; sha256 = "0k57qhawjysm4cpbfpc49kl4av7lji310kjcamkl23bwgij5ld9j"; }) + (fetchNuGet { pname = "System.Reactive"; version = "5.0.0"; sha256 = "1lafmpnadhiwxyd543kraxa3jfdpm6ipblxrjlibym9b1ykpr5ik"; }) + (fetchNuGet { pname = "System.Reflection"; version = "4.3.0"; sha256 = "0xl55k0mw8cd8ra6dxzh974nxif58s3k1rjv1vbd7gjbjr39j11m"; }) + (fetchNuGet { pname = "System.Reflection.Emit"; version = "4.3.0"; sha256 = "11f8y3qfysfcrscjpjym9msk7lsfxkk4fmz9qq95kn3jd0769f74"; }) + (fetchNuGet { pname = "System.Reflection.Emit"; version = "4.7.0"; sha256 = "121l1z2ypwg02yz84dy6gr82phpys0njk7yask3sihgy214w43qp"; }) + (fetchNuGet { pname = "System.Reflection.Emit.ILGeneration"; version = "4.3.0"; sha256 = "0w1n67glpv8241vnpz1kl14sy7zlnw414aqwj4hcx5nd86f6994q"; }) + (fetchNuGet { pname = "System.Reflection.Primitives"; version = "4.3.0"; sha256 = "04xqa33bld78yv5r93a8n76shvc8wwcdgr1qvvjh959g3rc31276"; }) + (fetchNuGet { pname = "System.Runtime"; version = "4.1.0"; sha256 = "02hdkgk13rvsd6r9yafbwzss8kr55wnj8d5c7xjnp8gqrwc8sn0m"; }) + (fetchNuGet { pname = "System.Runtime"; version = "4.3.0"; sha256 = "066ixvgbf2c929kgknshcxqj6539ax7b9m570cp8n179cpfkapz7"; }) + (fetchNuGet { pname = "System.Runtime.CompilerServices.Unsafe"; version = "4.6.0"; sha256 = "0xmzi2gpbmgyfr75p24rqqsba3cmrqgmcv45lsqp5amgrdwd0f0m"; }) + (fetchNuGet { pname = "System.Security.Principal.Windows"; version = "4.7.0"; sha256 = "1a56ls5a9sr3ya0nr086sdpa9qv0abv31dd6fp27maqa9zclqq5d"; }) + (fetchNuGet { pname = "System.Text.Encoding"; version = "4.3.0"; sha256 = "1f04lkir4iladpp51sdgmis9dj4y8v08cka0mbmsy0frc9a4gjqr"; }) + (fetchNuGet { pname = "System.Threading.Tasks"; version = "4.3.0"; sha256 = "134z3v9abw3a6jsw17xl3f6hqjpak5l682k2vz39spj4kmydg6k7"; }) + (fetchNuGet { pname = "System.Threading.Tasks.Extensions"; version = "4.5.4"; sha256 = "0y6ncasgfcgnjrhynaf0lwpkpkmv4a07sswwkwbwb5h7riisj153"; }) + (fetchNuGet { pname = "System.ValueTuple"; version = "4.5.0"; sha256 = "00k8ja51d0f9wrq4vv5z2jhq8hy31kac2rg0rv06prylcybzl8cy"; }) + (fetchNuGet { pname = "ThisAssembly.AssemblyInfo"; version = "1.0.9"; sha256 = "0rvav885cq7ia5kzwp7d37c2azsg47988z2fn6ksi1q6y294crxm"; }) + (fetchNuGet { pname = "ThisAssembly.Prerequisites"; version = "1.0.9"; sha256 = "1igi76li4c1iif71141jhn7x5w0ng1vmqj5ijjhdxz289n6wjf2g"; }) + (fetchNuGet { pname = "Tmds.DBus"; version = "0.9.0"; sha256 = "0vvx6sg8lxm23g5jvm5wh2gfs95mv85vd52lkq7d1b89bdczczf3"; }) + (fetchNuGet { pname = "XamlNameReferenceGenerator"; version = "1.3.4"; sha256 = "0w1bz5sr6y5fhgx1f54xyl8rx7y3kyf1fhacnd6akq8970zjdkdi"; }) +] diff --git a/pkgs/games/asc/default.nix b/pkgs/games/asc/default.nix index f351040ff883d..94a16f60140d3 100644 --- a/pkgs/games/asc/default.nix +++ b/pkgs/games/asc/default.nix @@ -1,27 +1,69 @@ -{ fetchurl, lib, stdenv, SDL, SDL_image, SDL_mixer, SDL_sound, libsigcxx, physfs -, boost, expat, freetype, libjpeg, wxGTK32, lua, perl, pkg-config, zlib, zip, bzip2 -, libpng, libtiff, fluidsynth, libmikmod, libvorbis, flac, libogg }: +{ fetchFromGitHub +, lib +, stdenv +, SDL +, SDL_image +, SDL_mixer +, SDL_sound +, libsigcxx +, physfs +, boost +, expat +, freetype +, libjpeg +, wxGTK32 +, lua +, perl +, pkg-config +, zlib +, zip +, bzip2 +, libpng +, libtiff +, fluidsynth +, libmikmod +, libvorbis +, flac +, libogg +}: stdenv.mkDerivation rec { pname = "asc"; - version = "2.6.0.0"; + version = "2.6.3.0"; - src = fetchurl { - url = "mirror://sourceforge/asc-hq/asc-${version}.tar.bz2"; - sha256 = "1fybasb6srqfg6pqbvh0s0vvzjq9r0n6aq0z44hs7n68kmaam775"; + src = fetchFromGitHub { + owner = "ValHaris"; + repo = "asc-hq"; + rev = "fa3bca082a5cea2b35812349f99b877f0113aef0"; + sha256 = "atamYCN2mOqxV6auToTeWdpKuFfC+GLfLdRsfT0ouwQ="; }; - configureFlags = [ "--disable-paragui" "--disable-paraguitest" ]; - - NIX_CFLAGS_COMPILE = "-fpermissive -Wno-error=narrowing -std=c++11"; # I'm too lazy to catch all gcc47-related problems - hardeningDisable = [ "format" ]; - nativeBuildInputs = [ pkg-config ]; buildInputs = [ - SDL SDL_image SDL_mixer SDL_sound libsigcxx physfs boost expat - freetype libjpeg wxGTK32 lua perl zlib zip bzip2 libpng - libtiff fluidsynth libmikmod flac libvorbis libogg + SDL + SDL_image + SDL_mixer + SDL_sound + physfs + boost + expat + freetype + libjpeg + wxGTK32 + lua + perl + zlib + zip + bzip2 + libpng + libtiff + fluidsynth + libmikmod + flac + libvorbis + libogg + libsigcxx ]; meta = with lib; { diff --git a/pkgs/games/blobby/blobby.sh b/pkgs/games/blobby/blobby.sh index 4c4b32b124331..3171c5a80b1bb 100644 --- a/pkgs/games/blobby/blobby.sh +++ b/pkgs/games/blobby/blobby.sh @@ -7,4 +7,4 @@ test -d ~/.blobby || { ( cd ~/.blobby; for i in *.zip; do @unzip@/bin/unzip "$i"; done ) } -@out@/bin/blobby.bin +exec @out@/bin/blobby.bin "$@" diff --git a/pkgs/games/blobby/default.nix b/pkgs/games/blobby/default.nix index 9dad0b84d1e33..68e18dfe26dd0 100644 --- a/pkgs/games/blobby/default.nix +++ b/pkgs/games/blobby/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, SDL2, SDL2_image, libGLU, libGL, cmake, physfs, boost, zip, zlib, pkg-config }: +{ lib, stdenv, fetchurl, SDL2, SDL2_image, libGLU, libGL, cmake, physfs, boost, zip, zlib, unzip, pkg-config }: stdenv.mkDerivation rec { pname = "blobby-volley"; @@ -16,6 +16,8 @@ stdenv.mkDerivation rec { sed -e '1i#include <iostream>' -i src/NetworkMessage.cpp ''; + inherit unzip; + postInstall = '' cp ../data/Icon.bmp "$out/share/blobby/" mv "$out/bin"/blobby{,.bin} @@ -28,7 +30,8 @@ stdenv.mkDerivation rec { license = licenses.bsd3; platforms = platforms.linux; maintainers = with maintainers; [ raskin ]; - homepage = "http://blobby.sourceforge.net/"; + homepage = "https://blobbyvolley.de/"; downloadPage = "https://sourceforge.net/projects/blobby/files/Blobby%20Volley%202%20%28Linux%29/"; + mainProgram = "blobby"; }; } diff --git a/pkgs/games/bzflag/default.nix b/pkgs/games/bzflag/default.nix index db144a147f6d9..7f43e8949b70d 100644 --- a/pkgs/games/bzflag/default.nix +++ b/pkgs/games/bzflag/default.nix @@ -4,11 +4,11 @@ stdenv.mkDerivation rec { pname = "bzflag"; - version = "2.4.24"; + version = "2.4.26"; src = fetchurl { url = "https://download.bzflag.org/${pname}/source/${version}/${pname}-${version}.tar.bz2"; - sha256 = "sha256-X4Exvrf8i6UeMjoG7NfY6rkVN8NCzoehE+XrbqmM48Q="; + sha256 = "sha256-AYMEBf8mrR3FlafgaVyCTCeG5niGjZ/4Iq6xSsdIEBQ="; }; nativeBuildInputs = [ pkg-config ]; diff --git a/pkgs/games/dwarf-fortress/default.nix b/pkgs/games/dwarf-fortress/default.nix index 382537282748f..dd8e6b5503da8 100644 --- a/pkgs/games/dwarf-fortress/default.nix +++ b/pkgs/games/dwarf-fortress/default.nix @@ -69,7 +69,7 @@ let dfhack = callPackage ./dfhack { inherit (perlPackages) XMLLibXML XMLLibXSLT; - inherit dfVersion twbt; + inherit dfVersion; stdenv = gccStdenv; }; diff --git a/pkgs/games/dwarf-fortress/dfhack/default.nix b/pkgs/games/dwarf-fortress/dfhack/default.nix index 49e8fabd45e42..914ccbb6ab334 100644 --- a/pkgs/games/dwarf-fortress/dfhack/default.nix +++ b/pkgs/games/dwarf-fortress/dfhack/default.nix @@ -2,6 +2,7 @@ , buildEnv , lib , fetchFromGitHub +, fetchpatch , cmake , writeScriptBin , perl @@ -13,8 +14,6 @@ , allegro5 , libGLU , libGL -, enableTWBT ? true -, twbt , SDL , dfVersion }: @@ -23,24 +22,6 @@ with lib; let dfhack-releases = { - "0.43.05" = { - dfHackRelease = "0.43.05-r3.1"; - sha256 = "1ds366i0qcfbn62w9qv98lsqcrm38npzgvcr35hf6ihqa6nc6xrl"; - xmlRev = "860a9041a75305609643d465123a4b598140dd7f"; - prerelease = false; - }; - "0.44.05" = { - dfHackRelease = "0.44.05-r2"; - sha256 = "1cwifdhi48a976xc472nf6q2k0ibwqffil5a4llcymcxdbgxdcc9"; - xmlRev = "2794f8a6d7405d4858bac486a0bb17b94740c142"; - prerelease = false; - }; - "0.44.09" = { - dfHackRelease = "0.44.09-r1"; - sha256 = "1nkfaa43pisbyik5inj5q2hja2vza5lwidg5z02jyh136jm64hwk"; - xmlRev = "3c0bf63674d5430deadaf7befaec42f0ec1e8bc5"; - prerelease = false; - }; "0.44.10" = { dfHackRelease = "0.44.10-r2"; sha256 = "19bxsghxzw3bilhr8sm4axz7p7z8lrvbdsd1vdjf5zbg04rs866i"; @@ -66,22 +47,24 @@ let prerelease = true; }; "0.47.04" = { - dfHackRelease = "0.47.04-r2"; - sha256 = "18ppn1dqaxi6ahjzsvb9kw70rvca106a1hibhzc4rxmraypnqb89"; - xmlRev = "036b662a1bbc96b4911f3cbe74dfa1243b6459bc"; + dfHackRelease = "0.47.04-r5"; + sha256 = "sha256-0s+/LKbqsS/mrxKPDeniqykE5+Gy3ZzCa8yEDzMyssY="; + xmlRev = "be0444cc165a1abff053d5893dc1f780f06526b7"; prerelease = false; }; "0.47.05" = { - dfHackRelease = "0.47.05-r1"; - sha256 = "sha256-B0iv7fpIcnaO8sx9wPqI7/WuyLK15p8UYlYIcF5F5bw="; - xmlRev = "11c379ffd31255f2a1415d98106114a46245e1c3"; + dfHackRelease = "0.47.05-r7"; + sha256 = "sha256-vBKUTSjfCnalkBzfjaIKcxUuqsGGOTtoJC1RHJIDlNc="; + xmlRev = "f5019a5c6f19ef05a28bd974c3e8668b78e6e2a4"; prerelease = false; }; }; release = - if hasAttr dfVersion dfhack-releases + if lib.isAttrs dfVersion + then dfVersion + else if hasAttr dfVersion dfhack-releases then getAttr dfVersion dfhack-releases else throw "[DFHack] Unsupported Dwarf Fortress version: ${dfVersion}"; @@ -115,9 +98,9 @@ let exit 1 fi ''; - - dfhack = stdenv.mkDerivation { - pname = "dfhack-base"; +in + stdenv.mkDerivation { + pname = "dfhack"; inherit version; # Beware of submodules @@ -129,10 +112,20 @@ let fetchSubmodules = true; }; - patches = [ ./fix-stonesense.patch ]; + patches = lib.optional (lib.versionOlder version "0.44.12-r3") (fetchpatch { + name = "fix-stonesense.patch"; + url = "https://github.com/DFHack/stonesense/commit/f5be6fe5fb192f01ae4551ed9217e97fd7f6a0ae.patch"; + extraPrefix = "plugins/stonesense/"; + stripLen = 1; + hash = "sha256-wje6Mkct29eyMOcJnbdefwBOLJko/s4JcJe52ojuW+8="; + }) ++ lib.optional (lib.versionOlder version "0.47.04-r1") (fetchpatch { + name = "fix-protobuf.patch"; + url = "https://github.com/DFHack/dfhack/commit/7bdf958518d2892ee89a7173224a069c4a2190d8.patch"; + hash = "sha256-p+mKhmYbnhWKNiGPMjbYO505Gcg634n0nudqH0NX3KY="; + }); # gcc 11 fix - NIX_CFLAGS_COMPILE = "-fpermissive"; + CXXFLAGS = lib.optionalString (lib.versionOlder version "0.47.05-r3") "-fpermissive"; # As of # https://github.com/DFHack/dfhack/commit/56e43a0dde023c5a4595a22b29d800153b31e3c4, @@ -166,21 +159,13 @@ let ln -s ${ruby}/lib/libruby-*.so $out/hack/libruby.so ''; - }; -in - -buildEnv { - name = "dfhack-${version}"; - - passthru = { inherit version dfVersion; }; + passthru = { inherit dfVersion; }; - paths = [ dfhack ] ++ lib.optionals enableTWBT [ twbt.lib ]; - - meta = with lib; { - description = "Memory hacking library for Dwarf Fortress and a set of tools that use it"; - homepage = "https://github.com/DFHack/dfhack/"; - license = licenses.zlib; - platforms = [ "x86_64-linux" "i686-linux" ]; - maintainers = with maintainers; [ robbinch a1russell abbradar numinit ]; - }; -} + meta = with lib; { + description = "Memory hacking library for Dwarf Fortress and a set of tools that use it"; + homepage = "https://github.com/DFHack/dfhack/"; + license = licenses.zlib; + platforms = [ "x86_64-linux" "i686-linux" ]; + maintainers = with maintainers; [ robbinch a1russell abbradar numinit ncfavier ]; + }; + } diff --git a/pkgs/games/dwarf-fortress/dfhack/fix-stonesense.patch b/pkgs/games/dwarf-fortress/dfhack/fix-stonesense.patch deleted file mode 100644 index da860cd556247..0000000000000 --- a/pkgs/games/dwarf-fortress/dfhack/fix-stonesense.patch +++ /dev/null @@ -1,23 +0,0 @@ -From f5be6fe5fb192f01ae4551ed9217e97fd7f6a0ae Mon Sep 17 00:00:00 2001 -From: Herwig Hochleitner <hhochleitner@gmail.com> -Date: Sun, 1 Oct 2017 18:01:43 +0200 -Subject: [PATCH] include <GL/glext.h> - -this fixes `GLhandleARB` not being defined ---- - plugins/stonesense/common.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/plugins/stonesense/common.h b/plugins/stonesense/common.h -index eb36691..ef45389 100644 ---- a/plugins/stonesense/common.h -+++ b/plugins/stonesense/common.h -@@ -31,6 +31,8 @@ using namespace df::enums; - #include <allegro5/allegro_opengl.h> - #include <allegro5/utf8.h> - -+#include <GL/glext.h> -+ - // allegro leaks X headers, undef some of it here: - #undef TileShape - #undef None \ No newline at end of file diff --git a/pkgs/games/dwarf-fortress/game.nix b/pkgs/games/dwarf-fortress/game.nix index 42f2c6ed127bd..7ce837b7b0b55 100644 --- a/pkgs/games/dwarf-fortress/game.nix +++ b/pkgs/games/dwarf-fortress/game.nix @@ -104,6 +104,6 @@ stdenv.mkDerivation { homepage = "https://www.bay12games.com/dwarves/"; license = licenses.unfreeRedistributable; platforms = attrNames platforms; - maintainers = with maintainers; [ a1russell robbinch roconnor abbradar numinit shazow ]; + maintainers = with maintainers; [ a1russell robbinch roconnor abbradar numinit shazow ncfavier ]; }; } diff --git a/pkgs/games/dwarf-fortress/lazy-pack.nix b/pkgs/games/dwarf-fortress/lazy-pack.nix index b34dbd3c74b8a..17037dbdb278c 100644 --- a/pkgs/games/dwarf-fortress/lazy-pack.nix +++ b/pkgs/games/dwarf-fortress/lazy-pack.nix @@ -19,7 +19,7 @@ , theme ? themes.phoebus # General config options: , enableIntro ? true -, enableTruetype ? true +, enableTruetype ? null # defaults to 24, see init.txt , enableFPS ? false , enableTextMode ? false , enableSound ? true diff --git a/pkgs/games/dwarf-fortress/twbt/default.nix b/pkgs/games/dwarf-fortress/twbt/default.nix index 7d2816d97a4a0..311a36da2bf1d 100644 --- a/pkgs/games/dwarf-fortress/twbt/default.nix +++ b/pkgs/games/dwarf-fortress/twbt/default.nix @@ -9,21 +9,6 @@ with lib; let twbt-releases = { - "0.43.05" = { - twbtRelease = "6.22"; - sha256 = "0di5d38f6jj9smsz0wjcs1zav4zba6hrk8cbn59kwpb1wamsh5c7"; - prerelease = false; - }; - "0.44.05" = { - twbtRelease = "6.35"; - sha256 = "0qjkgl7dsqzsd7pdq8a5bihhi1wplfkv1id7sj6dp3swjpsfxp8g"; - prerelease = false; - }; - "0.44.09" = { - twbtRelease = "6.41"; - sha256 = "0nsq15z05pbhqjvw2xqs1a9b1n2ma0aalhc3vh3mi4cd4k7lxh44"; - prerelease = false; - }; "0.44.10" = { twbtRelease = "6.49"; sha256 = "1qjkc7k33qhxj2g18njzasccjqsis5y8zrw5vl90h4rs3i8ld9xz"; @@ -46,14 +31,14 @@ let }; "0.47.04" = { twbtRelease = "6.xx"; - dfhackRelease = "0.47.04-r2"; - sha256 = "092dgp8fh1j4nqr9wbzn89ib1nhscclr8m91lfxsvg0mgn7j8xlv"; + dfhackRelease = "0.47.04-r5"; + sha256 = "sha256-+C3g4KJShCb2VXGQ4mtkDOufXZQ1P+ebDTmUzL3tNyU="; prerelease = true; }; "0.47.05" = { twbtRelease = "6.xx"; - dfhackRelease = "0.47.05-r1"; - sha256 = "1nqhaf7271bm9rq9dmilhhk9q7v3841d0rv4y3fid40vfi4gpi3p"; + dfhackRelease = "0.47.05-r7"; + sha256 = "sha256-4xMKuSP5J6pMK+hwjTAcTI0gsLJfw+Xt+vh9CopR4tk="; prerelease = true; }; }; diff --git a/pkgs/games/dwarf-fortress/wrapper/default.nix b/pkgs/games/dwarf-fortress/wrapper/default.nix index 0c1fbc6ca4de2..89f980f8d5bc2 100644 --- a/pkgs/games/dwarf-fortress/wrapper/default.nix +++ b/pkgs/games/dwarf-fortress/wrapper/default.nix @@ -4,6 +4,7 @@ , substituteAll , runCommand , coreutils +, gawk , dwarf-fortress , dwarf-therapist , enableDFHack ? false @@ -16,18 +17,22 @@ , twbt , themes ? { } , theme ? null +, extraPackages ? [ ] # General config options: , enableIntro ? true -, enableTruetype ? true +, enableTruetype ? null # defaults to 24, see init.txt , enableFPS ? false , enableTextMode ? false , enableSound ? true +# An attribute set of settings to override in data/init/*.txt. +# For example, `init.FOO = true;` is translated to `[FOO:YES]` in init.txt +, settings ? { } +# TODO world-gen.txt, interface.txt require special logic }: let dfhack_ = dfhack.override { inherit enableStoneSense; - inherit enableTWBT; }; ptheme = @@ -35,27 +40,65 @@ let then builtins.getAttr theme themes else theme; - unBool = b: if b then "YES" else "NO"; + baseEnv = buildEnv { + name = "dwarf-fortress-base-env-${dwarf-fortress.dfVersion}"; - # These are in inverse order for first packages to override the next ones. - themePkg = lib.optional (theme != null) ptheme; - pkgs = lib.optional enableDFHack dfhack_ - ++ lib.optional enableSoundSense soundSense - ++ lib.optional enableTWBT twbt.art - ++ [ dwarf-fortress ]; + # These are in inverse order for first packages to override the next ones. + paths = extraPackages + ++ lib.optional (theme != null) ptheme + ++ lib.optional enableDFHack dfhack_ + ++ lib.optional enableSoundSense soundSense + ++ lib.optionals enableTWBT [ twbt.lib twbt.art ] + ++ [ dwarf-fortress ]; - fixup = lib.singleton (runCommand "fixup" { } ('' + ignoreCollisions = true; + }; + + settings_ = lib.recursiveUpdate { + init = { + PRINT_MODE = if enableTextMode then "TEXT" else if enableTWBT then "TWBT" else null; + INTRO = enableIntro; + TRUETYPE = enableTruetype; + FPS = enableFPS; + SOUND = enableSound; + }; + } settings; + + forEach = attrs: f: lib.concatStrings (lib.mapAttrsToList f attrs); + + toTxt = v: + if lib.isBool v then if v then "YES" else "NO" + else if lib.isInt v then toString v + else if lib.isString v then v + else throw "dwarf-fortress: unsupported configuration value ${toString v}"; + + config = runCommand "dwarf-fortress-config" { + nativeBuildInputs = [ gawk ]; + } ('' mkdir -p $out/data/init - '' + (if (theme != null) then '' - cp ${lib.head themePkg}/data/init/init.txt $out/data/init/init.txt - '' else '' - cp ${dwarf-fortress}/data/init/init.txt $out/data/init/init.txt - '') + lib.optionalString enableDFHack '' + + edit_setting() { + v=''${v//'&'/'\&'} + if ! gawk -i inplace -v RS='\r?\n' ' + { n += sub("\\[" ENVIRON["k"] ":[^]]*\\]", "[" ENVIRON["k"] ":" ENVIRON["v"] "]"); print } + END { exit(!n) } + ' "$out/$file"; then + echo "error: no setting named '$k' in $file" >&2 + exit 1 + fi + } + '' + forEach settings_ (file: kv: '' + file=data/init/${lib.escapeShellArg file}.txt + cp ${baseEnv}/"$file" "$out/$file" + '' + forEach kv (k: v: lib.optionalString (v != null) '' + export k=${lib.escapeShellArg k} v=${lib.escapeShellArg (toTxt v)} + edit_setting + '')) + lib.optionalString enableDFHack '' mkdir -p $out/hack # Patch the MD5 - orig_md5=$(cat "${dwarf-fortress}/hash.md5.orig") - patched_md5=$(cat "${dwarf-fortress}/hash.md5") + orig_md5=$(< "${dwarf-fortress}/hash.md5.orig") + patched_md5=$(< "${dwarf-fortress}/hash.md5") input_file="${dfhack_}/hack/symbols.xml" output_file="$out/hack/symbols.xml" @@ -66,31 +109,21 @@ let echo " Replace: $patched_md5" substitute "$input_file" "$output_file" --replace "$orig_md5" "$patched_md5" - '' + lib.optionalString enableTWBT '' - substituteInPlace $out/data/init/init.txt \ - --replace '[PRINT_MODE:2D]' '[PRINT_MODE:TWBT]' - '' + - lib.optionalString enableTextMode '' - substituteInPlace $out/data/init/init.txt \ - --replace '[PRINT_MODE:2D]' '[PRINT_MODE:TEXT]' - '' + '' - substituteInPlace $out/data/init/init.txt \ - --replace '[INTRO:YES]' '[INTRO:${unBool enableIntro}]' \ - --replace '[TRUETYPE:YES]' '[TRUETYPE:${unBool enableTruetype}]' \ - --replace '[FPS:NO]' '[FPS:${unBool enableFPS}]' \ - --replace '[SOUND:YES]' '[SOUND:${unBool enableSound}]' - '')); + ''); + # This is a separate environment because the config files to modify may come + # from any of the paths in baseEnv. env = buildEnv { name = "dwarf-fortress-env-${dwarf-fortress.dfVersion}"; - - paths = fixup ++ themePkg ++ pkgs; - pathsToLink = [ "/" "/hack" "/hack/scripts" ]; - + paths = [ config baseEnv ]; ignoreCollisions = true; }; in +lib.throwIf (enableTWBT && !enableDFHack) "dwarf-fortress: TWBT requires DFHack to be enabled" +lib.throwIf (enableStoneSense && !enableDFHack) "dwarf-fortress: StoneSense requires DFHack to be enabled" +lib.throwIf (enableTextMode && enableTWBT) "dwarf-fortress: text mode and TWBT are mutually exclusive" + stdenv.mkDerivation { pname = "dwarf-fortress"; version = dwarf-fortress.dfVersion; @@ -114,7 +147,10 @@ stdenv.mkDerivation { runDFHack = ./dfhack.in; runSoundSense = ./soundSense.in; - passthru = { inherit dwarf-fortress dwarf-therapist; }; + passthru = { + inherit dwarf-fortress dwarf-therapist twbt env; + dfhack = dfhack_; + }; buildCommand = '' mkdir -p $out/bin diff --git a/pkgs/games/dwarf-fortress/wrapper/dfhack.in b/pkgs/games/dwarf-fortress/wrapper/dfhack.in index 026b33ab87bf7..0f74674baf299 100644..100755 --- a/pkgs/games/dwarf-fortress/wrapper/dfhack.in +++ b/pkgs/games/dwarf-fortress/wrapper/dfhack.in @@ -2,8 +2,8 @@ source @dfInit@ -for i in dfhack.init-example dfhack-config/default hack/* stonesense/*; do - update_path "$i" +for i in *.init *.init-example dfhack-config/default dfhack-config/init hack/* stonesense/*; do + if [ -e "$i" ]; then update_path "$i"; fi done cd "$DF_DIR" diff --git a/pkgs/games/factorio/versions.json b/pkgs/games/factorio/versions.json index 92cdd1b4bd463..9897495efecf2 100644 --- a/pkgs/games/factorio/versions.json +++ b/pkgs/games/factorio/versions.json @@ -2,20 +2,20 @@ "x86_64-linux": { "alpha": { "experimental": { - "name": "factorio_alpha_x64-1.1.70.tar.xz", + "name": "factorio_alpha_x64-1.1.72.tar.xz", "needsAuth": true, - "sha256": "1d0ahy34xmj9k79kd8imnzi576ivhcvf0qqvl6r9qdc8cmbmip18", + "sha256": "0hphx3jpmwwpyxyw4v4s7awy6vmcxi067sfl5j1ym5rdgsvr6n63", "tarDirectory": "x64", - "url": "https://factorio.com/get-download/1.1.70/alpha/linux64", - "version": "1.1.70" + "url": "https://factorio.com/get-download/1.1.72/alpha/linux64", + "version": "1.1.72" }, "stable": { - "name": "factorio_alpha_x64-1.1.70.tar.xz", + "name": "factorio_alpha_x64-1.1.72.tar.xz", "needsAuth": true, - "sha256": "1d0ahy34xmj9k79kd8imnzi576ivhcvf0qqvl6r9qdc8cmbmip18", + "sha256": "0hphx3jpmwwpyxyw4v4s7awy6vmcxi067sfl5j1ym5rdgsvr6n63", "tarDirectory": "x64", - "url": "https://factorio.com/get-download/1.1.70/alpha/linux64", - "version": "1.1.70" + "url": "https://factorio.com/get-download/1.1.72/alpha/linux64", + "version": "1.1.72" } }, "demo": { @@ -38,20 +38,20 @@ }, "headless": { "experimental": { - "name": "factorio_headless_x64-1.1.70.tar.xz", + "name": "factorio_headless_x64-1.1.72.tar.xz", "needsAuth": false, - "sha256": "05bkawn394jb5d9if8xbf2xff3gnmd591axy41h7x1yg8sz94zw4", + "sha256": "1jbckp2d1zp6kxsqax367vxc1970kbs9apm8sdv9bfn8majial6a", "tarDirectory": "x64", - "url": "https://factorio.com/get-download/1.1.70/headless/linux64", - "version": "1.1.70" + "url": "https://factorio.com/get-download/1.1.72/headless/linux64", + "version": "1.1.72" }, "stable": { - "name": "factorio_headless_x64-1.1.70.tar.xz", + "name": "factorio_headless_x64-1.1.72.tar.xz", "needsAuth": false, - "sha256": "05bkawn394jb5d9if8xbf2xff3gnmd591axy41h7x1yg8sz94zw4", + "sha256": "1jbckp2d1zp6kxsqax367vxc1970kbs9apm8sdv9bfn8majial6a", "tarDirectory": "x64", - "url": "https://factorio.com/get-download/1.1.70/headless/linux64", - "version": "1.1.70" + "url": "https://factorio.com/get-download/1.1.72/headless/linux64", + "version": "1.1.72" } } } diff --git a/pkgs/games/grapejuice/default.nix b/pkgs/games/grapejuice/default.nix index f58596fccc129..1d67947d7accb 100644 --- a/pkgs/games/grapejuice/default.nix +++ b/pkgs/games/grapejuice/default.nix @@ -14,17 +14,18 @@ , winetricks , wine , glxinfo +, xrandr }: python3Packages.buildPythonApplication rec { pname = "grapejuice"; - version = "6.2.2"; + version = "7.2.0"; src = fetchFromGitLab { owner = "BrinkerVII"; repo = "grapejuice"; rev = "v${version}"; - sha256 = "sha256-wwM3q8Z4bYZod7/KcGc/PXlyLQxLRPkF1TdtFcg8mNE="; + sha256 = "sha256-BNVoSJbGi+u2DHuAicOjEUpDlmu25vMWoBudbV1FLgM="; }; nativeBuildInputs = [ @@ -50,13 +51,14 @@ python3Packages.buildPythonApplication rec { requests unidecode click + pydantic ]; dontWrapGApps = true; makeWrapperArgs = [ "\${gappsWrapperArgs[@]}" - "--prefix PATH : ${lib.makeBinPath [ xdg-user-dirs wine winetricks pciutils glxinfo ]}" + "--prefix PATH : ${lib.makeBinPath [ xdg-user-dirs wine winetricks pciutils glxinfo xrandr ]}" # make xdg-open overrideable at runtime "--suffix PATH : ${lib.makeBinPath [ xdg-utils ]}" ]; @@ -82,8 +84,8 @@ python3Packages.buildPythonApplication rec { 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}",' + substituteInPlace src/grapejuice_common/models/settings_model.py \ + --replace 'default_wine_home: Optional[str] = ""' 'default_wine_home: Optional[str] = "${wine}"' ''; postInstall = '' diff --git a/pkgs/games/harmonist/default.nix b/pkgs/games/harmonist/default.nix index ae7d6644ce75f..9b132d4a862bf 100644 --- a/pkgs/games/harmonist/default.nix +++ b/pkgs/games/harmonist/default.nix @@ -1,20 +1,17 @@ -{lib, fetchurl, buildGoPackage}: - -buildGoPackage rec { +{lib, fetchurl, buildGoModule}: +buildGoModule rec { pname = "harmonist"; version = "0.4.1"; - goPackagePath = "git.tuxfamily.org/harmonist/harmonist.git"; - src = fetchurl { url = "https://download.tuxfamily.org/harmonist/releases/${pname}-${version}.tar.gz"; - sha256 = "19abqmzz9nnlnizkskvlkcpahk8lzrl57mgg6dfxn25l55vfznws"; + hash = "sha256-mtvvdim0CNtdM+/VU2j+FE2oLpt0Tz1/tNTa9H/FS6U="; }; - goDeps = ./deps.nix; + vendorHash = "sha256-SrvJXTyLtPZ2PyhSZz/gJvuso9r7e5NbGe7EJRf2XlI="; - postInstall = "mv $out/bin/harmonist.git $out/bin/harmonist"; + ldflags = [ "-s" "-w" ]; meta = with lib; { description = "A stealth coffee-break roguelike game"; @@ -29,6 +26,6 @@ buildGoPackage rec { homepage = "https://harmonist.tuxfamily.org/"; license = licenses.isc; platforms = platforms.unix; - maintainers = with maintainers; []; + maintainers = with maintainers; [ aaronjheng ]; }; } diff --git a/pkgs/games/harmonist/deps.nix b/pkgs/games/harmonist/deps.nix deleted file mode 100644 index 8823ada42d434..0000000000000 --- a/pkgs/games/harmonist/deps.nix +++ /dev/null @@ -1,92 +0,0 @@ -[ - { - goPackagePath = "github.com/mattn/go-runewidth"; - fetch = { - type = "git"; - url = "https://github.com/mattn/go-runewidth"; - rev = "59616a248b91ae20bf3eb93636a24c87d9ce6cea"; - sha256 = "0jh9552ppqvkdfni7x623n0x5mbiaqqhjhmr0zkh28x56k4ysii4"; - }; - } - { - goPackagePath = "github.com/anaseto/gruid"; - fetch = { - type = "git"; - url = "https://github.com/anaseto/gruid"; - rev = "976b3db42d20169cf44eca1406b3cff104a80979"; - sha256 = "0rvsavkvg2hziwdh8sjk3n5v92m5mfjb8v9m7ch22maxfwq5kv6y"; - }; - } - { - goPackagePath = "github.com/anaseto/gruid-tcell"; - fetch = { - type = "git"; - url = "https://github.com/anaseto/gruid-tcell"; - rev = "4878126bb96fa0e529ec22c700d03b030e5c3bf7"; - sha256 = "0spm9gqsdan1mvbpypywid00vvl92rii8akhmjdm8l1r9qk7a3i4"; - }; - } - { - goPackagePath = "github.com/gdamore/tcell"; - fetch = { - type = "git"; - url = "https://github.com/gdamore/tcell"; - rev = "f4d402906fa3d330545365abbf970c048e677b35"; - sha256 = "1wcbm5vxrh5s8g4mas32y3n0pjvfmngmc2yrxg1yn4333mh9mgf3"; - }; - } - { - goPackagePath = "github.com/lucasb-eyer/go-colorful"; - fetch = { - type = "git"; - url = "https://github.com/lucasb-eyer/go-colorful"; - rev = "4d8f45c41ac988423342507a1fb6050239b5a742"; - sha256 = "1p2rl5353fi4p3l0bz3dg0lifhxqj8hjyh1b6z1cn286qxwnnnm8"; - }; - } - { - goPackagePath = "github.com/gdamore/encoding"; - fetch = { - type = "git"; - url = "https://github.com/gdamore/encoding"; - rev = "6289cdc94c00ac4aa177771c5fce7af2f96b626d"; - sha256 = "1vmm5zll92i2fm4ajqx0gyx0p9j36496x5nabi3y0x7h0inv0pk9"; - }; - } - { - goPackagePath = "github.com/rivo/uniseg"; - fetch = { - type = "git"; - url = "https://github.com/rivo/uniseg"; - rev = "75711fccf6a3e85bc74c241e2dddd06a9bc9e53d"; - sha256 = "0j7h22vfmjj562vr8gpsyrkrwp1pq9ayh5fylv24skxb467g9f0q"; - }; - } - { - goPackagePath = "golang.org/x/term/"; - fetch = { - type = "git"; - url = "https://go.googlesource.com/term"; - rev = "6a3ed077a48de71621ad530f9078fffa0bc0ce32"; - sha256 = "0xni8n3q2r9f6fk223b2c1702fvqmgz7vk6738asri3fwby583q5"; - }; - } - { - goPackagePath = "golang.org/x/text/"; - fetch = { - type = "git"; - url = "https://go.googlesource.com/text"; - rev = "e3aa4adf54f644ca0cb35f1f1fb19b239c40ef04"; - sha256 = "03q5kjmp4sfp5yzwb76lyf8cs9qca26vlwry5qgqf8w03rq700hf"; - }; - } - { - goPackagePath = "golang.org/x/sys/"; - fetch = { - type = "git"; - url = "https://go.googlesource.com/sys"; - rev = "88b6017d06564827ae436c619d52116f470a3611"; - sha256 = "14n7b6833lhxjzsgvi14c6c8nfiqqb4r71wvv4z5ksyssi95i3r7"; - }; - } -] diff --git a/pkgs/games/mari0/default.nix b/pkgs/games/mari0/default.nix index 8189c07898113..9541b97476c16 100644 --- a/pkgs/games/mari0/default.nix +++ b/pkgs/games/mari0/default.nix @@ -1,23 +1,10 @@ -{ lib, stdenv, fetchFromGitHub, zip, love_11, lua, makeWrapper, makeDesktopItem }: +{ lib, stdenv, fetchFromGitHub, zip, love, makeWrapper, makeDesktopItem +, copyDesktopItems }: -let +stdenv.mkDerivation rec { pname = "mari0"; version = "1.6.2"; - desktopItem = makeDesktopItem { - name = "mari0"; - exec = pname; - comment = "Crossover between Super Mario Bros. and Portal"; - desktopName = "mari0"; - genericName = "mari0"; - categories = [ "Game" ]; - }; - -in - -stdenv.mkDerivation { - inherit pname version; - src = fetchFromGitHub { owner = "Stabyourself"; repo = pname; @@ -25,17 +12,26 @@ stdenv.mkDerivation { sha256 = "1zqaq4w599scsjvy1rsb21fd2r8j3srx9vym4ir9bh666dp36gxa"; }; - nativeBuildInputs = [ makeWrapper ]; - buildInputs = [ lua love_11 zip ]; - - installPhase = - '' - mkdir -p $out/bin $out/share/games/lovegames $out/share/applications - zip -9 -r ${pname}.love ./* - mv ${pname}.love $out/share/games/lovegames/${pname}.love - makeWrapper ${love_11}/bin/love $out/bin/${pname} --add-flags $out/share/games/lovegames/${pname}.love - ln -s ${desktopItem}/share/applications/* $out/share/applications/ - chmod +x $out/bin/${pname} + nativeBuildInputs = [ makeWrapper copyDesktopItems zip ]; + + desktopItems = [ + (makeDesktopItem { + name = "mari0"; + exec = pname; + comment = "Crossover between Super Mario Bros. and Portal"; + desktopName = "mari0"; + genericName = "mari0"; + categories = [ "Game" ]; + }) + ]; + + installPhase = '' + runHook preInstall + zip -9 -r mari0.love ./* + install -Dm444 -t $out/share/games/lovegames/ mari0.love + makeWrapper ${love}/bin/love $out/bin/mari0 \ + --add-flags $out/share/games/lovegames/mari0.love + runHook postInstall ''; meta = with lib; { diff --git a/pkgs/games/odamex/default.nix b/pkgs/games/odamex/default.nix index 7905cfaa3855d..5fc1b57be5dcd 100644 --- a/pkgs/games/odamex/default.nix +++ b/pkgs/games/odamex/default.nix @@ -1,4 +1,14 @@ -{ lib, stdenv, cmake, fetchurl, pkg-config, SDL, SDL_mixer, SDL_net, wxGTK30 }: +{ lib +, stdenv +, fetchurl +, cmake +, pkg-config +, makeWrapper +, SDL +, SDL_mixer +, SDL_net +, wxGTK32 +}: stdenv.mkDerivation rec { pname = "odamex"; @@ -9,14 +19,36 @@ stdenv.mkDerivation rec { sha256 = "sha256-WBqO5fWzemw1kYlY192v0nnZkbIEVuWmjWYMy+1ODPQ="; }; - nativeBuildInputs = [ cmake pkg-config ]; - buildInputs = [ SDL SDL_mixer SDL_net wxGTK30 ]; + nativeBuildInputs = [ + cmake + pkg-config + makeWrapper + ]; + + buildInputs = [ + SDL + SDL_mixer + SDL_net + wxGTK32 + ]; + + installPhase = '' + runHook preInstall + '' + (if stdenv.isDarwin then '' + mkdir -p $out/{Applications,bin} + mv odalaunch/odalaunch.app $out/Applications + makeWrapper $out/{Applications/odalaunch.app/Contents/MacOS,bin}/odalaunch + '' else '' + make install + '') + '' + runHook postInstall + ''; meta = { homepage = "http://odamex.net/"; description = "A client/server port for playing old-school Doom online"; - license = lib.licenses.gpl2; - platforms = lib.platforms.linux; + license = lib.licenses.gpl2Only; + platforms = lib.platforms.unix; maintainers = with lib.maintainers; [ MP2E ]; }; } diff --git a/pkgs/games/rigsofrods/default.nix b/pkgs/games/rigsofrods/default.nix index 72c8a49939d38..1e1b8130e3779 100644 --- a/pkgs/games/rigsofrods/default.nix +++ b/pkgs/games/rigsofrods/default.nix @@ -1,5 +1,5 @@ -{ fetchFromGitHub, lib, stdenv, wxGTK30, freeimage, cmake, zziplib, libGLU, libGL, boost, - pkg-config, libuuid, openal, ogre, ois, curl, gtk2, mygui, unzip, +{ fetchFromGitHub, lib, stdenv, wxGTK30-gtk3, freeimage, cmake, zziplib, libGLU, libGL, boost, + pkg-config, libuuid, openal, ogre, ois, curl, gtk3, mygui, unzip, angelscript, ogrepaged, mysocketw, libxcb }: @@ -14,6 +14,10 @@ stdenv.mkDerivation rec { sha256 = "0cb1il7qm45kfhh6h6jwfpxvjlh2dmg8z1yz9kj4d6098myf2lg4"; }; + patches = [ + ./gtk3.patch + ]; + installPhase = '' sed -e "s@/usr/local/lib/OGRE@${ogre}/lib/OGRE@" -i ../tools/linux/binaries/plugins.cfg mkdir -p $out/share/rigsofrods @@ -24,8 +28,8 @@ stdenv.mkDerivation rec { ''; nativeBuildInputs = [ cmake pkg-config unzip ]; - buildInputs = [ wxGTK30 freeimage zziplib libGLU libGL boost - libuuid openal ogre ois curl gtk2 mygui angelscript + buildInputs = [ wxGTK30-gtk3 freeimage zziplib libGLU libGL boost + libuuid openal ogre ois curl gtk3 mygui angelscript ogrepaged mysocketw libxcb ]; meta = with lib; { @@ -34,6 +38,5 @@ stdenv.mkDerivation rec { license = licenses.gpl3; maintainers = with maintainers; [ raskin ]; platforms = platforms.linux; - hydraPlatforms = []; }; } diff --git a/pkgs/games/rigsofrods/gtk3.patch b/pkgs/games/rigsofrods/gtk3.patch new file mode 100644 index 0000000000000..e873cfedbaed6 --- /dev/null +++ b/pkgs/games/rigsofrods/gtk3.patch @@ -0,0 +1,29 @@ +diff --git a/cmake/DependenciesConfig.cmake b/cmake/DependenciesConfig.cmake +index 1bdf93c..4773fca 100644 +--- a/cmake/DependenciesConfig.cmake ++++ b/cmake/DependenciesConfig.cmake +@@ -187,10 +187,8 @@ endmacro(importLib) + + ELSEIF(UNIX) + find_package(PkgConfig) +- PKG_CHECK_MODULES (GTK gtk+-2.0 REQUIRED) +- PKG_CHECK_MODULES (GTK_PIXBUF gdk-pixbuf-2.0 REQUIRED) ++ PKG_CHECK_MODULES (GTK gtk+-3.0 REQUIRED) + include_directories(${GTK_INCLUDE_DIRS}) +- include_directories(${GTK_PIXBUF_INCLUDE_DIRS}) + + # Ogre basics + PKG_CHECK_MODULES (Ogre OGRE REQUIRED) +diff --git a/source/configurator/CMakeLists.txt b/source/configurator/CMakeLists.txt +index 51cc350..7f723b6 100644 +--- a/source/configurator/CMakeLists.txt ++++ b/source/configurator/CMakeLists.txt +@@ -56,7 +56,7 @@ IF(WIN32) + endif(ROR_USE_OPENCL) + ELSEIF(UNIX) + find_package(PkgConfig) +- PKG_CHECK_MODULES (GTK gtk+-2.0 REQUIRED) ++ PKG_CHECK_MODULES (GTK gtk+-3.0 REQUIRED) + INCLUDE_DIRECTORIES(${GTK_INCLUDE_DIRS}) + + PKG_CHECK_MODULES (Ogre OGRE REQUIRED) diff --git a/pkgs/games/sienna/default.nix b/pkgs/games/sienna/default.nix index 37138f152b6a0..c6f8db0ea9e7f 100644 --- a/pkgs/games/sienna/default.nix +++ b/pkgs/games/sienna/default.nix @@ -1,11 +1,12 @@ -{ lib, stdenv, fetchurl, love, lua, makeWrapper, makeDesktopItem }: +{ lib, stdenv, fetchurl, love, makeWrapper, makeDesktopItem, copyDesktopItems }: stdenv.mkDerivation rec { pname = "sienna"; - version = "1.0c"; + version = "1.0d"; + src = fetchurl { url = "https://github.com/SimonLarsen/${pname}/releases/download/v${version}/${pname}-${version}.love"; - sha256 = "1x15276fhqspgrrv8fzkp032i2qa8piywc0yy061x59mxhdndzj6"; + sha256 = "sha256-1bFjhN7jL/PMYMJH1ete6uyHTYsTGgoP60sf/sJTLlU="; }; icon = fetchurl { @@ -13,7 +14,7 @@ stdenv.mkDerivation rec { sha256 = "12q2rhk39dmb6ir50zafn8dylaad5gns8z3y21mfjabc5l5g02nn"; }; - desktopItem = makeDesktopItem { + desktopItems = [ (makeDesktopItem { name = "sienna"; exec = pname; icon = icon; @@ -21,33 +22,29 @@ stdenv.mkDerivation rec { desktopName = "Sienna"; genericName = "sienna"; categories = [ "Game" ]; - }; + }) ]; - nativeBuildInputs = [ makeWrapper ]; - buildInputs = [ lua love ]; + nativeBuildInputs = [ makeWrapper copyDesktopItems ]; dontUnpack = true; - installPhase = - '' + installPhase = '' + runHook preInstall mkdir -p $out/bin mkdir -p $out/share/games/lovegames cp -v $src $out/share/games/lovegames/${pname}.love makeWrapper ${love}/bin/love $out/bin/${pname} --add-flags $out/share/games/lovegames/${pname}.love - - chmod +x $out/bin/${pname} - mkdir -p $out/share/applications - ln -s ${desktopItem}/share/applications/* $out/share/applications/ + runHook postInstall ''; meta = with lib; { description = "Fast-paced one button platformer"; + homepage = "https://tangramgames.dk/games/sienna"; maintainers = with maintainers; [ leenaars ]; platforms = platforms.linux; license = licenses.free; - downloadPage = "http://tangramgames.dk/games/sienna"; }; } diff --git a/pkgs/games/spring/default.nix b/pkgs/games/spring/default.nix index f8b05bd97091b..12c3ce59e675b 100644 --- a/pkgs/games/spring/default.nix +++ b/pkgs/games/spring/default.nix @@ -1,7 +1,31 @@ -{ lib, stdenv, fetchFromGitHub, cmake, xz, boost, libdevil, zlib, p7zip -, openal, libvorbis, glew, freetype, xorg, SDL2, libGLU, libGL -, asciidoc, docbook_xsl, docbook_xsl_ns, curl, makeWrapper -, jdk ? null, python ? null, systemd, libunwind, which, minizip +{ lib +, stdenv +, fetchFromGitHub +, cmake +, xz +, boost +, libdevil +, zlib +, p7zip +, openal +, libvorbis +, glew +, freetype +, xorg +, SDL2 +, libGLU +, libGL +, asciidoc +, docbook_xsl +, docbook_xsl_ns +, curl +, makeWrapper +, jdk +, python +, systemd +, libunwind +, which +, minizip , withAI ? true # support for AI Interfaces and Skirmish AIs }: @@ -36,16 +60,36 @@ stdenv.mkDerivation rec { echo "${version} maintenance" > VERSION ''; - cmakeFlags = ["-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON" - "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=ON" - "-DPREFER_STATIC_LIBS:BOOL=OFF"]; + cmakeFlags = [ + "-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON" + "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=ON" + "-DPREFER_STATIC_LIBS:BOOL=OFF" + ]; nativeBuildInputs = [ cmake makeWrapper docbook_xsl docbook_xsl_ns asciidoc ]; - buildInputs = [ xz boost libdevil zlib p7zip openal libvorbis freetype SDL2 - xorg.libX11 xorg.libXcursor libGLU libGL glew curl - systemd libunwind which minizip ] - ++ lib.optional withAI jdk - ++ lib.optional withAI python; + buildInputs = [ + xz + boost + libdevil + zlib + p7zip + openal + libvorbis + freetype + SDL2 + xorg.libX11 + xorg.libXcursor + libGLU + libGL + glew + curl + systemd + libunwind + which + minizip + ] + ++ lib.optional withAI jdk + ++ lib.optional withAI python; NIX_CFLAGS_COMPILE = "-fpermissive"; # GL header minor incompatibility @@ -57,8 +101,8 @@ stdenv.mkDerivation rec { meta = with lib; { homepage = "https://springrts.com/"; description = "A powerful real-time strategy (RTS) game engine"; - license = licenses.gpl2; + license = licenses.gpl2Plus; maintainers = with maintainers; [ qknight domenkozar sorki ]; - platforms = platforms.linux; + platforms = [ "i686-linux" "x86_64-linux" ]; }; } diff --git a/pkgs/games/spring/springlobby.nix b/pkgs/games/spring/springlobby.nix index 55c61c4cbd826..ab792cf41a49e 100644 --- a/pkgs/games/spring/springlobby.nix +++ b/pkgs/games/spring/springlobby.nix @@ -1,29 +1,58 @@ -{ lib, stdenv, fetchurl, fetchpatch, cmake, wxGTK30, openal, pkg-config, curl, libtorrent-rasterbar -, libpng, libX11, gettext, boost, libnotify, gtk2, doxygen, spring -, makeWrapper, glib, minizip, alure, pcre, jsoncpp }: +{ lib +, stdenv +, fetchurl +, cmake +, wxGTK32 +, openal +, pkg-config +, curl +, libtorrent-rasterbar +, libpng +, libX11 +, gettext +, boost +, libnotify +, gtk3 +, doxygen +, spring +, makeWrapper +, glib +, minizip +, alure +, pcre +, jsoncpp +}: stdenv.mkDerivation rec { pname = "springlobby"; - version = "0.270"; + version = "0.273"; src = fetchurl { url = "https://springlobby.springrts.com/dl/stable/springlobby-${version}.tar.bz2"; - sha256 = "1r1g2hw9ipsmsmzbhsi7bxqra1za6x7j1kw12qzl5psqyq8rqbgs"; + sha256 = "sha256-XkU6i6ABCgw3H9vJu0xjHRO1BglueYM1LyJxcZdOrDk="; }; nativeBuildInputs = [ cmake pkg-config gettext doxygen makeWrapper ]; buildInputs = [ - wxGTK30 openal curl libtorrent-rasterbar pcre jsoncpp - boost libpng libX11 libnotify gtk2 glib minizip alure + wxGTK32 + openal + curl + libtorrent-rasterbar + pcre + jsoncpp + boost + libpng + libX11 + libnotify + gtk3 + glib + minizip + alure ]; patches = [ ./revert_58b423e.patch # Allows springLobby to continue using system installed spring until #707 is fixed ./fix-certs.patch - (fetchpatch { - url = "https://github.com/springlobby/springlobby/commit/252c4cb156c1442ed9b4faec3f26265bc7c295ff.patch"; - sha256 = "sha256-Nq1F5fRPnCkZwl9KgrfuUmpIMK3hUOyZQYIKElWpmzU="; - }) ]; postInstall = '' @@ -33,10 +62,10 @@ stdenv.mkDerivation rec { ''; meta = with lib; { - homepage = "https://springlobby.info/"; + homepage = "https://springlobby.springrts.com"; description = "Cross-platform lobby client for the Spring RTS project"; - license = licenses.gpl2; + license = licenses.gpl2Plus; maintainers = with maintainers; [ qknight domenkozar ]; - platforms = platforms.linux; + platforms = [ "i686-linux" "x86_64-linux" ]; }; } diff --git a/pkgs/games/starsector/default.nix b/pkgs/games/starsector/default.nix index bbc781d6ab27d..ed995e4a5e640 100644 --- a/pkgs/games/starsector/default.nix +++ b/pkgs/games/starsector/default.nix @@ -41,20 +41,20 @@ stdenv.mkDerivation rec { installPhase = '' runHook preInstall - mkdir -p $out/bin + mkdir -p $out/bin $out/share/starsector rm -r jre_linux # remove bundled jre7 rm starfarer.api.zip - cp -r ./* $out + cp -r ./* $out/share/starsector mkdir -p $out/share/icons/hicolor/64x64/apps ln -s $out/graphics/ui/s_icon64.png $out/share/icons/hicolor/64x64/apps/starsector.png - wrapProgram $out/starsector.sh \ + wrapProgram $out/share/starsector/starsector.sh \ --prefix PATH : ${lib.makeBinPath [ openjdk ]} \ --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath buildInputs} \ --run 'mkdir -p ''${XDG_DATA_HOME:-~/.local/share}/starsector' \ - --chdir "$out" - ln -s $out/starsector.sh $out/bin/starsector + --chdir "$out/share/starsector" + ln -s $out/share/starsector/starsector.sh $out/bin/starsector runHook postInstall ''; @@ -65,7 +65,7 @@ stdenv.mkDerivation rec { postPatch = '' substituteInPlace starsector.sh \ --replace "./jre_linux/bin/java" "${openjdk}/bin/java" \ - --replace "./native/linux" "$out/native/linux" \ + --replace "./native/linux" "$out/share/starsector/native/linux" \ --replace "=." "=\''${XDG_DATA_HOME:-\$HOME/.local/share}/starsector" \ --replace "-XX:+CompilerThreadHintNoPreempt" "-XX:+UnlockDiagnosticVMOptions -XX:-BytecodeVerificationRemote -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSConcurrentMTEnabled -XX:+DisableExplicitGC" ''; diff --git a/pkgs/games/unciv/default.nix b/pkgs/games/unciv/default.nix index 37b6cd151de55..604f01fafd1e7 100644 --- a/pkgs/games/unciv/default.nix +++ b/pkgs/games/unciv/default.nix @@ -25,11 +25,11 @@ let in stdenv.mkDerivation rec { pname = "unciv"; - version = "4.2.20"; + version = "4.3.1"; src = fetchurl { url = "https://github.com/yairm210/Unciv/releases/download/${version}/Unciv.jar"; - sha256 = "sha256-SsEOewFbJqad8OCRiE1VHOx7kVFtF4DEInE3ETCGxDM="; + sha256 = "sha256-qgjMQSkSYp/Tk9Acr21Nd5gLq9JLmEYsfSC+Ia362+c="; }; dontUnpack = true; diff --git a/pkgs/games/warzone2100/default.nix b/pkgs/games/warzone2100/default.nix index 4adb079ebaa0b..6307decb6a4d2 100644 --- a/pkgs/games/warzone2100/default.nix +++ b/pkgs/games/warzone2100/default.nix @@ -29,6 +29,7 @@ , testers , warzone2100 +, nixosTests , withVideos ? false }: @@ -43,11 +44,11 @@ in stdenv.mkDerivation rec { inherit pname; - version = "4.3.1"; + version = "4.3.2"; src = fetchurl { url = "mirror://sourceforge/${pname}/releases/${version}/${pname}_src.tar.xz"; - sha256 = "sha256-GdHe8DskEd0G1E388z8GGOtjTqHTMBpFSxf1MNATGN0="; + sha256 = "sha256-RcpHk+p9Adu9zkd2J54hspeolZr/xsBsY8eUHLGY0xw="; }; buildInputs = [ @@ -111,6 +112,7 @@ stdenv.mkDerivation rec { # The command always exits with code 1 command = "(warzone2100 --version || [ $? -eq 1 ])"; }; + nixosTest = nixosTests.warzone2100; }; meta = with lib; { |