From patchwork Wed Apr 15 15:36:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Giacomo Leidi X-Patchwork-Id: 21268 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 47FC227BBE4; Wed, 15 Apr 2020 16:37:26 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_ADSP_ALL, DKIM_SIGNED,MAILING_LIST_MULTI,T_DKIM_INVALID,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id C0D8E27BBE1 for ; Wed, 15 Apr 2020 16:37:25 +0100 (BST) Received: from localhost ([::1]:51870 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOk6O-0006il-VQ for patchwork@mira.cbaines.net; Wed, 15 Apr 2020 11:37:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56994) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOk64-0006iI-FN for guix-patches@gnu.org; Wed, 15 Apr 2020 11:37:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jOk63-0000CD-2C for guix-patches@gnu.org; Wed, 15 Apr 2020 11:37:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53635) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jOk62-0000Bb-Gx for guix-patches@gnu.org; Wed, 15 Apr 2020 11:37:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jOk62-0004Br-Cp for guix-patches@gnu.org; Wed, 15 Apr 2020 11:37:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#36599] [PATCH] gnu: Add node-semver. (Updated) Resent-From: goodoldpaul@autistici.org Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 15 Apr 2020 15:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36599 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Efraim Flashner Cc: 36599@debbugs.gnu.org Received: via spool by 36599-submit@debbugs.gnu.org id=B36599.158696497416035 (code B ref 36599); Wed, 15 Apr 2020 15:37:02 +0000 Received: (at 36599) by debbugs.gnu.org; 15 Apr 2020 15:36:14 +0000 Received: from localhost ([127.0.0.1]:36948 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jOk5F-0004AZ-Jk for submit@debbugs.gnu.org; Wed, 15 Apr 2020 11:36:13 -0400 Received: from latitanza.investici.org ([82.94.249.234]:34225) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jOk5A-0004AL-Ux for 36599@debbugs.gnu.org; Wed, 15 Apr 2020 11:36:12 -0400 Received: from 1.mail-backend.investici.org (unknown [10.0.0.11]) by latitanza.investici.org (Postfix) with ESMTP id 8D1BF12015E; Wed, 15 Apr 2020 15:36:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1586964966; bh=xjlial+VOUQzN7a0u8BQnWlig538NCx/yDHPqbxe4pY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=j7rAMu7ZviFF7/R0g/ezEJ8inCmApcE3kYmLl6ZD5oX1bZZuKrWhro22KhGxyqGST h9UwZnarazN60kFDuqhuFyyDm2OQgHe1DvleFuF19t7lirN2Aj/qzEF1Sv4DorZ7qm x762iVh4HKkMk5vL+R9G0sflf9Tqyl27ginygwpg= Received: from 1.webmail.investici.org (localhost [127.0.0.1]) (Authenticated sender: goodoldpaul@autistici.org) by 1.mail-backend.investici.org (Postfix) with ESMTPA id 6A6AFC1FA7; Wed, 15 Apr 2020 15:36:06 +0000 (UTC) MIME-Version: 1.0 Date: Wed, 15 Apr 2020 15:36:06 +0000 From: goodoldpaul@autistici.org In-Reply-To: <20200409200150.GQ1518@E5400> References: <20190711121221.16123-1-goodoldpaul@autistici.org> <20200409200150.GQ1518@E5400> User-Agent: Roundcube Webmail Message-ID: X-Sender: goodoldpaul@autistici.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hi Efraim, > Overall it looks good to me. I also checked npm¹ and it agrees that > there are no dependencies for this package. Do you happen to know why > there's a test directory installed? I don't know if it's supposed to be > there but it seems strange to me I didn't notice and I agree that tests shouldn't be installed but IIUC it's a limitation of the node-build-system that copies recursively the contents of the node_modules directory. I checked and it seems that other packages using the node-build-system have the same problem (i.e. node-color-name install test.js, node-far installs a test directory). One way to fix this could be adding an extra phase (either to each package or in the node-build-system with a special field indicating a list of tests directories) where we delete the test directory from node_modules preventing the copy. On my system I get orang3@frastanato ~/code/guix [env]$ du -sh /gnu/store/5kkb1nya9ws12b2qxsn0r7904nx6v5b5-node-semver-7.2.1 732K /gnu/store/5kkb1nya9ws12b2qxsn0r7904nx6v5b5-node-semver-7.2.1 orang3@frastanato ~/code/guix [env]$ du -sh /gnu/store/5kkb1nya9ws12b2qxsn0r7904nx6v5b5-node-semver-7.2.1/lib/node_modules/semver/test/ 264K /gnu/store/5kkb1nya9ws12b2qxsn0r7904nx6v5b5-node-semver-7.2.1/lib/node_modules/semver/test/ which is not much but amounts nearly to 1/3 of the total disk usage of semver. If you believe that another phase deleting the tests would be better I attached an attempt. Giacomo From 77ffe7c3a0be8e215f4f4ae0b780385ffe39c1a2 Mon Sep 17 00:00:00 2001 From: Giacomo Leidi Date: Wed, 8 Apr 2020 00:59:13 +0200 Subject: [PATCH] gnu: Add node-semver. * gnu/packages/node-xyz.scm (node-semver): New variable. --- gnu/packages/node-xyz.scm | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm index 44236ec469..93328969e5 100644 --- a/gnu/packages/node-xyz.scm +++ b/gnu/packages/node-xyz.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2020 Efraim Flashner +;;; Copyright © 2020 Giacomo Leidi ;;; ;;; This file is part of GNU Guix. ;;; @@ -244,3 +245,34 @@ protocol used in @code{node-lynx}.") (description "This package provides the Node.js @code{util.deprecate()} function with browser support.") (license license:expat))) + +(define-public node-semver + (package + (name "node-semver") + (version "7.2.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/npm/node-semver.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "06biknqb05r9xsmcflm3ygh50pjvdk84x6r79w43kmck4fn3qn5p")))) + (build-system node-build-system) + (arguments + `(#:tests? #f ;; FIXME: Tests depend on node-tap + #:phases + (modify-phases %standard-phases + (add-before 'install 'delete-tests-dir + (lambda _ + ;; Delete tests to prevent installing them + (delete-file-recursively "test") + (delete-file-recursively "tap-snapshots") + #t))))) + (home-page "https://github.com/npm/node-semver") + (synopsis "Parses semantic versions strings") + (description + "@code{node-semver} is a JavaScript implementation of the +@uref{https://semver.org/, SemVer.org} specification.") + (license license:isc))) -- 2.26.1