google-clasp: use nodePackages."@google/clasp"

This commit is contained in:
Malo Bourgon 2022-02-14 13:37:11 -08:00
parent 973855b843
commit 61cce0f23c
8 changed files with 1 additions and 2183 deletions

View File

@ -1,6 +0,0 @@
## 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

@ -1,19 +0,0 @@
{ lib, stdenv, pkgs }:
let
version = "2.2.1";
in
(import ./google-clasp.nix {
inherit pkgs;
inherit (stdenv.hostPlatform) system;
})."@google/clasp-${version}".override {
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 = lib.licenses.asl20;
maintainers = [ lib.maintainers.michojel ];
priority = 100;
};
}

View File

@ -1,13 +0,0 @@
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

@ -1,9 +0,0 @@
#!/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

@ -1,17 +0,0 @@
# This file has been generated by node2nix 1.9.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 lib python2 runCommand writeTextFile writeShellScript;
inherit pkgs nodejs;
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
};
in
import ./node-packages.nix {
inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit;
inherit nodeEnv;
}

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -6069,7 +6069,7 @@ with pkgs;
google-fonts = callPackage ../data/fonts/google-fonts { };
google-clasp = callPackage ../development/misc/google-clasp { };
google-clasp = nodePackages."@google/clasp";
google-compute-engine = with python38.pkgs; toPythonApplication google-compute-engine;