From patchwork Tue Dec 27 16:23:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivien Kraus X-Patchwork-Id: 45679 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 4EE9C27BBED; Thu, 29 Dec 2022 15:19:28 +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 1152E27BBE9 for ; Thu, 29 Dec 2022 15:19:27 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pAugY-0000e6-EI; Thu, 29 Dec 2022 10:19:10 -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 1pAugV-0000df-Se for guix-patches@gnu.org; Thu, 29 Dec 2022 10:19:08 -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 1pAugQ-0006o4-UH for guix-patches@gnu.org; Thu, 29 Dec 2022 10:19:07 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pAugQ-0000K1-BR for guix-patches@gnu.org; Thu, 29 Dec 2022 10:19:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60358] [PATCH v3 1/2] gnu: Add gnulib. Resent-From: Vivien Kraus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 29 Dec 2022 15:19:02 +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: 60358@debbugs.gnu.org Cc: Simon Josefsson Received: via spool by 60358-submit@debbugs.gnu.org id=B60358.16723271241193 (code B ref 60358); Thu, 29 Dec 2022 15:19:02 +0000 Received: (at 60358) by debbugs.gnu.org; 29 Dec 2022 15:18:44 +0000 Received: from localhost ([127.0.0.1]:60876 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pAug7-0000JB-M4 for submit@debbugs.gnu.org; Thu, 29 Dec 2022 10:18:44 -0500 Received: from planete-kraus.eu ([89.234.140.182]:55254) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pAug4-0000Ix-An for 60358@debbugs.gnu.org; Thu, 29 Dec 2022 10:18:42 -0500 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id a0170029; Thu, 29 Dec 2022 15:18:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=planete-kraus.eu; h= in-reply-to:references:from:date:subject:to:cc:message-id :mime-version; s=dkim; bh=TVcAFSsQXVmqgfSnmwOFfjLLsgA=; b=BbqNu6 sffdvhhT6xPvOuN5Neu7wUJJ+lhrbHQVJ+kTcgWeB+nAeXrRBRTYJFJACyv9CMzH EPAPUNpL6XPK+tBnc4f/KXRKXfcJWmTCza6sedXb8ZGiSRPdVIwEHHqsHly56Tct z+YQ/WfiSYm5N8gFpQSO7+u6Rh6l4UdBkq8l4= Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id b84cb25e (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Thu, 29 Dec 2022 15:18:29 +0000 (UTC) In-Reply-To: <87zgb6gsxs.fsf@josefsson.org> References: <87zgb6gsxs.fsf@josefsson.org> Date: Tue, 27 Dec 2022 17:23:30 +0100 Message-ID: <6d918b9fb87e379766c1187c6ea7bd76d9842d6e.camel@planete-kraus.eu> MIME-Version: 1.0 User-Agent: Evolution 3.46.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: , 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): New variable. (gnulib-checkout): New function. It returns a package with a specific commit of gnulib. --- gnu/packages/build-tools.scm | 58 ++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) base-commit: 77d4bff94c6918eb0c0ccd20ee610e6dfc823aec 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) #: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,58 @@ (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)))) + +(define-public (gnulib-checkout gl-version gl-commit gl-hash) + "Return as a package the exact gnulib checkout." + (package + (name "gnulib") + (version (git-version gl-version "1" gl-commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.savannah.gnu.org/git/gnulib.git") + (commit gl-commit))) + (file-name (git-file-name name version)) + (sha256 (base32 gl-hash)))) + (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/" + #$gl-commit))))) + #: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 "Source files to share among distributions") + (description + "Gnulib is a central location for common infrastructure needed by GNU +packages. It provides a wide variety of functionality, e.g., portability +across many systems, working with Unicode strings, cryptographic computation, +and much more. 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. The included @command{gnulib-tool} script helps with using Gnulib +code in other packages. Gnulib also includes copies of licensing and +maintenance-related files, for convenience.") + (native-search-paths + (list (search-path-specification + (variable "GNULIB_SRCDIR") + (files (list (string-append "share/gnulib/" gl-commit)))))) + (license (list license:lgpl2.0+ license:gpl3+)))) + +(define-public gnulib + (gnulib-checkout + "2022-12-27" + "fde75446490e18d2539817ca418ab8adf73b02d3" + "0fjbdhwi9025wyq39rwc2j6aazfmagx056kkbvxx6bs97i80dcim"))