Distro / Kernel release : NixOS 23.11
Mono / .NET package version : dotnet-runtime 7.0.15
Graphics driver version : Mesa Intel® UHD Graphics 620 (i915)
Works for client, mp server or both : only client has been tested
Installation method used :
NIXPKGS_ALLOW_UNFREE=1 nix-shell -p vintagestory
Hacks (if needed) : none, the above command was the only thing needed and worked right out of the box
This will give you the version currently in nixpkgs, which is 1.19.1 at the time of this post.
Installing the most recent version is only slightly more work. Copy the vintagestory nix file from nixpkgs to a local file called vintagestory.nix, with a small wrapper around it:
let pkgs = import <nixpkgs> {};
in pkgs.callPackage (
{ lib
, stdenv
, fetchurl
, makeWrapper
, makeDesktopItem
, copyDesktopItems
, xorg
, gtk2
, sqlite
, openal
, cairo
, libGLU
, SDL2
, freealut
, libglvnd
, pipewire
, libpulseaudio
, dotnet-runtime_7
}:
stdenv.mkDerivation rec {
pname = "vintagestory";
version = "1.19.2";
src = fetchurl {
url = "https://cdn.vintagestory.at/gamefiles/stable/vs_client_linux-x64_${version}.tar.gz";
hash = "sha256-iCvgmZdJLahkmUa+oWiGvuEkL6TQUlUGM6i1jGx6dmI=";
};
nativeBuildInputs = [ makeWrapper copyDesktopItems ];
buildInputs = [ dotnet-runtime_7 ];
runtimeLibs = lib.makeLibraryPath ([
gtk2
sqlite
openal
cairo
libGLU
SDL2
freealut
libglvnd
pipewire
libpulseaudio
] ++ (with xorg; [
libX11
libXi
]));
desktopItems = makeDesktopItem {
name = "vintagestory";
desktopName = "Vintage Story";
exec = "vintagestory";
icon = "vintagestory";
comment = "Innovate and explore in a sandbox world";
categories = [ "Game" ];
};
installPhase = ''
runHook preInstall
mkdir -p $out/share/vintagestory $out/bin $out/share/pixmaps $out/share/fonts/truetype
cp -r * $out/share/vintagestory
cp $out/share/vintagestory/assets/gameicon.xpm $out/share/pixmaps/vintagestory.xpm
cp $out/share/vintagestory/assets/game/fonts/*.ttf $out/share/fonts/truetype
runHook postInstall
'';
preFixup = ''
makeWrapper ${dotnet-runtime_7}/bin/dotnet $out/bin/vintagestory \
--prefix LD_LIBRARY_PATH : "${runtimeLibs}" \
--add-flags $out/share/vintagestory/Vintagestory.dll
makeWrapper ${dotnet-runtime_7}/bin/dotnet $out/bin/vintagestory-server \
--prefix LD_LIBRARY_PATH : "${runtimeLibs}" \
--add-flags $out/share/vintagestory/VintagestoryServer.dll
'' + ''
find "$out/share/vintagestory/assets/" -not -path "*/fonts/*" -regex ".*/.*[A-Z].*" | while read -r file; do
local filename="$(basename -- "$file")"
ln -sf "$filename" "''${file%/*}"/"''${filename,,}"
done
'';
meta = with lib; {
description = "An in-development indie sandbox game about innovation and exploration";
homepage = "https://www.vintagestory.at/";
license = licenses.unfree;
maintainers = with maintainers; [ artturin gigglesquid ];
};
}
) {}
For me, the following worked. First, update the version number, then run
NIXPKGS_ALLOW_UNFREE=1 nix-build vintagestory.nix
This produces an error message about the hash not matching. Update the hash to match and re-run the above command. Then start the game with
result/bin/vintagestory