guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/03: gnu: Add esbuild.


From: guix-commits
Subject: 02/03: gnu: Add esbuild.
Date: Mon, 12 Oct 2020 02:49:23 -0400 (EDT)

efraim pushed a commit to branch master
in repository guix.

commit 5137c73e29929c892c9dbd143fd920014a2ef193
Author: Ryan Prior via Guix-patches via <guix-patches@gnu.org>
AuthorDate: Sun Oct 11 16:16:29 2020 +0000

    gnu: Add esbuild.
    
    * gnu/packages/web.scm (esbuild): New variable.
    
    Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
---
 gnu/packages/web.scm | 45 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 1699c92..0c17f27 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -45,6 +45,7 @@
 ;;; Copyright © 2018, 2019, 2020 Björn Höfling 
<bjoern.hoefling@bjoernhoefling.de>
 ;;; Copyright © 2020 Paul Garlick <pgarlick@tourbillion-technology.com>
 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
+;;; Copyright © 2020 Ryan Prior <rprior@protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1346,6 +1347,50 @@ 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.14")
+    (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
+         "1y5hqymv2r8r29f8vh8kgncj3wlkg4fzi0zlc7mgyss872ajkc7i"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           ;; Remove prebuilt binaries
+           (delete-file-recursively "npm")
+           #t))))
+    (build-system go-build-system)
+    (arguments
+     '(#:import-path "github.com/evanw/esbuild/cmd/esbuild"
+       #:unpack-path "github.com/evanw/esbuild"
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key tests? unpack-path #:allow-other-keys)
+             (if tests?
+               (with-directory-excursion (string-append "src/" unpack-path)
+                 (invoke "make" "test-go")))
+             #t)))))
+    (inputs
+     `(("go-golang-org-x-sys" ,go-golang-org-x-sys)))
+    (native-inputs
+     `(("go-github-com-kylelemons-godebug" ,go-github-com-kylelemons-godebug)))
+    (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")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]