summaryrefslogtreecommitdiffstats
path: root/pkgs/games
diff options
context:
space:
mode:
authorNaïm Favier <n@monade.li>2024-03-31 10:23:44 +0200
committerNaïm Favier <n@monade.li>2024-03-31 10:23:44 +0200
commit92514e4863088499459c02c99e83465d654d188b (patch)
tree84337a8387c705aa7545ace44e9eacb2bbc6b038 /pkgs/games
parent47ac0b2cc151c398636318e24ec6076bad37c58e (diff)
parent04e15baaadf09ff9043458d84459d51d94ea2501 (diff)
Merge branch 'master' into haskell-updates
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/arx-libertatis/default.nix10
-rw-r--r--pkgs/games/dwarf-fortress/default.nix19
-rw-r--r--pkgs/games/dwarf-fortress/dfhack/default.nix29
-rw-r--r--pkgs/games/dwarf-fortress/game.nix15
-rw-r--r--pkgs/games/dwarf-fortress/lazy-pack.nix17
-rw-r--r--pkgs/games/dwarf-fortress/themes/default.nix15
-rw-r--r--pkgs/games/dwarf-fortress/twbt/default.nix12
-rw-r--r--pkgs/games/dwarf-fortress/unfuck.nix15
-rw-r--r--pkgs/games/factorio/mods.nix2
-rw-r--r--pkgs/games/factorio/utils.nix15
-rw-r--r--pkgs/games/koboredux/default.nix11
-rw-r--r--pkgs/games/libremines/default.nix4
-rw-r--r--pkgs/games/lugaru/default.nix10
-rw-r--r--pkgs/games/openra_2019/common.nix11
-rw-r--r--pkgs/games/path-of-building/default.nix4
-rw-r--r--pkgs/games/sgt-puzzles/default.nix4
-rw-r--r--pkgs/games/tinyfugue/default.nix11
-rw-r--r--pkgs/games/vintagestory/default.nix4
18 files changed, 156 insertions, 52 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/libremines/default.nix b/pkgs/games/libremines/default.nix
index 9177e337593e..f1a79e54bd62 100644
--- a/pkgs/games/libremines/default.nix
+++ b/pkgs/games/libremines/default.nix
@@ -9,13 +9,13 @@
stdenv.mkDerivation rec {
pname = "libremines";
- version = "2.0.0";
+ version = "2.0.1";
src = fetchFromGitHub {
owner = "Bollos00";
repo = pname;
rev = "v${version}";
- hash = "sha256-LejDXjli+AEVGp23y+ez/NyJY/8w7uHcOij6RsDwIH4=";
+ hash = "sha256-TQwjEgtqAvKnrpia6VloRgFwtq5TNDmxU+ZWjtEK/n8=";
};
nativeBuildInputs = [ cmake wrapQtAppsHook ];
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/path-of-building/default.nix b/pkgs/games/path-of-building/default.nix
index 2e996f975487..1e2a2811769a 100644
--- a/pkgs/games/path-of-building/default.nix
+++ b/pkgs/games/path-of-building/default.nix
@@ -2,13 +2,13 @@
let
data = stdenv.mkDerivation(finalAttrs: {
pname = "path-of-building-data";
- version = "2.41.0";
+ version = "2.42.0";
src = fetchFromGitHub {
owner = "PathOfBuildingCommunity";
repo = "PathOfBuilding";
rev = "v${finalAttrs.version}";
- hash = "sha256-XoRoKvlfBtlKyur1AZ+VjYc5URyX2/fof05h6Vs+vok=";
+ hash = "sha256-OxAyB+tMszQktGvxlGL/kc+Wt0iInFYY0qHNjK6EnSg=";
};
nativeBuildInputs = [ unzip ];
diff --git a/pkgs/games/sgt-puzzles/default.nix b/pkgs/games/sgt-puzzles/default.nix
index bd56416c5918..e5be3c4ae71e 100644
--- a/pkgs/games/sgt-puzzles/default.nix
+++ b/pkgs/games/sgt-puzzles/default.nix
@@ -6,11 +6,11 @@
stdenv.mkDerivation rec {
pname = "sgt-puzzles";
- version = "20240302.80aac31";
+ version = "20240330.fd304c5";
src = fetchurl {
url = "http://www.chiark.greenend.org.uk/~sgtatham/puzzles/puzzles-${version}.tar.gz";
- hash = "sha256-0+bmGq4wM+0/ldQz8ieKdkuG0HHazctQr9ul/qLT0gg=";
+ hash = "sha256-usEgCfbeKOkAg/sHpRxuMcPGHxb+J5+r92aO4Ar7iUA=";
};
sgt-puzzles-menu = fetchurl {
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";
diff --git a/pkgs/games/vintagestory/default.nix b/pkgs/games/vintagestory/default.nix
index 182f0621bfed..8b9468b81c76 100644
--- a/pkgs/games/vintagestory/default.nix
+++ b/pkgs/games/vintagestory/default.nix
@@ -20,11 +20,11 @@
stdenv.mkDerivation rec {
pname = "vintagestory";
- version = "1.19.4";
+ version = "1.19.5";
src = fetchurl {
url = "https://cdn.vintagestory.at/gamefiles/stable/vs_client_linux-x64_${version}.tar.gz";
- hash = "sha256-A5NIWy902a0W/Y/sJL+qPrEJwCiU/TNIm7G3BtU6gzM=";
+ hash = "sha256-noweIb+lZhme1kEjU2+tIc0E99iShNngxEEyDMKJcpk=";
};