Compare commits
3 Commits
dead80b8fc
...
94683e2876
Author | SHA1 | Date | |
---|---|---|---|
94683e2876 | |||
a886c52c39 | |||
b0d8884afe |
@ -6,7 +6,3 @@ repos:
|
|||||||
- id: end-of-file-fixer
|
- id: end-of-file-fixer
|
||||||
- id: check-yaml
|
- id: check-yaml
|
||||||
- id: check-added-large-files
|
- id: check-added-large-files
|
||||||
- repo: https://github.com/nix-community/nixpkgs-fmt
|
|
||||||
rev: v1.3.0
|
|
||||||
hooks:
|
|
||||||
- id: nixpkgs-fmt
|
|
||||||
|
12
flake.lock
generated
12
flake.lock
generated
@ -64,11 +64,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1720734513,
|
"lastModified": 1721135958,
|
||||||
"narHash": "sha256-neWQ8eNtLTd+YMesb7WjKl1SVCbDyCm46LUgP/g/hdo=",
|
"narHash": "sha256-H548rpPMsn25LDKn1PCFmPxmWlClJJGnvdzImHkqjuY=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "90ae324e2c56af10f20549ab72014804a3064c7f",
|
"rev": "afd2021bedff2de92dfce0e257a3d03ae65c603d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -124,11 +124,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1720957393,
|
"lastModified": 1721138476,
|
||||||
"narHash": "sha256-oedh2RwpjEa+TNxhg5Je9Ch6d3W1NKi7DbRO1ziHemA=",
|
"narHash": "sha256-+W5eZOhhemLQxelojLxETfbFbc19NWawsXBlapYpqIA=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "693bc46d169f5af9c992095736e82c3488bf7dbb",
|
"rev": "ad0b5eed1b6031efaed382844806550c3dcb4206",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{ pkgs, osConfig, ... }:
|
{ pkgs, osConfig, ... }:
|
||||||
let
|
let
|
||||||
withCuda = if (osConfig.system.name == "gunter") then true else false;
|
withCuda = if (osConfig.system.name == "gunter") then true else false;
|
||||||
|
pob = pkgs.qt6Packages.callPackage ../../packages/pob.nix { };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
@ -28,8 +29,8 @@ in
|
|||||||
kubectl
|
kubectl
|
||||||
ncdu
|
ncdu
|
||||||
nvd
|
nvd
|
||||||
|
nurl
|
||||||
nwg-look
|
nwg-look
|
||||||
path-of-building
|
|
||||||
pinentry
|
pinentry
|
||||||
pre-commit
|
pre-commit
|
||||||
pulseaudio
|
pulseaudio
|
||||||
@ -105,5 +106,7 @@ in
|
|||||||
(btop.override { cudaSupport = withCuda; })
|
(btop.override { cudaSupport = withCuda; })
|
||||||
# PrismLauncher
|
# PrismLauncher
|
||||||
(prismlauncher.override { withWaylandGLFW = true; })
|
(prismlauncher.override { withWaylandGLFW = true; })
|
||||||
|
|
||||||
|
pob
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
94
packages/pob.nix
Normal file
94
packages/pob.nix
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
{
|
||||||
|
stdenv,
|
||||||
|
lib,
|
||||||
|
fetchFromGitHub,
|
||||||
|
unzip,
|
||||||
|
meson,
|
||||||
|
ninja,
|
||||||
|
pkg-config,
|
||||||
|
qtbase,
|
||||||
|
qttools,
|
||||||
|
wrapQtAppsHook,
|
||||||
|
luajit,
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
data = stdenv.mkDerivation (finalAttrs: {
|
||||||
|
pname = "path-of-building-data";
|
||||||
|
version = "2.43.0-beta";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "PathOfBuildingCommunity";
|
||||||
|
repo = "PathOfBuilding";
|
||||||
|
rev = "520e4aea9583ce33bf2c1494fc1b5dc128696797";
|
||||||
|
hash = "sha256-E7UgJpsC0YnqG2KbZYxbYRDPoZ2+NfyYCn4fK+QN5WM=";
|
||||||
|
};
|
||||||
|
|
||||||
|
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
|
||||||
|
];
|
||||||
|
buildInputs = [
|
||||||
|
qtbase
|
||||||
|
luajit
|
||||||
|
luajit.pkgs.lua-curl
|
||||||
|
];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
install -Dm555 pobfrontend $out/bin/pobfrontend
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
preFixup = ''
|
||||||
|
qtWrapperArgs+=(
|
||||||
|
--set LUA_PATH "$LUA_PATH"
|
||||||
|
--set LUA_CPATH "$LUA_CPATH"
|
||||||
|
--chdir "${data}"
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
|
||||||
|
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.isDarwin; # doesn't find uic6 for some reason
|
||||||
|
};
|
||||||
|
}
|
21
scripts/update-pob.sh
Executable file
21
scripts/update-pob.sh
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -eo pipefail
|
||||||
|
|
||||||
|
# TODO: Update pobfrontend as well?
|
||||||
|
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
nurl_output=$(nurl -j https://github.com/PathOfBuildingCommunity/PathOfBuilding 2>/dev/null)
|
||||||
|
rev=$(jq '.args.rev' <<< "$nurl_output")
|
||||||
|
else
|
||||||
|
nurl_output=$(nurl -j https://github.com/PathOfBuildingCommunity/PathOfBuilding "$1" 2>/dev/null)
|
||||||
|
fi
|
||||||
|
|
||||||
|
hash=$(jq '.args.hash' <<< "$nurl_output")
|
||||||
|
echo "Updating pob to $rev"
|
||||||
|
|
||||||
|
# Find lines to replace
|
||||||
|
line_numbers=$(grep -Fn "rev =" packages/pob.nix| cut -d":" -f1)
|
||||||
|
line_data=$(head -n1 <<< "$line_numbers")
|
||||||
|
|
||||||
|
sed -i "${line_data}s/.*/ rev = $rev;/" packages/pob.nix
|
||||||
|
nixfmt packages/pob.nix
|
Loading…
x
Reference in New Issue
Block a user