Improve entangled worlds
All checks were successful
build / build (push) Successful in 22m12s

This commit is contained in:
Torjus Håkestad 2025-04-15 00:29:10 +02:00
parent d26c26988d
commit 95373805cd
Signed by: torjus
SSH Key Fingerprint: SHA256:KjAds8wHfD2mBYK2H815s/+ABcSdcIHUndwHEdSxml4
2 changed files with 53 additions and 43 deletions

View File

@ -13,7 +13,16 @@
"aarch64-darwin" "aarch64-darwin"
]; ];
forAllSystems = forAllSystems =
f: nixpkgs.lib.genAttrs allSystems (system: f { pkgs = import nixpkgs { inherit system; }; }); f:
nixpkgs.lib.genAttrs allSystems (
system:
f {
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
}
);
in in
{ {
overlays = { overlays = {

View File

@ -1,5 +1,4 @@
{ {
lib,
alsa-lib, alsa-lib,
gtk3, gtk3,
fetchFromGitHub, fetchFromGitHub,
@ -11,9 +10,10 @@
cmake, cmake,
libopus, libopus,
steam-run, steam-run,
writeShellApplication,
}: }:
let
rustPlatform.buildRustPackage rec { entangled = rustPlatform.buildRustPackage rec {
pname = "noita-entangled-worlds-proxy"; pname = "noita-entangled-worlds-proxy";
version = "v1.5.1"; version = "v1.5.1";
@ -39,24 +39,25 @@ rustPlatform.buildRustPackage rec {
pkg-config pkg-config
python3 python3
cmake cmake
steam-run
]; ];
preInstall = '' preInstall = ''
mkdir -p $out/share/lib64/noita-proxy mkdir -p $out/share/lib64/noita-proxy
cp ${src}/redist/libsteam_api.so $out/share/lib64/noita-proxy cp -r ${src}/redist/libsteam_api.so $out/share/lib64/noita-proxy
'';
postInstall = ''
mv $out/bin/noita-proxy $out/bin/noita-proxy-unwrapped
cat > $out/bin/noita-proxy <<EOF
#!/usr/bin/env bash
export LD_PRELOAD=$out/share/lib64/noita-proxy/libsteam_api.so
exec ${steam-run}/bin/steam-run $out/bin/noita-proxy-unwrapped
EOF
chmod +x $out/bin/noita-proxy
''; '';
checkFlags = [ checkFlags = [
# reason for disabling test # reason for disabling test
"--skip=bookkeeping::releases::test::release_assets" "--skip=bookkeeping::releases::test::release_assets"
]; ];
};
in
writeShellApplication {
name = "noita-proxy-${entangled.version}";
runtimeInputs = [
entangled
steam-run
];
text = ''
export LD_PRELOAD=${entangled}/share/lib64/noita-proxy/libsteam_api.so
exec steam-run "${entangled}/bin/noita-proxy" "$@"
'';
} }