Add entangled worlds
Some checks failed
build / build (push) Failing after 29s

This commit is contained in:
Torjus Håkestad 2025-04-14 23:02:41 +02:00
parent 89f2269e2a
commit d26c26988d
Signed by: torjus
SSH Key Fingerprint: SHA256:KjAds8wHfD2mBYK2H815s/+ABcSdcIHUndwHEdSxml4
4 changed files with 201 additions and 2 deletions

View File

@ -31,6 +31,9 @@
vintagestory-unstable = final: prev: {
vintagestory-unstable = self.packages.${prev.system}.vintagestory-unstable;
};
noita-entangled-worlds = final: prev: {
noita-entangled-worlds = self.packages.${prev.system}.noita-entangled-worlds;
};
};
packages = forAllSystems (
@ -38,7 +41,9 @@
{
awakened-poe-trade = pkgs.callPackage ./pkgs/awakened-poe-trade { };
path-of-building-beta = pkgs.qt6Packages.callPackage ./pkgs/path-of-building-beta { };
path-of-building-poe2 = pkgs.qt6Packages.callPackage ./pkgs/path-of-building-poe2 { };
vintagestory-unstable = pkgs.callPackage ./pkgs/vintagestory { };
noita-entangled-worlds = pkgs.callPackage ./pkgs/noita-entangled-worlds { };
}
);
};

View File

@ -0,0 +1,62 @@
{
lib,
alsa-lib,
gtk3,
fetchFromGitHub,
rustPlatform,
openssl,
pkg-config,
jack2,
python3,
cmake,
libopus,
steam-run,
}:
rustPlatform.buildRustPackage rec {
pname = "noita-entangled-worlds-proxy";
version = "v1.5.1";
src = fetchFromGitHub {
owner = "IntQuant";
repo = "noita_entangled_worlds";
rev = version;
hash = "sha256-v5aulgWkPhgkPHfHb1j/39JauKfFhFCHRfBgm2UJHYc=";
};
sourceRoot = "${src.name}/noita-proxy";
useFetchCargoVendor = true;
cargoHash = "sha256-1YkLTp3QUaC1oU1SwmuOJMTklptfZu2gIonDyLfLhCk=";
buildInputs = [
gtk3
openssl
jack2
alsa-lib
libopus
];
nativeBuildInputs = [
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
'';
checkFlags = [
# reason for disabling test
"--skip=bookkeeping::releases::test::release_assets"
];
}

View File

@ -19,8 +19,8 @@ let
src = fetchFromGitHub {
owner = "PathOfBuildingCommunity";
repo = "PathOfBuilding";
rev = "f6d095a527017a1b2fd7b523d349f321bfdc2f58";
hash = "sha256-/pnirZSZBGpbVTdm/jmBzzdMdAiCcYlOiff7HQ2nINM=";
rev = "6a146e6c36c3549cce668c2b5424e04618ddd4a6";
hash = "sha256-q1WE2KpLvQqznOzbk39ThQGg7pvT7MES58uizpz+/EQ=";
};
nativeBuildInputs = [ unzip ];

View File

@ -0,0 +1,132 @@
{
stdenv,
lib,
fetchFromGitHub,
unzip,
meson,
ninja,
pkg-config,
qtbase,
qttools,
wrapQtAppsHook,
icoutils,
copyDesktopItems,
makeDesktopItem,
luajit,
}:
let
data = stdenv.mkDerivation (finalAttrs: {
pname = "path-of-building-poe2-data";
version = "0.5.0";
src = fetchFromGitHub {
owner = "PathOfBuildingCommunity";
repo = "PathOfBuilding-PoE2";
rev = "v${finalAttrs.version}";
hash = "sha256-/Jh/DZElpS0CKCThDHKTI3gfDFCuD1FxrWVIhrrdMog=";
};
nativeBuildInputs = [ unzip ];
buildCommand = ''
# I have absolutely no idea how this file is generated
# and I don't think I want to know. The Flatpak also does this.
unzip -j -d $out $src/runtime-win32.zip lua/sha1.lua
# Install the actual data
cp -r $src/src $src/runtime/lua/*.lua $src/manifest.xml $out
# Pretend this is an official build so we don't get the ugly "dev mode" warning
substituteInPlace $out/manifest.xml --replace '<Version' '<Version platform="nixos"'
touch $out/installed.cfg
# Completely stub out the update check
chmod +w $out/src/UpdateCheck.lua
echo 'return "none"' > $out/src/UpdateCheck.lua
'';
});
in
stdenv.mkDerivation {
pname = "path-of-building";
version = "${data.version}-unstable-2023-04-09";
src = fetchFromGitHub {
owner = "ernstp";
repo = "pobfrontend";
rev = "9faa19aa362f975737169824c1578d5011487c18";
hash = "sha256-zhw2PZ6ZNMgZ2hG+a6AcYBkeg7kbBHNc2eSt4if17Wk=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
qttools
wrapQtAppsHook
icoutils
] ++ lib.optional stdenv.hostPlatform.isLinux copyDesktopItems;
buildInputs = [
qtbase
luajit
luajit.pkgs.lua-curl
luajit.pkgs.luautf8
];
installPhase = ''
runHook preInstall
install -Dm555 pobfrontend $out/bin/pobfrontend
wrestool -x -t 14 ${data.src}/runtime/Path{space}of{space}Building-PoE2.exe -o pathofbuilding.ico
icotool -x pathofbuilding.ico
for size in 16 32 48 256; do
mkdir -p $out/share/icons/hicolor/"$size"x"$size"/apps
install -Dm 644 pathofbuilding*"$size"x"$size"*.png \
$out/share/icons/hicolor/"$size"x"$size"/apps/pathofbuilding.png
done
rm pathofbuilding.ico
runHook postInstall
'';
preFixup = ''
qtWrapperArgs+=(
--set LUA_PATH "$LUA_PATH"
--set LUA_CPATH "$LUA_CPATH"
--chdir "${data}"
)
'';
desktopItems = [
(makeDesktopItem {
name = "path-of-building";
desktopName = "Path of Building";
comment = "Offline build planner for Path of Exile";
exec = "pobfrontend %U";
terminal = false;
type = "Application";
icon = "pathofbuilding";
categories = [ "Game" ];
keywords = [
"poe"
"pob"
"pobc"
"path"
"exile"
];
mimeTypes = [ "x-scheme-handler/pob" ];
})
];
passthru.data = data;
meta = {
description = "Offline build planner for Path of Exile";
homepage = "https://pathofbuilding.community/";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.k900 ];
mainProgram = "pobfrontend";
broken = stdenv.hostPlatform.isDarwin; # doesn't find uic6 for some reason
};
}