1{ lib
2, stdenv
3, buildNpmPackage
4, fetchFromGitHub
5, python3
6, xcbuild
7}:
8
9buildNpmPackage rec {
10 pname = "firebase-tools";
11 version = "12.4.8";
12
13 src = fetchFromGitHub {
14 owner = "firebase";
15 repo = "firebase-tools";
16 rev = "v${version}";
17 hash = "sha256-uyw3M6EWRaiDLZg1MH1weiXih5hWh5Kz3HnB1xXISNA=";
18 };
19
20 npmDepsHash = "sha256-AjUREpqQX9+7tjO68Q9WIWQ71l5O641Oc+3Pr2khP4s=";
21
22 postPatch = ''
23 ln -s npm-shrinkwrap.json package-lock.json
24 '';
25
26 nativeBuildInputs = [
27 python3
28 ] ++ lib.optionals stdenv.isDarwin [
29 xcbuild
30 ];
31
32 env = {
33 PUPPETEER_SKIP_DOWNLOAD = true;
34 };
35
36 meta = {
37 changelog = "https://github.com/firebase/firebase-tools/blob/${src.rev}/CHANGELOG.md";
38 description = "Manage, and deploy your Firebase project from the command line";
39 homepage = "https://github.com/firebase/firebase-tools";
40 license = lib.licenses.mit;
41 mainProgram = "firebase";
42 maintainers = with lib.maintainers; [ ];
43 };
44}