From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 29 15:02:18 2022 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> Subject: Re: [PATCH v3 1/2] gnu: Add gnulib. From: Liliana Marie Prikler To: Vivien Kraus , 60358@debbugs.gnu.org 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-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 60358 Cc: Simon Josefsson X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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 _ > +=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 (install-file "gnulib-tool" > +=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=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 (string-append #$output "/bin")) > +=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 (copy-recursively "." > +=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=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (string-append > +=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=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #$output > +=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=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "/share/gnulib/" > +=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=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