From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id IN5AG4byrWP2QwEAbAwnHQ (envelope-from ) for ; Thu, 29 Dec 2022 21:03:18 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id cAgcG4byrWMHDwEAauVa8A (envelope-from ) for ; Thu, 29 Dec 2022 21:03:18 +0100 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 CCD891C9C3 for ; Thu, 29 Dec 2022 21:03:17 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pAz7Q-0002MT-PA; Thu, 29 Dec 2022 15:03:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pAz7G-0002KT-Md for guix-patches@gnu.org; Thu, 29 Dec 2022 15:03:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pAz7G-0006VH-7A for guix-patches@gnu.org; Thu, 29 Dec 2022 15:03:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pAz7F-0006u9-SD for guix-patches@gnu.org; Thu, 29 Dec 2022 15:03:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60358] [PATCH v3 1/2] gnu: Add gnulib. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 29 Dec 2022 20:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60358 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Vivien Kraus , 60358@debbugs.gnu.org Cc: Simon Josefsson Received: via spool by 60358-submit@debbugs.gnu.org id=B60358.167234413826490 (code B ref 60358); Thu, 29 Dec 2022 20:03:01 +0000 Received: (at 60358) by debbugs.gnu.org; 29 Dec 2022 20:02:18 +0000 Received: from localhost ([127.0.0.1]:32980 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pAz6Y-0006tB-9u for submit@debbugs.gnu.org; Thu, 29 Dec 2022 15:02:18 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:38431) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pAz6U-0006sw-St for 60358@debbugs.gnu.org; Thu, 29 Dec 2022 15:02:16 -0500 Received: by mail-wm1-f66.google.com with SMTP id fm16-20020a05600c0c1000b003d96fb976efso11800022wmb.3 for <60358@debbugs.gnu.org>; Thu, 29 Dec 2022 12:02:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=0V1jPCWCPm2W/EdFfTbPMALyaFFxTfYH0es5HyW8on8=; b=pH3cAeD0cDcaL7g14qoqHc1Kk2bQK+ksSztHq/0hu9zlhrNnXlR7QhY64w/+9oL1wp 9fLJT9f+OtBvHvatt7BU9eh0chVe211sCzxEMdqTHeawDHx7jT6eS85+dKOcVBMBbjxK 2WFEjvitfnA4OB4oRQGxoqQU1pW6pBwyiBnus9txAJ+AZTLxuMekve6vdW6yz7as3rEV V/RxIf/zkcA3RCEW103XpI1/6l6aBQ2fT2DotkvA1pPmiH816r6DGAcfc+MsTQBTedmq bbfKhDuHw8C8CAt1KQec1IiapEIgUmzFftvCEWFMGaakdr6lwyrJdivphv1Wy2GkmSsm jvAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=0V1jPCWCPm2W/EdFfTbPMALyaFFxTfYH0es5HyW8on8=; b=VER6wyBq74c2q+V+JhGKz1u3cImuVcnb6y5YaAnedTMVkuxBUMzRGOMJFS3PpU9ZDJ OD6Au0wiap4hBzhpullA/bDSYfSw+eBnoumKm+myUTFmss8oWnTL2pLea8UhhwpqEpCF i7nJTX3leacdLLfbNL8QohiYfFkGyvAA6Cp0FsP2uFlCSDYIsNCu+KPhs+ts3rl6u9eh 9PiN5BaYYhp65PFua/4iThZzuGMtE5Sb9b7dLE4aFghfam6TKy2Fsa/yTscjV3tFLvp/ qts89QZWwL7ijtLHQTrPkXnRRambYvsm3mpuzeFCdU8vEFTcc4HGUy0WOdera4HvGgnY ECSw== X-Gm-Message-State: AFqh2ko3T1CWv8Niv/ojYX3ADfie+9hkDr2vNMskk6n9UBTOKh7OJlgt q5FN8oZT9T6R4VbZK7naFkk= X-Google-Smtp-Source: AMrXdXsi92IAyegrnEvfJnBsUZU5jf708Uc1oDBSP3axS1ZjtZZDkUHwdgu81W+cf559rVROP1FgMQ== X-Received: by 2002:a05:600c:2e44:b0:3d3:4406:8a3c with SMTP id q4-20020a05600c2e4400b003d344068a3cmr20877133wmf.32.1672344128939; Thu, 29 Dec 2022 12:02:08 -0800 (PST) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id w14-20020adfee4e000000b002422bc69111sm22604032wro.9.2022.12.29.12.02.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Dec 2022 12:02:08 -0800 (PST) Message-ID: <489abf355b4a607ca6d152edc94756824c7edb0e.camel@gmail.com> From: Liliana Marie Prikler Date: Thu, 29 Dec 2022 21:02:07 +0100 In-Reply-To: <6d918b9fb87e379766c1187c6ea7bd76d9842d6e.camel@planete-kraus.eu> References: <87zgb6gsxs.fsf@josefsson.org> <6d918b9fb87e379766c1187c6ea7bd76d9842d6e.camel@planete-kraus.eu> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.0 MIME-Version: 1.0 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1672344197; a=rsa-sha256; cv=none; b=dLlXBmGa5ysVagtHg1nmPJtvlr/8XEYkdQChXRlsb3Ih2oOcZxtUmfciVl205HHOTZUpWI 4n+G6i1aXk0eeJwRyXsiBhMWlVFV+zZldQIDU9M3JqqdBjStkai5uSZvNi5f1vCcXWK393 MH35JedLCkyEpe2Hg5ztwMlrf11cQ1vrk78N0sK/6Je10IP+rpr+rDzhMlBd6D1Lurt1h9 8QITZ5N346570wf+EYAYt6Ve2HgDS6g6ak6wHVKAWXzoAFGIGF6exeGWwtZaz76o4eVG3M A0+fVUlQNMNtoj04j5lbh4rM9PWkLFWARpH0Zf91rxvXb9x+dMKkrQ7K5OhgAw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=pH3cAeD0; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1672344197; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: 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:dkim-signature; bh=0V1jPCWCPm2W/EdFfTbPMALyaFFxTfYH0es5HyW8on8=; b=YrbLNn5OVYZVx8Yk9gY1XPxUTQi7vp7tv/y5/Mb6/n1iM+21AS5XmdwnfmrQ6VhxHRUkiF zlNOwh+RwgUF7gBAiHPj00Bb12SUwZPaDZ+0VXnfKhHS6YrE8NDr61MOCgkZ4iNK9+wYme 2ERUl6OdGN+GHWsn1Cttar/1gYvsW3iJJBK4eCMBiX3BVVeym0AzIg7zsREgiBYDmrR/JO UUlkqghJn1jijSTEWexW2HxtuNK7RFfZWmOm/60DE1rOKoZDl/FU2ffNsMWANlz+xkanj5 uJB4/ekfQUA4RC9Feg27YeMO79Ob+OEP2Bip7t3SYdwJ+KO/Zfjry2wtD3qQOw== X-Spam-Score: -1.23 X-Migadu-Queue-Id: CCD891C9C3 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=pH3cAeD0; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -1.23 X-TUID: EjHTLm7Yn3rm Am Dienstag, dem 27.12.2022 um 17:23 +0100 schrieb Vivien Kraus: > * gnu/packages/build-tools.scm (gnulib): New variable. > (gnulib-checkout): New function. It returns a package with a specific > commit > of gnulib. > --- > =C2=A0gnu/packages/build-tools.scm | 58 > ++++++++++++++++++++++++++++++++++++ > =C2=A01 file changed, 58 insertions(+) >=20 > diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build- > tools.scm > index 6c1350c44f..5b4fc71429 100644 > --- a/gnu/packages/build-tools.scm > +++ b/gnu/packages/build-tools.scm > @@ -38,6 +38,7 @@ (define-module (gnu packages build-tools) > =C2=A0=C2=A0 #:use-module (guix gexp) > =C2=A0=C2=A0 #:use-module (guix download) > =C2=A0=C2=A0 #:use-module (guix git-download) > +=C2=A0 #:use-module (guix git) > =C2=A0=C2=A0 #:use-module (guix build-system cmake) > =C2=A0=C2=A0 #:use-module (gnu packages) > =C2=A0=C2=A0 #:use-module (gnu packages adns) > @@ -48,11 +49,13 @@ (define-module (gnu packages build-tools) > =C2=A0=C2=A0 #:use-module (gnu packages cpp) > =C2=A0=C2=A0 #:use-module (gnu packages elf) > =C2=A0=C2=A0 #:use-module (gnu packages linux) > +=C2=A0 #:use-module (gnu packages lisp) > =C2=A0=C2=A0 #:use-module (gnu packages logging) > =C2=A0=C2=A0 #:use-module (gnu packages lua) > =C2=A0=C2=A0 #:use-module (gnu packages ninja) > =C2=A0=C2=A0 #:use-module (gnu packages package-management) > =C2=A0=C2=A0 #:use-module (gnu packages pcre) > +=C2=A0 #:use-module (gnu packages perl) > =C2=A0=C2=A0 #:use-module (gnu packages pkg-config) > =C2=A0=C2=A0 #:use-module (gnu packages pretty-print) > =C2=A0=C2=A0 #:use-module (gnu packages protobuf) > @@ -803,3 +806,58 @@ (define-public genie > =C2=A0same settings to multiple projects.=C2=A0 It supports generating pr= ojects > using GNU > =C2=A0Makefiles, JSON Compilation Database, and experimentally Ninja.") > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (license license:bsd-3)))) > + > +(define-public (gnulib-checkout gl-version gl-commit gl-hash) You should probably use keyword arguments here. Also, don't bother prefixing things, the shadowing rules in Guix are well-defined. > +=C2=A0 "Return as a package the exact gnulib checkout." > +=C2=A0 (package > +=C2=A0=C2=A0=C2=A0 (name "gnulib") > +=C2=A0=C2=A0=C2=A0 (version (git-version gl-version "1" gl-commit)) Allow the user to specify revision, defaulting to "1". > +=C2=A0=C2=A0=C2=A0 (source > +=C2=A0=C2=A0=C2=A0=C2=A0 (origin > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (method git-fetch) > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (uri (git-reference > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= (url "https://git.savannah.gnu.org/git/gnulib.git") > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= (commit gl-commit))) > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (file-name (git-file-name name vers= ion)) > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (sha256 (base32 gl-hash)))) While it's more typing effort, move base32 outside for that compile- time expansion. > +=C2=A0=C2=A0=C2=A0 (build-system gnu-build-system) > +=C2=A0=C2=A0=C2=A0 (arguments > +=C2=A0=C2=A0=C2=A0=C2=A0 (list > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #:phases > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #~(modify-phases %standard-phases > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (delete 'configur= e) > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (replace 'install > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (lamb= da _ > +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2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #$gl-commit))))) See [*] below. > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #:tests? #f)) ;; Tests are syntax and ind= entation checks for > the > +=C2=A0=C2=A0=C2=A0 ;; maintainer. IMHO, we should still run tests unless they significantly complicate packaging.=20 > +=C2=A0=C2=A0=C2=A0 (inputs ;; Shebangs for some auxiliary build files. > +=C2=A0=C2=A0=C2=A0=C2=A0 (list python perl clisp)) > +=C2=A0=C2=A0=C2=A0 (home-page "https://www.gnu.org/software/gnulib/") > +=C2=A0=C2=A0=C2=A0 (synopsis "Source files to share among distributions"= ) > +=C2=A0=C2=A0=C2=A0 (description > +=C2=A0=C2=A0=C2=A0=C2=A0 "Gnulib is a central location for common infras= tructure needed > by GNU > +packages.=C2=A0 It provides a wide variety of functionality, e.g., > portability > +across many systems, working with Unicode strings, cryptographic > computation, > +and much more.=C2=A0 The code is intended to be shared at the level of > source > +files, rather than being a standalone library that is distributed, > built, and > +installed.=C2=A0 The included @command{gnulib-tool} script helps with > using Gnulib > +code in other packages.=C2=A0 Gnulib also includes copies of licensing > and > +maintenance-related files, for convenience.") > +=C2=A0=C2=A0=C2=A0 (native-search-paths > +=C2=A0=C2=A0=C2=A0=C2=A0 (list (search-path-specification > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (vari= able "GNULIB_SRCDIR") > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (file= s (list (string-append "share/gnulib/" gl- > commit)))))) [*] Rather than installing the library to an always different location and using an environment variable to bind it, I'd suggest using a fixed location, such as #$output/src/gnulib, so that consuming packages can use --gnulib-srcdir=3D#$(search-input-directory %build-inputs "src/gnulib") > +=C2=A0=C2=A0=C2=A0 (license (list license:lgpl2.0+ license:gpl3+)))) > + Furthermore, quite a number of gnulib appears to have been automatically generated. Can we do a proper bootstrap? :) Cheers