Skip to content

Commit

Permalink
wip: google-clasp: repackage using buildNpmPackage
Browse files Browse the repository at this point in the history
  • Loading branch information
natsukium committed May 4, 2023
1 parent f31f50b commit d131262
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
1 change: 0 additions & 1 deletion pkgs/development/node-packages/node-packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
, "@commitlint/config-conventional"
, "@emacs-eask/cli"
, "@forge/cli"
, "@google/clasp"
, "@medable/mdctl-cli"
, "@microsoft/rush"
, "@nerdwallet/shepherd"
Expand Down
29 changes: 29 additions & 0 deletions pkgs/development/tools/google-clasp/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{ lib
, buildNpmPackage
, fetchFromGitHub
}:

buildNpmPackage rec {
pname = "clasp";
version = "2.4.2";

src = fetchFromGitHub {
owner = "google";
repo = "clasp";
rev = "refs/tags/v${version}";
hash = "sha256-Cnnqbxjfx7hlRYIDtbjSbDO0QBHqLsleIGrAUQDLaCw=";
};

npmDepsHash = "sha256-4oYpGBpk4WBVnE1HNYmRRGHZgcPgta2YQB00YyWvbiI=";

# `npm run build` tries installing clasp globally
npmBuildScript = [ "compile" ];

meta = with lib; {
description = "Develop Apps Script Projects locally";
homepage = "https://github.com/google/clasp#readme";
changelog = "https://github.com/google/clasp/releases/tag/v${version}";
license = licenses.asl20;
maintainers = with maintainers; [ natsukium ];
};
}
2 changes: 1 addition & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7994,7 +7994,7 @@ with pkgs;

google-fonts = callPackage ../data/fonts/google-fonts { };

google-clasp = nodePackages."@google/clasp";
google-clasp = callPackage ../development/tools/google-clasp { };

google-compute-engine = with python38.pkgs; toPythonApplication google-compute-engine;

Expand Down

0 comments on commit d131262

Please sign in to comment.