| author | Tom Harley | 2021-10-06 00:54:19 +0100 |
|---|---|---|
| committer | Tom Harley | 2021-10-06 00:54:19 +0100 |
| commit | b016c7c52409d420c53522ef2efa178e9ca18335 (patch) | |
| tree | 64899c2650e058417aa8cdf55770dbc7c7055f38 /path-of-building | |
| parent | Rewrite email addresses (diff) | |
| download | magpkgs-b016c7c52409d420c53522ef2efa178e9ca18335.tar.gz magpkgs-b016c7c52409d420c53522ef2efa178e9ca18335.zip | |
Add Path of Building
The Path of Building Community Fork is a program for managing Path of Exile Builds. Its homepage can be found at:
https://pathofbuilding.community
There are a few caveats to this derivation:
The version of the program used is the portable windows edition, available in the releases section of the GitHub proejct. Ideally, the program would be built from sources for linux, but this is apparently not very easy.
The program has a default save directory, which is set to within the nix store. It should be easy enought to change this directory in the program itself, however…
The configuration of the program is also stored in the nix store (as it’s just a copy of a portable program).
The program opens with an error message, although I can’t find any repercussions from just closing the message and continuing.
| -rw-r--r-- | path-of-building/default.nix | 48 |
diff --git a/path-of-building/default.nix b/path-of-building/default.nix new file mode 100644 index 0000000..a0dbe11 --- /dev/null +++ b/path-of-building/default.nix @@ -0,0 +1,48 @@ +let nixpkgs = import <nixpkgs> {}; in + +{ wine ? nixpkgs.wineWowPackages.full +, stdenv ? nixpkgs.stdenv +, unzip ? nixpkgs.unzip +, fetchurl ? nixpkgs.fetchurl +, writeTextFile ? nixpkgs.writeTextFile +, ... }: + +let + pob-src = stdenv.mkDerivation { + name = "path-of-building-community-data"; + src = fetchurl { + url = https://github.com/PathOfBuildingCommunity/PathOfBuilding/releases/download/v2.7.0/PathOfBuildingCommunity-Portable-2.7.0.zip; + sha256 = "0ybw5f07h676hcdimhdbvacj53ky9lr47vvinya4sj7plkkq49ii"; + }; + dontUnpack = true; + nativeBuildInputs = [ + unzip + ]; + installPhase = '' + unzip $src -d $out + ''; + }; + +in stdenv.mkDerivation rec { + pname = "path-of-building-community"; + version = "2.7.0"; + + pob_script = writeTextFile { + name = "pob-script"; + executable = true; + + text = '' + #!/bin/sh + ${wine}/bin/wine "${pob-src}/Path of Building.exe" + ''; + }; + + dontUnpack = true; + + src = pob_script; + + installPhase = '' + mkdir -p $out/bin + cp $src $out/bin/pob + ''; + } |
