Merge pull request #249488 from K900/pob-2.31.2

path-of-building: 2.31.1 -> 2.31.2, clean up

authored by Pol Dellaiera and committed by GitHub 8f937650 15200d66

+40 -37
+40 -37
pkgs/games/path-of-building/default.nix
··· 1 - { stdenv, lib, fetchFromGitHub, runCommand, unzip, meson, ninja, pkg-config, qtbase, qttools, wrapQtAppsHook, luajit }: 2 let 3 - dataVersion = "2.31.1"; 4 - frontendVersion = "unstable-2023-04-09"; 5 in 6 stdenv.mkDerivation { 7 pname = "path-of-building"; 8 - version = "${dataVersion}-${frontendVersion}"; 9 10 src = fetchFromGitHub { 11 owner = "ernstp"; ··· 14 hash = "sha256-zhw2PZ6ZNMgZ2hG+a6AcYBkeg7kbBHNc2eSt4if17Wk="; 15 }; 16 17 - data = runCommand "path-of-building-data" { 18 - src = fetchFromGitHub { 19 - owner = "PathOfBuildingCommunity"; 20 - repo = "PathOfBuilding"; 21 - rev = "v${dataVersion}"; 22 - hash = "sha256-K/u8NYUv4U/XgGP/LkYMRzwmw1LFn25OW6bmvqqRpVQ="; 23 - }; 24 - 25 - nativeBuildInputs = [ unzip ]; 26 - } 27 - '' 28 - # I have absolutely no idea how this file is generated 29 - # and I don't think I want to know. The Flatpak also does this. 30 - unzip -j -d $out $src/runtime-win32.zip lua/sha1.lua 31 - 32 - # Install the actual data 33 - cp -r $src/src $src/runtime/lua/*.lua $src/manifest.xml $out 34 - 35 - # Pretend this is an official build so we don't get the ugly "dev mode" warning 36 - substituteInPlace $out/manifest.xml --replace '<Version' '<Version platform="nixos"' 37 - touch $out/installed.cfg 38 - 39 - # Completely stub out the update check 40 - chmod +w $out/src/UpdateCheck.lua 41 - echo 'return "none"' > $out/src/UpdateCheck.lua 42 - ''; 43 - 44 nativeBuildInputs = [ meson ninja pkg-config qttools wrapQtAppsHook ]; 45 buildInputs = [ qtbase luajit luajit.pkgs.lua-curl ]; 46 - dontWrapQtApps = true; 47 48 installPhase = '' 49 runHook preInstall ··· 51 runHook postInstall 52 ''; 53 54 - postFixup = '' 55 - wrapQtApp $out/bin/pobfrontend \ 56 - --set LUA_PATH "$LUA_PATH" \ 57 - --set LUA_CPATH "$LUA_CPATH" \ 58 - --chdir "$data" 59 ''; 60 61 meta = { 62 description = "Offline build planner for Path of Exile";
··· 1 + { stdenv, lib, fetchFromGitHub, unzip, meson, ninja, pkg-config, qtbase, qttools, wrapQtAppsHook, luajit }: 2 let 3 + data = stdenv.mkDerivation(finalAttrs: { 4 + pname = "path-of-building-data"; 5 + version = "2.31.2"; 6 + 7 + src = fetchFromGitHub { 8 + owner = "PathOfBuildingCommunity"; 9 + repo = "PathOfBuilding"; 10 + rev = "v${finalAttrs.version}"; 11 + hash = "sha256-E178uYVQ+B08h1lM7h+hwfMb08VZK+r25pD4haT1tc8="; 12 + }; 13 + 14 + nativeBuildInputs = [ unzip ]; 15 + 16 + buildCommand = '' 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 20 + 21 + # Install the actual data 22 + cp -r $src/src $src/runtime/lua/*.lua $src/manifest.xml $out 23 + 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 27 + 28 + # Completely stub out the update check 29 + chmod +w $out/src/UpdateCheck.lua 30 + echo 'return "none"' > $out/src/UpdateCheck.lua 31 + ''; 32 + }); 33 in 34 stdenv.mkDerivation { 35 pname = "path-of-building"; 36 + version = "${data.version}-unstable-2023-04-09"; 37 38 src = fetchFromGitHub { 39 owner = "ernstp"; ··· 42 hash = "sha256-zhw2PZ6ZNMgZ2hG+a6AcYBkeg7kbBHNc2eSt4if17Wk="; 43 }; 44 45 nativeBuildInputs = [ meson ninja pkg-config qttools wrapQtAppsHook ]; 46 buildInputs = [ qtbase luajit luajit.pkgs.lua-curl ]; 47 48 installPhase = '' 49 runHook preInstall ··· 51 runHook postInstall 52 ''; 53 54 + preFixup = '' 55 + qtWrapperArgs+=( 56 + --set LUA_PATH "$LUA_PATH" 57 + --set LUA_CPATH "$LUA_CPATH" 58 + --chdir "${data}" 59 + ) 60 ''; 61 + 62 + passthru.data = data; 63 64 meta = { 65 description = "Offline build planner for Path of Exile";