Merge pull request #225391 from K900/pob
path-of-building: init at 2.28.0-unstable-2023-04-09
This commit is contained in:
commit
0fac11230d
5 changed files with 102 additions and 0 deletions
|
@ -40,6 +40,7 @@ lrexlib-pcre,,,,,,vyp
|
||||||
lrexlib-posix,,,,,,
|
lrexlib-posix,,,,,,
|
||||||
lua-cjson,,,,,,
|
lua-cjson,,,,,,
|
||||||
lua-cmsgpack,,,,,,
|
lua-cmsgpack,,,,,,
|
||||||
|
lua-curl,,,,,,
|
||||||
lua-iconv,,,,,,
|
lua-iconv,,,,,,
|
||||||
lua-lsp,,,,,,
|
lua-lsp,,,,,,
|
||||||
lua-messagepack,,,,,,
|
lua-messagepack,,,,,,
|
||||||
|
|
|
|
@ -1121,6 +1121,29 @@ buildLuarocksPackage {
|
||||||
};
|
};
|
||||||
}) {};
|
}) {};
|
||||||
|
|
||||||
|
lua-curl = callPackage({ lua, buildLuarocksPackage, fetchzip, luaOlder, luaAtLeast }:
|
||||||
|
buildLuarocksPackage {
|
||||||
|
pname = "lua-curl";
|
||||||
|
version = "0.3.13-1";
|
||||||
|
knownRockspec = (fetchurl {
|
||||||
|
url = "mirror://luarocks/lua-curl-0.3.13-1.rockspec";
|
||||||
|
sha256 = "0lz534sm35hxazf1w71hagiyfplhsvzr94i6qyv5chjfabrgbhjn";
|
||||||
|
}).outPath;
|
||||||
|
src = fetchzip {
|
||||||
|
url = "https://github.com/Lua-cURL/Lua-cURLv3/archive/v0.3.13.zip";
|
||||||
|
sha256 = "0gn59bwrnb2mvl8i0ycr6m3jmlgx86xlr9mwnc85zfhj7zhi5anp";
|
||||||
|
};
|
||||||
|
|
||||||
|
disabled = (luaOlder "5.1") || (luaAtLeast "5.5");
|
||||||
|
propagatedBuildInputs = [ lua ];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
homepage = "https://github.com/Lua-cURL";
|
||||||
|
description = "Lua binding to libcurl";
|
||||||
|
license.fullName = "MIT/X11";
|
||||||
|
};
|
||||||
|
}) {};
|
||||||
|
|
||||||
lua-iconv = callPackage({ fetchurl, lua, buildLuarocksPackage, luaOlder }:
|
lua-iconv = callPackage({ fetchurl, lua, buildLuarocksPackage, luaOlder }:
|
||||||
buildLuarocksPackage {
|
buildLuarocksPackage {
|
||||||
pname = "lua-iconv";
|
pname = "lua-iconv";
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# do not add pkgs, it messes up splicing
|
# do not add pkgs, it messes up splicing
|
||||||
{ stdenv
|
{ stdenv
|
||||||
, cmake
|
, cmake
|
||||||
|
, curl
|
||||||
, cyrus_sasl
|
, cyrus_sasl
|
||||||
, dbus
|
, dbus
|
||||||
, expat
|
, expat
|
||||||
|
@ -255,6 +256,12 @@ with prev;
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
lua-curl = prev.luaLib.overrideLuarocks prev.lua-curl (drv: {
|
||||||
|
buildInputs = [
|
||||||
|
curl
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
lua-iconv = prev.luaLib.overrideLuarocks prev.lua-iconv (drv: {
|
lua-iconv = prev.luaLib.overrideLuarocks prev.lua-iconv (drv: {
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
libiconv
|
libiconv
|
||||||
|
|
69
pkgs/games/path-of-building/default.nix
Normal file
69
pkgs/games/path-of-building/default.nix
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
{ stdenv, lib, fetchFromGitHub, runCommand, unzip, meson, ninja, pkg-config, qtbase, qttools, wrapQtAppsHook, luajit }:
|
||||||
|
let
|
||||||
|
dataVersion = "2.28.0";
|
||||||
|
frontendVersion = "unstable-2023-04-09";
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
pname = "path-of-building";
|
||||||
|
version = "${dataVersion}-${frontendVersion}";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "ernstp";
|
||||||
|
repo = "pobfrontend";
|
||||||
|
rev = "9faa19aa362f975737169824c1578d5011487c18";
|
||||||
|
hash = "sha256-zhw2PZ6ZNMgZ2hG+a6AcYBkeg7kbBHNc2eSt4if17Wk=";
|
||||||
|
};
|
||||||
|
|
||||||
|
data = runCommand "path-of-building-data" {
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "PathOfBuildingCommunity";
|
||||||
|
repo = "PathOfBuilding";
|
||||||
|
rev = "v${dataVersion}";
|
||||||
|
hash = "sha256-IO6qUE6OcjNibljNzcJQlwji3DZqrBm7cvHedKuAwpM=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ unzip ];
|
||||||
|
}
|
||||||
|
''
|
||||||
|
# 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
|
||||||
|
'';
|
||||||
|
|
||||||
|
nativeBuildInputs = [ meson ninja pkg-config qttools wrapQtAppsHook ];
|
||||||
|
buildInputs = [ qtbase luajit luajit.pkgs.lua-curl ];
|
||||||
|
dontWrapQtApps = true;
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
install -Dm555 pobfrontend $out/bin/pobfrontend
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
postFixup = ''
|
||||||
|
wrapQtApp $out/bin/pobfrontend \
|
||||||
|
--set LUA_PATH "$LUA_PATH" \
|
||||||
|
--set LUA_CPATH "$LUA_CPATH" \
|
||||||
|
--chdir "$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.isDarwin; # doesn't find uic6 for some reason
|
||||||
|
};
|
||||||
|
}
|
|
@ -36264,6 +36264,8 @@ with pkgs;
|
||||||
|
|
||||||
papermc = callPackage ../games/papermc { };
|
papermc = callPackage ../games/papermc { };
|
||||||
|
|
||||||
|
path-of-building = qt6Packages.callPackage ../games/path-of-building {};
|
||||||
|
|
||||||
pentobi = libsForQt5.callPackage ../games/pentobi { };
|
pentobi = libsForQt5.callPackage ../games/pentobi { };
|
||||||
|
|
||||||
performous = callPackage ../games/performous { };
|
performous = callPackage ../games/performous { };
|
||||||
|
|
Loading…
Reference in a new issue