blob: 1fef2b0890d1352e818669f774165dddb649831a (
plain)
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
53
54
55
56
|
{pkgs, ...}:
let
patchSources = src: patches: pkgs.stdenv.mkDerivation {
name = "${src.name}-patched";
inherit patches src;
buildPhase = "mkdir -p $out";
installPhase = "cp -r * $out";
};
sources = {
tcm = pkgs.fetchFromGitHub {
owner = "thecodingmachine";
repo = "workadventure";
rev = "4966789b3b3abe8d00362553a827bc9a257ce6d3";
sha256 = "0nq6zg95wsq2ldqhi7w7alvb9krmzrqkgzq0m24cfvpm42agl1xc";
};
fediventure = pkgs.fetchFromGitLab {
owner = "fediventure";
repo = "workadventure";
rev = "e769e713c6058efac6959437df6a02da02b8e065";
sha256 = "13243az0b2w69wmbf5z0qnbd9rfixkj61c844c97sy2h136159yd";
};
xce = pkgs.fetchFromGitHub {
owner = "workadventure-xce";
repo = "workadventure-xce";
rev = "ba439ca6699a7e5751386d5bed5c44e375e12eb6";
sha256 = "1r6dpn8biisrqij5v2pg1vlifgvv93fnqppyp2l9wzls5am3rx6x";
};
};
wapkgs =
pkgs.lib.fix (self: let
mkWorkadventureSet = waSelf: workadventuresrc: name:
let
callWaPackage = path: pkgs.lib.callPackageWith
# some parts of workadventure depend on other parts of workadventure
(self // { workadventure = waSelf;})
(import path workadventuresrc name);
in
{
back = callWaPackage ./back {};
pusher = callWaPackage ./pusher {};
messages = callWaPackage ./messages {};
front = callWaPackage ./front {};
uploader = callWaPackage ./uploader {};
maps = callWaPackage ./maps {};
};
in pkgs // rec {
tcm = mkWorkadventureSet tcm (patchSources sources.tcm [ ./tcm.patch ]) "tcm";
fediventure = mkWorkadventureSet fediventure sources.fediventure "fediventure";
xce = mkWorkadventureSet xce (patchSources sources.xce [ ./xce.patch ]) "xce";
});
in {
workadventure-tcm = wapkgs.tcm;
workadventure-fediventure = wapkgs.fediventure;
workadventure-xce = wapkgs.xce;
}
|