1 { stdenv, lib, fetchFromGitHub, unzip, meson, ninja, pkg-config, qtbase, qttools, wrapQtAppsHook, luajit }:
3 data = stdenv.mkDerivation(finalAttrs: {
4 pname = "path-of-building-data";
7 src = fetchFromGitHub {
8 owner = "PathOfBuildingCommunity";
9 repo = "PathOfBuilding";
10 rev = "v${finalAttrs.version}";
11 hash = "sha256-i6OCW5Vc9/LfNuiaEeelmXiqP7+WdIklRNRcgWb7L1w=";
14 nativeBuildInputs = [ unzip ];
17 # I have absolutely no idea how this file is generated
18 # and I don't think I want to know. The Flatpak also does this.
19 unzip -j -d $out $src/runtime-win32.zip lua/sha1.lua
21 # Install the actual data
22 cp -r $src/src $src/runtime/lua/*.lua $src/manifest.xml $out
24 # Pretend this is an official build so we don't get the ugly "dev mode" warning
25 substituteInPlace $out/manifest.xml --replace '<Version' '<Version platform="nixos"'
26 touch $out/installed.cfg
28 # Completely stub out the update check
29 chmod +w $out/src/UpdateCheck.lua
30 echo 'return "none"' > $out/src/UpdateCheck.lua
35 pname = "path-of-building";
36 version = "${data.version}-unstable-2023-04-09";
38 src = fetchFromGitHub {
41 rev = "9faa19aa362f975737169824c1578d5011487c18";
42 hash = "sha256-zhw2PZ6ZNMgZ2hG+a6AcYBkeg7kbBHNc2eSt4if17Wk=";
45 nativeBuildInputs = [ meson ninja pkg-config qttools wrapQtAppsHook ];
46 buildInputs = [ qtbase luajit luajit.pkgs.lua-curl ];
50 install -Dm555 pobfrontend $out/bin/pobfrontend
56 --set LUA_PATH "$LUA_PATH"
57 --set LUA_CPATH "$LUA_CPATH"
65 description = "Offline build planner for Path of Exile";
66 homepage = "https://pathofbuilding.community/";
67 license = lib.licenses.mit;
68 maintainers = [ lib.maintainers.k900 ];
69 mainProgram = "pobfrontend";
70 broken = stdenv.isDarwin; # doesn't find uic6 for some reason