unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Moving and/or renaming Commander.js package
@ 2022-02-13 14:17 Matthew James Kraai
  0 siblings, 0 replies; only message in thread
From: Matthew James Kraai @ 2022-02-13 14:17 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 360 bytes --]

Hi,

I'm trying to package elm-test.  It depends on Commander.js, which is 
packaged as js-commander in gnu/packages/javascript.scm. In order for 
elm-test to find Commander.js, I modified js-commander to use 
node-build-system.  Should I also move it to gnu/packages/node-xyz.scm 
and/or rename it to node-commander?

I've attached the current patch.

Matt

[-- Attachment #2: 0001-gnu-js-commander-Use-node-build-system.patch --]
[-- Type: text/x-patch, Size: 2755 bytes --]

From 86fbafe61efad4d3e955ee8a94b6779755084bd6 Mon Sep 17 00:00:00 2001
From: Matthew James Kraai <kraai@ftbfs.org>
Date: Sun, 13 Feb 2022 06:14:23 -0800
Subject: [PATCH] gnu: js-commander: Use node-build-system.

* gnu/packages/javascript.scm (js-commander)[build-system]: Use
node-build-system.
[arguments]: Delete dev dependencies and disable tests.
---
 gnu/packages/javascript.scm | 33 ++++++++++++++++-----------------
 1 file changed, 16 insertions(+), 17 deletions(-)

diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm
index c453ac432a..cc944dd2f8 100644
--- a/gnu/packages/javascript.scm
+++ b/gnu/packages/javascript.scm
@@ -36,6 +36,7 @@ (define-module (gnu packages javascript)
   #:use-module (guix git-download)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system node)
   #:use-module (guix build-system trivial)
   #:use-module (guix build-system minify)
   #:use-module (guix utils))
@@ -322,24 +323,22 @@ (define-public js-commander
        (sha256
         (base32
          "126m25s6mxpxmdj4aw5awz06b47r8r798lcf1c5bnmmh39cik5i1"))))
-    (build-system trivial-build-system)
+    (build-system node-build-system)
     (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils))
-         (chdir (assoc-ref %build-inputs "source"))
-         (let ((esbuild (search-input-file %build-inputs "/bin/esbuild"))
-               (target (string-append %output "/share/javascript/commander")))
-           (invoke esbuild
-                   "--bundle"
-                   "--minify"
-                   "--tsconfig=tsconfig.json"
-                   "--platform=node"
-                   (string-append "--outfile=" target "/index.min.js")
-                   "index.js")))))
-    (native-inputs
-     (list esbuild))
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'patch-dependencies 'delete-dependencies
+           (lambda args
+             (delete-dependencies `("@types/jest"
+                                    "@types/node"
+                                    "@typescript-eslint/eslint-plugin"
+                                    "eslint"
+                                    "eslint-config-standard-with-typescript"
+                                    "eslint-plugin-jest"
+                                    "jest"
+                                    "standard"
+                                    "typescript")))))
+       #:tests? #f))
     (home-page "https://github.com/tj/commander.js")
     (synopsis "Library for node.js command-line interfaces")
     (description "Commander.js aims to be the complete solution for node.js
-- 
2.34.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-13 14:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-13 14:17 Moving and/or renaming Commander.js package Matthew James Kraai

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).