>From 9ad29ede5b26a9052518adb422bc66398c38c9b4 Mon Sep 17 00:00:00 2001 From: swedebugia Date: Fri, 30 Nov 2018 20:52:42 +0100 Subject: [PATCH 1/2] guix: Add a "npm-uri" helper method. * guix/build-system/node.scm (npm-uri): New method. --- guix/build-system/node.scm | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/guix/build-system/node.scm b/guix/build-system/node.scm index b6d362904..ce0d9f84c 100644 --- a/guix/build-system/node.scm +++ b/guix/build-system/node.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016 Jelle Licht +;;; Copyright © 2018 swedebugia ;;; ;;; This file is part of GNU Guix. ;;; @@ -30,7 +31,22 @@ #:export (npm-meta-uri %node-build-system-modules node-build - node-build-system)) + node-build-system + npm-uri)) + +;; Commentary: +;; +;; Standard build procedure for Node packages using 'packages.json' and +;; Makefiles. This is implemented as an extension of 'gnu-build-system'. +;; +;; Code: + +(define* (npm-uri name version #:optional (extension ".tgz")) + "Return a URI string for the NPM package hosted on the NPM Registry +corresponding to NAME and VERSION. EXTENSION is the file name extension, such +as '.tar.gz'. E.g. https://registry.npmjs.org/async/-/async-1.8.0.tgz" + (string-append "https://registry.npmjs.org/" name "/-/" name "-" version + extension)) (define (npm-meta-uri name) "Return a URI string for the metadata of node module NAME found in the npm -- 2.19.1