Re: [PATCH] glib-or-gtk-build-system: new build-system
On Mon, Oct 6, 2014 at 11:32 PM, Ludovic Courtès l...@gnu.org wrote: Excellent! Would be nice to check Evince and EOG, which were known to have this kind of problem. I've checked Evince and it works fine. I couldn't find EOG. What's the name of the package? Great. The strategy looks good to me. Mark had concerns about the wrapper approach in general, but IMO it’s OK here. Thoughts? Yes, I've read Mark's comments. I'm not ignoring his comments. I just do not have a better idea. Attached an updated patch. If it is fine, I will update the documentation in a separate patch to follow. Regards, Fede From 3bcb914162de1950ff927bc44cb91ea20bd5c1d4 Mon Sep 17 00:00:00 2001 From: Federico Beffa be...@fbengineering.ch Date: Mon, 6 Oct 2014 15:49:29 +0200 Subject: [PATCH] glib-or-gtk-build-system: New files * guix/build-system/glib-or-gtk.scm, guix/build/glib-or-gtk-build-system.scm: Add initial version of a new build-system called 'glib-or-gtk-build-system'. --- guix/build-system/glib-or-gtk.scm | 195 guix/build/glib-or-gtk-build-system.scm | 130 + 2 files changed, 325 insertions(+) create mode 100644 guix/build-system/glib-or-gtk.scm create mode 100644 guix/build/glib-or-gtk-build-system.scm diff --git a/guix/build-system/glib-or-gtk.scm b/guix/build-system/glib-or-gtk.scm new file mode 100644 index 000..8abdf9f --- /dev/null +++ b/guix/build-system/glib-or-gtk.scm @@ -0,0 +1,195 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2013, 2014 Ludovic Courtès l...@gnu.org +;;; Copyright © 2013 Cyril Roelandt tipec...@gmail.com +;;; Copyright © 2014 Federico Beffa be...@fbengineering.ch +;;; +;;; 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 http://www.gnu.org/licenses/. + +(define-module (guix build-system glib-or-gtk) + #:use-module (guix store) + #:use-module (guix utils) + #:use-module (guix derivations) + #:use-module (guix build-system) + #:use-module (guix build-system gnu) + #:use-module (guix packages) + #:use-module (ice-9 match) + #:export (glib-or-gtk-build +glib-or-gtk-build-system)) + +;; Commentary: +;; +;; This build system is an extension of the 'gnu-build-system'. It +;; accomodates the needs of applications making use of glib or gtk+ (with or +;; to be interpreted in the mathematical sense). This is achieved by adding +;; two phases run after the 'install' phase: +;; +;; 'glib-or-gtk-wrap' phase: +;; +;; a) This phase looks for GSettings schemas by verifying the existence of +;; path datadir/glib-2.0/schemas in all input packages. If the path is +;; found in any package, then all programs in out/bin are wrapped in scripts +;; where the environment variable XDG_DATA_DIRS is set and points to the +;; list of found schemas directories. +;; +;; b) Looks for the existence of libdir/gtk-3.0 directories in all input +;; packages. If any is found, then the environment variable GTK_PATH is +;; suitably set and added to the wrappers. The variable GTK_PATH has been +;; preferred over GTK_EXE_PREFIX because the latter can only point to a +;; single directory, while we may need to point to several ones. +;; +;; 'glib-or-gtk-compile-schemas' phase: +;; +;; Looks for the presence of out/share/glib-2.0/schemas. If that directory +;; exists and does not include a file named gschemas.compiled, then +;; glib-compile-schemas is run in that directory. +;; +;; Code: + +(define %default-modules + ;; Build-side modules made available in the build environment. + '((guix build glib-or-gtk-build-system) +(guix build utils))) + +(define %default-imported-modules + ;; Build-side modules imported and used by default. + '((guix build gnu-build-system) +(guix build glib-or-gtk-build-system) +(guix build utils))) + +(define (default-glib) + Return the default glib package from which we use +\glib-compile-schemas\. + ;; Do not use `@' to avoid introducing circular dependencies. + (let ((module (resolve-interface '(gnu packages glib +(module-ref module 'glib))) + +(define* (lower name +#:key source inputs native-inputs outputs system target +(glib (default-glib)) (implicit-inputs? #t) +(strip-binaries? #t) +#:allow-other-keys +#:rest arguments) + Return a bag for NAME. + (define
Re: [PATCH] glib-or-gtk-build-system: new build-system
On Wed, Oct 8, 2014 at 9:28 AM, Federico Beffa be...@ieee.org wrote: Attached an updated patch. If it is fine, I will update the documentation in a separate patch to follow. I forgot to mention that I'm not sure how to update gnu-system.am. I looked for cmake-build-system as an example, but it is not mentioned in the file. Regards, Fede
Re: [PATCH] gnu: conkeror: install conkeror-spawn-helper.
Eric Bavier ericbav...@gmail.com skribis: From 16e2259eb3860686a30d40e94c4c5bd39d60dfe0 Mon Sep 17 00:00:00 2001 From: Eric Bavier bav...@member.fsf.org Date: Tue, 7 Oct 2014 17:33:00 -0500 Subject: [PATCH] gnu: conkeror: install conkeror-spawn-helper. * gnu/packages/conkeror.scm (conkeror)[build-system]: Change to gnu-build-system. Adjust arguments accordingly. [inputs]: Remove now-implicit bash. [native-inputs]: Remove now-implicit tar and gzip. [description]: Fix two-space-after-end-of-sentence. Remove comment about separate conkeror-spawn-process-helper package. OK to push. (I had got used to spawning the PDF viewer by hand, but this is definitely an improvement!) Thanks, Ludo’.
Re: [PATCH] glib-or-gtk-build-system: new build-system
Federico Beffa be...@ieee.org skribis: On Wed, Oct 8, 2014 at 9:28 AM, Federico Beffa be...@ieee.org wrote: Attached an updated patch. If it is fine, I will update the documentation in a separate patch to follow. I forgot to mention that I'm not sure how to update gnu-system.am. I looked for cmake-build-system as an example, but it is not mentioned in the file. It’s actually in Makefile.am. gnu-system.am is for things under gnu/. Ludo’.
Re: [PATCH] glib-or-gtk-build-system: new build-system
Federico Beffa be...@ieee.org skribis: On Mon, Oct 6, 2014 at 11:32 PM, Ludovic Courtès l...@gnu.org wrote: Excellent! Would be nice to check Evince and EOG, which were known to have this kind of problem. I've checked Evince and it works fine. Great. I couldn't find EOG. What's the name of the package? I remember Cyril mentioned it in a discussion, but it’s not in the tree, so forget about it. Attached an updated patch. If it is fine, I will update the documentation in a separate patch to follow. OK. From 3bcb914162de1950ff927bc44cb91ea20bd5c1d4 Mon Sep 17 00:00:00 2001 From: Federico Beffa be...@fbengineering.ch Date: Mon, 6 Oct 2014 15:49:29 +0200 Subject: [PATCH] glib-or-gtk-build-system: New files * guix/build-system/glib-or-gtk.scm, guix/build/glib-or-gtk-build-system.scm: Add initial version of a new build-system called 'glib-or-gtk-build-system'. I’ve pushed the patch after adding the files to Makefile.am and tweaking the commit log (I realize I wasn’t clear: “New files” is for the body of the commit log, whereas the subject line is typically a sentence.) Thanks! Ludo’.
Re: [PATCH] glib-or-gtk-build-system: new build-system
On Wed, Oct 8, 2014 at 12:04 PM, Ludovic Courtès l...@gnu.org wrote: Federico Beffa be...@ieee.org skribis: I've checked Evince and it works fine. By the way, note that when started, it complains about missing libcanberra as does emacs. The problem is solved by adding libcanberra as an input to both programs. Maybe libcanberra should be made a propagating-input of some lower level library? Also, as emacs, it give the warning GLib-GIO-Message: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications. I believe this is because they can't find dconf. Any particular reason for not being in gnome.scm? Regards, Fede
ui: Move 'show-manifest-transaction' from (guix profiles).
Hello, I tried to move (and rename for consistency with other ‘show-…’ procedures) ‘manifest-show-transaction’ from (guix profiles) to (guix ui) as we were discussing on #guix today, but I found that tests began to fail. And I can't figure it out. The first failed test is builders.scm. Its log and the patch with the changes I made are attached. Need help :( From bc27ebd215a16c52d434245bd618b10262fa9562 Mon Sep 17 00:00:00 2001 From: Alex Kost alez...@gmail.com Date: Wed, 8 Oct 2014 17:15:49 +0400 Subject: [PATCH] ui: Move 'show-manifest-transaction' from (guix profiles). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Suggested by Ludovic Courtès. * guix/profiles.scm: Do not use (guix ui) module. (right-arrow, manifest-show-transaction): Move and rename to... * guix/ui.scm (right-arrow, show-manifest-transaction): ... here. * tests/profiles.scm (manifest-show-transaction): Move to... * tests/ui.scm (show-manifest-transaction): ... here. (guile-1.8.8, guile-2.0.9): New variables. * emacs/guix-main.scm (process-package-actions): Rename 'manifest-show-transaction' to 'show-manifest-transaction'. * guix/scripts/package.scm (guix-package): Likewise. --- emacs/guix-main.scm | 2 +- guix/profiles.scm| 93 guix/scripts/package.scm | 2 +- guix/ui.scm | 93 tests/profiles.scm | 17 - tests/ui.scm | 32 + 6 files changed, 127 insertions(+), 112 deletions(-) diff --git a/emacs/guix-main.scm b/emacs/guix-main.scm index 7dbfa61..c25dd50 100644 --- a/emacs/guix-main.scm +++ b/emacs/guix-main.scm @@ -797,7 +797,7 @@ OUTPUTS is a list of package outputs (may be an empty list). (new-profile (derivation-output-path derivation))) (set-build-options store #:use-substitutes? use-substitutes?) -(manifest-show-transaction store manifest transaction +(show-manifest-transaction store manifest transaction #:dry-run? dry-run?) (show-what-to-build store derivations #:use-substitutes? use-substitutes? diff --git a/guix/profiles.scm b/guix/profiles.scm index 18733a6..f2eb754 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -19,7 +19,6 @@ ;;; along with GNU Guix. If not, see http://www.gnu.org/licenses/. (define-module (guix profiles) - #:use-module (guix ui) #:use-module (guix utils) #:use-module (guix records) #:use-module (guix derivations) @@ -63,7 +62,6 @@ manifest-transaction-remove manifest-perform-transaction manifest-transaction-effects -manifest-show-transaction profile-manifest package-manifest-entry @@ -315,97 +313,6 @@ it. (manifest-add (manifest-remove manifest remove) install))) -(define (right-arrow port) - Return either a string containing the 'RIGHT ARROW' character, or an ASCII -replacement if PORT is not Unicode-capable. - (with-fluids ((%default-port-encoding (port-encoding port))) -(let ((arrow →)) - (catch 'encoding-error -(lambda () - (call-with-output-string -(lambda (port) - (set-port-conversion-strategy! port 'error) - (display arrow port -(lambda (key . args) - -) - -(define* (manifest-show-transaction store manifest transaction -#:key dry-run?) - Display what will/would be installed/removed from MANIFEST by TRANSACTION. - (define (package-strings name version output item) -(map (lambda (name version output item) - (format #f~a~:[:~a~;~*~]\t~a\t~a - name - (equal? output out) output version - (if (package? item) - (package-output store item output) - item))) - name version output item)) - - (define →;an arrow that can be represented on stderr -(right-arrow (current-error-port))) - - (define (upgrade-string name old-version new-version output item) -(format #f~a~:[:~a~;~*~]\t~a ~a ~a\t~a -name (equal? output out) output -old-version → new-version -(if (package? item) -(package-output store item output) -item))) - - (let-values (((remove install upgrade) -(manifest-transaction-effects manifest transaction))) -(match remove - ((($ manifest-entry name version output item) ..1) - (let ((len(length name)) - (remove (package-strings name version output item))) - (if dry-run? - (format (current-error-port) - (N_ The following package would be removed:~%~{~a~%~}~% - The
Re: ui: Move 'show-manifest-transaction' from (guix profiles).
Sorry, I've found that the patch I sent is not cleanly applied to the latest master checkout. The modified patch is attached. It seems the fail happens only if there is #:use-module (guix profiles) in (guix ui). If (guix profiles) is not used, there are no problems. I'm stuck. From 480c22f37437ce138d4fe822f5b1c15f1f65be0e Mon Sep 17 00:00:00 2001 From: Alex Kost alez...@gmail.com Date: Wed, 8 Oct 2014 17:15:49 +0400 Subject: [PATCH] ui: Move 'show-manifest-transaction' from (guix profiles). * guix/profiles.scm: Do not use (guix ui) module. (right-arrow, manifest-show-transaction): Move and rename to... * guix/ui.scm (right-arrow, show-manifest-transaction): ... here. * tests/profiles.scm (manifest-show-transaction): Move to... * tests/ui.scm (show-manifest-transaction): ... here. (guile-1.8.8, guile-2.0.9): New variables. * emacs/guix-main.scm (process-package-actions): Rename 'manifest-show-transaction' to 'show-manifest-transaction'. * guix/scripts/package.scm (guix-package): Likewise. --- emacs/guix-main.scm | 2 +- guix/profiles.scm| 93 guix/scripts/package.scm | 2 +- guix/ui.scm | 93 tests/profiles.scm | 17 - tests/ui.scm | 32 + 6 files changed, 127 insertions(+), 112 deletions(-) diff --git a/emacs/guix-main.scm b/emacs/guix-main.scm index b85bb5c..fe599fb 100644 --- a/emacs/guix-main.scm +++ b/emacs/guix-main.scm @@ -797,7 +797,7 @@ OUTPUTS is a list of package outputs (may be an empty list). (new-profile (derivation-output-path derivation))) (set-build-options store #:use-substitutes? use-substitutes?) - (manifest-show-transaction store manifest transaction + (show-manifest-transaction store manifest transaction #:dry-run? dry-run?) (show-what-to-build store derivations #:use-substitutes? use-substitutes? diff --git a/guix/profiles.scm b/guix/profiles.scm index 18733a6..f2eb754 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -19,7 +19,6 @@ ;;; along with GNU Guix. If not, see http://www.gnu.org/licenses/. (define-module (guix profiles) - #:use-module (guix ui) #:use-module (guix utils) #:use-module (guix records) #:use-module (guix derivations) @@ -63,7 +62,6 @@ manifest-transaction-remove manifest-perform-transaction manifest-transaction-effects -manifest-show-transaction profile-manifest package-manifest-entry @@ -315,97 +313,6 @@ it. (manifest-add (manifest-remove manifest remove) install))) -(define (right-arrow port) - Return either a string containing the 'RIGHT ARROW' character, or an ASCII -replacement if PORT is not Unicode-capable. - (with-fluids ((%default-port-encoding (port-encoding port))) -(let ((arrow →)) - (catch 'encoding-error -(lambda () - (call-with-output-string -(lambda (port) - (set-port-conversion-strategy! port 'error) - (display arrow port -(lambda (key . args) - -) - -(define* (manifest-show-transaction store manifest transaction -#:key dry-run?) - Display what will/would be installed/removed from MANIFEST by TRANSACTION. - (define (package-strings name version output item) -(map (lambda (name version output item) - (format #f~a~:[:~a~;~*~]\t~a\t~a - name - (equal? output out) output version - (if (package? item) - (package-output store item output) - item))) - name version output item)) - - (define →;an arrow that can be represented on stderr -(right-arrow (current-error-port))) - - (define (upgrade-string name old-version new-version output item) -(format #f~a~:[:~a~;~*~]\t~a ~a ~a\t~a -name (equal? output out) output -old-version → new-version -(if (package? item) -(package-output store item output) -item))) - - (let-values (((remove install upgrade) -(manifest-transaction-effects manifest transaction))) -(match remove - ((($ manifest-entry name version output item) ..1) - (let ((len(length name)) - (remove (package-strings name version output item))) - (if dry-run? - (format (current-error-port) - (N_ The following package would be removed:~%~{~a~%~}~% - The following packages would be removed:~%~{~a~%~}~% - len) - remove) - (format (current-error-port) - (N_ The
[PATCH] glib-or-gtk-build-system: added documentation
I've added documentation for the glib-or-gtk-build-system. Regards, Fede From 27748f063513260cf4dac7d56e5148fbc154b4c1 Mon Sep 17 00:00:00 2001 From: Federico Beffa be...@fbengineering.ch Date: Wed, 8 Oct 2014 21:04:25 +0200 Subject: [PATCH 2/2] glib-or-gtk-build-system: added documentation * doc/guix.texi: added description of glib-or-gtk-build-system --- doc/guix.texi | 29 + 1 file changed, 29 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index f6357bd..977b375 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -1637,6 +1637,35 @@ debugging information''), which roughly means that code is compiled with @code{-O2 -g}, as is the case for Autoconf-based packages by default. @end defvr +@defvr {Scheme Variable} glib-or-gtk-build-system +This variable is exported by @code{(guix build-system glib-or-gtk)}. It +is intended for use with packages making use of +@url{https://developer.gnome.org/glib/stable, glib} or +@url{https://developer.gnome.org/gtk3/stable, gtk+}. + +This build-system adds the following two phases to the ones defined by +the @code{gnu-build-system}: + +@table @code +@item glib-or-gtk-wrap +The phase @code{glib-or-gtk-wrap} ensures that programs found under +@file{bin/} are able to find @code{glib} schemas and @code{gtk+} +libraries. This is achieved by appropriately setting the environment +variables @code{XDG_DATA_DIRS} and @code{GTK_PATH}; and by wrapping the +programs in suitable launch scripts. + +@item glib-or-gtk-compile-schemas +The phase @code{glib-or-gtk-compile-schemas} makes sure that all +@code{glib} schemas are compiled. Compilation is performed by the +program @code{glib-compile-schemas}. It is provided by the package +@code{glib:bin} which is automatically imported by the build system. +The @code{glib} package providing @code{glib-compile-schemas} can be +specified with the @code{#:glib} parameter. +@end table + +Both phases are executed after the @code{install} phase. +@end defvr + @defvr {Scheme Variable} python-build-system This variable is exported by @code{(guix build-system python)}. It implements the more or less standard build procedure used by Python -- 1.8.4
Re: [PATCH] gnu: cmake: Use our curl, zlib, expat, bzip2, and libarchive.
Eric Bavier ericbav...@gmail.com skribis: Sending this patch to the list, as it would likely cause a lot of rebuilds. From c824d34faecc173bafc513d0b2052597a46dddfd Mon Sep 17 00:00:00 2001 From: Eric Bavier bav...@member.fsf.org Date: Wed, 8 Oct 2014 11:55:40 -0500 Subject: [PATCH] gnu: cmake: Use our curl, zlib, expat, bzip2, and libarchive. * gnu/packages/cmake.scm (cmake)[arguments]: Move sh-patching to new 'patch-bin-sh phase. New 'set-paths phase. [inputs]: Add curl, zlib, expat, bzip2, and libarchive. [description]: Fix space after end-of-sentence. LGTM. I think it’s fine to apply it on ‘master’ now (MIPS builds are lagging behind, but that’s OK.) Ludo’.
Re: ui: Move 'show-manifest-transaction' from (guix profiles).
Alex Kost alez...@gmail.com skribis: ?: 16 [primitive-load-path guix/profiles ...] In guix/profiles.scm: 21: 15 [#procedure 9776070 ()] In ice-9/boot-9.scm: 2951: 14 [define-module* (guix profiles) #:filename ...] 2926: 13 [resolve-imports (((guix utils)) ((guix records)) ((guix derivations)) ...)] 2864: 12 [resolve-interface (guix gexp) #:select ...] 2789: 11 [#procedure 944b300 at ice-9/boot-9.scm:2777:4 (name #:optional autoload version #:key ensure) # ...] 3065: 10 [try-module-autoload (guix gexp) #f] 2401: 9 [save-module-excursion #procedure 977a630 at ice-9/boot-9.scm:3066:17 ()] 3085: 8 [#procedure 977a630 at ice-9/boot-9.scm:3066:17 ()] In unknown file: ?: 7 [primitive-load-path guix/gexp ...] In guix/gexp.scm: 19: 6 [#procedure 97870d0 ()] In ice-9/boot-9.scm: 2951: 5 [define-module* (guix gexp) #:filename ...] 2926: 4 [resolve-imports ((# # #) (#) (# # #) (#) ...)] 2877: 3 [resolve-interface (guix store) #:select ...] 768: 2 [for-each #procedure 96f5640 at ice-9/boot-9.scm:2877:20 (bspec) #] 2883: 1 [#procedure 96f5640 at ice-9/boot-9.scm:2877:20 (bspec) direct-store-path?] In unknown file: ?: 0 [scm-error misc-error #f ...] ERROR: In procedure scm-error: ERROR: no binding `direct-store-path?' in module (guix store) This is another circularity issue. :-/ There’s: (guix store) - (guix nar) - (guix ui) - (guix store) ... This shouldn’t be a problem, except that occasional uses of #:select trigger a bug (see http://bugs.gnu.org/15540.) I’ve fiddled a bit on top of your patch, but couldn’t find any simple fix. However, back to the initial problem, is this a problem if the error conditions are defined in (guix profiles), which is then imported by (guix ui)? This is suboptimal, but this kind of circular reference shouldn’t cause any troubles. HTH, Ludo’.
Re: [PATCH] glib-or-gtk-build-system: added documentation
I took the freedom to slightly amend the text (see diff below), tweaked the commit log, and pushed it. Thanks! Ludo’. diff --git a/doc/guix.texi b/doc/guix.texi index 36337f1..ed2b81b 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -1644,27 +1644,27 @@ debugging information''), which roughly means that code is compiled with @defvr {Scheme Variable} glib-or-gtk-build-system This variable is exported by @code{(guix build-system glib-or-gtk)}. It -is intended for use with packages making use of -@url{https://developer.gnome.org/glib/stable, glib} or -@url{https://developer.gnome.org/gtk3/stable, gtk+}. +is intended for use with packages making use of GLib or GTK+. -This build-system adds the following two phases to the ones defined by -the @code{gnu-build-system}: +This build system adds the following two phases to the ones defined by +@var{gnu-build-system}: @table @code @item glib-or-gtk-wrap The phase @code{glib-or-gtk-wrap} ensures that programs found under -@file{bin/} are able to find @code{glib} schemas and @code{gtk+} -libraries. This is achieved by appropriately setting the environment -variables @code{XDG_DATA_DIRS} and @code{GTK_PATH}; and by wrapping the -programs in suitable launch scripts. +@file{bin/} are able to find GLib's ``schemas'' and +@uref{https://developer.gnome.org/gtk3/stable/gtk-running.html, GTK+ +modules}. This is achieved by wrapping the programs in launch scripts +that appropriately set the @code{XDG_DATA_DIRS} and @code{GTK_PATH} +environment variables. @item glib-or-gtk-compile-schemas -The phase @code{glib-or-gtk-compile-schemas} makes sure that all -@code{glib} schemas are compiled. Compilation is performed by the -program @code{glib-compile-schemas}. It is provided by the package +The phase @code{glib-or-gtk-compile-schemas} makes sure that all GLib's +@uref{https://developer.gnome.org/gio/stable/glib-compile-schemas.html, +GSettings schemas} are compiled. Compilation is performed by the +@command{glib-compile-schemas} program. It is provided by the package @code{glib:bin} which is automatically imported by the build system. -The @code{glib} package providing @code{glib-compile-schemas} can be +The @code{glib} package providing @command{glib-compile-schemas} can be specified with the @code{#:glib} parameter. @end table
[PATCH] scripts: Add 'environment' command.
Hello Guix hackers, Below is a preliminary version of a new guix command called 'environment'. For those familiar with Nix, it works a lot like nix-shell. The purpose of 'guix environment' is to assist hackers in creating reproducible development environments without polluting their package profile. 'guix environment' takes a package (or packages), builds all of the necessary inputs, and creates a shell environment to use them. For example, 'guix environment guile' adds these environment variables: export PATH=/gnu/store/hzq21w0m7akpc3b9gxq9p0vlr74k8pib-pkg-config-0.27.1/bin:/gnu/store/3yiqz9wmwx6b7hpbapg5q39sjx33kh0j-bash-4.3.27/bin:/gnu/store/26vfhzfgl2iqfwa92ij8zqssgc4amh9y-gcc-4.8.3/bin:/gnu/store/2x8wq5w4cxgmz0f982gz37wzdglj0865-ld-wrapper-boot3-0/bin:/gnu/store/4cbvfyx31xyh7pmmvv3w5h0689pcnlnw-glibc-2.20/bin:/gnu/store/4cbvfyx31xyh7pmmvv3w5h0689pcnlnw-glibc-2.20/sbin:/gnu/store/dlg2zv7w3d3bfj5qg7yhskvgj65080p2-binutils-cross-boot0-2.24/bin:/gnu/store/pcizz33yzwyiirfsinbg08v3aha6krx4-make-boot0-4.0/bin:/gnu/store/qgx70g83pab3b08ff6cl0rrzv33bf074-diffutils-3.3/bin:/gnu/store/37w1i5q2iqm0alymc1iiibs12nv87wap-findutils-4.4.2/bin:/gnu/store/1qza3p5n6w5ciphli8wm05jam72jczfd-file-5.19/bin:/gnu/store/jfavabhnk1am05pyivk7ryixznqa49l4-binutils-bootstrap-0/bin:/gnu/store/mbacj3k992756mxskp26pd8b476mynhk-bootstrap-binaries-0/bin:/gnu/store/52vg2sr63d5vpz4np3sa1vf5y5gyhnrf-readline-6.3/bin:/gnu/store/z8ifyrrgawhmd5w3v0fdjdv52cwhb0pd-ncurses-5.9/bin export PKG_CONFIG_PATH=/gnu/store/8f9db6s6j77w130y9b13wsnsbalhfrf9-libffi-3.1/lib/pkgconfig:/gnu/store/8g6zcbj2fzzl6xis3mcsmpxrqsfsaxs4-libgc-7.4.2/lib/pkgconfig export CPATH=/gnu/store/26vfhzfgl2iqfwa92ij8zqssgc4amh9y-gcc-4.8.3/include:/gnu/store/4cbvfyx31xyh7pmmvv3w5h0689pcnlnw-glibc-2.20/include:/gnu/store/rw5s9immq72plzajqm8g8i4sfg8z0kyc-linux-libre-headers-3.3.8/include:/gnu/store/1qza3p5n6w5ciphli8wm05jam72jczfd-file-5.19/include:/gnu/store/8f9db6s6j77w130y9b13wsnsbalhfrf9-libffi-3.1/include:/gnu/store/52vg2sr63d5vpz4np3sa1vf5y5gyhnrf-readline-6.3/include:/gnu/store/z8ifyrrgawhmd5w3v0fdjdv52cwhb0pd-ncurses-5.9/include:/gnu/store/3j7h3gz5qh1v0j1xjjb2xxr2b3kqcsv6-libunistring-0.9.4/include:/gnu/store/wz94w6nr5wsvy06inwfpc0pxqp1cpkly-libtool-2.4.2/include:/gnu/store/8g6zcbj2fzzl6xis3mcsmpxrqsfsaxs4-libgc-7.4.2/include:/gnu/store/l61k4nkiw8wc064ynf17l40sfgczyh56-gmp-6.0.0a/include export LIBRARY_PATH=/gnu/store/4cbvfyx31xyh7pmmvv3w5h0689pcnlnw-glibc-2.20/lib:/gnu/store/1qza3p5n6w5ciphli8wm05jam72jczfd-file-5.19/lib:/gnu/store/8f9db6s6j77w130y9b13wsnsbalhfrf9-libffi-3.1/lib:/gnu/store/52vg2sr63d5vpz4np3sa1vf5y5gyhnrf-readline-6.3/lib:/gnu/store/z8ifyrrgawhmd5w3v0fdjdv52cwhb0pd-ncurses-5.9/lib:/gnu/store/3j7h3gz5qh1v0j1xjjb2xxr2b3kqcsv6-libunistring-0.9.4/lib:/gnu/store/wz94w6nr5wsvy06inwfpc0pxqp1cpkly-libtool-2.4.2/lib:/gnu/store/8g6zcbj2fzzl6xis3mcsmpxrqsfsaxs4-libgc-7.4.2/lib:/gnu/store/l61k4nkiw8wc064ynf17l40sfgczyh56-gmp-6.0.0a/lib With this environment, you can grab the guile source code and build it, knowing that all the dependencies have been satisfied. Furthermore, this system makes it easy to work on projects that require different versions of the same software without clashes. Bye-bye RVM and virtualenv! By default, running 'guix environment' spawns a new $SHELL process, because it is usually what one would want to do. However, the '--exec' flag can be used to specify the command to run. Additionally, the default behavior is to prepend search paths to the existing environment variable values so that one has access to other installed software e.g. git. To clear the existing environment firstf, the '--pure' flag can be used. Finally, the '--load' flag can be used to read a package from a file instead of searching $GUIX_PACKAGE_PATH. There is no documentation yet. I wanted to get feedback first before writing it in case substantial changes are made. :) WDYT? From 298dcc1dd3aac49e033debeea154c91b25229c14 Mon Sep 17 00:00:00 2001 From: David Thompson dthomps...@worcester.edu Date: Sun, 21 Sep 2014 13:40:05 -0400 Subject: [PATCH] scripts: Add 'environment' command. * guix/scripts/environment.scm: New file. * Makefile.am (MODULES): Add it. --- Makefile.am | 1 + guix/scripts/environment.scm | 212 +++ 2 files changed, 213 insertions(+) create mode 100644 guix/scripts/environment.scm diff --git a/Makefile.am b/Makefile.am index 7eecef2..4b823ec 100644 --- a/Makefile.am +++ b/Makefile.am @@ -94,6 +94,7 @@ MODULES = \ guix/scripts/system.scm \ guix/scripts/lint.scm\ guix/scripts/import/nix.scm \ + guix/scripts/environment.scm \ guix.scm \ $(GNU_SYSTEM_MODULES) diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm new file mode 100644 index 000..a4aaa86 --- /dev/null +++ b/guix/scripts/environment.scm @@ -0,0 +1,212 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2014 David Thompson
Having trouble packaging 'tidy'
Tidy is an application/library for fixing problems with HTML markup that is depended on by a number of other projects. However, tidy hasn't been updated since about 2009 and does not provide release tarballs. There's only a CVS repo, and it seems impossible to download a tarball snapshot of a specific revision. Their homepage is here: http://tidy.sourceforge.net/ Debian hosts a tarball for their source package, but we probably don't want to rely on that. I'm not sure how to proceed. Thoughts? -- David Thompson Web Developer - Free Software Foundation - http://fsf.org GPG Key: 0FF1D807 Support the FSF: https://fsf.org/donate
[PATCH] gnu: icecat: Update to 31.1.1
This is technically a pre-release, but given that our current Icecat has at least one security hole (and probably others), and fails to build on i686, I'm inclined to push it to master immediately. I suppose I should also mention that I've only tested it on i686. What do you think? Mark From d74f4c12f005bbfbd419772f861d7693eb1b7c28 Mon Sep 17 00:00:00 2001 From: Mark H Weaver m...@netris.org Date: Wed, 8 Oct 2014 23:37:37 -0400 Subject: [PATCH] gnu: icecat: Update to 31.1.1. * gnu/packages/gnuzilla.scm (icecat): Update to 31.1.1. Add 'pango', 'freetype', 'libxft' and 'pulseaudio' as inputs. Set 'out-of-source?' to #t. Remove 'sanitise' phase. Adapt customized 'configure' phase to handle 'out-of-source?' build. Add '--with-l10n-base' argument to configure. --- gnu/packages/gnuzilla.scm | 61 +++ 1 file changed, 35 insertions(+), 26 deletions(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 11515d4..1ae1f29 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -30,9 +30,11 @@ #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages compression) + #:use-module (gnu packages fontutils) #:use-module (gnu packages libevent) #:use-module (gnu packages image) #:use-module (gnu packages libffi) + #:use-module (gnu packages pulseaudio) #:use-module (gnu packages python) #:use-module (gnu packages xorg) #:use-module (gnu packages gl) @@ -42,16 +44,15 @@ (define-public icecat (package (name icecat) -(version 24.0) +(version 31.1.1) (source (origin (method url-fetch) - (uri (string-append mirror://gnu/gnuzilla/ - (substring version 0 (string-index version #\.)) - /icecat- version .tar.gz)) + (uri (string-append http://gnuzilla.gnu.org/releases/; + version / name - version .tar.xz)) (sha256 (base32 -1vxzjwmhad6yxx4sk9zvapjgv5salcv10id061q0991ii3dycy9a +033p5b6akjbg33prqg57mhp5zx3svryqzbjb3k58ql6939bfmad8 (build-system gnu-build-system) (inputs `((alsa-lib ,alsa-lib) @@ -62,9 +63,13 @@ (gstreamer ,gstreamer-0.10) (gst-plugins-base ,gst-plugins-base-0.10) (gtk+ ,gtk+-2) + (pango ,pango) + (freetype ,freetype) + (libxft ,libxft) (libevent ,libevent) (libxt ,libxt) (libffi ,libffi) + (pulseaudio ,pulseaudio) (mesa ,mesa) (unzip ,unzip) (yasm ,yasm) @@ -76,7 +81,8 @@ (python2-pysqlite ,python2-pysqlite) (pkg-config ,pkg-config))) (arguments - `(#:tests? #f ; no check target + `(#:tests? #f ; no check target + #:out-of-source? #t ; must be built outside of the source directory #:configure-flags '(;; Building with debugging symbols takes ~5GiB, so ;; disable it. @@ -112,26 +118,29 @@ --enable-system-ffi) #:phases - (alist-cons-before - 'patch-source-shebangs 'sanitise - (lambda _ -;; delete dangling symlinks -(delete-file browser/base/content/.#aboutDialog.xul) -(delete-file browser/base/content/abouthome/.#aboutHome.xhtml) -(delete-file browser/branding/unofficial/content/.#aboutHome.xhtml) -(delete-file toolkit/crashreporter/google-breakpad/autotools/compile)) - (alist-replace - 'configure - ;; configure does not work followed by both SHELL=... and - ;; CONFIG_SHELL=...; set environment variables instead - (lambda* (#:key outputs configure-flags #:allow-other-keys) -(let ((out (assoc-ref outputs out))) - (setenv SHELL (which bash)) - (setenv CONFIG_SHELL (which bash)) - (zero? (apply system* ./configure -(string-append --prefix= out) -configure-flags - %standard-phases + (alist-replace +'configure +;; configure does not work followed by both SHELL=... and +;; CONFIG_SHELL=...; set environment variables instead +(lambda* (#:key outputs configure-flags #:allow-other-keys) + (let* ((out (assoc-ref outputs out)) + (bash (which bash)) + (abs-srcdir (getcwd)) + (srcdir (string-append ../ (basename abs-srcdir))) + (flags `(,(string-append --prefix= out) + ,(string-append --with-l10n-base= + abs-srcdir /l10n) + ,@configure-flags))) +(setenv SHELL bash) +(setenv CONFIG_SHELL bash) +(mkdir ../build) +(chdir ../build) +(format #t build directory: ~s~%
Re: [PATCH] gnu: icecat: Update to 31.1.1
Mark H Weaver m...@netris.org writes: This is technically a pre-release, but given that our current Icecat has at least one security hole (and probably others), and fails to build on i686, I'm inclined to push it to master immediately. After some more testing, I went ahead and pushed this. Mark