From: Liliana Marie Prikler <liliana.prikler@gmail.com>
To: Vivien Kraus <vivien@planete-kraus.eu>, 60358@debbugs.gnu.org
Cc: Simon Josefsson <simon@josefsson.org>
Subject: [bug#60358] [PATCH v3 1/2] gnu: Add gnulib.
Date: Thu, 29 Dec 2022 21:02:07 +0100 [thread overview]
Message-ID: <489abf355b4a607ca6d152edc94756824c7edb0e.camel@gmail.com> (raw)
In-Reply-To: <6d918b9fb87e379766c1187c6ea7bd76d9842d6e.camel@planete-kraus.eu>
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.
> ---
> gnu/packages/build-tools.scm | 58
> ++++++++++++++++++++++++++++++++++++
> 1 file changed, 58 insertions(+)
>
> 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)
You should probably use keyword arguments here. Also, don't bother
prefixing things, the shadowing rules in Guix are well-defined.
> + "Return as a package the exact gnulib checkout."
> + (package
> + (name "gnulib")
> + (version (git-version gl-version "1" gl-commit))
Allow the user to specify revision, defaulting to "1".
> + (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))))
While it's more typing effort, move base32 outside for that compile-
time expansion.
> + (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)))))
See [*] below.
> + #:tests? #f)) ;; Tests are syntax and indentation checks for
> the
> + ;; maintainer.
IMHO, we should still run tests unless they significantly complicate
packaging.
> + (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))))))
[*] 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=#$(search-input-directory %build-inputs
"src/gnulib")
> + (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
next prev parent reply other threads:[~2022-12-29 20:03 UTC|newest]
Thread overview: 83+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-27 16:23 [bug#60358] [PATCH] gnu: Add gnulib Vivien Kraus via Guix-patches via
2022-12-27 16:23 ` [bug#60358] [PATCH v6 2/3] " Vivien Kraus via Guix-patches via
2022-12-27 16:23 ` [bug#60358] [PATCH v11 3/4] " Vivien Kraus via Guix-patches via
2023-01-01 20:48 ` Vivien Kraus via Guix-patches via
2022-12-27 16:23 ` [bug#60358] [PATCH v8 " Vivien Kraus via Guix-patches via
2022-12-27 16:23 ` [bug#60358] [PATCH v9 " Vivien Kraus via Guix-patches via
2023-01-01 16:25 ` Liliana Marie Prikler
2023-01-01 16:55 ` Vivien Kraus via Guix-patches via
2023-01-01 17:31 ` Liliana Marie Prikler
2022-12-27 16:23 ` [bug#60358] [PATCH v4 1/3] " Vivien Kraus via Guix-patches via
2022-12-27 16:23 ` [bug#60358] [PATCH v10 3/4] " Vivien Kraus via Guix-patches via
2022-12-27 16:23 ` [bug#60358] [PATCH v7 4/5] " Vivien Kraus via Guix-patches via
2022-12-31 19:26 ` Liliana Marie Prikler
2022-12-27 16:23 ` [bug#60358] [PATCH v5 1/5] " Vivien Kraus via Guix-patches via
2022-12-31 6:53 ` Liliana Marie Prikler
2022-12-27 17:33 ` [bug#60358] Providing gnulib Vivien Kraus via Guix-patches via
2022-12-27 18:44 ` [bug#60358] [PATCH] gnu: Add gnulib Simon Josefsson via Guix-patches via
2022-12-28 1:57 ` Vivien Kraus via Guix-patches via
2022-12-29 14:44 ` Simon Josefsson via Guix-patches via
2022-12-29 15:56 ` Simon Josefsson via Guix-patches via
2022-12-27 20:45 ` Liliana Marie Prikler
2022-12-27 16:23 ` [bug#60358] [PATCH v2 1/2] " Vivien Kraus via Guix-patches via
2022-12-28 2:20 ` [bug#60358] [PATCH v2 2/2] gnu: guile-gnutls: Update to 3.7.11 Vivien Kraus via Guix-patches via
2022-12-28 2:50 ` Vivien Kraus via Guix-patches via
2022-12-29 14:55 ` Simon Josefsson via Guix-patches via
2022-12-27 16:23 ` [bug#60358] [PATCH v3 1/2] gnu: Add gnulib Vivien Kraus via Guix-patches via
2022-12-29 20:02 ` Liliana Marie Prikler [this message]
2022-12-30 11:45 ` Vivien Kraus via Guix-patches via
2022-12-30 19:35 ` Liliana Marie Prikler
2022-12-28 2:20 ` [bug#60358] [PATCH v3 2/2] gnu: guile-gnutls: Update to 3.7.11 Vivien Kraus via Guix-patches via
2022-12-29 15:25 ` Vivien Kraus via Guix-patches via
2022-12-29 15:37 ` Simon Josefsson via Guix-patches via
2022-12-29 16:06 ` Vivien Kraus via Guix-patches via
2022-12-29 16:14 ` Simon Josefsson via Guix-patches via
2022-12-28 2:20 ` [bug#60358] [PATCH v8 4/4] " Vivien Kraus via Guix-patches via
2022-12-28 2:20 ` [bug#60358] [PATCH v11 " Vivien Kraus via Guix-patches via
2022-12-28 2:20 ` [bug#60358] [PATCH v10 " Vivien Kraus via Guix-patches via
2023-01-15 7:07 ` bug#60358: " Liliana Marie Prikler
2022-12-28 2:20 ` [bug#60358] [PATCH v5 5/5] " Vivien Kraus via Guix-patches via
2022-12-31 6:53 ` Liliana Marie Prikler
2022-12-28 2:20 ` [bug#60358] [PATCH v6 3/3] " Vivien Kraus via Guix-patches via
2022-12-28 2:20 ` [bug#60358] [PATCH v7 5/5] " Vivien Kraus via Guix-patches via
2022-12-28 2:20 ` [bug#60358] [PATCH v9 4/4] " Vivien Kraus via Guix-patches via
2022-12-28 2:20 ` [bug#60358] [PATCH v4 3/3] " Vivien Kraus via Guix-patches via
2022-12-30 11:30 ` [bug#60358] [PATCH v4 2/3] gnu: gnulib: Enable tests Vivien Kraus via Guix-patches via
2022-12-30 11:30 ` [bug#60358] [PATCH v5 2/5] " Vivien Kraus via Guix-patches via
2022-12-30 21:20 ` [bug#60358] [PATCH v6 1/3] gnu: UCD: Add version 3.0-update1 Vivien Kraus via Guix-patches via
2022-12-30 21:20 ` [bug#60358] [PATCH v5 3/5] " Vivien Kraus via Guix-patches via
2022-12-31 6:49 ` Liliana Marie Prikler
2022-12-31 10:56 ` Vivien Kraus via Guix-patches via
2022-12-31 14:07 ` Liliana Marie Prikler
2022-12-30 21:20 ` [bug#60358] [PATCH v7 " Vivien Kraus via Guix-patches via
2022-12-31 19:17 ` Liliana Marie Prikler
2023-01-01 0:24 ` Vivien Kraus via Guix-patches via
2023-01-01 1:28 ` Liliana Marie Prikler
2022-12-30 22:05 ` [bug#60358] [PATCH v5 4/5] gnu: gnulib: Regenerate the unicode data Vivien Kraus via Guix-patches via
2022-12-31 17:33 ` [bug#60358] [PATCH v11 1/4] gnu: libunibreak: Use ucd instead of ucd-next Vivien Kraus via Guix-patches via
2022-12-31 17:33 ` [bug#60358] [PATCH v10 " Vivien Kraus via Guix-patches via
2022-12-31 17:33 ` [bug#60358] [PATCH v7 1/5] " Vivien Kraus via Guix-patches via
2022-12-31 17:33 ` [bug#60358] [PATCH v8 1/4] " Vivien Kraus via Guix-patches via
2022-12-31 17:33 ` [bug#60358] [PATCH v9 " Vivien Kraus via Guix-patches via
2022-12-31 17:34 ` [bug#60358] [PATCH v10 2/4] gnu: ucd-next: Update to 15.0.0 Vivien Kraus via Guix-patches via
2022-12-31 17:34 ` [bug#60358] [PATCH v7 2/5] " Vivien Kraus via Guix-patches via
2022-12-31 17:34 ` [bug#60358] [PATCH v9 2/4] " Vivien Kraus via Guix-patches via
2022-12-31 17:34 ` [bug#60358] [PATCH v11 " Vivien Kraus via Guix-patches via
2022-12-31 17:34 ` [bug#60358] [PATCH v8 " Vivien Kraus via Guix-patches via
2023-01-01 21:45 ` [bug#60358] [PATCH v11 0/4] Use a cover letter Vivien Kraus via Guix-patches via
2022-12-31 17:33 ` [bug#60358] [PATCH v11 1/4] gnu: libunibreak: Use ucd instead of ucd-next Vivien Kraus via Guix-patches via
2022-12-31 17:34 ` [bug#60358] [PATCH v11 2/4] gnu: ucd-next: Update to 15.0.0 Vivien Kraus via Guix-patches via
2022-12-27 16:23 ` [bug#60358] [PATCH v11 3/4] gnu: Add gnulib Vivien Kraus via Guix-patches via
2022-12-28 2:20 ` [bug#60358] [PATCH v11 4/4] gnu: guile-gnutls: Update to 3.7.11 Vivien Kraus via Guix-patches via
2023-01-01 21:59 ` [bug#60358] [PATCH v11 0/4] Using a cover letter with a shallow thread style Vivien Kraus via Guix-patches via
2022-12-27 16:23 ` [bug#60358] [PATCH v11 3/4] gnu: Add gnulib Vivien Kraus via Guix-patches via
2022-12-28 2:20 ` [bug#60358] [PATCH v11 4/4] gnu: guile-gnutls: Update to 3.7.11 Vivien Kraus via Guix-patches via
2022-12-31 17:33 ` [bug#60358] [PATCH v11 1/4] gnu: libunibreak: Use ucd instead of ucd-next Vivien Kraus via Guix-patches via
2022-12-31 17:34 ` [bug#60358] [PATCH v11 2/4] gnu: ucd-next: Update to 15.0.0 Vivien Kraus via Guix-patches via
2023-01-02 19:43 ` [bug#60358] [PATCH v12 0/4] Add my name to the copyright line Vivien Kraus via Guix-patches via
2022-12-27 16:23 ` [bug#60358] [PATCH v12 3/4] gnu: Add gnulib Vivien Kraus via Guix-patches via
2023-01-16 11:59 ` [bug#60358] [PATCH] " Ludovic Courtès
2022-12-28 2:20 ` [bug#60358] [PATCH v12 4/4] gnu: guile-gnutls: Update to 3.7.11 Vivien Kraus via Guix-patches via
2022-12-31 17:33 ` [bug#60358] [PATCH v12 1/4] gnu: libunibreak: Use ucd instead of ucd-next Vivien Kraus via Guix-patches via
2022-12-31 17:34 ` [bug#60358] [PATCH v12 2/4] gnu: ucd-next: Update to 15.0.0 Vivien Kraus via Guix-patches via
2023-01-07 10:21 ` [bug#60358] gnulib: Should this be in its own module? Vivien Kraus via Guix-patches via
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=489abf355b4a607ca6d152edc94756824c7edb0e.camel@gmail.com \
--to=liliana.prikler@gmail.com \
--cc=60358@debbugs.gnu.org \
--cc=simon@josefsson.org \
--cc=vivien@planete-kraus.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.