Code change:
<del> { stdenv, fetchurl, binutils-unwrapped, sconsPackages, gnum4, p7zip, glibc_multi, mesa , xorg, libGLU, libGL, openal , lib, makeWrapper, makeDesktopItem }: let pname = "tdm"; version = "2.08"; desktop = makeDesktopItem { desktopName = pname; name = pname; exec = "@out@/bin/${pname}"; icon = pname; terminal = "false"; comment = "The Dark Mod - stealth FPS inspired by the Thief series"; type = "Application"; categories = "Game;"; genericName = pname; fileValidation = false; }; in stdenv.mkDerivation { name = "${pname}-${version}"; src = fetchurl { url = "https://www.thedarkmod.com/sources/thedarkmod.${version}.src.7z"; sha256 = "0bmv07j6s6q3m7hnpx7cwrycjkbvlf0y9sg9migakni0jg9yz5ps"; }; nativeBuildInputs = [ p7zip sconsPackages.scons_3_1_2 gnum4 makeWrapper ]; buildInputs = [ glibc_multi mesa.dev xorg.libX11.dev openal xorg.libXext.dev xorg.libXxf86vm.dev libGL libGLU ]; unpackPhase = '' 7z x $src ''; # I'm pretty sure there's a better way to build 2 targets than a random hook preBuild = '' pushd tdm_update scons BUILD=release TARGET_ARCH=x64 install -Dm755 bin/tdm_update.linux64 $out/share/libexec/tdm_update.linux popd ''; # why oh why can it find ld but not strip? postPatch = '' sed -i 's!strip $!${binutils-unwrapped}/bin/strip $!' SConstruct # This adds math.h needed for math::floor sed -i 's|#include "Util.h"|#include "Util.h"n#include <math.h>|' tdm_update/ConsoleUpdater.cpp ''; installPhase = '' runHook preInstall install -Dm644 ${desktop}/share/applications/${pname}.desktop $out/share/applications/${pname}.desktop substituteInPlace $out/share/applications/${pname}.desktop --subst-var out install -Dm755 thedarkmod.x64 $out/share/libexec/tdm # The package doesn't install assets, these get installed by running tdm_update.linux # Provide a script that runs tdm_update.linux on first launch install -Dm755 <(cat <<'EOF' #!/bin/sh set -e DIR="$HOME/.local/share/tdm" mkdir -p "$DIR" cd "$DIR" exec "PKGDIR/share/libexec/tdm_update.linux" --noselfupdate EOF ) $out/bin/tdm_update install -Dm755 <(cat <<'EOF' #!/bin/sh set -e DIR="$HOME/.local/share/tdm" if [ ! -d "$DIR" ]; then echo "Please run tdm_update to (re)download game data" else cd "$DIR" exec "PKGDIR/share/libexec/tdm" fi EOF ) $out/bin/tdm sed -i "s!PKGDIR!$out!g" $out/bin/tdm_update sed -i "s!PKGDIR!$out!g" $out/bin/tdm runHook postInstall ''; postInstall = '' wrapProgram $out/bin/tdm --suffix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libGL libGLU ]} ''; enableParallelBuilding = true; sconsFlags = [ "BUILD=release" "TARGET_ARCH=x64" ]; NIX_CFLAGS_COMPILE = "-Wno-error=format-security"; meta = with stdenv.lib; { description = "The Dark Mod - stealth FPS inspired by the Thief series"; homepage = "http://www.thedarkmod.com"; license = licenses.gpl3; maintainers = with maintainers; [ cizra ]; platforms = with platforms; [ "x86_64-linux" ];  # tdm also supports x86, but I don't have a x86 install at hand to test. }; } </del>

Related discussion:
text: Describe the bug A clear and concise description of what the bug is. To Reproduce Steps to reproduce the behavior: tdmupdater tdm Expected behavior tdm starts. Actual behaviour tdm starts with a black error and has stderr errors such as: Additional context It looks like the problem might be that and the assets downloaded via tdmupdater are different versions: Workaround (Steam isn't actually used for this. This is just a lazy way to run FHS programs.) Notify maintainers Metadata** Maintainer information:
There's a version update in master. I don't know when it'll land in unstable (maybe it already did?) or stable.
Is it possible to have NixOS stable not break when upstream changes? Either: (a) NixOS stable should include the TDM assets (in which case tdm_update is not needed) (b) becomes solely a shim to grab assets from the TDM assets, so it doesn't matter which version of is used.
require patching the path to ELF interpreter, along with worrying about lib dependencies. complicated: TDM players are accustomed to dowloading extra missions, which requires a writable directory to hold the data. Do you have a proposal how to do this securely? Hardlinking the default install to /home would break if /home is on a different FS. Suid wrappers smell. World-writable bits in /nix smell too.
Surely the engine supports multiple asset directories, so we can load the assets from the nix store in addition to whatever was installed manually into a local directory.
The comments on suggest The Dark Mod stores save games in its installation directory. tracks this issue.
I have another issue that seem to be related. Running tdm via the ` work however. The relevent line are: When it doesn't work and with the second option
I poked around - and I don't have any ideas why OpenAL might not be finding hardware. Right now, it seems that the best course of action is to remove TDM from repos (to avoid creating false expectations), and run it with steam-run. and do you agree?