;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013 Andreas Enge ;;; Copyright © 2014, 2015 Mark H Weaver ;;; Copyright © 2015 Ricardo Wurmus ;;; Copyright © 2016 Leo Famulari ;;; Copyright © 2017 Marius Bakke ;;; Copyright © 2017 Ludovic Courtès ;;; Copyright © 2017 Efraim Flashner ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; ;;; 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 pcre) #:use-module ((guix licenses) #:prefix license:) #:use-module (gnu packages compression) #:use-module (gnu packages readline) #:use-module (gnu packages) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu)) (define-public pcre (package (name "pcre") (version "8.43") (source (origin (method url-fetch) (uri (list (string-append "ftp://ftp.csx.cam.ac.uk" "/pub/software/programming/pcre/" "pcre-" version ".tar.bz2") (string-append "mirror://sourceforge/pcre/pcre/" version "/pcre-" version ".tar.bz2"))) (sha256 (base32 "0sxg1wlknq05ryq63h21cchjmcjkin9lmnqsmhs3h08301965rwi")))) (build-system gnu-build-system) (outputs '("out" ;library & headers "bin" ;depends on Readline (adds 20MiB to the closure) "doc" ;1.8 MiB of HTML "static")) ;1.8 MiB static libraries (inputs `(("bzip2" ,bzip2) ("readline" ,readline) ("zlib" ,zlib))) (arguments '(#:disallowed-references ("doc") #:configure-flags '("--enable-utf" "--enable-pcregrep-libz" "--enable-pcregrep-libbz2" "--enable-pcretest-libreadline" "--enable-unicode-properties" "--enable-pcre16" "--enable-pcre32" "--enable-jit") #:phases (modify-phases %standard-phases (add-after 'install 'move-static-libs (lambda* (#:key outputs #:allow-other-keys) (let ((source (string-append (assoc-ref outputs "out") "/lib")) (static (string-append (assoc-ref outputs "static") "/lib"))) (mkdir-p static) (for-each (lambda (lib) (link lib (string-append static "/" (basename lib))) (delete-file lib)) (find-files source "\\.a$")) #t)))))) (synopsis "Perl Compatible Regular Expressions") (description "The PCRE library is a set of functions that implement regular expression pattern matching using the same syntax and semantics as Perl 5. PCRE has its own native API, as well as a set of wrapper functions that correspond to the POSIX regular expression API.") (license license:bsd-3) (home-page "https://www.pcre.org/"))) (define-public pcre2 (package (name "pcre2") (version "10.34") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/pcre/pcre2/" version "/pcre2-" version ".tar.bz2")) (sha256 (base32 "1jlqnzcz2yi70dm40wyfa9w8is9z2kh4dl8zjnv3vqd9mgzp7i3l")))) (build-system gnu-build-system) (inputs `(("bzip2" ,bzip2) ("readline" ,readline) ("zlib" ,zlib))) (arguments `(#:configure-flags '("--enable-unicode" "--enable-pcre2grep-libz" "--enable-pcre2grep-libbz2" "--enable-pcre2test-libreadline" "--enable-pcre2-16" "--enable-pcre2-32" "--enable-jit" "--disable-static") #:phases (modify-phases %standard-phases (add-after 'unpack 'patch-paths (lambda _ (substitute* "RunGrepTest" (("/bin/echo") (which "echo"))) #t))))) (synopsis "Perl Compatible Regular Expressions") (description "The PCRE library is a set of functions that implement regular expression pattern matching using the same syntax and semantics as Perl 5. PCRE has its own native API, as well as a set of wrapper functions that correspond to the POSIX regular expression API.") (license license:bsd-3) (home-page "https://www.pcre.org/"))) /tests/guix-shell.sh?id=746584e0ca200e7bf51b139ceb36c19ea81d6ef1'>shell: By default load the local 'manifest.scm' or 'guix.scm' file....* guix/scripts/shell.scm (parse-args): Add call to 'auto-detect-manifest'. (authorized-directory-file, authorized-shell-directory?) (find-file-in-parent-directories, auto-detect-manifest): New procedures. * tests/guix-shell.sh: Add test. * doc/guix.texi (Invoking guix shell): Document it. Ludovic Courtès 2021-10-25Add 'guix shell'....* guix/scripts/shell.scm, tests/guix-shell.sh: New files. * Makefile.am (MODULES): Add 'shell.scm'. (SH_TESTS): Add 'tests/guix-shell.sh'. * guix/scripts/environment.scm (show-environment-options-help): New procedure. (show-help): Use it. (guix-environment*): New procedure. (guix-environment): Use it. * po/guix/POTFILES.in: Add it. * doc/guix.texi (Features): Refer to "guix shell" (Invoking guix package): Likewise. (Development): Likewise. (Invoking guix shell): New node. (Invoking guix environment): Add deprecation warning. (Debugging Build Failures): Use 'guix shell' in examples. (Invoking guix container): Refer to 'guix shell'. (Invoking guix processes, Virtualization Services): Adjust examples to use 'guix shell'. * doc/contributing.texi (Building from Git): Refer to 'guix shell'. * etc/completion/bash/guix: Handle "shell". Ludovic Courtès