Merge branch 'master' into gtk-rebuild
This commit is contained in:
commit
30f9cbb072
14
HACKING
14
HACKING
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#+TITLE: Hacking GNU Guix and Its Incredible Distro
|
#+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 © 2013 Nikita Karetnikov <nikita@karetnikov.org>
|
||||||
Copyright © 2014 Pierre-Antoine Rault <par@rigelk.eu>
|
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
|
* Running Guix before it is installed
|
||||||
|
|
||||||
Command-line tools can be used even if you have not run "make install".
|
See the same-named section in the manual.
|
||||||
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.
|
|
||||||
|
|
||||||
* The Perfect Setup
|
* The Perfect Setup
|
||||||
|
|
||||||
|
|
|
@ -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
|
case by default. So if that is what you're using, you can happily skip
|
||||||
this section and read about the fun stuff.
|
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
|
To be able to use ``guix.el'', you need to install the following
|
||||||
packages:
|
packages:
|
||||||
|
|
||||||
|
|
|
@ -88,6 +88,7 @@ Installation
|
||||||
* Running the Test Suite:: Testing Guix.
|
* Running the Test Suite:: Testing Guix.
|
||||||
* Setting Up the Daemon:: Preparing the build daemon's environment.
|
* Setting Up the Daemon:: Preparing the build daemon's environment.
|
||||||
* Invoking guix-daemon:: Running the build daemon.
|
* Invoking guix-daemon:: Running the build daemon.
|
||||||
|
* Running Guix Before It Is Installed:: Hacker tricks.
|
||||||
|
|
||||||
Setting Up the Daemon
|
Setting Up the Daemon
|
||||||
|
|
||||||
|
@ -114,6 +115,11 @@ Programming Interface
|
||||||
* The Store Monad:: Purely functional interface to the store.
|
* The Store Monad:: Purely functional interface to the store.
|
||||||
* G-Expressions:: Manipulating build expressions.
|
* G-Expressions:: Manipulating build expressions.
|
||||||
|
|
||||||
|
Defining Packages
|
||||||
|
|
||||||
|
* package Reference:: The package data type.
|
||||||
|
* origin Reference:: The origin data type.
|
||||||
|
|
||||||
Utilities
|
Utilities
|
||||||
|
|
||||||
* Invoking guix build:: Building packages from the command line.
|
* 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.
|
* Running the Test Suite:: Testing Guix.
|
||||||
* Setting Up the Daemon:: Preparing the build daemon's environment.
|
* Setting Up the Daemon:: Preparing the build daemon's environment.
|
||||||
* Invoking guix-daemon:: Running the build daemon.
|
* Invoking guix-daemon:: Running the build daemon.
|
||||||
|
* Running Guix Before It Is Installed:: Hacker tricks.
|
||||||
@end menu
|
@end menu
|
||||||
|
|
||||||
@node Binary Installation
|
@node Binary Installation
|
||||||
|
@ -825,6 +832,44 @@ useful in exceptional circumstances, such as if you need to run several
|
||||||
daemons on the same machine.
|
daemons on the same machine.
|
||||||
@end table
|
@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 *********************************************************************
|
@c *********************************************************************
|
||||||
@node Package Management
|
@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
|
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
|
source tree, it can be tested using the @command{guix build} command
|
||||||
(@pxref{Invoking guix build}). For example, assuming the new package is
|
(@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
|
@example
|
||||||
./pre-inst-env guix build gnew --keep-failed
|
./pre-inst-env guix build gnew --keep-failed
|
||||||
|
|
|
@ -418,7 +418,6 @@ to it are lost."
|
||||||
(switch-root "/root")
|
(switch-root "/root")
|
||||||
(format #t "loading '~a'...\n" to-load)
|
(format #t "loading '~a'...\n" to-load)
|
||||||
|
|
||||||
;; TODO: Remove /lib, /share, and /loader.go.
|
|
||||||
(primitive-load to-load)
|
(primitive-load to-load)
|
||||||
|
|
||||||
(format (current-error-port)
|
(format (current-error-port)
|
||||||
|
|
|
@ -991,10 +991,8 @@ buffers, and audio capture.")
|
||||||
("boost" ,boost)
|
("boost" ,boost)
|
||||||
("jack" ,jack-1)
|
("jack" ,jack-1)
|
||||||
("ganv" ,ganv)
|
("ganv" ,ganv)
|
||||||
("glib" ,glib)
|
|
||||||
("glibmm" ,glibmm)
|
("glibmm" ,glibmm)
|
||||||
("gtkmm" ,gtkmm-2)
|
("gtkmm" ,gtkmm-2)
|
||||||
("dbus" ,dbus)
|
|
||||||
("dbus-glib" ,dbus-glib)))
|
("dbus-glib" ,dbus-glib)))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("pkg-config" ,pkg-config)))
|
`(("pkg-config" ,pkg-config)))
|
||||||
|
|
|
@ -353,10 +353,11 @@ translated.")
|
||||||
(base32
|
(base32
|
||||||
"1xi1v1msz75qs0s4lkyf1psrksdppa3hwkg0mznc6gpw5flg3hdz"))))
|
"1xi1v1msz75qs0s4lkyf1psrksdppa3hwkg0mznc6gpw5flg3hdz"))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(inputs
|
(propagated-inputs ; according to dbus-glib-1.pc
|
||||||
`(("dbus" ,dbus)
|
`(("dbus" ,dbus)
|
||||||
("expat" ,expat)
|
|
||||||
("glib" ,glib)))
|
("glib" ,glib)))
|
||||||
|
(inputs
|
||||||
|
`(("expat" ,expat)))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("glib" ,glib "bin")
|
`(("glib" ,glib "bin")
|
||||||
("pkg-config" ,pkg-config)))
|
("pkg-config" ,pkg-config)))
|
||||||
|
|
|
@ -837,8 +837,7 @@ use in GNOME applications, built on top of CORBA.")
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "0k3q9nh53yhc9qxf1zaicz4sk8p3kzq4ndjdsgpaa2db0ccbj4hr"))))
|
(base32 "0k3q9nh53yhc9qxf1zaicz4sk8p3kzq4ndjdsgpaa2db0ccbj4hr"))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(inputs `(("dbus" ,dbus)
|
(inputs `(("dbus-glib" ,dbus-glib)
|
||||||
("dbus-glib" ,dbus-glib)
|
|
||||||
("libxml2" ,libxml2)))
|
("libxml2" ,libxml2)))
|
||||||
(propagated-inputs `(("glib" ,glib) ; referred to in the .pc file
|
(propagated-inputs `(("glib" ,glib) ; referred to in the .pc file
|
||||||
("orbit2" ,orbit2)))
|
("orbit2" ,orbit2)))
|
||||||
|
@ -907,7 +906,6 @@ designed to be accessed through the MIME functions in GnomeVFS.")
|
||||||
%standard-phases))))
|
%standard-phases))))
|
||||||
(inputs `(("libxml2" ,libxml2)
|
(inputs `(("libxml2" ,libxml2)
|
||||||
("dbus-glib" ,dbus-glib)
|
("dbus-glib" ,dbus-glib)
|
||||||
("dbus" ,dbus)
|
|
||||||
("gconf" ,gconf)
|
("gconf" ,gconf)
|
||||||
("gnome-mime-data" ,gnome-mime-data)
|
("gnome-mime-data" ,gnome-mime-data)
|
||||||
("zlib" ,zlib)))
|
("zlib" ,zlib)))
|
||||||
|
@ -1949,7 +1947,6 @@ keyboard shortcuts.")
|
||||||
("intltool" ,intltool)))
|
("intltool" ,intltool)))
|
||||||
(inputs
|
(inputs
|
||||||
`(("eudev" ,eudev)
|
`(("eudev" ,eudev)
|
||||||
("dbus" ,dbus)
|
|
||||||
("dbus-glib" ,dbus-glib)
|
("dbus-glib" ,dbus-glib)
|
||||||
("libusb" ,libusb)
|
("libusb" ,libusb)
|
||||||
("lcms" ,lcms)
|
("lcms" ,lcms)
|
||||||
|
@ -2083,7 +2080,6 @@ faster results and to avoid unnecessary server load.")
|
||||||
("python" ,python)))
|
("python" ,python)))
|
||||||
(inputs
|
(inputs
|
||||||
`(("eudev" ,eudev)
|
`(("eudev" ,eudev)
|
||||||
("dbus" ,dbus)
|
|
||||||
("dbus-glib" ,dbus-glib)
|
("dbus-glib" ,dbus-glib)
|
||||||
("libusb" ,libusb)))
|
("libusb" ,libusb)))
|
||||||
(home-page "http://upower.freedesktop.org/")
|
(home-page "http://upower.freedesktop.org/")
|
||||||
|
|
|
@ -245,9 +245,7 @@ standards.")
|
||||||
`(("alsa-lib" ,alsa-lib)
|
`(("alsa-lib" ,alsa-lib)
|
||||||
("bzip2" ,bzip2)
|
("bzip2" ,bzip2)
|
||||||
("cairo" ,cairo)
|
("cairo" ,cairo)
|
||||||
("dbus" ,dbus)
|
|
||||||
("dbus-glib" ,dbus-glib)
|
("dbus-glib" ,dbus-glib)
|
||||||
("glib" ,glib)
|
|
||||||
("gstreamer" ,gstreamer)
|
("gstreamer" ,gstreamer)
|
||||||
("gst-plugins-base" ,gst-plugins-base)
|
("gst-plugins-base" ,gst-plugins-base)
|
||||||
("gtk+" ,gtk+-2)
|
("gtk+" ,gtk+-2)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
|
;;; 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 © 2012 Nikita Karetnikov <nikita@karetnikov.org>
|
||||||
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
|
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
|
||||||
;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
|
;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
|
||||||
|
@ -308,7 +308,7 @@ It has been modified to remove all non-free binary blobs.")
|
||||||
(license gpl2)
|
(license gpl2)
|
||||||
(home-page "http://www.gnu.org/software/linux-libre/"))))
|
(home-page "http://www.gnu.org/software/linux-libre/"))))
|
||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
;;; Pluggable authentication modules (PAM).
|
;;; 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")
|
at login. Local and dynamic reconfiguration are its key features")
|
||||||
(license bsd-3)))
|
(license bsd-3)))
|
||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
;;; Miscellaneous.
|
;;; Miscellaneous.
|
||||||
;;;
|
;;;
|
||||||
|
@ -1582,7 +1582,7 @@ from the module-init-tools project.")
|
||||||
;; Work around undefined reference to
|
;; Work around undefined reference to
|
||||||
;; 'mq_getattr' in sc-daemon.c.
|
;; 'mq_getattr' in sc-daemon.c.
|
||||||
"LDFLAGS=-lrt")
|
"LDFLAGS=-lrt")
|
||||||
#:phases
|
#:phases
|
||||||
(alist-cons-before
|
(alist-cons-before
|
||||||
'build 'pre-build
|
'build 'pre-build
|
||||||
;; The program 'g-ir-scanner' (part of the package
|
;; The program 'g-ir-scanner' (part of the package
|
||||||
|
@ -2203,7 +2203,8 @@ applications.")
|
||||||
(arguments
|
(arguments
|
||||||
'(#:configure-flags
|
'(#:configure-flags
|
||||||
(let ((out (assoc-ref %outputs "out")))
|
(let ((out (assoc-ref %outputs "out")))
|
||||||
(list "--disable-systemd"
|
(list "--enable-library"
|
||||||
|
"--disable-systemd"
|
||||||
;; Install dbus/udev files to the correct location.
|
;; Install dbus/udev files to the correct location.
|
||||||
(string-append "--with-dbusconfdir=" out "/etc")
|
(string-append "--with-dbusconfdir=" out "/etc")
|
||||||
(string-append "--with-udevdir=" out "/lib/udev")))))
|
(string-append "--with-udevdir=" out "/lib/udev")))))
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
|
;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
|
||||||
;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
|
;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
|
||||||
;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
|
;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
|
||||||
|
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -493,7 +494,6 @@ MailCore 2.")
|
||||||
(inputs `(("bogofilter" ,bogofilter)
|
(inputs `(("bogofilter" ,bogofilter)
|
||||||
("curl" ,curl)
|
("curl" ,curl)
|
||||||
("dbus-glib" ,dbus-glib)
|
("dbus-glib" ,dbus-glib)
|
||||||
("dbus" ,dbus)
|
|
||||||
("enchant" ,enchant)
|
("enchant" ,enchant)
|
||||||
("expat" ,expat)
|
("expat" ,expat)
|
||||||
("ghostscript" ,ghostscript)
|
("ghostscript" ,ghostscript)
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
|
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
|
||||||
;;; Copyright © 2014 Julien Lepiller <julien@lepiller.eu>
|
;;; Copyright © 2014 Julien Lepiller <julien@lepiller.eu>
|
||||||
;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
|
;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
|
||||||
|
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
|
|
@ -3274,9 +3274,7 @@ features useful for text console applications.")
|
||||||
`(("pkg-config" ,pkg-config)))
|
`(("pkg-config" ,pkg-config)))
|
||||||
(inputs
|
(inputs
|
||||||
`(("python" ,python)
|
`(("python" ,python)
|
||||||
("dbus" ,dbus)
|
("dbus-glib" ,dbus-glib)))
|
||||||
("dbus-glib" ,dbus-glib)
|
|
||||||
("glib" ,glib)))
|
|
||||||
(synopsis "Python bindings for D-bus")
|
(synopsis "Python bindings for D-bus")
|
||||||
(description "python-dbus provides bindings for libdbus, the reference
|
(description "python-dbus provides bindings for libdbus, the reference
|
||||||
implementation of D-Bus.")
|
implementation of D-Bus.")
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
|
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
|
||||||
;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
|
;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
|
||||||
|
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -49,8 +50,7 @@
|
||||||
"wicd-template-instantiation.patch")))))
|
"wicd-template-instantiation.patch")))))
|
||||||
(build-system python-build-system)
|
(build-system python-build-system)
|
||||||
(native-inputs `(("gettext" ,gnu-gettext)))
|
(native-inputs `(("gettext" ,gnu-gettext)))
|
||||||
(inputs `(("dbus" ,dbus)
|
(inputs `(("dbus-glib" ,dbus-glib)
|
||||||
("dbus-glib" ,dbus-glib)
|
|
||||||
("python2-dbus" ,python2-dbus)
|
("python2-dbus" ,python2-dbus)
|
||||||
("python2-pygtk" ,python2-pygtk)
|
("python2-pygtk" ,python2-pygtk)
|
||||||
("python2-urwid" ,python2-urwid)
|
("python2-urwid" ,python2-urwid)
|
||||||
|
|
|
@ -145,6 +145,16 @@ When GRUB? is true, install GRUB on DEVICE, using GRUB.CFG."
|
||||||
;; Copy items to the new store.
|
;; Copy items to the new store.
|
||||||
(copy-closure to-copy target #:log-port log-port)))))
|
(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))
|
(let ((os-dir (derivation->output-path os-drv))
|
||||||
(format (lift format %store-monad))
|
(format (lift format %store-monad))
|
||||||
(populate (lift2 populate-root-file-system %store-monad)))
|
(populate (lift2 populate-root-file-system %store-monad)))
|
||||||
|
|
Loading…
Reference in New Issue