aboutsummaryrefslogtreecommitdiff
path: root/maps/default.nix
blob: 230b074e8a52d5d614b67acdf4e5c3669dc33119 (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
workadventuresrc: waname:

{ stdenv
, fetchFromGitHub
, makeWrapper
, yarn2nix-moretea
, ... }:

yarn2nix-moretea.mkYarnPackage rec {
  pname = "workadventuremaps-${waname}";
  version = "unstable";
  name = pname + "-" + version;

  src = "${workadventuresrc}/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/workadventuremaps $out
  '';
}