blob: 4249e64a6815a4ae9f087d7f85d754b38deca96f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
let nixpkgs = import <nixpkgs> {}; in
{ wine
, stdenv
, unzip
, fetchurl
, 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";
# };
src = fetchurl {
url = https://github.com/PathOfBuildingCommunity/PathOfBuilding/releases/download/v2.9.0/PathOfBuildingCommunity-Portable-2.9.0.zip;
sha256 = "0129zbz5dl5j0gk979n9k395773z74ighsd30b2fb1ympcjnyn87";
};
dontUnpack = true;
nativeBuildInputs = [
unzip
];
installPhase = ''
unzip $src -d $out
'';
};
in stdenv.mkDerivation rec {
pname = "path-of-building-community";
version = "2.9.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
'';
}
|