google-clasp: init at 2.2.1 (#43376)

* google-clasp: init at version 2.2.1

Useful for developing Google's Apps Scripts.

Signed-off-by: Michal Minář <mic.liamg@gmail.com>

* fixed license

Signed-off-by: Michal Minář <mic.liamg@gmail.com>
This commit is contained in:
Michal Minář 2019-08-22 13:29:43 +02:00 committed by Maximilian Bosch
parent 8b6b9533ef
commit f0c12c4795
8 changed files with 2170 additions and 0 deletions

View File

@ -0,0 +1,6 @@
## How to update
1. bump version of `@google/clasp` in [node-packages.json](./node-packages.json)
2. run [generate.sh](./generate.sh)
3. set the same version in [default.nix](./default.nix)
4. build and test it

View File

@ -0,0 +1,19 @@
{ stdenv, pkgs }:
let
version = "2.2.1";
in
(import ./google-clasp.nix {
inherit pkgs;
inherit (stdenv.hostPlatform) system;
})."@google/clasp-${version}".override rec {
preRebuild = ''
patch -p1 <<<"${builtins.readFile ./dotf.patch}"
'';
meta = {
description = "Command Line tool for Google Apps Script Projects";
homepage = https://developers.google.com/apps-script/guides/clasp;
license = stdenv.lib.licenses.asl20;
maintainers = [ stdenv.lib.maintainers.michojel ];
priority = 100;
};
}

View File

@ -0,0 +1,13 @@
Index: nodejs/tmp/xcindf87mmqyp0x5blima5q2m9fw3dx3-node__at_google_slash_clasp-2.2.1/lib/node_modules/@google/clasp/src/dotfile.js
===================================================================
--- clasp.orig/src/dotfile.js
+++ clasp/src/dotfile.js
@@ -94,7 +94,7 @@ exports.DOTFILE = {
return dotf(projectPath ? path_1.default.dirname(projectPath) : exports.DOT.PROJECT.DIR, exports.DOT.PROJECT.NAME);
},
// Stores {ClaspCredentials}
- RC: dotf(exports.DOT.RC.DIR, exports.DOT.RC.NAME),
+ RC: dotf.default(exports.DOT.RC.DIR, exports.DOT.RC.NAME),
// Stores {ClaspCredentials}
RC_LOCAL: function () {
var localPath = find_up_1.default.sync(exports.DOT.PROJECT.PATH);

View File

@ -0,0 +1,9 @@
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p nodePackages.node2nix
set -eu -o pipefail
exec node2nix --nodejs-10 \
-i node-packages.json -o node-packages.nix \
-c google-clasp.nix \
--no-copy-node-env -e ../../../development/node-packages/node-env.nix

View File

@ -0,0 +1,17 @@
# This file has been generated by node2nix 1.6.0. Do not edit!
{pkgs ? import <nixpkgs> {
inherit system;
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-10_x"}:
let
nodeEnv = import ../../node-packages/node-env.nix {
inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile;
inherit nodejs;
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
};
in
import ./node-packages.nix {
inherit (pkgs) fetchurl fetchgit;
inherit nodeEnv;
}

View File

@ -0,0 +1,3 @@
[
{"@google/clasp": "2.2.1"}
]

File diff suppressed because it is too large Load Diff

View File

@ -3477,6 +3477,8 @@ in
google-fonts = callPackage ../data/fonts/google-fonts { };
google-clasp = callPackage ../development/misc/google-clasp { };
google-compute-engine = python2.pkgs.google-compute-engine;
google-compute-engine-oslogin = callPackage ../tools/virtualization/google-compute-engine-oslogin { };