aboutsummaryrefslogtreecommitdiff
path: root/wapkgs.nix
blob: 1922adb4e43d8a251accb80871bfcfea3d1655a5 (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
{pkgs, ...}:

let
  codingmachine = pkgs.fetchFromGitHub {
     owner = "thecodingmachine";
     repo = "workadventure";
     rev = "6e9c71598004dc9cbab9418efb3c0ac892da7ca2";
     sha256 = "0rvra0dy631al4aylacyqldkyd6biawz2shsikgcy30nv5lzc78c";
  };
  hasi = pkgs.fetchgit {
    url = "https://gitlab.hasi.it/herzi/project/workadventure";
    rev = "c7303a458d8de3d3aa095738987d089e62684a1a";
    sha256 = "0gbax61jd6bdhql94mfyqabih20y9an042c5bixqkpk0rzv0c95l";
  };
  tabascoeye = pkgs.fetchFromGitHub {
    owner = "tabascoeye";
    repo = "workadventure";
    rev = "1824ce3ad469693c0d7bd0dbbd0fc84246889fdd";
    sha256 = "1h5wx5v09hlx680pq1rpzadzc2cylmyx0szxmpsjvilnnv7vplhd";
  };
  fediventure = pkgs.fetchFromGitLab {
    owner = "fediventure";
    repo = "workadventure";
    rev = "e769e713c6058efac6959437df6a02da02b8e065";
    sha256 = "13243az0b2w69wmbf5z0qnbd9rfixkj61c844c97sy2h136159yd";
  };
  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 {
      workadventure-hasi = mkWorkadventureset workadventure-hasi hasi "hasi";
      workadventure-tcm = mkWorkadventureset workadventure-tcm codingmachine "tcm";
      workadventure-tabascoeye = mkWorkadventureset workadventure-tabascoeye tabascoeye "tabascoeye";
      workadventure-fediventure = mkWorkadventureset workadventure-fediventure fediventure "fediventure";
    });
in {
  workadventure-hasi = pkgs.lib.mapAttrs (name: pkg: pkg.overrideAttrs(old: { meta.broken = true; })) wapkgs.workadventure-hasi;
  workadventure-tcm = wapkgs.workadventure-tcm;
  workadventure-tabascoeye = wapkgs.workadventure-tabascoeye;
  workadventure-fediventure = wapkgs.workadventure-fediventure;
}