;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012-2023 Ludovic Courtès ;;; Copyright © 2014, 2019 Andreas Enge ;;; Copyright © 2012 Nikita Karetnikov ;;; Copyright © 2014, 2015, 2016, 2018 Mark H Weaver ;;; Copyright © 2014 Alex Kost ;;; Copyright © 2014, 2015 Manolis Fragkiskos Ragkousis ;;; Copyright © 2016, 2017, 2019-2023 Efraim Flashner ;;; Copyright © 2016, 2020, 2023 Janneke Nieuwenhuizen ;;; Copyright © 2016, 2018 Alex Vong ;;; Copyright © 2017 Rene Saavedra ;;; Copyright © 2017, 2020 Mathieu Othacehe ;;; Copyright © 2017, 2018, 2020, 2022 Marius Bakke ;;; Copyright © 2017 Eric Bavier ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2018, 2019, 2022 Ricardo Wurmus ;;; Copyright © 2020 Vitaliy Shatrov ;;; Copyright © 2020 Chris Marusich ;;; Copyright © 2021 Leo Le Bouter ;;; Copyright © 2021 Maxime Devos ;;; Copyright © 2021 Guillaume Le Vaillant ;;; Copyright © 2021 Maxim Cournoyer ;;; Copyright © 2022 zamfofex ;;; Copyright © 2022 John Kehayias ;;; Copyright © 2023 Josselin Poiret ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (gnu packages base) #:use-module ((guix licenses) #:select (gpl3+ lgpl2.0+ lgpl3+ public-domain)) #:use-module (gnu packages) #:use-module (gnu packages acl) #:use-module (gnu packages algebra) #:use-module (gnu packages attr) #:use-module (gnu packages bash) #:use-module (gnu packages bison) #:use-module (gnu packages ed) #:use-module (gnu packages gawk) #:use-module (gnu packages gcc) #:use-module (gnu packages guile) #:use-module (gnu packages multiprecision) #:use-module (gnu packages compression) #:use-module (gnu packages perl) #:use-module (gnu packages linux) #:use-module (gnu packages pcre) #:use-module (gnu packages texinfo) #:use-module (gnu packages hurd) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) #:use-module (gnu packages gettext) #:use-module (guix i18n) #:use-module (guix utils) #:use-module (guix gexp) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (guix build-system trivial) #:use-module (ice-9 format) #:use-module (ice-9 match) #:use-module (ice-9 optargs) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) #:export (glibc libc-for-target make-ld-wrapper libiconv-if-needed %final-inputs)) ;;; Commentary: ;;; ;;; Base packages of the Guix-based GNU user-land software distribution. ;;; ;;; Code: (define-public hello (package (name "hello") (version "2.12.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/hello/hello-" version ".tar.gz")) (sha256 (base32 "086vqwk2wl8zfs47sq2xpjc9k066ilmb8z6dn0q6ymwjzlm196cd")))) (build-system gnu-build-system) (synopsis "Hello, GNU world: An example GNU package") (description "GNU Hello prints the message \"Hello, world!\" and then exits. It serves as an example of standard GNU coding practices. As such, it supports command-line arguments, multiple languages, and so on.") (home-page "https://www.gnu.org/software/hello/") (license gpl3+))) (define-public grep (package (name "grep") (version "3.8") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/grep/grep-" version ".tar.xz")) (sha256 (base32 "10n3mc9n1xmg85hpxyr4wiqzfp27ffxzwhvkv021j27vnk0pr3a9")) (patches (search-patches "grep-timing-sensitive-test.patch")))) (build-system gnu-build-system) (native-inputs (list perl)) ;some of the tests require it (inputs (list pcre)) (arguments `(#:phases (modify-phases %standard-phases (add-after 'install 'fix-egrep-and-fgrep ;; Patch 'egrep' and 'fgrep' to execute 'grep' via its ;; absolute file name instead of searching for it in $PATH. (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (bin (string-append out "/bin"))) (substitute* (list (string-append bin "/egrep") (string-append bin "/fgrep")) (("^exec grep") (string-append "exec " bin "/grep")))))) ,@(if (system-hurd?) '((add-before 'check 'skip-test (lambda _ (substitute* ;; This test hangs '("tests/hash-collision-perf" ;; This test fails "tests/file") (("^#!.*" all) (string-append all "exit 77;\n")))))) '())))) (synopsis "Print lines matching a pattern") (description "grep is a tool for finding text inside files. Text is found by matching a pattern provided by the user in one or many files. The pattern may be provided as a basic or extended regular expression, or as fixed strings. By default, the matching text is simply printed to the screen, however the output can be greatly customized to include, for example, line numbers. GNU grep offers many extensions over the standard utility, including, for example, recursive directory searching.") (license gpl3+) (home-page "https://www.gnu.org/software/grep/"))) (define-public sed (package (name "sed") (version "4.8") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/sed/sed-" version ".tar.gz")) (sha256 (base32 "0alqagh0nliymz23kfjg6g9w3cr086k0sfni56gi8fhzqwa3xksk")) (patches (search-patches "coreutils-gnulib-tests.patch")) ;; Remove this snippet once upstream releases a fixed version. ;; This snippet changes Makefile.in, even though the upstream ;; patch changes testsuite/local.mk, since we build sed from a ;; release tarball. See: https://bugs.gnu.org/36150 (snippet '(begin (substitute* "Makefile.in" (("^ abs_srcdir='\\$\\(abs_srcdir\\)'.*" p