From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id sPrhH1sOVmApRAAA0tVLHw (envelope-from ) for ; Sat, 20 Mar 2021 15:01:47 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id wDpJG1sOVmAFZwAAB5/wlQ (envelope-from ) for ; Sat, 20 Mar 2021 15:01:47 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3AC97E55E for ; Sat, 20 Mar 2021 16:01:47 +0100 (CET) Received: from localhost ([::1]:53276 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNd6o-00016o-C5 for larch@yhetil.org; Sat, 20 Mar 2021 11:01:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42804) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNd5F-0008TM-1q for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:10 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41477) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lNd5E-0001dT-Fb for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:08 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lNd5E-0000Oj-Dp for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:08 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47282] [PATCH 12/13] gnu: node: Add llhttp-bootstrap. Resent-From: Jelle Licht Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 20 Mar 2021 15:00:08 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47282 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47282@debbugs.gnu.org Received: via spool by 47282-submit@debbugs.gnu.org id=B47282.16162523991400 (code B ref 47282); Sat, 20 Mar 2021 15:00:08 +0000 Received: (at 47282) by debbugs.gnu.org; 20 Mar 2021 14:59:59 +0000 Received: from localhost ([127.0.0.1]:53010 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNd55-0000MT-B9 for submit@debbugs.gnu.org; Sat, 20 Mar 2021 10:59:59 -0400 Received: from mail1.fsfe.org ([217.69.89.151]:47280) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNd4j-0000Kt-4a for 47282@debbugs.gnu.org; Sat, 20 Mar 2021 10:59:37 -0400 From: Jelle Licht Date: Sat, 20 Mar 2021 15:59:24 +0100 Message-Id: <20210320145925.12500-12-jlicht@fsfe.org> In-Reply-To: <20210320145925.12500-1-jlicht@fsfe.org> References: <20210320145925.12500-1-jlicht@fsfe.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1616252507; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=Oz4Jk2AXhxiQ7U3kZtJArgns++mLZ536JKgQOaZmHq4=; b=MnpXzYnn6ELhmzZbfpr00zBxy6SVsGC97vDwm0xQNILm5GaVLnkePoHozGajU7SxGYh6Io /Up9jjAYFvxmm/PAUOwzUOQVic3LOBEiKUdhYn7hnwaBHD93afbgo2d5YCcqaQD5QcTSa4 IqjFadJnGuekrMRHi5EwVrrCwqH2KloGw2EV9XYVE6UjUCps2gVlas5a9M3c/tUbgV7h48 lQhb3qWRlSAHONE+a0UYptlYg0uvmcL1TGzrw4Ese+8isYh4t8fYAq8E1aCXDDVyeJSf1H 9Qm8sW5gRx1p8SJ157fmBmBNYhF2lYPPrICn/SrU1APJiBOFjFr5Lbb/jxKSlg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1616252507; a=rsa-sha256; cv=none; b=tElH3s2pI6rxwemBuUSaZKK09jEE3qXQD2Yvh1hxhhF5jSbqDICF743FQ9TKHjbdNPsg5T kTjYPkkHe1ghljSP3gdeO0u+PgnUnPpTFNzSIXxKB4hz130umovzYittsUrPmnBKaNnW7L dw+7uTP2ih29VMJ3cAHc6gmzJONQjARguoCKjYizjvEnuNoQXUHe/kbM7+kmQRfqBFJLms 4XK5qBEbwj82KPCOXsmgi5Uk1ijCyUGF0lnAlb8H3WIgp/7hTeEB0Cqm/p3f37S0P6a0q2 q0OBsBAVOaCM7lS4+A2SU7TTlCedZ1gL4QmD+0YeyQhEEM8KtjcN9xpv/EL80Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=fsfe.org (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 2.69 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=fsfe.org (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 3AC97E55E X-Spam-Score: 2.69 X-Migadu-Scanner: scn0.migadu.com X-TUID: cOxUVjcILJSt * gnu/packages/node.scm (llhttp-bootstrap): New package. --- gnu/packages/node.scm | 67 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm index 380e959a58..d44bec7ca4 100644 --- a/gnu/packages/node.scm +++ b/gnu/packages/node.scm @@ -539,6 +539,73 @@ compiler.") definition into a C output.") (license license:expat))) +(define-public llhttp-bootstrap + (package + (name "llhttp") + (version "2.1.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/nodejs/llhttp.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "08ylnirqrk63h0ww1m79p0bh6rwayrhd4v28p353qlp3qcffwwb0")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Fix incorrect import semantics + ;; https://github.com/evanw/esbuild/issues/477 + (substitute* "src/llhttp/http.ts" + (("\\* as assert") + "assert")) + (substitute* "Makefile" + (("npx ts-node bin/generate.ts") + "node bin/generate.js")) + #t)))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; no tests + #:make-flags (list "CLANG=gcc" + (string-append "DESTDIR=" (assoc-ref %outputs "out")) + "PREFIX=") + #:phases (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key inputs #:allow-other-keys) + (let ((esbuild (string-append + (assoc-ref inputs "esbuild") + "/bin/esbuild"))) + (invoke esbuild + "--platform=node" + "--outfile=bin/generate.js" + "--bundle" "bin/generate.ts")))) + (add-before 'install 'create-install-directories + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (for-each (lambda (dir) + (mkdir-p (string-append out dir))) + (list "/lib" "/include" "/src")) + #t))) + (add-after 'install 'install-src + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (src-dir (string-append out "/src"))) + (install-file "build/c/llhttp.c" src-dir) + #t)))))) + (native-inputs + `(("esbuild" ,esbuild) + ("node" ,node-bootstrap) + ("node-semver" ,node-semver-bootstrap) + ("node-llparse-bootstrap" ,node-llparse-bootstrap))) + (home-page "https://github.com/nodejs/llhttp") + (properties '((hidden? . #t))) + (synopsis "Port of @code{http_parser} to @code{llparse}") + (description "@code{llhttp} is a port of @code{http_parser} to TypeScript. +@code{llparse} is used to generate the output C source file, which can be +compiled and linked with the embedder's program (like @code{Node.js}).") + (license license:expat))) + (define-public libnode (package/inherit node (name "libnode") -- 2.31.0