18 data = stdenv.mkDerivation (finalAttrs: {
19 pname = "path-of-building-data";
22 src = fetchFromGitHub {
23 owner = "PathOfBuildingCommunity";
24 repo = "PathOfBuilding";
25 rev = "v${finalAttrs.version}";
26 hash = "sha256-rxvReL2ofdaQdKmIg2lMDT0thN1IkeJMf1B7+HWlQaI=";
29 nativeBuildInputs = [ unzip ];
32 # I have absolutely no idea how this file is generated
33 # and I don't think I want to know. The Flatpak also does this.
34 unzip -j -d $out $src/runtime-win32.zip lua/sha1.lua
36 # Install the actual data
37 cp -r $src/src $src/runtime/lua/*.lua $src/manifest.xml $out
39 # Pretend this is an official build so we don't get the ugly "dev mode" warning
40 substituteInPlace $out/manifest.xml --replace '<Version' '<Version platform="nixos"'
41 touch $out/installed.cfg
43 # Completely stub out the update check
44 chmod +w $out/src/UpdateCheck.lua
45 echo 'return "none"' > $out/src/UpdateCheck.lua
50 pname = "path-of-building";
51 version = "${data.version}-unstable-2023-04-09";
53 src = fetchFromGitHub {
56 rev = "9faa19aa362f975737169824c1578d5011487c18";
57 hash = "sha256-zhw2PZ6ZNMgZ2hG+a6AcYBkeg7kbBHNc2eSt4if17Wk=";
67 ] ++ lib.optional stdenv.hostPlatform.isLinux copyDesktopItems;
77 install -Dm555 pobfrontend $out/bin/pobfrontend
79 wrestool -x -t 14 ${data.src}/runtime/Path{space}of{space}Building.exe -o pathofbuilding.ico
80 icotool -x pathofbuilding.ico
82 for size in 16 32 48 256; do
83 mkdir -p $out/share/icons/hicolor/"$size"x"$size"/apps
84 install -Dm 644 pathofbuilding*"$size"x"$size"*.png \
85 $out/share/icons/hicolor/"$size"x"$size"/apps/pathofbuilding.png
94 --set LUA_PATH "$LUA_PATH"
95 --set LUA_CPATH "$LUA_CPATH"
102 name = "path-of-building";
103 desktopName = "Path of Building";
104 comment = "Offline build planner for Path of Exile";
105 exec = "pobfrontend %U";
107 type = "Application";
108 icon = "pathofbuilding";
109 categories = [ "Game" ];
117 mimeTypes = [ "x-scheme-handler/pob" ];
121 passthru.data = data;
124 description = "Offline build planner for Path of Exile";
125 homepage = "https://pathofbuilding.community/";
126 license = lib.licenses.mit;
127 maintainers = [ lib.maintainers.k900 ];
128 mainProgram = "pobfrontend";
129 broken = stdenv.hostPlatform.isDarwin; # doesn't find uic6 for some reason