digitalalovestory-bin: link missing libraries & excise steam-run

This commit is contained in:
Katherina Walshe-Grey 2024-06-24 16:52:06 +01:00
parent d841c56b8f
commit ab1dd67e72

View file

@ -1,16 +1,13 @@
{ stdenv { stdenv
, lib , lib
, fetchzip , fetchzip
, steam-run , zlib
# , zlib , autoPatchelfHook
# , autoPatchelfHook , xorg
, libpulseaudio
, alsa-lib
}: }:
# TODO: Shouldn't need the whole steam-run FHS env.
# Adding autoPatchelfHook and zlib lets it build and run,
# but pygame errors out with "error: No available video device".
# It may be more practical to just create a version built from source.
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "digitalalovestory-bin"; pname = "digitalalovestory-bin";
version = "1.1"; version = "1.1";
@ -20,13 +17,22 @@ stdenv.mkDerivation rec {
sha256 = "+7KcZ8dKts1AoKWNfHMKIt+w2fBFIAcnkuAtzSw49xk="; sha256 = "+7KcZ8dKts1AoKWNfHMKIt+w2fBFIAcnkuAtzSw49xk=";
}; };
# nativeBuildInputs = [ nativeBuildInputs = [
# autoPatchelfHook autoPatchelfHook
# ]; ];
buildInputs = [ buildInputs = [
steam-run zlib
# zlib ];
appendRunpaths = [
"${xorg.libX11}/lib"
"${xorg.libXext}/lib"
"${xorg.libXrender}/lib"
"${xorg.libXrandr}/lib"
"${xorg.libXcursor}/lib"
"${libpulseaudio}/lib"
"${alsa-lib}/lib"
]; ];
sourceRoot = "."; sourceRoot = ".";
@ -47,9 +53,6 @@ stdenv.mkDerivation rec {
sed -i "s#dir=.*#dir=$out/opt/Digital-linux-x86#g" $out/opt/Digital-linux-x86/Digital.sh sed -i "s#dir=.*#dir=$out/opt/Digital-linux-x86#g" $out/opt/Digital-linux-x86/Digital.sh
sed -i 's/base=.*/base=Digital.sh/g' $out/opt/Digital-linux-x86/Digital.sh sed -i 's/base=.*/base=Digital.sh/g' $out/opt/Digital-linux-x86/Digital.sh
# wrap in steam-run
sed -i 's#exec#exec "${steam-run}/bin/steam-run"#g' $out/opt/Digital-linux-x86/Digital.sh
# link entrypoint to bin directory # link entrypoint to bin directory
mkdir -p $out/bin mkdir -p $out/bin
ln -s $out/opt/Digital-linux-x86/Digital.sh $out/bin/Digital ln -s $out/opt/Digital-linux-x86/Digital.sh $out/bin/Digital