unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#40860] [PATCH] yarnpkg
@ 2020-04-26  2:15 Kozo
  2020-04-26 17:42 ` Christopher Baines
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Kozo @ 2020-04-26  2:15 UTC (permalink / raw)
  To: 40860

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

Hello,

This is my first submission. Please let me know how I can improve for
future packages.

I followed the steps in the manual and submitted a Software Heritage
request to pull the source code.

Thank you,
Kozo

[-- Attachment #2: 0001-yarnpkg.patch --]
[-- Type: text/x-patch, Size: 2299 bytes --]

From cf6cecd960225bab04cc33041e42d4e0cf4a075c Mon Sep 17 00:00:00 2001
From: Kozodev <gitlabcanada@runbox.com>
Date: Sat, 25 Apr 2020 20:09:34 -0600
Subject: [PATCH] yarnpkg

---
 yarn.scm | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100644 yarn.scm

diff --git a/yarn.scm b/yarn.scm
new file mode 100644
index 0000000..4a1a57b
--- /dev/null
+++ b/yarn.scm
@@ -0,0 +1,47 @@
+(define-module (yarn)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system trivial)
+  #:use-module (guix licenses)
+  #:use-module (gnu packages node)
+  #:use-module (ice-9 pretty-print))
+
+(define yarn-version "1.22.4")
+
+(define-public yarn
+  (package
+   (name "yarn")
+   (version yarn-version)
+   (source (origin
+    (method url-fetch/tarbomb)
+    (uri (string-append "https://github.com/yarnpkg/yarn/releases/download/v"
+     version "/yarn-v" version ".tar.gz"))
+    (sha256
+     (base32
+      "0n7vhwjz3lyjnavcaw08cqa8gfampqsy5mm3f555cbqb26m1clxw"))))
+   (build-system trivial-build-system)
+   (outputs '("out"))
+   (inputs `(("node" ,node)))
+   (arguments
+    `(#:modules ((guix build utils))
+      #:builder (begin
+  (use-modules (guix build utils))
+                  (let* ((out (assoc-ref %outputs "out"))
+   (bin (string-append  out "/bin"))
+   (lib (string-append  out "/lib"))
+                         (node-modules (string-append lib "/node_modules"))
+                         (yarn (string-append node-modules "/yarn"))
+                         (input-dir (string-append
+     (assoc-ref %build-inputs "source") "/yarn-v" ,version)))
+    (mkdir-p yarn)
+    (mkdir-p bin)
+    (copy-recursively (string-append input-dir "/") yarn)
+    (symlink (string-append yarn "/bin/yarn") (string-append bin "/yarn"))
+    (symlink (string-append yarn "/bin/yarnpkg") (string-append bin "/yarnpkg"))
+    (delete-file (string-append yarn "/bin/yarn.cmd"))
+    (delete-file (string-append yarn "/bin/yarnpkg.cmd"))))))
+   (home-page "https://yarnpkg.com/")
+   (synopsis "Dependency management tool for JavaScript")
+   (description "Fast, reliable, and secure dependency management tool
+for JavaScript.  Acts as a drop-in replacement for NodeJS's npm.")
+   (license bsd-2)))
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-05-05  7:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-26  2:15 [bug#40860] [PATCH] yarnpkg Kozo
2020-04-26 17:42 ` Christopher Baines
2020-04-26 18:16 ` Jakub Kądziołka
2020-04-27 14:10 ` [bug#40860] [PATCH] Yarnpkg Kozo
2020-04-27 18:28   ` bug#40860: " Björn Höfling
2020-05-04 19:28 ` [bug#40860] (no subject) Kozo via web
2020-05-05  7:08   ` Björn Höfling

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).