From 44d10b1f722856ab8e9b942804aa7ef33e2ef739 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 15 Jan 2019 14:21:30 +0100 Subject: gnu: Separate Python core packages from the rest. * gnu/packages/python.scm: Move hundreds of package definitions from here... * gnu/packages/python-xyz.scm: ...to this new module. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * gnu/packages/ada.scm, gnu/packages/admin.scm, gnu/packages/android.scm, gnu/packages/audio.scm, gnu/packages/backup.scm, gnu/packages/benchmark.scm, gnu/packages/bioinformatics.scm, gnu/packages/bittorrent.scm, gnu/packages/calendar.scm, gnu/packages/check.scm, gnu/packages/chemistry.scm, gnu/packages/cluster.scm, gnu/packages/compression.scm, gnu/packages/connman.scm, gnu/packages/crypto.scm, gnu/packages/cups.scm, gnu/packages/databases.scm, gnu/packages/dav.scm, gnu/packages/direct-connect.scm, gnu/packages/disk.scm, gnu/packages/django.scm, gnu/packages/dlang.scm, gnu/packages/docker.scm, gnu/packages/ebook.scm, gnu/packages/elf.scm, gnu/packages/emacs.scm, gnu/packages/emulators.scm, gnu/packages/engineering.scm, gnu/packages/enlightenment.scm, gnu/packages/finance.scm, gnu/packages/fltk.scm, gnu/packages/fontutils.scm, gnu/packages/freedesktop.scm, gnu/packages/game-development.scm, gnu/packages/games.scm, gnu/packages/geo.scm, gnu/packages/gl.scm, gnu/packages/glib.scm, gnu/packages/gnome.scm, gnu/packages/gnupg.scm, gnu/packages/gnuzilla.scm, gnu/packages/graph.scm, gnu/packages/graphics.scm, gnu/packages/graphviz.scm, gnu/packages/gtk.scm, gnu/packages/ham-radio.scm, gnu/packages/image-processing.scm, gnu/packages/image-viewers.scm, gnu/packages/image.scm, gnu/packages/irc.scm, gnu/packages/jrnl.scm, gnu/packages/julia.scm, gnu/packages/kde-frameworks.scm, gnu/packages/key-mon.scm, gnu/packages/libffi.scm, gnu/packages/libreoffice.scm, gnu/packages/libusb.scm, gnu/packages/lirc.scm, gnu/packages/logging.scm, gnu/packages/machine-learning.scm, gnu/packages/mail.scm, gnu/packages/mate.scm, gnu/packages/maths.scm, gnu/packages/medical.scm, gnu/packages/messaging.scm, gnu/packages/monitoring.scm, gnu/packages/mp3.scm, gnu/packages/mpd.scm, gnu/packages/music.scm, gnu/packages/networking.scm, gnu/packages/nutrition.scm, gnu/packages/openldap.scm, gnu/packages/openstack.scm, gnu/packages/package-management.scm, gnu/packages/password-utils.scm, gnu/packages/patchutils.scm, gnu/packages/pdf.scm, gnu/packages/photo.scm, gnu/packages/polkit.scm, gnu/packages/protobuf.scm, gnu/packages/python-crypto.scm, gnu/packages/python-web.scm, gnu/packages/qt.scm, gnu/packages/rdf.scm, gnu/packages/ruby.scm, gnu/packages/search.scm, gnu/packages/selinux.scm, gnu/packages/serialization.scm, gnu/packages/shells.scm, gnu/packages/simulation.scm, gnu/packages/ssh.scm, gnu/packages/statistics.scm, gnu/packages/storage.scm, gnu/packages/sync.scm, gnu/packages/terminals.scm, gnu/packages/textutils.scm, gnu/packages/time.scm, gnu/packages/tls.scm, gnu/packages/tor.scm, gnu/packages/tryton.scm, gnu/packages/version-control.scm, gnu/packages/video.scm, gnu/packages/virtualization.scm, gnu/packages/vpn.scm, gnu/packages/web-browsers.scm, gnu/packages/web.scm, gnu/packages/wicd.scm, gnu/packages/xdisorg.scm, gnu/packages/xorg.scm: Update module references. --- gnu/packages/shells.scm | 1 + 1 file changed, 1 insertion(+) (limited to 'gnu/packages/shells.scm') diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm index 38eeaa7831..edf747de40 100644 --- a/gnu/packages/shells.scm +++ b/gnu/packages/shells.scm @@ -40,6 +40,7 @@ #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) + #:use-module (gnu packages python-xyz) #:use-module (gnu packages readline) #:use-module (gnu packages scheme) #:use-module (guix build-system gnu) -- cgit v1.2.3 From e1dba5bea01672c94c9bc4e64695675a2da5bfea Mon Sep 17 00:00:00 2001 From: Meiyo Peng Date: Sun, 6 Jan 2019 22:11:36 +0800 Subject: gnu: fish: Update to 3.0.0. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/shells.scm (fish): Update to 3.0.0. [source]: Remove dead URL. [inputs]: Remove bc. Replace python-wrapper with python. [arguments]: Remove configure-flags. Enable fish to source /etc/fish/config.fish. Enable completions, functions and configurations in user's and system's guix profiles. Signed-off-by: Ludovic Courtès --- gnu/packages/shells.scm | 110 +++++++++++++++++++++++++++++++----------------- 1 file changed, 72 insertions(+), 38 deletions(-) (limited to 'gnu/packages/shells.scm') diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm index edf747de40..e92b2fcc63 100644 --- a/gnu/packages/shells.scm +++ b/gnu/packages/shells.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2017, 2018 Nils Gillmann ;;; Copyright © 2017, 2018 Leo Famulari ;;; Copyright © 2017 Arun Isaac +;;; Copyright © 2019 Meiyo Peng ;;; ;;; This file is part of GNU Guix. ;;; @@ -27,7 +28,6 @@ (define-module (gnu packages shells) #:use-module (gnu packages) - #:use-module (gnu packages algebra) #:use-module (gnu packages autotools) #:use-module (gnu packages base) #:use-module (gnu packages bison) @@ -89,51 +89,85 @@ direct descendant of NetBSD's Almquist Shell (@command{ash}).") (define-public fish (package (name "fish") - (version "2.7.1") - (source (origin - (method url-fetch) - (uri - (list - (string-append "https://fishshell.com/files/" - version "/fish-" version ".tar.gz") - (string-append "https://github.com/fish-shell/fish-shell/" - "releases/download/" version "/" - name "-" version ".tar.gz"))) - (sha256 - (base32 - "0nhc3yc5lnnan7zmxqqxm07rdpwjww5ijy45ll2njdc6fnfb2az4")) - (modules '((guix build utils))) - ;; Don't try to install /etc/fish/config.fish. - (snippet '(begin - (substitute* "Makefile.in" - ((".*INSTALL.*sysconfdir.*fish.*") "")) - #t)))) + (version "3.0.0") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/fish-shell/fish-shell/" + "releases/download/" version "/" + name "-" version ".tar.gz")) + (sha256 + (base32 "1kzjd0n0sfslkd36lzrvvvgy3qwkd9y466bkrqlnhd5h9dhx77ga")))) (build-system gnu-build-system) - (native-inputs - `(("doxygen" ,doxygen))) (inputs - `(("bc" ,bc) + `(("groff" ,groff) ; for 'fish --help' ("ncurses" ,ncurses) - ("groff" ,groff) ;for 'fish --help' - ("pcre2" ,pcre2) ;don't use the bundled PCRE2 - ("python" ,python-wrapper))) ;for fish_config and manpage completions + ("pcre2" ,pcre2) ; don't use the bundled PCRE2 + ("python" ,python))) ; for fish_config and manpage completions + (native-inputs + `(("doxygen" ,doxygen))) (arguments - '(#:tests? #f ; no check target - #:configure-flags '("--sysconfdir=/etc") + '(#:tests? #f ; no check target #:phases (modify-phases %standard-phases - ;; Embed absolute paths to store items. - (add-after 'unpack 'embed-store-paths - (lambda* (#:key inputs outputs #:allow-other-keys) - (substitute* '("share/functions/math.fish" - "share/functions/seq.fish") - (("\\| bc") - (string-append "| " (assoc-ref %build-inputs "bc") - "/bin/bc"))) - (substitute* "share/functions/fish_update_completions.fish" - (("python") (which "python"))) + (add-after 'unpack 'patch-source + (lambda _ + (substitute* '("build_tools/build_commands_hdr.sh" + "build_tools/build_user_doc.sh") + (("/usr/bin/env") "env")) + #t)) + ;; Embed absolute paths. + (add-before 'install 'embed-absolute-paths + (lambda _ + (substitute* '("share/functions/__fish_config_interactive.fish" + "share/functions/fish_config.fish" + "share/functions/fish_update_completions.fish") + (("python3") (which "python3"))) (substitute* "share/functions/__fish_print_help.fish" (("nroff") (which "nroff"))) + #t)) + ;; Source /etc/fish/config.fish from $__fish_sysconf_dir/config.fish. + (add-before 'install 'patch-fish-config + (lambda _ + (let ((port (open-file "etc/config.fish" "a"))) + (display (string-append + "\n\n" + "# Patched by Guix.\n" + "# Source /etc/fish/config.fish.\n" + "if test -f /etc/fish/config.fish\n" + " source /etc/fish/config.fish\n" + "end\n") + port) + (close-port port)) + #t)) + ;; Enable completions, functions and configurations in user's and + ;; system's guix profiles by adding them to __extra_* variables. + (add-before 'install 'patch-fish-extra-paths + (lambda _ + (let ((port (open-file "share/__fish_build_paths.fish" "a"))) + (display + (string-append + "\n\n" + "# Patched by Guix.\n" + "# Enable completions, functions and configurations in user's" + " and system's guix profiles by adding them to __extra_*" + " variables.\n" + "set -l __guix_profile_paths ~/.guix-profile" + " /run/current-system/profile\n" + "set __extra_completionsdir" + " $__guix_profile_paths\"/etc/fish/completions\"" + " $__guix_profile_paths\"/share/fish/vendor_completions.d\"" + " $__extra_completionsdir\n" + "set __extra_functionsdir" + " $__guix_profile_paths\"/etc/fish/functions\"" + " $__guix_profile_paths\"/share/fish/vendor_functions.d\"" + " $__extra_functionsdir\n" + "set __extra_confdir" + " $__guix_profile_paths\"/etc/fish/conf.d\"" + " $__guix_profile_paths\"/share/fish/vendor_conf.d\"" + " $__extra_confdir\n") + port) + (close-port port)) #t))))) (synopsis "The friendly interactive shell") (description -- cgit v1.2.3 From 1d962fc0a1fb676bc327fd69b42086701a3b3d86 Mon Sep 17 00:00:00 2001 From: Meiyo Peng Date: Sun, 20 Jan 2019 21:41:21 +0800 Subject: gnu: Add fish-foreign-env. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/shells.scm (fish-foreign-env): New variable. Signed-off-by: Ludovic Courtès --- gnu/packages/shells.scm | 50 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) (limited to 'gnu/packages/shells.scm') diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm index e92b2fcc63..8e2ca2a9a3 100644 --- a/gnu/packages/shells.scm +++ b/gnu/packages/shells.scm @@ -30,6 +30,7 @@ #:use-module (gnu packages) #:use-module (gnu packages autotools) #:use-module (gnu packages base) + #:use-module (gnu packages bash) #:use-module (gnu packages bison) #:use-module (gnu packages documentation) #:use-module (gnu packages groff) @@ -45,6 +46,7 @@ #:use-module (gnu packages scheme) #:use-module (guix build-system gnu) #:use-module (guix build-system python) + #:use-module (guix build-system trivial) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix licenses) @@ -182,6 +184,54 @@ and syntax highlighting.") (home-page "https://fishshell.com/") (license gpl2))) +(define-public fish-foreign-env + (package + (name "fish-foreign-env") + (version "0.20190116") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/oh-my-fish/plugin-foreign-env.git") + (commit "dddd9213272a0ab848d474d0cbde12ad034e65bc"))) + (file-name (git-file-name name version)) + (sha256 + (base32 "00xqlyl3lffc5l0viin1nyp819wf81fncqyz87jx8ljjdhilmgbs")))) + (build-system trivial-build-system) + (arguments + '(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let* ((source (assoc-ref %build-inputs "source")) + (out (assoc-ref %outputs "out")) + (func-path (string-append out "/share/fish/functions"))) + (mkdir-p func-path) + (copy-recursively (string-append source "/functions") + func-path) + + ;; Embed absolute paths. + (substitute* `(,(string-append func-path "/fenv.fish") + ,(string-append func-path "/fenv.apply.fish") + ,(string-append func-path "/fenv.main.fish")) + (("bash") + (string-append (assoc-ref %build-inputs "bash") "/bin/bash")) + (("sed") + (string-append (assoc-ref %build-inputs "sed") "/bin/sed")) + ((" tr ") + (string-append " " (assoc-ref %build-inputs "coreutils") + "/bin/tr "))))))) + (inputs + `(("bash" ,bash) + ("coreutils" ,coreutils) + ("sed" ,sed))) + (home-page "https://github.com/oh-my-fish/plugin-foreign-env") + (synopsis "Foreign environment interface for fish shell") + (description "@code{fish-foreign-env} wraps bash script execution in a way +that environment variables that are exported or modified get imported back +into fish.") + (license expat))) + (define-public rc (package (name "rc") -- cgit v1.2.3 From 4bddd12ad540d45a33a5f9f129b896843dca603f Mon Sep 17 00:00:00 2001 From: Meiyo Peng Date: Sun, 20 Jan 2019 21:42:15 +0800 Subject: gnu: fish: Use fish-foreign-env to source /etc/profile. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/shells.scm (fish): Use fish-foreign-env to source /etc/profile when user logs in. Signed-off-by: Ludovic Courtès --- gnu/packages/shells.scm | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'gnu/packages/shells.scm') diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm index 8e2ca2a9a3..d0561559e9 100644 --- a/gnu/packages/shells.scm +++ b/gnu/packages/shells.scm @@ -102,7 +102,8 @@ direct descendant of NetBSD's Almquist Shell (@command{ash}).") (base32 "1kzjd0n0sfslkd36lzrvvvgy3qwkd9y466bkrqlnhd5h9dhx77ga")))) (build-system gnu-build-system) (inputs - `(("groff" ,groff) ; for 'fish --help' + `(("fish-foreign-env" ,fish-foreign-env) + ("groff" ,groff) ; for 'fish --help' ("ncurses" ,ncurses) ("pcre2" ,pcre2) ; don't use the bundled PCRE2 ("python" ,python))) ; for fish_config and manpage completions @@ -170,6 +171,25 @@ direct descendant of NetBSD's Almquist Shell (@command{ash}).") " $__extra_confdir\n") port) (close-port port)) + #t)) + ;; Use fish-foreign-env to source /etc/profile. + (add-before 'install 'source-etc-profile + (lambda* (#:key inputs #:allow-other-keys) + (let ((port (open-file "share/__fish_build_paths.fish" "a"))) + (display + (string-append + "\n\n" + "# Patched by Guix.\n" + "# Use fish-foreign-env to source /etc/profile.\n" + "if status is-login\n" + " set fish_function_path " + (assoc-ref inputs "fish-foreign-env") "/share/fish/functions" + " $__fish_datadir/functions\n" + " fenv source /etc/profile\n" + " set -e fish_function_path\n" + "end\n") + port) + (close-port port)) #t))))) (synopsis "The friendly interactive shell") (description -- cgit v1.2.3