all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Efraim Flashner <efraim@flashner.co.il>
To: Ryan Prior <rprior@protonmail.com>
Cc: 43840@debbugs.gnu.org
Subject: [bug#43840] [PATCH] gnu: Add esbuild.
Date: Wed, 7 Oct 2020 09:34:31 +0300	[thread overview]
Message-ID: <20201007063431.GH21174@E5400> (raw)
In-Reply-To: <20201007023119.22495-1-rprior@protonmail.com>

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

On Wed, Oct 07, 2020 at 02:31:24AM +0000, Ryan Prior via Guix-patches via wrote:
> * gnu/packages/web.scm (esbuild): New variable.
> ---
>  gnu/packages/web.scm | 28 ++++++++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
> 
> diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
> index b798e0abca..1e2f2e7e10 100644
> --- a/gnu/packages/web.scm
> +++ b/gnu/packages/web.scm
> @@ -1345,6 +1345,34 @@ used to validate and fix HTML data.")
>      (home-page "http://tidy.sourceforge.net/")
>      (license (license:x11-style "file:///include/tidy.h"))))
>  
> +(define-public esbuild
> +  (package
> +    (name "esbuild")
> +    (version "0.7.11")
> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri (git-reference
> +             (url "https://github.com/evanw/esbuild")
> +             (commit (string-append "v" version))))
> +       (file-name (git-file-name name version))
> +       (sha256
> +        (base32
> +         "08lx1i0s1q3my6x4csz746rc3c2fl4p0hyrwx4rpx80gwwjj1i11"))))
> +    (build-system go-build-system)
> +    (arguments
> +     '(#:import-path "github.com/evanw/esbuild/cmd/esbuild"
> +       #:unpack-path "github.com/evanw/esbuild"))
> +    (inputs
> +     `(("go-golang-org-x-sys" ,go-golang-org-x-sys)))
> +    (home-page "https://github.com/evanw/esbuild")
> +    (synopsis "Bundler and minifier tool for JavaScript and TypeScript")
> +    (description
> +     "The esbuild tool provides a unified bundler, transpiler and
> +minifier.  It packages up JavaScript and TypeScript code, along with JSON
> +and other data, for distribution on the web.")
> +    (license license:expat)))
> +
>  (define-public tinyproxy
>    (package
>      (name "tinyproxy")
> -- 
> 2.17.1
> 

First pass, I don't see a vendor directory that needs to be deleted, and
it does seem to only really depend on go-golang-org-x-sys, which is
nice. There is an npm directory which is where the compiled binaries are
placed, there are a couple in the checked out repo.

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 1e2f2e7e10..f55f1a02d9 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -1358,7 +1358,13 @@ used to validate and fix HTML data.")
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "08lx1i0s1q3my6x4csz746rc3c2fl4p0hyrwx4rpx80gwwjj1i11"))))
+         "08lx1i0s1q3my6x4csz746rc3c2fl4p0hyrwx4rpx80gwwjj1i11"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           ;; Remove pre-compiled binaries
+           (delete-file-recursively "npm")
+           #t))))
     (build-system go-build-system)
     (arguments
      '(#:import-path "github.com/evanw/esbuild/cmd/esbuild"

`esbuild --help` still works after removing the npm directory.

Is it worth trying to run some of the test suite? I see there are a
couple of 'make check' type targets in the Makefile at the root of the
repository and currently there are none run during the build.

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2020-10-07  6:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-07  2:31 [bug#43840] [PATCH] gnu: Add esbuild Ryan Prior via Guix-patches via
2020-10-07  6:34 ` Efraim Flashner [this message]
2020-10-08  2:08   ` Ryan Prior via Guix-patches via
2020-10-11 10:28     ` Efraim Flashner
2020-10-11 16:15       ` Ryan Prior via Guix-patches via
2020-10-11 16:16 ` [bug#43840] [PATCH 1/2] gnu: Add go-github-com-kylelemons-godebug Ryan Prior via Guix-patches via
2020-10-11 16:16   ` [bug#43840] [PATCH 2/2] gnu: Add esbuild Ryan Prior via Guix-patches via
2020-10-12  6:41     ` bug#43840: " Efraim Flashner

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

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

  git send-email \
    --in-reply-to=20201007063431.GH21174@E5400 \
    --to=efraim@flashner.co.il \
    --cc=43840@debbugs.gnu.org \
    --cc=rprior@protonmail.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.