diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2024-03-31 00:02:07 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-31 00:02:07 +0000 |
commit | ba060bffac5ada1bd2be64b6061c6e69ac3bc9aa (patch) | |
tree | 3dd5f3a839ae21a7a1aa587a67e7e00622da7c32 /pkgs/games | |
parent | fe34b95595aa74401ae0cdc0135c6e4b72b3862a (diff) | |
parent | 4a660d5bb29c955bc776d59f88693a0d7772f3ad (diff) |
Merge master into staging-next
Diffstat (limited to 'pkgs/games')
-rw-r--r-- | pkgs/games/arx-libertatis/default.nix | 10 | ||||
-rw-r--r-- | pkgs/games/dwarf-fortress/default.nix | 19 | ||||
-rw-r--r-- | pkgs/games/dwarf-fortress/dfhack/default.nix | 29 | ||||
-rw-r--r-- | pkgs/games/dwarf-fortress/game.nix | 15 | ||||
-rw-r--r-- | pkgs/games/dwarf-fortress/lazy-pack.nix | 17 | ||||
-rw-r--r-- | pkgs/games/dwarf-fortress/themes/default.nix | 15 | ||||
-rw-r--r-- | pkgs/games/dwarf-fortress/twbt/default.nix | 12 | ||||
-rw-r--r-- | pkgs/games/dwarf-fortress/unfuck.nix | 15 | ||||
-rw-r--r-- | pkgs/games/factorio/mods.nix | 2 | ||||
-rw-r--r-- | pkgs/games/factorio/utils.nix | 15 | ||||
-rw-r--r-- | pkgs/games/koboredux/default.nix | 11 | ||||
-rw-r--r-- | pkgs/games/lugaru/default.nix | 10 | ||||
-rw-r--r-- | pkgs/games/openra_2019/common.nix | 11 | ||||
-rw-r--r-- | pkgs/games/tinyfugue/default.nix | 11 |
14 files changed, 148 insertions, 44 deletions
diff --git a/pkgs/games/arx-libertatis/default.nix b/pkgs/games/arx-libertatis/default.nix index de597163a3d1..334219a28901 100644 --- a/pkgs/games/arx-libertatis/default.nix +++ b/pkgs/games/arx-libertatis/default.nix @@ -8,7 +8,15 @@ , gdb ? null }: -with lib; +let + inherit (lib) + licenses + maintainers + optionals + optionalString + platforms + ; +in stdenv.mkDerivation rec { pname = "arx-libertatis"; diff --git a/pkgs/games/dwarf-fortress/default.nix b/pkgs/games/dwarf-fortress/default.nix index 55157950c4f2..777866d8fb0e 100644 --- a/pkgs/games/dwarf-fortress/default.nix +++ b/pkgs/games/dwarf-fortress/default.nix @@ -32,9 +32,16 @@ # changes on later launches, but consider extending the wrapper with your # desired options instead. -with lib; - let + inherit (lib) + attrNames + getAttr + importJSON + listToAttrs + recurseIntoAttrs + replaceStrings + ; + callPackage = newScope self; # The latest Dwarf Fortress version. Maintainers: when a new version comes @@ -43,14 +50,14 @@ let latestVersion = "0.47.05"; # Converts a version to a package name. - versionToName = version: "dwarf-fortress_${lib.replaceStrings ["."] ["_"] version}"; + versionToName = version: "dwarf-fortress_${replaceStrings ["."] ["_"] version}"; dwarf-therapist-original = libsForQt5.callPackage ./dwarf-therapist { texlive = texliveBasic.withPackages (ps: with ps; [ float caption wrapfig adjmulticol sidecap preprint enumitem ]); }; # A map of names to each Dwarf Fortress package we know about. - df-games = lib.listToAttrs (map + df-games = listToAttrs (map (dfVersion: { name = versionToName dfVersion; value = @@ -83,10 +90,10 @@ let jdk = jdk8; # TODO: remove override https://github.com/NixOS/nixpkgs/pull/89731 }; }) - (lib.attrNames self.df-hashes)); + (attrNames self.df-hashes)); self = rec { - df-hashes = lib.importJSON ./game.json; + df-hashes = importJSON ./game.json; # Aliases for the latest Dwarf Fortress and the selected Therapist install dwarf-fortress = getAttr (versionToName latestVersion) df-games; diff --git a/pkgs/games/dwarf-fortress/dfhack/default.nix b/pkgs/games/dwarf-fortress/dfhack/default.nix index 914ccbb6ab33..12d097c71415 100644 --- a/pkgs/games/dwarf-fortress/dfhack/default.nix +++ b/pkgs/games/dwarf-fortress/dfhack/default.nix @@ -18,9 +18,20 @@ , dfVersion }: -with lib; - let + inherit (lib) + getAttr + hasAttr + isAttrs + licenses + maintainers + optional + optionals + optionalString + platforms + versionOlder + ; + dfhack-releases = { "0.44.10" = { dfHackRelease = "0.44.10-r2"; @@ -62,7 +73,7 @@ let }; release = - if lib.isAttrs dfVersion + if isAttrs dfVersion then dfVersion else if hasAttr dfVersion dfhack-releases then getAttr dfVersion dfhack-releases @@ -112,20 +123,20 @@ in fetchSubmodules = true; }; - patches = lib.optional (lib.versionOlder version "0.44.12-r3") (fetchpatch { + patches = optional (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 { + }) ++ optional (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 - CXXFLAGS = lib.optionalString (lib.versionOlder version "0.47.05-r3") "-fpermissive"; + CXXFLAGS = optionalString (versionOlder version "0.47.05-r3") "-fpermissive"; # As of # https://github.com/DFHack/dfhack/commit/56e43a0dde023c5a4595a22b29d800153b31e3c4, @@ -142,7 +153,7 @@ in nativeBuildInputs = [ cmake perl XMLLibXML XMLLibXSLT fakegit ]; # We don't use system libraries because dfhack needs old C++ ABI. buildInputs = [ zlib SDL ] - ++ lib.optionals enableStoneSense [ allegro5 libGLU libGL ]; + ++ optionals enableStoneSense [ allegro5 libGLU libGL ]; preConfigure = '' # Trick build system into believing we have .git @@ -151,7 +162,7 @@ in ''; cmakeFlags = [ "-DDFHACK_BUILD_ARCH=${arch}" "-DDOWNLOAD_RUBY=OFF" ] - ++ lib.optionals enableStoneSense [ "-DBUILD_STONESENSE=ON" "-DSTONESENSE_INTERNAL_SO=OFF" ]; + ++ optionals enableStoneSense [ "-DBUILD_STONESENSE=ON" "-DSTONESENSE_INTERNAL_SO=OFF" ]; # dfhack expects an unversioned libruby.so to be present in the hack # subdirectory for ruby plugins to function. @@ -161,7 +172,7 @@ in passthru = { inherit dfVersion; }; - meta = with lib; { + meta = { description = "Memory hacking library for Dwarf Fortress and a set of tools that use it"; homepage = "https://github.com/DFHack/dfhack/"; license = licenses.zlib; diff --git a/pkgs/games/dwarf-fortress/game.nix b/pkgs/games/dwarf-fortress/game.nix index 7ce837b7b0b5..8d351cdbbd0d 100644 --- a/pkgs/games/dwarf-fortress/game.nix +++ b/pkgs/games/dwarf-fortress/game.nix @@ -13,9 +13,20 @@ , df-hashes }: -with lib; - let + inherit (lib) + attrNames + elemAt + getAttr + getLib + hasAttr + licenses + maintainers + makeLibraryPath + optionalString + splitVersion + ; + libpath = makeLibraryPath [ stdenv.cc.cc stdenv.cc.libc dwarf-fortress-unfuck SDL ]; # Map Dwarf Fortress platform names to Nixpkgs platform names. diff --git a/pkgs/games/dwarf-fortress/lazy-pack.nix b/pkgs/games/dwarf-fortress/lazy-pack.nix index 17037dbdb278..dcaa8102ae98 100644 --- a/pkgs/games/dwarf-fortress/lazy-pack.nix +++ b/pkgs/games/dwarf-fortress/lazy-pack.nix @@ -25,9 +25,16 @@ , enableSound ? true }: -with lib; - let + inherit (lib) + getAttr + hasAttr + licenses + maintainers + optional + platforms + ; + dfGame = versionToName dfVersion; dwarf-fortress = if hasAttr dfGame df-games @@ -43,10 +50,10 @@ buildEnv { enableIntro enableTruetype enableFPS enableTextMode enableSound; }) ] - ++ lib.optional enableDwarfTherapist dwarf-therapist - ++ lib.optional enableLegendsBrowser legends-browser; + ++ optional enableDwarfTherapist dwarf-therapist + ++ optional enableLegendsBrowser legends-browser; - meta = with lib; { + meta = { description = "An opinionated wrapper for Dwarf Fortress"; maintainers = with maintainers; [ Baughn numinit ]; license = licenses.mit; diff --git a/pkgs/games/dwarf-fortress/themes/default.nix b/pkgs/games/dwarf-fortress/themes/default.nix index d2e2ec5fd19b..ad033b043a46 100644 --- a/pkgs/games/dwarf-fortress/themes/default.nix +++ b/pkgs/games/dwarf-fortress/themes/default.nix @@ -1,6 +1,15 @@ { lib, fetchFromGitHub, ... }: -with builtins; +let + inherit (lib) + importJSON + licenses + listToAttrs + maintainers + platforms + readFile + ; +in listToAttrs (map (v: { @@ -11,11 +20,11 @@ listToAttrs (map repo = v.name; rev = v.version; sha256 = v.sha256; - meta = with lib; { + meta = { platforms = platforms.all; maintainers = [ maintainers.matthewbauer maintainers.shazow ]; license = licenses.free; }; }; }) - (fromJSON (readFile ./themes.json))) + (importJSON ./themes.json)) diff --git a/pkgs/games/dwarf-fortress/twbt/default.nix b/pkgs/games/dwarf-fortress/twbt/default.nix index 68a5b923aaf4..3c582a67770e 100644 --- a/pkgs/games/dwarf-fortress/twbt/default.nix +++ b/pkgs/games/dwarf-fortress/twbt/default.nix @@ -5,9 +5,15 @@ , dfVersion }: -with lib; - let + inherit (lib) + getAttr + hasAttr + licenses + maintainers + platforms + ; + twbt-releases = { "0.44.10" = { twbtRelease = "6.49"; @@ -75,7 +81,7 @@ stdenvNoCC.mkDerivation rec { cp -a *.png $art/data/art/ ''; - meta = with lib; { + meta = { description = "A plugin for Dwarf Fortress / DFHack that improves various aspects the game interface"; maintainers = with maintainers; [ Baughn numinit ]; license = licenses.mit; diff --git a/pkgs/games/dwarf-fortress/unfuck.nix b/pkgs/games/dwarf-fortress/unfuck.nix index 9b7de93ecd7d..3aeee27d87a5 100644 --- a/pkgs/games/dwarf-fortress/unfuck.nix +++ b/pkgs/games/dwarf-fortress/unfuck.nix @@ -19,9 +19,16 @@ , pkg-config }: -with lib; - let + inherit (lib) + getAttr + hasAttr + licenses + maintainers + platforms + versionOlder + ; + unfuck-releases = { "0.43.05" = { unfuckRelease = "0.43.05"; @@ -106,7 +113,7 @@ stdenv.mkDerivation { libGL ] # switched to gtk3 in 0.47.05 - ++ (if lib.versionOlder release.unfuckRelease "0.47.05" then [ + ++ (if versionOlder release.unfuckRelease "0.47.05" then [ gtk2 ] else [ gtk3 @@ -124,7 +131,7 @@ stdenv.mkDerivation { passthru = { inherit dfVersion; }; - meta = with lib; { + meta = { description = "Unfucked multimedia layer for Dwarf Fortress"; homepage = "https://github.com/svenstaro/dwarf_fortress_unfuck"; license = licenses.free; diff --git a/pkgs/games/factorio/mods.nix b/pkgs/games/factorio/mods.nix index 7327b9e22870..9a06453ccce8 100644 --- a/pkgs/games/factorio/mods.nix +++ b/pkgs/games/factorio/mods.nix @@ -7,7 +7,7 @@ , allRecommendedMods ? true , allOptionalMods ? false }: -with lib; + let modDrv = factorio-utils.modDrv { inherit allRecommendedMods allOptionalMods; }; in diff --git a/pkgs/games/factorio/utils.nix b/pkgs/games/factorio/utils.nix index d2b52ae48366..b68cc921996e 100644 --- a/pkgs/games/factorio/utils.nix +++ b/pkgs/games/factorio/utils.nix @@ -1,7 +1,18 @@ # This file provides a top-level function that will be used by both nixpkgs and nixos # to generate mod directories for use at runtime by factorio. { lib, stdenv }: -with lib; +let + inherit (lib) + flatten + head + optionals + optionalString + removeSuffix + replaceStrings + splitString + unique + ; +in { mkModDirDrv = mods: modsDatFile: # a list of mod derivations let @@ -18,7 +29,7 @@ with lib; # NB: there will only ever be a single zip file in each mod derivation's output dir ln -s $modDrv/*.zip $out done - '' + (lib.optionalString (modsDatFile != null) '' + '' + (optionalString (modsDatFile != null) '' cp ${modsDatFile} $out/mod-settings.dat ''); }; diff --git a/pkgs/games/koboredux/default.nix b/pkgs/games/koboredux/default.nix index 46db8b1da57a..5eb482b09cb3 100644 --- a/pkgs/games/koboredux/default.nix +++ b/pkgs/games/koboredux/default.nix @@ -10,9 +10,16 @@ , useProprietaryAssets ? true }: -with lib; - let + inherit (lib) + and + licenses + maintainers + optional + optionalString + platforms + ; + pname = "koboredux"; version = "0.7.5.1"; diff --git a/pkgs/games/lugaru/default.nix b/pkgs/games/lugaru/default.nix index b989195bd5a3..ba8dcdebcec3 100644 --- a/pkgs/games/lugaru/default.nix +++ b/pkgs/games/lugaru/default.nix @@ -1,7 +1,13 @@ { lib, stdenv, fetchFromGitLab, cmake, openal, pkg-config, libogg, libvorbis, SDL2, makeWrapper, libpng, libjpeg_turbo, libGLU }: -with lib; +let + inherit (lib) + licenses + maintainers + platforms + ; +in stdenv.mkDerivation rec { @@ -27,6 +33,6 @@ stdenv.mkDerivation rec { homepage = "https://osslugaru.gitlab.io"; maintainers = [ ]; platforms = platforms.linux; - license = lib.licenses.gpl2Plus; + license = licenses.gpl2Plus; }; } diff --git a/pkgs/games/openra_2019/common.nix b/pkgs/games/openra_2019/common.nix index 5932eeb6e6d0..091b56b3d141 100644 --- a/pkgs/games/openra_2019/common.nix +++ b/pkgs/games/openra_2019/common.nix @@ -7,9 +7,16 @@ , zenity }: -with lib; - let + inherit (lib) + licenses + maintainers + makeBinPath + makeLibraryPath + optional + platforms + ; + path = makeBinPath ([ mono python3 ] ++ optional (zenity != null) zenity); rpath = makeLibraryPath [ lua freetype openal SDL2 ]; mkdirp = makeSetupHook { diff --git a/pkgs/games/tinyfugue/default.nix b/pkgs/games/tinyfugue/default.nix index d6b9647fcc02..e03364f4a1ad 100644 --- a/pkgs/games/tinyfugue/default.nix +++ b/pkgs/games/tinyfugue/default.nix @@ -3,10 +3,17 @@ , sslSupport ? true }: -with lib; - assert sslSupport -> openssl != null; +let + inherit (lib) + licenses + maintainers + optional + platforms + ; +in + stdenv.mkDerivation rec { pname = "tinyfugue"; version = "50b8"; |