diff options
author | stuebinm | 2021-03-09 15:38:16 +0100 |
---|---|---|
committer | stuebinm | 2021-03-09 15:38:16 +0100 |
commit | 6908ecac521c0ddf3d8af75adefa7209f7a8719c (patch) | |
tree | 62714c31f3c0cef23d56d82f05682fbf729dcec6 /wapkgs.nix | |
parent | ead8c570b6dfd00531bf7ada77e08bbd9955b731 (diff) |
Added hasi workadventure version
wapkgs.nix new contains packages for several different versions of
workadventure (so far hasi + thecodingmachine), which can both be used.
Unfortunately, this appears to require some weird hacks to convince nix
to sort out the dependencies without having to actually duplicate all
the packaging code, but it works.
Diffstat (limited to '')
-rw-r--r-- | wapkgs.nix | 54 |
1 files changed, 35 insertions, 19 deletions
@@ -1,23 +1,39 @@ {pkgs, lib, ...}: let - workadventuresrc = pkgs.fetchFromGitHub { - owner = "thecodingmachine"; - repo = "workadventure"; - rev = "6e9c71598004dc9cbab9418efb3c0ac892da7ca2"; - sha256 = "0rvra0dy631al4aylacyqldkyd6biawz2shsikgcy30nv5lzc78c"; + codingmachine = pkgs.fetchFromGitHub { + owner = "thecodingmachine"; + repo = "workadventure"; + rev = "6e9c71598004dc9cbab9418efb3c0ac892da7ca2"; + sha256 = "0rvra0dy631al4aylacyqldkyd6biawz2shsikgcy30nv5lzc78c"; }; -in - lib.fix (self: let - callWaPackage = path: lib.callPackageWith self (import path workadventuresrc); - in pkgs // { - workadventure = { - back = callWaPackage ./back {}; - pusher = callWaPackage ./pusher {}; - messages = callWaPackage ./messages {}; - front = callWaPackage ./front {}; - uploader = callWaPackage ./uploader {}; - maps = callWaPackage ./maps {}; - }; - }) - + hasi = pkgs.fetchgit { + url = "https://gitlab.hasi.it/herzi/project/workadventure"; + rev = "686a85330f59b2d4373f37d8a009d4763607ca19"; + sha256 = "1kxdhf5x97qhm8v1cbi4dnbvj01i1kh66cyhwad60vw60d9lz0az"; + }; + wapkgs = + lib.fix (self: let + mkWorkadventureset = waSelf: workadventuresrc: name: + let + callWaPackage = path: 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"; + }); +in { + workadventure-hasi = wapkgs.workadventure-hasi; + workadventure-tcm = wapkgs.workadventure-tcm; +} |