diff options
Diffstat (limited to 'path-of-building/default.nix')
| -rw-r--r-- | path-of-building/default.nix | 48 |
1 files changed, 48 insertions, 0 deletions
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 + ''; + } |
