Merge branch 'master' into gtk-rebuild

This commit is contained in:
Mark H Weaver 2015-05-23 22:24:19 -04:00
commit 30f9cbb072
14 changed files with 75 additions and 37 deletions

14
HACKING
View File

@ -2,7 +2,7 @@
#+TITLE: Hacking GNU Guix and Its Incredible Distro
Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
Copyright © 2014 Pierre-Antoine Rault <par@rigelk.eu>
@ -46,17 +46,7 @@ take a look at “info '(guix) Installation'” or send a message to
* Running Guix before it is installed
Command-line tools can be used even if you have not run "make install".
To do that, prefix each command with ./pre-inst-env, as in:
./pre-inst-env guix build --help
Similarly, for a Guile session using the Guix modules:
./pre-inst-env guile -c '(use-modules (guix utils)) (pk (%current-system))'
The pre-inst-env script sets up all the environment variables
necessary to support this.
See the same-named section in the manual.
* The Perfect Setup

View File

@ -29,7 +29,7 @@ is ready to use, provided Guix is installed system-wide, which is the
case by default. So if that is what you're using, you can happily skip
this section and read about the fun stuff.
If you're not yet a happy user of GSD, a little bit of setup is needed.
If you're not yet a happy user of GuixSD, a little bit of setup is needed.
To be able to use ``guix.el'', you need to install the following
packages:

View File

@ -88,6 +88,7 @@ Installation
* Running the Test Suite:: Testing Guix.
* Setting Up the Daemon:: Preparing the build daemon's environment.
* Invoking guix-daemon:: Running the build daemon.
* Running Guix Before It Is Installed:: Hacker tricks.
Setting Up the Daemon
@ -114,6 +115,11 @@ Programming Interface
* The Store Monad:: Purely functional interface to the store.
* G-Expressions:: Manipulating build expressions.
Defining Packages
* package Reference:: The package data type.
* origin Reference:: The origin data type.
Utilities
* Invoking guix build:: Building packages from the command line.
@ -247,6 +253,7 @@ instead, you want to install the complete GNU operating system,
* Running the Test Suite:: Testing Guix.
* Setting Up the Daemon:: Preparing the build daemon's environment.
* Invoking guix-daemon:: Running the build daemon.
* Running Guix Before It Is Installed:: Hacker tricks.
@end menu
@node Binary Installation
@ -825,6 +832,44 @@ useful in exceptional circumstances, such as if you need to run several
daemons on the same machine.
@end table
@node Running Guix Before It Is Installed
@section Running Guix Before It Is Installed
If you are hacking Guix itself---which is a good idea!---you will find
it useful to test the changes made in your local source tree checkout
without actually installing them.
To that end, all the command-line tools can be used even if you have not
run @command{make install}. To do that, prefix each command with
@command{./pre-inst-env} (the @file{pre-inst-env} script lives in the
top build tree of Guix), as in:
@example
$ sudo ./pre-inst-env guix-daemon --build-users-group=guixbuild
$ ./pre-inst-env guix build hello
@end example
@noindent
Similarly, for a Guile session using the Guix modules:
@example
$ ./pre-inst-env guile -c '(use-modules (guix utils)) (pk (%current-system))'
@end example
The @command{pre-inst-env} script sets up all the environment variables
necessary to support this, including @code{PATH} and
@code{GUILE_LOAD_PATH}.
If you are hacking Guix from Emacs using the wonderful Geiser
(@pxref{Introduction,,, geiser, Geiser User Manual}), make sure to
augment Guile's load path so that it finds source files from your
checkout:
@lisp
;; Assuming the Guix checkout is in ~/src/guix.
(add-to-list 'geiser-guile-load-path "~/src/guix")
@end lisp
@c *********************************************************************
@node Package Management
@ -6210,7 +6255,8 @@ creating packages. For more information on package definitions,
Once a package definition is in place, stored in a file in the Guix
source tree, it can be tested using the @command{guix build} command
(@pxref{Invoking guix build}). For example, assuming the new package is
called @code{gnew}, you may run this command from the Guix build tree:
called @code{gnew}, you may run this command from the Guix build tree
(@pxref{Running Guix Before It Is Installed}):
@example
./pre-inst-env guix build gnew --keep-failed

View File

@ -418,7 +418,6 @@ to it are lost."
(switch-root "/root")
(format #t "loading '~a'...\n" to-load)
;; TODO: Remove /lib, /share, and /loader.go.
(primitive-load to-load)
(format (current-error-port)

View File

@ -991,10 +991,8 @@ buffers, and audio capture.")
("boost" ,boost)
("jack" ,jack-1)
("ganv" ,ganv)
("glib" ,glib)
("glibmm" ,glibmm)
("gtkmm" ,gtkmm-2)
("dbus" ,dbus)
("dbus-glib" ,dbus-glib)))
(native-inputs
`(("pkg-config" ,pkg-config)))

View File

@ -353,10 +353,11 @@ translated.")
(base32
"1xi1v1msz75qs0s4lkyf1psrksdppa3hwkg0mznc6gpw5flg3hdz"))))
(build-system gnu-build-system)
(inputs
(propagated-inputs ; according to dbus-glib-1.pc
`(("dbus" ,dbus)
("expat" ,expat)
("glib" ,glib)))
(inputs
`(("expat" ,expat)))
(native-inputs
`(("glib" ,glib "bin")
("pkg-config" ,pkg-config)))

View File

@ -837,8 +837,7 @@ use in GNOME applications, built on top of CORBA.")
(sha256
(base32 "0k3q9nh53yhc9qxf1zaicz4sk8p3kzq4ndjdsgpaa2db0ccbj4hr"))))
(build-system gnu-build-system)
(inputs `(("dbus" ,dbus)
("dbus-glib" ,dbus-glib)
(inputs `(("dbus-glib" ,dbus-glib)
("libxml2" ,libxml2)))
(propagated-inputs `(("glib" ,glib) ; referred to in the .pc file
("orbit2" ,orbit2)))
@ -907,7 +906,6 @@ designed to be accessed through the MIME functions in GnomeVFS.")
%standard-phases))))
(inputs `(("libxml2" ,libxml2)
("dbus-glib" ,dbus-glib)
("dbus" ,dbus)
("gconf" ,gconf)
("gnome-mime-data" ,gnome-mime-data)
("zlib" ,zlib)))
@ -1949,7 +1947,6 @@ keyboard shortcuts.")
("intltool" ,intltool)))
(inputs
`(("eudev" ,eudev)
("dbus" ,dbus)
("dbus-glib" ,dbus-glib)
("libusb" ,libusb)
("lcms" ,lcms)
@ -2083,7 +2080,6 @@ faster results and to avoid unnecessary server load.")
("python" ,python)))
(inputs
`(("eudev" ,eudev)
("dbus" ,dbus)
("dbus-glib" ,dbus-glib)
("libusb" ,libusb)))
(home-page "http://upower.freedesktop.org/")

View File

@ -245,9 +245,7 @@ standards.")
`(("alsa-lib" ,alsa-lib)
("bzip2" ,bzip2)
("cairo" ,cairo)
("dbus" ,dbus)
("dbus-glib" ,dbus-glib)
("glib" ,glib)
("gstreamer" ,gstreamer)
("gst-plugins-base" ,gst-plugins-base)
("gtk+" ,gtk+-2)

View File

@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
@ -308,7 +308,7 @@ It has been modified to remove all non-free binary blobs.")
(license gpl2)
(home-page "http://www.gnu.org/software/linux-libre/"))))
;;;
;;; Pluggable authentication modules (PAM).
;;;
@ -354,7 +354,7 @@ be used through the PAM API to perform tasks, like authenticating a user
at login. Local and dynamic reconfiguration are its key features")
(license bsd-3)))
;;;
;;; Miscellaneous.
;;;
@ -1582,7 +1582,7 @@ from the module-init-tools project.")
;; Work around undefined reference to
;; 'mq_getattr' in sc-daemon.c.
"LDFLAGS=-lrt")
#:phases
#:phases
(alist-cons-before
'build 'pre-build
;; The program 'g-ir-scanner' (part of the package
@ -2203,7 +2203,8 @@ applications.")
(arguments
'(#:configure-flags
(let ((out (assoc-ref %outputs "out")))
(list "--disable-systemd"
(list "--enable-library"
"--disable-systemd"
;; Install dbus/udev files to the correct location.
(string-append "--with-dbusconfdir=" out "/etc")
(string-append "--with-udevdir=" out "/lib/udev")))))

View File

@ -7,6 +7,7 @@
;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
;;;
;;; This file is part of GNU Guix.
;;;
@ -493,7 +494,6 @@ MailCore 2.")
(inputs `(("bogofilter" ,bogofilter)
("curl" ,curl)
("dbus-glib" ,dbus-glib)
("dbus" ,dbus)
("enchant" ,enchant)
("expat" ,expat)
("ghostscript" ,ghostscript)

View File

@ -2,6 +2,7 @@
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
;;;
;;; This file is part of GNU Guix.
;;;

View File

@ -3274,9 +3274,7 @@ features useful for text console applications.")
`(("pkg-config" ,pkg-config)))
(inputs
`(("python" ,python)
("dbus" ,dbus)
("dbus-glib" ,dbus-glib)
("glib" ,glib)))
("dbus-glib" ,dbus-glib)))
(synopsis "Python bindings for D-bus")
(description "python-dbus provides bindings for libdbus, the reference
implementation of D-Bus.")

View File

@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
;;;
;;; This file is part of GNU Guix.
;;;
@ -49,8 +50,7 @@
"wicd-template-instantiation.patch")))))
(build-system python-build-system)
(native-inputs `(("gettext" ,gnu-gettext)))
(inputs `(("dbus" ,dbus)
("dbus-glib" ,dbus-glib)
(inputs `(("dbus-glib" ,dbus-glib)
("python2-dbus" ,python2-dbus)
("python2-pygtk" ,python2-pygtk)
("python2-urwid" ,python2-urwid)

View File

@ -145,6 +145,16 @@ When GRUB? is true, install GRUB on DEVICE, using GRUB.CFG."
;; Copy items to the new store.
(copy-closure to-copy target #:log-port log-port)))))
;; Make sure TARGET is root-owned when running as root, but still allow
;; non-root uses (useful for testing.) See
;; <http://lists.gnu.org/archive/html/guix-devel/2015-05/msg00452.html>.
(if (zero? (geteuid))
(chown target 0 0)
(warning (_ "not running as 'root', so \
the ownership of '~a' may be incorrect!~%")
target))
(chmod target #o755)
(let ((os-dir (derivation->output-path os-drv))
(format (lift format %store-monad))
(populate (lift2 populate-root-file-system %store-monad)))