aboutsummaryrefslogtreecommitdiff
path: root/maps/default.nix
blob: 5142f1edb0d89c9230c3d3d0251da79450f8d308 (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
{ stdenv
, fetchFromGitHub
, makeWrapper
, yarn2nix-moretea
, ... }:

yarn2nix-moretea.mkYarnPackage rec {
  pname = "workadventuremaps";
  version = "unstable";

  src = fetchFromGitHub
    {
      owner = "thecodingmachine";
      repo = "workadventure";
      rev = "6e9c71598004dc9cbab9418efb3c0ac892da7ca2";
      sha256 = "0rvra0dy631al4aylacyqldkyd6biawz2shsikgcy30nv5lzc78c";
    } + "/maps";

  # NOTE: this is optional and generated dynamically if omitted
  yarnNix = ./yarn.nix;

  nativeBuildInputs = [ makeWrapper ];

  dontStrip = true;

  buildPhase = ''
    mkdir -p $out
    HOME=$TMPDIR yarn --offline run tsc
    cp -r deps/${pname} $out
  '';
}