This commit is contained in:
parent
d26c26988d
commit
95373805cd
11
flake.nix
11
flake.nix
@ -13,7 +13,16 @@
|
||||
"aarch64-darwin"
|
||||
];
|
||||
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
|
||||
{
|
||||
overlays = {
|
||||
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
lib,
|
||||
alsa-lib,
|
||||
gtk3,
|
||||
fetchFromGitHub,
|
||||
@ -11,9 +10,10 @@
|
||||
cmake,
|
||||
libopus,
|
||||
steam-run,
|
||||
writeShellApplication,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
let
|
||||
entangled = rustPlatform.buildRustPackage rec {
|
||||
pname = "noita-entangled-worlds-proxy";
|
||||
version = "v1.5.1";
|
||||
|
||||
@ -39,24 +39,25 @@ rustPlatform.buildRustPackage rec {
|
||||
pkg-config
|
||||
python3
|
||||
cmake
|
||||
steam-run
|
||||
];
|
||||
preInstall = ''
|
||||
mkdir -p $out/share/lib64/noita-proxy
|
||||
cp ${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
|
||||
cp -r ${src}/redist/libsteam_api.so $out/share/lib64/noita-proxy
|
||||
'';
|
||||
checkFlags = [
|
||||
# reason for disabling test
|
||||
"--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" "$@"
|
||||
'';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user