From patchwork Tue Dec 27 16:23:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vivien Kraus X-Patchwork-Id: 45602 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 2A5E727BBE9; Tue, 27 Dec 2022 17:05:32 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 40ADA27BBEB for ; Tue, 27 Dec 2022 17:05:29 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pADNx-00049e-Mi; Tue, 27 Dec 2022 12:05:05 -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 1pADNv-00049P-4q for guix-patches@gnu.org; Tue, 27 Dec 2022 12:05:03 -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 1pADNu-0002yC-HF for guix-patches@gnu.org; Tue, 27 Dec 2022 12:05:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pADNt-0007BS-Py for guix-patches@gnu.org; Tue, 27 Dec 2022 12:05:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60358] [PATCH] gnu: Add gnulib. Resent-From: Vivien Kraus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 27 Dec 2022 17:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 60358 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60358@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167216069627596 (code B ref -1); Tue, 27 Dec 2022 17:05:01 +0000 Received: (at submit) by debbugs.gnu.org; 27 Dec 2022 17:04:56 +0000 Received: from localhost ([127.0.0.1]:56386 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pADNn-0007B1-Iq for submit@debbugs.gnu.org; Tue, 27 Dec 2022 12:04:56 -0500 Received: from lists.gnu.org ([209.51.188.17]:39160) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pADNl-0007At-G7 for submit@debbugs.gnu.org; Tue, 27 Dec 2022 12:04:54 -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 1pADNi-00048f-3C for guix-patches@gnu.org; Tue, 27 Dec 2022 12:04:51 -0500 Received: from planete-kraus.eu ([2a00:5881:4008:2810::309]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1pADNf-0002vI-Jk for guix-patches@gnu.org; Tue, 27 Dec 2022 12:04:49 -0500 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id 21a26af0 for ; Tue, 27 Dec 2022 17:04:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=planete-kraus.eu; h=from :date:subject:mime-version:content-type :content-transfer-encoding:to:message-id; s=dkim; bh=8gxFvhhhOk1 Q9NlRbzleNxRIzas=; b=vE9GkCKCLaSrIC2ohjbcuOKBIwKAtbDeionPCZASiwR xXCtpnfEgcjjNXc1HYyjTg+PJ4sfP2W5KzgdLxIxShIcaxCOsH754nPzykXKWd4S 1wr680/8N/SfzWf6UBfB2mlz/n5w+kpZd1+WElC/Wie+ByZK4wNtjUlvh7QhXjE8 = Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id f35e0b05 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for ; Tue, 27 Dec 2022 17:04:35 +0000 (UTC) Date: Tue, 27 Dec 2022 17:23:30 +0100 MIME-Version: 1.0 Message-ID: User-Agent: Evolution 3.46.0 Received-SPF: pass client-ip=2a00:5881:4008:2810::309; envelope-from=vivien@planete-kraus.eu; helo=planete-kraus.eu X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Reply-to: Vivien Kraus X-ACL-Warn: , Vivien Kraus via Guix-patches X-Patchwork-Original-From: Vivien Kraus via Guix-patches via From: Vivien Kraus Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/build-tools.scm (gnulib-latest): New variable. This one always tracks the latest upstream commit, so don’t use it as an input. (gnulib): New variable. This is a "recent" snapshot. --- gnu/packages/build-tools.scm | 71 ++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) base-commit: 8f93a1e01a879ae026678dd92c18e2a2a49be540 diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm index 6c1350c44f..062956f685 100644 --- a/gnu/packages/build-tools.scm +++ b/gnu/packages/build-tools.scm @@ -38,6 +38,7 @@ (define-module (gnu packages build-tools) #:use-module (guix gexp) #:use-module (guix download) #:use-module (guix git-download) + #:use-module (guix git) #:use-module (guix build-system cmake) #:use-module (gnu packages) #:use-module (gnu packages adns) @@ -48,11 +49,13 @@ (define-module (gnu packages build-tools) #:use-module (gnu packages cpp) #:use-module (gnu packages elf) #:use-module (gnu packages linux) + #:use-module (gnu packages lisp) #:use-module (gnu packages logging) #:use-module (gnu packages lua) #:use-module (gnu packages ninja) #:use-module (gnu packages package-management) #:use-module (gnu packages pcre) + #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages pretty-print) #:use-module (gnu packages protobuf) @@ -803,3 +806,71 @@ (define-public genie same settings to multiple projects. It supports generating projects using GNU Makefiles, JSON Compilation Database, and experimentally Ninja.") (license license:bsd-3)))) + +;; Gnulib is a source code library. The developers encourage you to develop +;; your programs with the latest commit of gnulib. However, gnulib is also +;; used to bootstrap some GNU programs. To avoid rebuilding the world when a +;; new gnulib commit is pushed, gnulib as a native input must use a known +;; snapshot of the library. + +(define-public gnulib-latest + ;; Use this to develop. + (package + (name "gnulib-latest") + (version "latest") + (source + (git-checkout + (url "https://git.savannah.gnu.org/git/gnulib.git"))) + (build-system gnu-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (delete 'configure) + (replace 'install + (lambda _ + (install-file "gnulib-tool" + (string-append #$output "/bin")) + (copy-recursively "." + (string-append #$output "/share/gnulib-srcdir"))))) + #:tests? #f)) ;; Tests are syntax and indentation checks for the + ;; maintainer. + (inputs ;; Shebangs for some auxiliary build files. + (list python perl clisp)) + (home-page "https://www.gnu.org/software/gnulib/") + (synopsis "GNU portability library") + (description + "Gnulib is a library that provides common functions from the glibc to your +programs, in order to enhance portability across operating systems. It also +provides common maintainer tools for gnu packages. This package always tracks +the latest commit in gnulib. @strong{For packages dependencies, please use the +@code{gnulib} package instead.} The latter provides a recent enough snapshot.") + (native-search-paths + (list + (search-path-specification + (variable "GNULIB_SRCDIR") + (files (list "share/gnulib-srcdir"))))) + (license + (list license:lgpl2.0+ license:gpl3+)))) + +(define-public gnulib + ;; Use this as a native input. + (package + (inherit gnulib-latest) + (name "gnulib") + (version "2022-12-27") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.savannah.gnu.org/git/gnulib.git") + (commit "fde75446490e18d2539817ca418ab8adf73b02d3"))) + (sha256 + (base32 + "0fjbdhwi9025wyq39rwc2j6aazfmagx056kkbvxx6bs97i80dcim")))) + (synopsis "GNU portability library") + (description + "Gnulib is a library that provides common functions from the glibc to your +programs, in order to enhance portability across operating systems. It also +provides common maintainer tools for gnu packages. This package provides a +recent snapshot of gnulib.")))