aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--default.nix2
-rw-r--r--path-of-building/default.nix48
2 files changed, 50 insertions, 0 deletions
diff --git a/default.nix b/default.nix
index b11c717..2b83c02 100644
--- a/default.nix
+++ b/default.nix
@@ -7,6 +7,8 @@ let
magpkgs = rec {
callPackage = callPackageWith (nixpkgs // magpkgs);
+ path-of-building = callPackage ./path-of-building {};
+
minion = callPackage ./minion {};
savilerow = callPackage ./savilerow {};
conjure = callPackage ./conjure {};
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
+ '';
+ }