unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Matthew James Kraai <kraai@ftbfs.org>
To: guix-devel@gnu.org
Subject: Moving and/or renaming Commander.js package
Date: Sun, 13 Feb 2022 06:17:21 -0800	[thread overview]
Message-ID: <354d5f14-7016-4827-05f3-ca9a0ff15e3d@ftbfs.org> (raw)

[-- 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


                 reply	other threads:[~2022-02-13 14:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=354d5f14-7016-4827-05f3-ca9a0ff15e3d@ftbfs.org \
    --to=kraai@ftbfs.org \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).