1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-07-07 07:44:08 +02:00

Compare commits

..

3 Commits

Author SHA1 Message Date
David Thompson 2c2631658c build: syscalls: Add pseudo-terminal bindings.
* guix/build/syscalls.scm (openpt, grantpt, unlockpt, ptsname, open-pty-pair,
  call-with-pty): New procedures.
2015-10-25 20:27:19 -04:00
David Thompson 054ee2038e scripts: Add 'container' subcommand.
* guix/scripts/container.scm: New file.
* guix/scripts/container/exec.scm: New file.
* po/guix/POTFILES.in: Add them.
* Makefile.am (MODULES): Add them.
* doc/guix.texi (Invoking guix container): New section.
2015-10-25 20:27:19 -04:00
David Thompson e086dcfcf9 scripts: system: Add 'container' action.
* guix/scripts/system.scm (show-help): Display 'container' action.
  (system-derivation-for-action, guix-system): Add 'container' case.
  (perform-action): Skip GRUB config generation when building a container.
* doc/guix.texi (Invoking guix system): Document it.
2015-10-25 20:27:19 -04:00
870 changed files with 29352 additions and 162679 deletions
-4
View File
@@ -23,7 +23,6 @@
(eval . (put 'lambda* 'scheme-indent-function 1))
(eval . (put 'substitute* 'scheme-indent-function 1))
(eval . (put 'modify-phases 'scheme-indent-function 1))
(eval . (put 'modify-services 'scheme-indent-function 1))
(eval . (put 'with-directory-excursion 'scheme-indent-function 1))
(eval . (put 'package 'scheme-indent-function 0))
(eval . (put 'origin 'scheme-indent-function 0))
@@ -41,8 +40,6 @@
(eval . (put 'with-atomic-file-output 'scheme-indent-function 1))
(eval . (put 'call-with-compressed-output-port 'scheme-indent-function 2))
(eval . (put 'call-with-decompressed-port 'scheme-indent-function 2))
(eval . (put 'call-with-gzip-input-port 'scheme-indent-function 1))
(eval . (put 'call-with-gzip-output-port 'scheme-indent-function 1))
(eval . (put 'signature-case 'scheme-indent-function 1))
(eval . (put 'emacs-batch-eval 'scheme-indent-function 0))
(eval . (put 'emacs-batch-edit-file 'scheme-indent-function 1))
@@ -61,7 +58,6 @@
(eval . (put 'run-with-store 'scheme-indent-function 1))
(eval . (put 'run-with-state 'scheme-indent-function 1))
(eval . (put 'wrap-program 'scheme-indent-function 1))
(eval . (put 'with-imported-modules 'scheme-indent-function 1))
(eval . (put 'call-with-container 'scheme-indent-function 1))
(eval . (put 'container-excursion 'scheme-indent-function 1))
+83 -75
View File
@@ -1,16 +1,9 @@
*.eps
*.go
*.log
*.pdf
*.png
*.tar.xz
*.tmp
*~
,*
/ABOUT-NLS
/INSTALL
/aclocal.m4
/autom4te.cache
*.tmp
*.go
tmp
*.log
/build-aux/compile
/build-aux/config.guess
/build-aux/config.rpath
@@ -21,42 +14,14 @@
/build-aux/missing
/build-aux/test-driver
/build-aux/texinfo.tex
/config.status
/configure
/doc/*.1
/doc/.dirstamp
/doc/guix.aux
/doc/guix.cp
/doc/guix.cps
/doc/guix.fn
/doc/guix.fns
/doc/guix.info
/doc/guix.info-[0-9]
/doc/guix.ky
/doc/guix.pg
/doc/guix.toc
/doc/guix.t2p
/doc/guix.tp
/doc/guix.vr
/doc/guix.vrs
/doc/os-config-bare-bones.texi
/doc/os-config-desktop.texi
/doc/stamp-vti
/doc/version.texi
/emacs/Makefile
/emacs/Makefile.in
/emacs/guix-autoloads.el
/emacs/guix-config.el
/emacs/guix-helper.scm
/etc/guix-daemon.conf
/etc/guix-daemon.service
/guix-daemon
/guix-register
/guix/config.scm
/libformat.a
/libstore.a
/libutil.a
/m4/*
Makefile.in
Makefile
/autom4te.cache
config.cache
/aclocal.m4
/config.status
/ABOUT-NLS
/m4/ChangeLog
/m4/gettext.m4
/m4/iconv.m4
@@ -66,20 +31,6 @@
/m4/nls.m4
/m4/po.m4
/m4/progtest.m4
/nix-setuid-helper
/nix/AUTHORS
/nix/COPYING
/nix/config.h
/nix/config.h.in
/nix/nix-daemon/nix-daemon.cc
/nix/nix-setuid-helper/nix-setuid-helper.cc
/nix/scripts/guix-authenticate
/nix/scripts/list-runtime-roots
/nix/scripts/offload
/nix/scripts/substitute
/po/guix/*.gmo
/po/guix/*.insert-header
/po/guix/*.mo
/po/guix/ChangeLog
/po/guix/Makefile.in.in
/po/guix/Makevars.template
@@ -88,15 +39,15 @@
/po/guix/boldquot.sed
/po/guix/en@boldquot.*
/po/guix/en@quot.*
/po/guix/guix.pot
/po/guix/insert-header.sin
/po/guix/*.insert-header
/po/guix/quot.sed
/po/guix/remove-potcdate.sed
/po/guix/remove-potcdate.sin
/po/guix/stamp-po
/po/packages/*.gmo
/po/packages/*.insert-header
/po/packages/*.mo
/po/guix/guix.pot
/po/guix/*.mo
/po/guix/*.gmo
/po/packages/ChangeLog
/po/packages/Makefile.in.in
/po/packages/Makevars.template
@@ -105,23 +56,80 @@
/po/packages/boldquot.sed
/po/packages/en@boldquot.*
/po/packages/en@quot.*
/po/packages/guix-packages.pot
/po/packages/insert-header.sin
/po/packages/*.insert-header
/po/packages/quot.sed
/po/packages/remove-potcdate.sed
/po/packages/remove-potcdate.sin
/po/packages/stamp-po
/pre-inst-env
/scripts/guix
/test-env
/test-tmp
/po/packages/guix-packages.pot
/po/packages/*.mo
/po/packages/*.gmo
/tests/*.trs
/INSTALL
/m4/*
/pre-inst-env
/doc/.dirstamp
/doc/guix.info
/doc/guix.info-[0-9]
/doc/guix.pdf
/doc/stamp-vti
/doc/version.texi
/gnu/packages/bootstrap/x86_64-linux/guile-2.0.9.tar.xz
/gnu/packages/bootstrap/i686-linux/guile-2.0.9.tar.xz
/gnu/packages/bootstrap/armhf-linux/guile-2.0.11.tar.xz
/gnu/packages/bootstrap/mips64el-linux/guile-2.0.9.tar.xz
/guix/config.scm
/nix/nix-daemon/nix-daemon.cc
/nix/config.h
/nix/config.h.in
stamp-h[0-9]
/nix/AUTHORS
/nix/COPYING
/libformat.a
/libstore.a
/libutil.a
/guix-daemon
/test-tmp
/nix/scripts/list-runtime-roots
/test-env
/nix/nix-setuid-helper/nix-setuid-helper.cc
/scripts/guix
/doc/guix.aux
/doc/guix.cp
/doc/guix.cps
/doc/guix.fn
/doc/guix.fns
/doc/guix.ky
/doc/guix.pg
/doc/guix.toc
/doc/guix.tp
/doc/guix.vr
/doc/guix.vrs
/nix/scripts/substitute
/doc/images/bootstrap-graph.png
/doc/images/bootstrap-graph.eps
/guix-register
GPATH
GRTAGS
GTAGS
Makefile
Makefile.in
config.cache
stamp-h[0-9]
tmp
/doc/os-config-lightweight-desktop.texi
/nix-setuid-helper
/nix/scripts/guix-authenticate
/nix/scripts/offload
/emacs/Makefile.in
/emacs/Makefile
/emacs/guix-autoloads.el
/emacs/guix-helper.scm
/emacs/guix-config.el
/doc/os-config-bare-bones.texi
/doc/os-config-desktop.texi
/doc/*.1
/etc/guix-daemon.service
/doc/images/bootstrap-graph.pdf
/doc/images/coreutils-bag-graph.png
/doc/images/coreutils-graph.png
/doc/images/coreutils-size-map.eps
/doc/images/service-graph.png
/doc/images/service-graph.eps
/doc/images/service-graph.pdf
/doc/images/dmd-graph.png
+2 -18
View File
@@ -1,21 +1,14 @@
# This list is used to avoid multiple name/email instances of the same
# contributors reported by "git log" and "git shortlog" commands.
Al McElrath <hello@yrns.org> <hello@atonesir.com>
Alexander I. Grafov <grafov@gmail.com>
Alírio Eyng <alirioeyng@gmail.com>
Amirouche Boubekki <amirouche@hypermove.net>
Andreas Enge <andreas@enge.fr> <andreas.enge@inria.fr>
Andreas Enge <andreas@enge.fr> <privat@xobs-novena>
Andy Wingo <wingo@igalia.com> <wingo@pobox.com>
Ben Woodcroft <donttrustben@gmail.com> <b.woodcroft@uq.edu.au>
Ben Woodcroft <donttrustben@gmail.com> <donttrustben near gmail.com>
Ben Woodcroft <b.woodcroft@uq.edu.au> <donttrustben@gmail.com>
Claes Wallin (韋嘉誠) <claes.wallin@greatsinodevelopment.com>
Cyprien Nicolas <cyprien@nicolas.tf> <c.nicolas+gitorious@gmail.com>
Danny Milosavljevic <dannym@scratchpost.org> <dannym+a@scratchpost.org>
David Thompson <davet@gnu.org> <dthompson2@worcester.edu>
David Thompson <davet@gnu.org> <dthompson@member.fsf.org>
David Thompson <davet@gnu.org> <dthompson@vistahigherlearning.com>
Deck Pickard <deck.r.pickard@gmail.com> <nebu@kipple>
Eric Bavier <bavier@member.fsf.org> <ericbavier@gmail.com>
Eric Dvorsak <eric@dvorsak.fr> <yenda1@gmail.com>
@@ -24,22 +17,13 @@ Joshua Grant <tadni@riseup.net> <gzg@riseup.net>
Joshua Grant <tadni@riseup.net> <jgrant@parenthetical.io>
Joshua Grant <tadni@riseup.net> <tadnimi@gmail.com>
Joshua Grant <tadni@riseup.net> <youlysses@riseup.net>
Kei Kebreau <kei@openmailbox.org>
Leo Famulari <leo@famulari.name> <lfamular@gmail.com>
Ludovic Courtès <ludo@gnu.org> <ludovic.courtes@inria.fr>
Mathieu Lirzin <mthl@gnu.org> <mthl@openmailbox.org>
Mathieu Lirzin <mthl@gnu.org> <mathieu.lirzin@openmailbox.org>
Mathieu Lirzin <mthl@openmailbox.org> <mathieu.lirzin@openmailbox.org>
Nikita Karetnikov <nikita@karetnikov.org> <nikita.karetnikov@gmail.com>
ng0 <ng0@we.make.ritual.n0.is> <niasterisk@grrlz.net>
ng0 <ng0@we.make.ritual.n0.is> <ng@niasterisk.space>
ng0 <ng0@we.make.ritual.n0.is> <ng0@libertad.pw>
Pjotr Prins <pjotr.public01@thebird.nl>
Pjotr Prins <pjotr.public01@thebird.nl> <pjotr.public12@thebird.nl>
Raimon Grau <raimonster@gmail.com> <raimon@3scale.net>
Raymond Nicholson <rain1@openmailbox.org>
Ricardo Wurmus <rekado@elephly.net>
Ricardo Wurmus <rekado@elephly.net> <ricardo.wurmus@mdc-berlin.de>
Sou Bunnbu (宋文武) <iyzsong@gmail.com>
Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
Tomáš Čech <sleep_walker@gnu.org> <sleep_walker@suse.cz>
Tobias Geerinckx-Rice <me@tobias.gr> <tobias.geerinckx.rice@gmail.com>
-51
View File
@@ -1,51 +0,0 @@
Contributor Code of Conduct
Note: In the sequel, "project" refers to GNU Guix, and "project
maintainer(s)" refers to maintainer(s) of GNU Guix.
As contributors and maintainers of this project, and in the interest of
fostering an open and welcoming community, we pledge to respect all
people who contribute through reporting issues, posting feature
requests, updating documentation, submitting pull requests or patches,
and other activities.
We are committed to making participation in this project a
harassment-free experience for everyone, regardless of level of
experience, gender, gender identity and expression, sexual orientation,
disability, personal appearance, body size, race, ethnicity, age,
religion, or nationality.
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery
* Personal attacks
* Trolling or insulting/derogatory comments
* Public or private harassment
* Publishing other's private information, such as physical or electronic
addresses, without explicit permission
* Other unethical or unprofessional conduct
Project maintainers have the right and responsibility to remove, edit,
or reject comments, commits, code, wiki edits, issues, and other
contributions that are not aligned to this Code of Conduct, or to ban
temporarily or permanently any contributor for other behaviors that they
deem inappropriate, threatening, offensive, or harmful.
By adopting this Code of Conduct, project maintainers commit themselves
to fairly and consistently applying these principles to every aspect of
managing this project. Project maintainers who do not follow or enforce
the Code of Conduct may be permanently removed from the project team.
This Code of Conduct applies both within project spaces and in public
spaces when an individual is representing the project or its community.
Instances of abusive, harassing, or otherwise unacceptable behavior may
be reported by contacting a project maintainer at guix-maintainers@gnu.org.
All complaints will be reviewed and investigated and will
result in a response that is deemed necessary and appropriate to the
circumstances. Maintainers are obligated to maintain confidentiality
with regard to the reporter of an incident.
This Code of Conduct is adapted from the Contributor Covenant
(http://contributor-covenant.org), version 1.3.0, available at
http://contributor-covenant.org/version/1/3/0/
+1 -9
View File
@@ -2,7 +2,7 @@
#+TITLE: Hacking GNU Guix and Its Incredible Distro
Copyright © 2012, 2013, 2014, 2016 Ludovic Courtès <ludo@gnu.org>
Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
Copyright © 2015 Mathieu Lirzin <mthl@openmailbox.org>
Copying and distribution of this file, with or without modification,
@@ -35,14 +35,6 @@ upgrading GnuTLS or GLib.) We have a mailing list for commit notifications
(guix-commits@gnu.org), so people can notice. Before pushing your changes,
make sure to run git pull --rebase.
All commits that are pushed to the central repository on Savannah must be
signed with an OpenPGP key, and the public key should be uploaded to your user
account on Savannah and to public key servers, such as pgp.mit.edu. To
configure Git to automatically sign commits, run:
git config commit.gpgsign true
git config user.signingkey CABBA6EA1DC0FF33
For anything else, please post to guix-devel@gnu.org and leave time for a
review, without committing anything. If you didnt receive any reply
after two weeks, and if youre confident, its OK to commit.
+60 -136
View File
@@ -1,9 +1,7 @@
# GNU Guix --- Functional package management for GNU
# Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
# Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
# Copyright © 2013 Andreas Enge <andreas@enge.fr>
# Copyright © 2015 Alex Kost <alezost@gmail.com>
# Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
# Copyright © 2016 Mark H Weaver <mhw@netris.org>
#
# This file is part of GNU Guix.
#
@@ -27,7 +25,7 @@ nodist_noinst_SCRIPTS = \
pre-inst-env \
test-env
include gnu/local.mk
include gnu-system.am
MODULES = \
guix/base32.scm \
@@ -38,12 +36,10 @@ MODULES = \
guix/hash.scm \
guix/pk-crypto.scm \
guix/pki.scm \
guix/combinators.scm \
guix/utils.scm \
guix/sets.scm \
guix/download.scm \
guix/git-download.scm \
guix/hg-download.scm \
guix/monads.scm \
guix/monad-repl.scm \
guix/gexp.scm \
@@ -51,15 +47,10 @@ MODULES = \
guix/serialization.scm \
guix/nar.scm \
guix/derivations.scm \
guix/grafts.scm \
guix/gnu-maintenance.scm \
guix/upstream.scm \
guix/licenses.scm \
guix/graph.scm \
guix/cve.scm \
guix/zlib.scm \
guix/build-system.scm \
guix/build-system/ant.scm \
guix/build-system/cmake.scm \
guix/build-system/emacs.scm \
guix/build-system/glib-or-gtk.scm \
@@ -79,12 +70,10 @@ MODULES = \
guix/cvs-download.scm \
guix/svn-download.scm \
guix/ui.scm \
guix/build/ant-build-system.scm \
guix/build/download.scm \
guix/build/cmake-build-system.scm \
guix/build/emacs-build-system.scm \
guix/build/git.scm \
guix/build/hg.scm \
guix/build/glib-or-gtk-build-system.scm \
guix/build/gnu-build-system.scm \
guix/build/gnu-dist.scm \
@@ -102,11 +91,9 @@ MODULES = \
guix/build/rpath.scm \
guix/build/cvs.scm \
guix/build/svn.scm \
guix/build/syscalls.scm \
guix/build/gremlin.scm \
guix/build/emacs-utils.scm \
guix/build/graft.scm \
guix/build/bournish.scm \
guix/search-paths.scm \
guix/packages.scm \
guix/import/utils.scm \
@@ -146,16 +133,10 @@ MODULES = \
guix.scm \
$(GNU_SYSTEM_MODULES)
if HAVE_GUILE_JSON
if BUILD_SYSCALLS_MODULE
MODULES += \
guix/import/github.scm \
guix/import/json.scm \
guix/import/pypi.scm \
guix/scripts/import/pypi.scm \
guix/import/cpan.scm \
guix/scripts/import/gem.scm \
guix/import/gem.scm
guix/build/syscalls.scm
endif
@@ -169,20 +150,20 @@ endif BUILD_DAEMON_OFFLOAD
# Internal module with test suite support.
dist_noinst_DATA = guix/tests.scm
# Because of the autoload hack in (guix build download), we must build it
# first to avoid errors on systems where (gnutls) is unavailable.
guix/scripts/download.go: guix/build/download.go
guix/download.go: guix/build/download.go
# Linux-Libre configurations.
KCONFIGS = \
gnu/packages/linux-libre-4.7-i686.conf \
gnu/packages/linux-libre-4.7-x86_64.conf \
gnu/packages/linux-libre-4.4-i686.conf \
gnu/packages/linux-libre-4.4-x86_64.conf \
gnu/packages/linux-libre-4.1-i686.conf \
gnu/packages/linux-libre-4.1-x86_64.conf
gnu/packages/linux-libre-i686.conf \
gnu/packages/linux-libre-x86_64.conf
# Templates, examples.
EXAMPLES = \
gnu/system/examples/bare-bones.tmpl \
gnu/system/examples/desktop.tmpl \
gnu/system/examples/lightweight-desktop.tmpl
gnu/system/examples/desktop.tmpl
GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go guix/tests.go
@@ -208,11 +189,6 @@ clean-go:
-$(RM) -f $(GOBJECTS)
# Test extensions; has to be unconditional.
TEST_EXTENSIONS = .scm .sh
if CAN_RUN_TESTS
SCM_TESTS = \
tests/base32.scm \
tests/base64.scm \
@@ -221,15 +197,11 @@ SCM_TESTS = \
tests/pk-crypto.scm \
tests/pki.scm \
tests/sets.scm \
tests/gnu-maintenance.scm \
tests/substitute.scm \
tests/builders.scm \
tests/derivations.scm \
tests/grafts.scm \
tests/ui.scm \
tests/records.scm \
tests/upstream.scm \
tests/combinators.scm \
tests/utils.scm \
tests/build-utils.scm \
tests/packages.scm \
@@ -245,24 +217,26 @@ SCM_TESTS = \
tests/profiles.scm \
tests/syscalls.scm \
tests/gremlin.scm \
tests/bournish.scm \
tests/lint.scm \
tests/publish.scm \
tests/scripts.scm \
tests/size.scm \
tests/graph.scm \
tests/challenge.scm \
tests/cve.scm \
tests/zlib.scm \
tests/file-systems.scm \
tests/system.scm \
tests/services.scm \
tests/scripts-build.scm \
tests/containers.scm \
tests/import-utils.scm
tests/containers.scm
if HAVE_GUILE_JSON
MODULES += \
guix/import/json.scm \
guix/import/pypi.scm \
guix/scripts/import/pypi.scm \
guix/import/cpan.scm \
guix/scripts/import/gem.scm \
guix/import/gem.scm
SCM_TESTS += \
tests/pypi.scm \
tests/cpan.scm \
@@ -294,14 +268,12 @@ endif BUILD_DAEMON
TESTS = $(SCM_TESTS) $(SH_TESTS)
AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)" GUILE_AUTO_COMPILE=0
TEST_EXTENSIONS = .scm .sh
SCM_LOG_DRIVER = \
$(top_builddir)/test-env --quiet-stderr \
$(GUILE) --no-auto-compile -e main \
$(top_srcdir)/build-aux/test-driver.scm
AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)"
AM_SCM_LOG_DRIVER_FLAGS = --brief=yes
SCM_LOG_COMPILER = $(top_builddir)/test-env $(GUILE)
AM_SCM_LOG_FLAGS = --no-auto-compile -L "$(top_srcdir)"
SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL)
AM_SH_LOG_FLAGS = -x -e
@@ -313,28 +285,6 @@ tests/guix-gc.log: \
$(patsubst %.sh,%.log,$(filter-out tests/guix-gc.sh,$(SH_TESTS))) \
$(SCM_TESTS:%.scm=%.log)
else !CAN_RUN_TESTS
TESTS =
SH_TESTS =
SCM_TESTS =
# Automake always generates a 'check' target, so better not override it.
check-local:
@echo
@echo "Cannot run tests because file name limits would be exceeded." >&2
@echo "Look for 'length' in the 'config.log' file for details." >&2
@echo
@exit 1
endif !CAN_RUN_TESTS
check-system: $(GOBJECTS)
$(AM_V_at)$(top_builddir)/pre-inst-env \
$(GUILE) --no-auto-compile \
-e '(@@ (run-system-tests) run-system-tests)' \
$(top_srcdir)/build-aux/run-system-tests.scm
# Public key used to sign substitutes from hydra.gnu.org.
dist_pkgdata_DATA = hydra.gnu.org.pub
@@ -345,11 +295,8 @@ EXTRA_DIST = \
HACKING \
ROADMAP \
TODO \
CODE-OF-CONDUCT \
.dir-locals.el \
build-aux/build-self.scm \
build-aux/compile-all.scm \
build-aux/hydra/evaluate.scm \
build-aux/hydra/gnu-system.scm \
build-aux/hydra/demo-os.scm \
build-aux/hydra/guix.scm \
@@ -358,15 +305,12 @@ EXTRA_DIST = \
build-aux/download.scm \
build-aux/make-binary-tarball.scm \
build-aux/generate-authors.scm \
build-aux/test-driver.scm \
build-aux/run-system-tests.scm \
srfi/srfi-37.scm.in \
srfi/srfi-64.scm \
srfi/srfi-64.upstream.scm \
tests/test.drv \
tests/signing-key.pub \
tests/signing-key.sec \
tests/cve-sample.xml \
build-aux/config.rpath \
bootstrap \
release.nix \
@@ -379,28 +323,40 @@ EXTRA_DIST += \
endif !BUILD_DAEMON_OFFLOAD
if !BUILD_SYSCALLS_MODULE
EXTRA_DIST += \
guix/build/syscalls.scm
endif !BUILD_SYSCALLS_MODULE
CLEANFILES = \
$(GOBJECTS) \
$(SCM_TESTS:tests/%.scm=%.log)
AM_V_GUILEC = $(AM_V_GUILEC_$(V))
AM_V_GUILEC_ = $(AM_V_GUILEC_$(AM_DEFAULT_VERBOSITY))
AM_V_GUILEC_0 = @echo " GUILEC" $@;
# Unset 'GUILE_LOAD_COMPILED_PATH' altogether while compiling. Otherwise, if
# $GUILE_LOAD_COMPILED_PATH contains $(moduledir), we may find .go files in
# there that are newer than the local .scm files (for instance because the
# user ran 'make install' recently). When that happens, we end up loading
# those previously-installed .go files, which may be stale, thereby breaking
# the whole thing. Likewise, set 'XDG_CACHE_HOME' to avoid loading possibly
# stale files from ~/.cache/guile/ccache.
%.go: make-go ; @:
make-go: $(MODULES) guix/config.scm guix/tests.scm
$(AM_V_at)echo "Compiling Scheme modules..." ; \
# the whole thing.
#
# XXX: Use the C locale for when Guile lacks
# <http://git.sv.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=e2c6bf3866d1186c60bacfbd4fe5037087ee5e3f>.
.scm.go:
$(AM_V_GUILEC)$(MKDIR_P) `dirname "$@"` ; \
unset GUILE_LOAD_COMPILED_PATH ; \
XDG_CACHE_HOME=/nowhere \
host=$(host) srcdir="$(top_srcdir)" \
LC_ALL=C \
$(top_builddir)/pre-inst-env \
$(GUILE) -L "$(top_builddir)" -L "$(top_srcdir)" \
--no-auto-compile \
-s "$(top_srcdir)"/build-aux/compile-all.scm $^
$(GUILD) compile -L "$(top_builddir)" -L "$(top_srcdir)" \
-Wformat -Wunbound-variable -Warity-mismatch \
--target="$(host)" \
-o "$@" "$<"
SUFFIXES = .go
@@ -422,20 +378,16 @@ install-data-hook: set-bootstrap-executable-permissions
SUBDIRS = po/guix po/packages
BUILT_SOURCES =
include doc/local.mk
include doc.am
if BUILD_DAEMON
include nix/local.mk
include daemon.am
endif BUILD_DAEMON
ACLOCAL_AMFLAGS = -I m4
# Pass an explicit '--localstatedir' so that configure does not error out if
# it finds an existing installation with a different localstatedir.
AM_DISTCHECK_CONFIGURE_FLAGS = \
--localstatedir="$$dc_install_base/var" \
--with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)" \
--with-libgcrypt-libdir="$(LIBGCRYPT_LIBDIR)" \
--with-nix-prefix="$(NIX_PREFIX)" \
@@ -443,11 +395,11 @@ AM_DISTCHECK_CONFIGURE_FLAGS = \
dist_emacsui_DATA = emacs/guix-main.scm
nodist_emacsui_DATA = emacs/guix-helper.scm
include emacs/local.mk
include emacs.am
# The self-contained tarball.
guix-binary.%.tar.xz:
$(AM_V_GEN)GUIX_PACKAGE_PATH= \
-GUIX_PACKAGE_PATH= \
$(top_builddir)/pre-inst-env "$(GUILE)" \
"$(top_srcdir)/build-aux/make-binary-tarball.scm" "$*" "$@"
@@ -458,11 +410,11 @@ dist-hook: assert-no-store-file-names
distcheck-hook: assert-binaries-available assert-final-inputs-self-contained
sync-descriptions:
$(AM_V_at)GUIX_PACKAGE_PATH= \
-GUIX_PACKAGE_PATH= \
$(top_builddir)/pre-inst-env guix lint --checkers=gnu-description
gen-ChangeLog:
$(AM_V_GEN)if test -d .git; then \
if test -d .git; then \
$(top_srcdir)/build-aux/gitlog-to-changelog \
> $(distdir)/cl-t; \
rm -f $(distdir)/ChangeLog; \
@@ -470,7 +422,7 @@ gen-ChangeLog:
fi
gen-AUTHORS:
$(AM_V_GEN)if test -d .git; then \
if test -d .git; then \
rm -f "$(distdir)/AUTHORS"; \
$(top_builddir)/pre-inst-env "$(GUILE)" \
"$(top_srcdir)/build-aux/generate-authors.scm" \
@@ -479,7 +431,7 @@ gen-AUTHORS:
# Make sure we're not shipping a file that embeds a local /gnu/store file name.
assert-no-store-file-names:
$(AM_V_at)if grep -r --exclude=*.texi --exclude=*.info \
if grep -r --exclude=*.texi --exclude=*.info \
"$(storedir)/[a-z0-9]{32}-" $(distdir) ; \
then \
echo "error: store file names embedded in the distribution" >&2 ; \
@@ -487,43 +439,15 @@ assert-no-store-file-names:
fi
# Make sure hydra.gnu.org has the important binaries.
assert-binaries-available: $(GOBJECTS)
$(AM_V_at)$(top_builddir)/pre-inst-env "$(GUILE)" \
assert-binaries-available:
$(top_builddir)/pre-inst-env "$(GUILE)" \
"$(top_srcdir)/build-aux/check-available-binaries.scm"
# Make sure the final inputs don't refer to bootstrap tools.
assert-final-inputs-self-contained: $(GOBJECTS)
$(AM_V_at)$(top_builddir)/pre-inst-env "$(GUILE)" \
assert-final-inputs-self-contained:
$(top_builddir)/pre-inst-env "$(GUILE)" \
"$(top_srcdir)/build-aux/check-final-inputs-self-contained.scm"
# Compute the Hydra jobs and write them in the target file.
hydra-jobs.scm: $(GOBJECTS)
$(AM_V_at)$(MKDIR_P) "`dirname "$@"`"
$(AM_V_GEN)$(top_builddir)/pre-inst-env "$(GUILE)" \
"$(top_srcdir)/build-aux/hydra/evaluate.scm" \
"$(top_srcdir)/build-aux/hydra/gnu-system.scm" > "$@.tmp"
$(AM_V_at)mv "$@.tmp" "$@"
.PHONY: sync-descriptions gen-ChangeLog gen-AUTHORS clean-go make-go
.PHONY: sync-descriptions gen-ChangeLog gen-AUTHORS clean-go
.PHONY: assert-no-store-file-names assert-binaries-available
.PHONY: assert-final-inputs-self-contained
## -------------- ##
## Silent rules. ##
## -------------- ##
AM_V_DL = $(AM_V_DL_$(V))
AM_V_DL_ = $(AM_V_DL_$(AM_DEFAULT_VERBOSITY))
AM_V_DL_0 = @echo " DL " $@;
AM_V_DOT = $(AM_V_DOT_$(V))
AM_V_DOT_ = $(AM_V_DOT_$(AM_DEFAULT_VERBOSITY))
AM_V_DOT_0 = @echo " DOT " $@;
AM_V_EMACS = $(AM_V_EMACS_$(V))
AM_V_EMACS_ = $(AM_V_EMACS_$(AM_DEFAULT_VERBOSITY))
AM_V_EMACS_0 = @echo " EMACS " $@;
AM_V_HELP2MAN = $(AM_V_HELP2MAN_$(V))
AM_V_HELP2MAN_ = $(AM_V_HELP2MAN_$(AM_DEFAULT_VERBOSITY))
AM_V_HELP2MAN_0 = @echo " HELP2MAN" $@;
+1 -1068
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -77,6 +77,6 @@ Freenode!
+ build containers like guix-daemon does
+ provide a Plash-like interface in Bash
- daemon rewritten in Guile
- more shepherd integration
- more dmd integration
+ monitor network interfaces and start/stop events based on that
+ include a DHCP client written in Scheme
-3
View File
@@ -14,7 +14,6 @@ infrastructure help:
Alexandru Cojocaru <xojoc@gmx.com>
Aleix Conchillo Flaqué <aconchillo@gmail.com>
Malcolm Cook <MEC@stowers.org>
Thomas Danckaert <thomas.danckaert@gmail.com>
Rafael Ferreira <rafael.f.f1@gmail.com>
Christian Grothoff <christian@grothoff.org>
Eric Hanchrow <eric.hanchrow@gmail.com>
@@ -26,7 +25,6 @@ infrastructure help:
Daniel Kochmański <dkochmanski@hellsgate.pl>
Matthew Lien <bluet@bluet.org>
Dave Love <fx@gnu.org>
Chris Marusich <cmmarusich@gmail.com>
Niels Möller <nisse@lysator.liu.se>
Cyprien Nicolas <cyprien@nicolas.tf>
Yutaka Niibe <gniibe@fsij.org>
@@ -41,7 +39,6 @@ infrastructure help:
Thomas Schwinge <thomas@codesourcery.com>
Alexander Shendi <Alexander.Shendi@web.de>
Alen Skondro <askondro@gmail.com>
Jan Synáček <jan.synacek@gmail.com>
Matthias Wachs <wachs@net.in.tum.de>
Christopher Allan Webber <cwebber@dustycloud.org>
Philip Woods <elzairthesorcerer@gmail.com>
+4 -55
View File
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -19,9 +19,7 @@
(define-module (build-self)
#:use-module (gnu)
#:use-module (guix)
#:use-module (guix config)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-19)
#:export (build))
;;; Commentary:
@@ -46,18 +44,6 @@
(define libgcrypt
(first (find-best-packages-by-name "libgcrypt" #f)))
(define zlib
(first (find-best-packages-by-name "zlib" #f)))
(define gzip
(first (find-best-packages-by-name "gzip" #f)))
(define bzip2
(first (find-best-packages-by-name "bzip2" #f)))
(define xz
(first (find-best-packages-by-name "xz" #f)))
(define guile-json
(first (find-best-packages-by-name "guile-json" #f)))
@@ -71,33 +57,12 @@
(lambda (file)
(string-append (dirname file) "/.."))))
(define (date-version-string)
"Return the current date and hour in UTC timezone, for use as a poor
person's version identifier."
;; XXX: Replace with a Git commit id.
(date->string (current-date 0) "~Y~m~d.~H"))
;; The procedure below is our return value.
(define* (build source
#:key verbose? (version (date-version-string))
(define* (build source #:key verbose?
#:allow-other-keys
#:rest rest)
"Return a derivation that unpacks SOURCE into STORE and compiles Scheme
files."
;; The '%xxxdir' variables were added to (guix config) in July 2016 so we
;; cannot assume that they are defined. Try to guess their value when
;; they're undefined (XXX: we get an incorrect guess when environment
;; variables such as 'NIX_STATE_DIR' are defined!).
(define storedir
(if (defined? '%storedir) %storedir %store-directory))
(define localstatedir
(if (defined? '%localstatedir) %localstatedir (dirname %state-directory)))
(define sysconfdir
(if (defined? '%sysconfdir) %sysconfdir (dirname %config-directory)))
(define sbindir
(if (defined? '%sbindir) %sbindir (dirname %guix-register-program)))
(define builder
#~(begin
(use-modules (guix build pull))
@@ -108,28 +73,12 @@ files."
(build-guix #$output #$source
#:system #$%system
#:storedir #$storedir
#:localstatedir #$localstatedir
#:sysconfdir #$sysconfdir
#:sbindir #$sbindir
#:package-name #$%guix-package-name
#:package-version #$version
#:bug-report-address #$%guix-bug-report-address
#:home-page-url #$%guix-home-page-url
#:libgcrypt #$libgcrypt
#:zlib #$zlib
#:gzip #$gzip
#:bzip2 #$bzip2
#:xz #$xz
;; XXX: This is not perfect, enabling VERBOSE? means
;; building a different derivation.
#:debug-port (if #$verbose?
(current-error-port)
(%make-void-port "w")))))
(%make-void-port "w"))
#:gcrypt #$libgcrypt)))
(gexp->derivation "guix-latest" builder
#:modules '((guix build pull)
+3 -5
View File
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -21,7 +21,6 @@
;;;
(use-modules (guix store)
(guix grafts)
(guix packages)
(guix derivations)
(gnu packages emacs)
@@ -46,9 +45,8 @@
(available (substitutable-paths store total))
(missing (lset-difference string=? total available)))
(if (null? missing)
(format (current-error-port)
"~a packages found substitutable on~{ ~a~}~%"
(length total) %hydra-supported-systems)
(format (current-error-port) "~a packages found substitutable~%"
(length total))
(format (current-error-port)
"~a packages are not substitutable:~%~{ ~a~%~}~%"
(length missing) missing))
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -21,7 +21,6 @@
;;;
(use-modules (guix store)
(guix grafts)
(guix packages)
(guix derivations)
(guix ui)
-90
View File
@@ -1,90 +0,0 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
;;;
;;; 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/>.
(use-modules (system base target)
(system base message)
(ice-9 match)
(ice-9 threads)
(guix build utils))
(define warnings
'(unsupported-warning format unbound-variable arity-mismatch))
(define host (getenv "host"))
(define srcdir (getenv "srcdir"))
(define (relative-file file)
(if (string-prefix? (string-append srcdir "/") file)
(string-drop file (+ 1 (string-length srcdir)))
file))
(define (file-mtime<? f1 f2)
(< (stat:mtime (stat f1))
(stat:mtime (stat f2))))
(define (scm->go file)
(let* ((relative (relative-file file))
(without-extension (string-drop-right relative 4)))
(string-append without-extension ".go")))
(define (file-needs-compilation? file)
(let ((go (scm->go file)))
(or (not (file-exists? go))
(file-mtime<? go file))))
(define (file->module file)
(let* ((relative (relative-file file))
(module-path (string-drop-right relative 4)))
(map string->symbol
(string-split module-path #\/))))
;;; To work around <http://bugs.gnu.org/15602> (FIXME), we want to load all
;;; files to be compiled first. We do this via resolve-interface so that the
;;; top-level of each file (module) is only executed once.
(define (load-module-file file)
(let ((module (file->module file)))
(format #t " LOAD ~a~%" module)
(resolve-interface module)))
(define (compile-file* file output-mutex)
(let ((go (scm->go file)))
(with-mutex output-mutex
(format #t " GUILEC ~a~%" go)
(force-output))
(mkdir-p (dirname go))
(with-fluids ((*current-warning-prefix* ""))
(with-target host
(lambda ()
(compile-file file
#:output-file go
#:opts `(#:warnings ,warnings)))))))
(match (command-line)
((_ . files)
(let ((files (filter file-needs-compilation? files)))
(for-each load-module-file files)
(let ((mutex (make-mutex)))
(par-for-each (lambda (file)
(compile-file* file mutex))
files)))))
;;; Local Variables:
;;; eval: (put 'with-target 'scheme-indent-function 1)
;;; End:
+1 -1
View File
@@ -56,7 +56,7 @@
(match (command-line)
((_ file expected-hash)
(let ((uri (file-name->uri file)))
(format #t "downloading file `~a'~%from `~a'...~%"
(format #t "downloading file `~a' from `~a'...~%"
file (uri->string uri))
(let*-values (((resp data) (http-get uri #:decode-body? #f))
((hash) (bytevector->base16-string (sha256 data)))
+1 -1
View File
@@ -57,7 +57,7 @@ This is an alpha preview of the GNU system. Welcome.
This image features the GNU Guix package manager, which was used to
build it (http://www.gnu.org/software/guix/). The init system is
the GNU Shepherd (http://www.gnu.org/software/shepherd/).
GNU dmd (http://www.gnu.org/software/dmd/).
You can log in as 'guest' or 'root' with no password.
")
-111
View File
@@ -1,111 +0,0 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
;;;
;;; 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/>.
;;; This program replicates the behavior of Hydra's 'hydra-eval-guile-job'.
;;; It evaluates the Hydra job defined by the program passed as its first
;;; arguments and outputs an sexp of the jobs on standard output.
(use-modules (guix store)
(srfi srfi-19)
(ice-9 match)
(ice-9 pretty-print)
(ice-9 format))
(define %user-module
;; Hydra user module.
(let ((m (make-module)))
(beautify-user-module! m)
m))
(define (call-with-time thunk kont)
"Call THUNK and pass KONT the elapsed time followed by THUNK's return
values."
(let* ((start (current-time time-monotonic))
(result (call-with-values thunk list))
(end (current-time time-monotonic)))
(apply kont (time-difference end start) result)))
(define (call-with-time-display thunk)
"Call THUNK and write to the current output port its duration."
(call-with-time thunk
(lambda (time . results)
(format #t "~,3f seconds~%"
(+ (time-second time)
(/ (time-nanosecond time) 1e9)))
(apply values results))))
(define (assert-valid-job job thing)
"Raise an error if THING is not an alist with a valid 'derivation' entry.
Otherwise return THING."
(unless (and (list? thing)
(and=> (assoc-ref thing 'derivation)
(lambda (value)
(and (string? value)
(string-suffix? ".drv" value)))))
(error "job did not produce a valid alist" job thing))
thing)
;; Without further ado...
(match (command-line)
((command file)
;; Load FILE, a Scheme file that defines Hydra jobs.
(let ((port (current-output-port)))
(save-module-excursion
(lambda ()
(set-current-module %user-module)
(primitive-load file)))
(with-store store
;; Make sure we don't resort to substitutes.
(set-build-options store
#:use-substitutes? #f
#:substitute-urls '())
;; Grafts can trigger early builds. We do not want that to happen
;; during evaluation, so use a sledgehammer to catch such problems.
(set! build-things
(lambda (store . args)
(format (current-error-port)
"error: trying to build things during evaluation!~%")
(format (current-error-port)
"'build-things' arguments: ~s~%" args)
(exit 1)))
;; Call the entry point of FILE and print the resulting job sexp.
(pretty-print
(match ((module-ref %user-module 'hydra-jobs) store '())
(((names . thunks) ...)
(map (lambda (job thunk)
(format (current-error-port) "evaluating '~a'... " job)
(force-output (current-error-port))
(cons job
(assert-valid-job job
(call-with-time-display thunk))))
names thunks)))
port))))
((command _ ...)
(format (current-error-port) "Usage: ~a FILE
Evaluate the Hydra jobs defined in FILE.~%"
command)
(exit 1)))
;;; Local Variables:
;;; eval: (put 'call-with-time 'scheme-indent-function 1)
;;; End:
+39 -91
View File
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -38,7 +38,6 @@
(use-modules (guix config)
(guix store)
(guix grafts)
(guix packages)
(guix derivations)
(guix monads)
@@ -59,7 +58,6 @@
(gnu system)
(gnu system vm)
(gnu system install)
(gnu tests)
(srfi srfi-1)
(srfi srfi-26)
(ice-9 match))
@@ -72,20 +70,16 @@
(define* (package->alist store package system
#:optional (package-derivation package-derivation))
"Convert PACKAGE to an alist suitable for Hydra."
(parameterize ((%graft? #f))
`((derivation . ,(derivation-file-name
(package-derivation store package system
#:graft? #f)))
(description . ,(package-synopsis package))
(long-description . ,(package-description package))
(license . ,(package-license package))
(home-page . ,(package-home-page package))
(maintainers . ("bug-guix@gnu.org"))
(max-silent-time . ,(or (assoc-ref (package-properties package)
'max-silent-time)
3600)) ;1 hour by default
(timeout . ,(or (assoc-ref (package-properties package) 'timeout)
72000))))) ;20 hours by default
`((derivation . ,(derivation-file-name
(package-derivation store package system
#:graft? #f)))
(description . ,(package-synopsis package))
(long-description . ,(package-description package))
(license . ,(package-license package))
(home-page . ,(package-home-page package))
(maintainers . ("bug-guix@gnu.org"))
(timeout . ,(or (assoc-ref (package-properties package) 'timeout)
72000)))) ; 20 hours by default
(define (package-job store job-name package system)
"Return a job called JOB-NAME that builds PACKAGE on SYSTEM."
@@ -130,9 +124,6 @@ SYSTEM."
(file (string-append dir "/demo-os.scm")))
(read-operating-system file)))
(define %guixsd-supported-systems
'("x86_64-linux" "i686-linux"))
(define (qemu-jobs store system)
"Return a list of jobs that build QEMU images for SYSTEM."
(define (->alist drv)
@@ -147,14 +138,12 @@ system.")
(define (->job name drv)
(let ((name (symbol-append name (string->symbol ".")
(string->symbol system))))
`(,name . ,(lambda ()
(parameterize ((%graft? #f))
(->alist drv))))))
`(,name . ,(cut ->alist drv))))
(define MiB
(expt 2 20))
(if (member system %guixsd-supported-systems)
(if (member system '("x86_64-linux" "i686-linux"))
(list (->job 'qemu-image
(run-with-store store
(mbegin %store-monad
@@ -168,37 +157,7 @@ system.")
(set-guile-for-build (default-guile))
(system-disk-image installation-os
#:disk-image-size
(* 1024 MiB))))))
'()))
(define (system-test-jobs store system)
"Return a list of jobs for the system tests."
(define (test->thunk test)
(lambda ()
(define drv
(run-with-store store
(mbegin %store-monad
(set-current-system system)
(set-grafting #f)
(set-guile-for-build (default-guile))
(system-test-value test))))
`((derivation . ,(derivation-file-name drv))
(description . ,(format #f "GuixSD '~a' system test"
(system-test-name test)))
(long-description . ,(system-test-description test))
(license . ,gpl3+)
(home-page . ,%guix-home-page-url)
(maintainers . ("bug-guix@gnu.org")))))
(define (->job test)
(let ((name (string->symbol
(string-append "test." (system-test-name test)
"." system))))
(cons name (test->thunk test))))
(if (member system %guixsd-supported-systems)
(map ->job (all-system-tests))
(* 860 MiB))))))
'()))
(define (tarball-jobs store system)
@@ -215,9 +174,7 @@ all its dependencies, and ready to be installed on non-GuixSD distributions.")
(define (->job name drv)
(let ((name (symbol-append name (string->symbol ".")
(string->symbol system))))
`(,name . ,(lambda ()
(parameterize ((%graft? #f))
(->alist drv))))))
`(,name . ,(cut ->alist drv))))
;; XXX: Add a job for the stable Guix?
(list (->job 'binary-tarball
@@ -288,36 +245,27 @@ valid."
%packages-to-cross-build))
(remove (either from-32-to-64? same?) %cross-targets)))
;; Turn off grafts. Grafting is meant to happen on the user's machines.
(parameterize ((%graft? #f))
;; Return one job for each package, except bootstrap packages.
(append-map (lambda (system)
(case subset
((all)
;; Build everything, including replacements.
(let ((all (fold-packages
(lambda (package result)
(if (package-replacement package)
(cons* package
(package-replacement package)
result)
(cons package result)))
'()))
(job (lambda (package)
(package->job store package
system))))
(append (filter-map job all)
(qemu-jobs store system)
(system-test-jobs store system)
(tarball-jobs store system)
(cross-jobs system))))
((core)
;; Build core packages only.
(append (map (lambda (package)
(package-job store (job-name package)
package system))
%core-packages)
(cross-jobs system)))
(else
(error "unknown subset" subset))))
%hydra-supported-systems)))
;; Return one job for each package, except bootstrap packages.
(append-map (lambda (system)
(case subset
((all)
;; Build everything.
(fold-packages (lambda (package result)
(let ((job (package->job store package
system)))
(if job
(cons job result)
result)))
(append (qemu-jobs store system)
(tarball-jobs store system)
(cross-jobs system))))
((core)
;; Build core packages only.
(append (map (lambda (package)
(package-job store (job-name package)
package system))
%core-packages)
(cross-jobs system)))
(else
(error "unknown subset" subset))))
%hydra-supported-systems))
+7 -21
View File
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -47,7 +47,6 @@
(guix build-system gnu)
(gnu packages version-control)
(gnu packages package-management)
(gnu packages imagemagick)
(gnu packages graphviz)
(gnu packages man)
(srfi srfi-1)
@@ -73,25 +72,12 @@
(define (tarball-package checkout)
"Return a package that does `make distcheck' from CHECKOUT, a directory
containing a Git checkout of Guix."
(let ((guix (@@ (gnu packages package-management) guix)))
(dist-package (package
(inherit guix)
(arguments (package-arguments guix))
(native-inputs `(("imagemagick" ,imagemagick)
,@(package-native-inputs guix))))
checkout
#:phases
'(modify-phases %dist-phases
(add-before 'build 'build-daemon
;; Build 'guix-daemon' first so that help2man
;; successfully creates 'guix-daemon.1'.
(lambda _
(let ((n (number->string
(parallel-job-count))))
(zero? (system* "make"
"nix/libstore/schema.sql.hh"
"guix-daemon" "-j" n)))))))))
(dist-package (package
(inherit guix)
(native-inputs `(("graphviz" ,graphviz)
("help2man" ,help2man)
,@(package-native-inputs guix))))
checkout))
(define (hydra-jobs store arguments)
"Return Hydra jobs."
-85
View File
@@ -1,85 +0,0 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
;;;
;;; 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 (run-system-tests)
#:use-module (gnu tests)
#:use-module (guix store)
#:use-module (guix monads)
#:use-module (guix derivations)
#:use-module (guix ui)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-34)
#:use-module (ice-9 match)
#:export (run-system-tests))
(define (built-derivations* drv)
(lambda (store)
(guard (c ((nix-protocol-error? c)
(values #f store)))
(values (build-derivations store drv) store))))
(define (filterm mproc lst) ;XXX: move to (guix monads)
(with-monad %store-monad
(>>= (foldm %store-monad
(lambda (item result)
(mlet %store-monad ((keep? (mproc item)))
(return (if keep?
(cons item result)
result))))
'()
lst)
(lift1 reverse %store-monad))))
(define (run-system-tests . args)
(define tests
;; Honor the 'TESTS' environment variable so that one can select a subset
;; of tests to run in the usual way:
;;
;; make check-system TESTS=installed-os
(match (getenv "TESTS")
(#f
(all-system-tests))
((= string-tokenize (tests ...))
(filter (lambda (test)
(member (system-test-name test) tests))
(all-system-tests)))))
(format (current-error-port) "Running ~a system tests...~%"
(length tests))
(with-store store
(run-with-store store
(mlet* %store-monad ((drv (mapm %store-monad system-test-value tests))
(out -> (map derivation->output-path drv)))
(mbegin %store-monad
(show-what-to-build* drv)
(set-build-options* #:keep-going? #t #:keep-failed? #t)
(built-derivations* drv)
(mlet %store-monad ((valid (filterm (store-lift valid-path?)
out))
(failed (filterm (store-lift
(negate valid-path?))
out)))
(format #t "TOTAL: ~a\n" (length drv))
(for-each (lambda (item)
(format #t "PASS: ~a~%" item))
valid)
(for-each (lambda (item)
(format #t "FAIL: ~a~%" item))
failed)
(exit (null? failed))))))))
-189
View File
@@ -1,189 +0,0 @@
;;;; test-driver.scm - Guile test driver for Automake testsuite harness
(define script-version "2016-04-03.12") ;UTC
;;; Copyright © 2015, 2016 Mathieu Lirzin <mthl@gnu.org>
;;;
;;; This program 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.
;;;
;;; This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
;;;; Commentary:
;;;
;;; This script provides a Guile test driver using the SRFI-64 Scheme API for
;;; test suites. SRFI-64 is distributed with Guile since version 2.0.9.
;;;
;;;; Code:
(use-modules (ice-9 getopt-long)
(ice-9 pretty-print)
(srfi srfi-26)
(srfi srfi-64))
(define (show-help)
(display "Usage:
test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
[--expect-failure={yes|no}] [--color-tests={yes|no}]
[--enable-hard-errors={yes|no}] [--brief={yes|no}}] [--]
TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
The '--test-name', '--log-file' and '--trs-file' options are mandatory.\n"))
(define %options
'((test-name (value #t))
(log-file (value #t))
(trs-file (value #t))
(color-tests (value #t))
(expect-failure (value #t)) ;XXX: not implemented yet
(enable-hard-errors (value #t)) ;not implemented in SRFI-64
(brief (value #t))
(help (single-char #\h) (value #f))
(version (single-char #\V) (value #f))))
(define (option->boolean options key)
"Return #t if the value associated with KEY in OPTIONS is \"yes\"."
(and=> (option-ref options key #f) (cut string=? <> "yes")))
(define* (test-display field value #:optional (port (current-output-port))
#:key pretty?)
"Display \"FIELD: VALUE\\n\" on PORT."
(if pretty?
(begin
(format port "~A:~%" field)
(pretty-print value port #:per-line-prefix "+ "))
(format port "~A: ~A~%" field value)))
(define* (result->string symbol #:key colorize?)
"Return SYMBOL as an upper case string. Use colors when COLORIZE is #t."
(let ((result (string-upcase (symbol->string symbol))))
(if colorize?
(string-append (case symbol
((pass) "") ;green
((xfail) "") ;light green
((skip) "") ;blue
((fail xpass) "") ;red
((error) "")) ;magenta
result
"") ;no color
result)))
(define* (test-runner-gnu test-name #:key color? brief? out-port trs-port)
"Return an custom SRFI-64 test runner. TEST-NAME is a string specifying the
file name of the current the test. COLOR? specifies whether to use colors,
and BRIEF?, well, you know. OUT-PORT and TRS-PORT must be output ports. The
current output port is supposed to be redirected to a '.log' file."
(define (test-on-test-begin-gnu runner)
;; Procedure called at the start of an individual test case, before the
;; test expression (and expected value) are evaluated.
(let ((result (cute assq-ref (test-result-alist runner) <>)))
(test-display "test-name" (result 'test-name))
(test-display "location"
(string-append (result 'source-file) ":"
(number->string (result 'source-line))))
(test-display "source" (result 'source-form) #:pretty? #t)))
(define (test-on-test-end-gnu runner)
;; Procedure called at the end of an individual test case, when the result
;; of the test is available.
(let* ((results (test-result-alist runner))
(result? (cut assq <> results))
(result (cut assq-ref results <>)))
(unless brief?
;; Display the result of each test case on the console.
(test-display
(result->string (test-result-kind runner) #:colorize? color?)
(string-append test-name " - " (test-runner-test-name runner))
out-port))
(when (result? 'expected-value)
(test-display "expected-value" (result 'expected-value)))
(when (result? 'expected-error)
(test-display "expected-error" (result 'expected-error) #:pretty? #t))
(when (result? 'actual-value)
(test-display "actual-value" (result 'actual-value)))
(when (result? 'actual-error)
(test-display "actual-error" (result 'actual-error) #:pretty? #t))
(test-display "result" (result->string (result 'result-kind)))
(newline)
(test-display ":test-result"
(string-append (result->string (test-result-kind runner))
" " (test-runner-test-name runner))
trs-port)))
(define (test-on-group-end-gnu runner)
;; Procedure called by a 'test-end', including at the end of a test-group.
(let ((fail (or (positive? (test-runner-fail-count runner))
(positive? (test-runner-xpass-count runner))))
(skip (or (positive? (test-runner-skip-count runner))
(positive? (test-runner-xfail-count runner)))))
;; XXX: The global results need some refinements for XPASS.
(test-display ":global-test-result"
(if fail "FAIL" (if skip "SKIP" "PASS"))
trs-port)
(test-display ":recheck"
(if fail "yes" "no")
trs-port)
(test-display ":copy-in-global-log"
(if (or fail skip) "yes" "no")
trs-port)
(when brief?
;; Display the global test group result on the console.
(test-display (result->string (if fail 'fail (if skip 'skip 'pass))
#:colorize? color?)
test-name
out-port))
#f))
(let ((runner (test-runner-null)))
(test-runner-on-test-begin! runner test-on-test-begin-gnu)
(test-runner-on-test-end! runner test-on-test-end-gnu)
(test-runner-on-group-end! runner test-on-group-end-gnu)
(test-runner-on-bad-end-name! runner test-on-bad-end-name-simple)
runner))
;;;
;;; Entry point.
;;;
(define (main . args)
(let* ((opts (getopt-long (command-line) %options))
(option (cut option-ref opts <> <>)))
(cond
((option 'help #f) (show-help))
((option 'version #f) (format #t "test-driver.scm ~A" script-version))
(else
(let ((log (open-file (option 'log-file "") "w0"))
(trs (open-file (option 'trs-file "") "wl"))
(out (duplicate-port (current-output-port) "wl")))
(redirect-port log (current-output-port))
(redirect-port log (current-warning-port))
(redirect-port log (current-error-port))
(test-with-runner
(test-runner-gnu (option 'test-name #f)
#:color? (option->boolean opts 'color-tests)
#:brief? (option->boolean opts 'brief)
#:out-port out #:trs-port trs)
(load-from-path (option 'test-name #f)))
(close-port log)
(close-port trs)
(close-port out))))
(exit 0)))
;;; Local Variables:
;;; eval: (add-hook 'write-file-functions 'time-stamp)
;;; time-stamp-start: "(define script-version \""
;;; time-stamp-format: "%:y-%02m-%02d.%02H"
;;; time-stamp-time-zone: "UTC"
;;; time-stamp-end: "\") ;UTC"
;;; End:
;;;; test-driver.scm ends here.
+8 -16
View File
@@ -14,6 +14,14 @@ if test "x$guix_build_daemon" = "xyes"; then
AC_PROG_RANLIB
AC_CONFIG_HEADER([nix/config.h])
dnl Decompressors, for use by the substituter.
AC_PATH_PROG([GZIP], [gzip])
AC_PATH_PROG([BZIP2], [bzip2])
AC_PATH_PROG([XZ], [xz])
AC_SUBST([GZIP])
AC_SUBST([BZIP2])
AC_SUBST([XZ])
dnl Use 64-bit file system calls so that we can support files > 2 GiB.
AC_SYS_LARGEFILE
@@ -110,20 +118,6 @@ if test "x$guix_build_daemon" = "xyes"; then
dnl Check for <linux/fs.h> (for immutable file support).
AC_CHECK_HEADERS([linux/fs.h])
dnl Determine the appropriate default list of substitute URLs.
GUILE_MODULE_AVAILABLE([have_gnutls], [(gnutls)])
if test "x$have_gnutls" = "xyes"; then
guix_substitute_urls="https://mirror.hydra.gnu.org"
else
AC_MSG_WARN([GnuTLS is missing, substitutes will be downloaded in the clear])
guix_substitute_urls="http://mirror.hydra.gnu.org"
fi
AC_MSG_CHECKING([for default substitute URLs])
AC_MSG_RESULT([$guix_substitute_urls])
AC_DEFINE_UNQUOTED([GUIX_SUBSTITUTE_URLS], ["$guix_substitute_urls"],
[Default list of substitute URLs used by 'guix-daemon'.])
dnl Check whether the 'offload' build hook can be built (uses
dnl 'restore-file-set', which requires unbuffered custom binary input
dnl ports from Guile >= 2.0.10.)
@@ -140,8 +134,6 @@ if test "x$guix_build_daemon" = "xyes"; then
GUIX_TEST_ROOT="$ac_cv_guix_test_root"
AC_SUBST([GUIX_TEST_ROOT])
GUIX_CHECK_LOCALSTATEDIR
AC_CONFIG_FILES([nix/scripts/list-runtime-roots],
[chmod +x nix/scripts/list-runtime-roots])
AC_CONFIG_FILES([nix/scripts/substitute],
+8 -24
View File
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.68)
AC_INIT([GNU Guix], [0.11.0], [bug-guix@gnu.org], [guix],
AC_INIT([GNU Guix], [0.9.0], [bug-guix@gnu.org], [guix],
[http://www.gnu.org/software/guix/])
AC_CONFIG_AUX_DIR([build-aux])
@@ -60,8 +60,7 @@ AC_SUBST([guix_localstatedir])
AC_SUBST([guix_sysconfdir])
AC_SUBST([guix_sbindir])
GUIX_CHECK_FILE_NAME_LIMITS([can_run_tests])
AM_CONDITIONAL([CAN_RUN_TESTS], [test "x$can_run_tests" = "xyes"])
GUIX_CHECK_FILE_NAME_LIMITS
dnl We require pkg.m4 (from pkg-config) and guile.m4 (from Guile.)
dnl Make sure they are available.
@@ -86,13 +85,10 @@ dnl Check whether (srfi srfi-37) works, and provide our own if it doesn't.
GUIX_CHECK_SRFI_37
AM_CONDITIONAL([INSTALL_SRFI_37], [test "x$ac_cv_guix_srfi_37_broken" = xyes])
dnl Decompressors, for use by the substituter and other modules.
AC_PATH_PROG([GZIP], [gzip])
AC_PATH_PROG([BZIP2], [bzip2])
AC_PATH_PROG([XZ], [xz])
AC_SUBST([GZIP])
AC_SUBST([BZIP2])
AC_SUBST([XZ])
dnl Check whether (guix build syscalls) can be built.
GUIX_CHECK_LIBC_MOUNT
AM_CONDITIONAL([BUILD_SYSCALLS_MODULE],
[test "x$guix_cv_libc_has_mount" = "xyes"])
AC_ARG_WITH([nix-prefix],
[AS_HELP_STRING([--with-nix-prefix=DIR],
@@ -189,17 +185,6 @@ AC_SUBST([LIBGCRYPT_LIBDIR])
GUIX_ASSERT_LIBGCRYPT_USABLE
dnl Library name of zlib suitable for 'dynamic-link'.
GUIX_LIBZ_LIBDIR([libz_libdir])
if test "x$libz_libdir" = "x"; then
LIBZ="libz"
else
LIBZ="$libz_libdir/libz"
fi
AC_MSG_CHECKING([for zlib's shared library name])
AC_MSG_RESULT([$LIBZ])
AC_SUBST([LIBZ])
AC_CACHE_SAVE
m4_include([config-daemon.ac])
@@ -217,9 +202,8 @@ AC_CONFIG_FILES([Makefile
guix/config.scm])
AC_CONFIG_FILES([scripts/guix], [chmod +x scripts/guix])
AC_CONFIG_FILES([test-env:build-aux/test-env.in], [chmod +x test-env])
AC_CONFIG_FILES([pre-inst-env:build-aux/pre-inst-env.in],
[chmod +x pre-inst-env])
AC_CONFIG_FILES([pre-inst-env], [chmod +x pre-inst-env])
AC_CONFIG_FILES([test-env], [chmod +x test-env])
dnl Emacs interface.
AC_PATH_PROG([DOT_USER_PROGRAM], [dot], [dot])
+77 -91
View File
@@ -1,6 +1,5 @@
# GNU Guix --- Functional package management for GNU
# Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
# Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
# Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
#
# This file is part of GNU Guix.
#
@@ -21,8 +20,8 @@
# Integration of the `guix-daemon' code taken from upstream Nix.
#
BUILT_SOURCES += %D%/libstore/schema.sql.hh
CLEANFILES += $(BUILT_SOURCES) etc/guix-daemon.service etc/guix-daemon.conf
BUILT_SOURCES += nix/libstore/schema.sql.hh
CLEANFILES += $(BUILT_SOURCES) etc/guix-daemon.service
noinst_LIBRARIES = libformat.a libutil.a libstore.a
@@ -30,83 +29,86 @@ noinst_LIBRARIES = libformat.a libutil.a libstore.a
AM_CXXFLAGS = -Wall -std=c++11
libformat_a_SOURCES = \
%D%/boost/format/free_funcs.cc \
%D%/boost/format/parsing.cc \
%D%/boost/format/format_implementation.cc
nix/boost/format/free_funcs.cc \
nix/boost/format/parsing.cc \
nix/boost/format/format_implementation.cc
libformat_headers = \
%D%/boost/throw_exception.hpp \
%D%/boost/format.hpp \
%D%/boost/assert.hpp \
%D%/boost/format/macros_default.hpp \
%D%/boost/format/format_fwd.hpp \
%D%/boost/format/format_class.hpp \
%D%/boost/format/exceptions.hpp \
%D%/boost/format/group.hpp \
%D%/boost/format/feed_args.hpp \
%D%/boost/format/internals_fwd.hpp \
%D%/boost/format/internals.hpp
nix/boost/throw_exception.hpp \
nix/boost/format.hpp \
nix/boost/assert.hpp \
nix/boost/format/macros_default.hpp \
nix/boost/format/format_fwd.hpp \
nix/boost/format/format_class.hpp \
nix/boost/format/exceptions.hpp \
nix/boost/format/group.hpp \
nix/boost/format/feed_args.hpp \
nix/boost/format/internals_fwd.hpp \
nix/boost/format/internals.hpp
libformat_a_CPPFLAGS = \
-I$(top_srcdir)/nix
libutil_a_SOURCES = \
%D%/libutil/archive.cc \
%D%/libutil/affinity.cc \
%D%/libutil/serialise.cc \
%D%/libutil/util.cc \
%D%/libutil/hash.cc \
%D%/libutil/gcrypt-hash.cc
nix/libutil/archive.cc \
nix/libutil/affinity.cc \
nix/libutil/serialise.cc \
nix/libutil/util.cc \
nix/libutil/xml-writer.cc \
nix/libutil/hash.cc \
nix/libutil/gcrypt-hash.cc
libutil_headers = \
%D%/libutil/affinity.hh \
%D%/libutil/hash.hh \
%D%/libutil/serialise.hh \
%D%/libutil/util.hh \
%D%/libutil/archive.hh \
%D%/libutil/types.hh \
%D%/libutil/gcrypt-hash.hh \
%D%/libutil/md5.h \
%D%/libutil/sha1.h \
%D%/libutil/sha256.h \
%D%/libutil/sha512.h
nix/libutil/affinity.hh \
nix/libutil/hash.hh \
nix/libutil/serialise.hh \
nix/libutil/xml-writer.hh \
nix/libutil/util.hh \
nix/libutil/archive.hh \
nix/libutil/types.hh \
nix/libutil/gcrypt-hash.hh \
nix/libutil/md5.h \
nix/libutil/sha1.h \
nix/libutil/sha256.h
libutil_a_CPPFLAGS = \
-I$(top_builddir)/nix \
-I$(top_srcdir)/%D%/libutil \
-I$(top_srcdir)/nix/libutil \
$(libformat_a_CPPFLAGS)
libstore_a_SOURCES = \
%D%/libstore/gc.cc \
%D%/libstore/globals.cc \
%D%/libstore/misc.cc \
%D%/libstore/references.cc \
%D%/libstore/store-api.cc \
%D%/libstore/optimise-store.cc \
%D%/libstore/local-store.cc \
%D%/libstore/build.cc \
%D%/libstore/pathlocks.cc \
%D%/libstore/derivations.cc
nix/libstore/gc.cc \
nix/libstore/globals.cc \
nix/libstore/misc.cc \
nix/libstore/references.cc \
nix/libstore/store-api.cc \
nix/libstore/optimise-store.cc \
nix/libstore/local-store.cc \
nix/libstore/remote-store.cc \
nix/libstore/build.cc \
nix/libstore/pathlocks.cc \
nix/libstore/derivations.cc
libstore_headers = \
%D%/libstore/references.hh \
%D%/libstore/pathlocks.hh \
%D%/libstore/globals.hh \
%D%/libstore/worker-protocol.hh \
%D%/libstore/derivations.hh \
%D%/libstore/misc.hh \
%D%/libstore/local-store.hh \
%D%/libstore/store-api.hh
nix/libstore/references.hh \
nix/libstore/pathlocks.hh \
nix/libstore/globals.hh \
nix/libstore/worker-protocol.hh \
nix/libstore/remote-store.hh \
nix/libstore/derivations.hh \
nix/libstore/misc.hh \
nix/libstore/local-store.hh \
nix/libstore/store-api.hh
libstore_a_CPPFLAGS = \
$(libutil_a_CPPFLAGS) \
-I$(top_srcdir)/%D%/libstore \
-I$(top_builddir)/%D%/libstore \
-I$(top_srcdir)/nix/libstore \
-I$(top_builddir)/nix/libstore \
-DNIX_STORE_DIR=\"$(storedir)\" \
-DNIX_DATA_DIR=\"$(datadir)\" \
-DNIX_STATE_DIR=\"$(localstatedir)/guix\" \
-DNIX_LOG_DIR=\"$(localstatedir)/log/guix\" \
-DGUIX_CONFIGURATION_DIRECTORY=\"$(sysconfdir)/guix\" \
-DNIX_CONF_DIR=\"$(sysconfdir)/guix\" \
-DNIX_LIBEXEC_DIR=\"$(libexecdir)\" \
-DNIX_BIN_DIR=\"$(bindir)\" \
-DOPENSSL_PATH="\"guix-authenticate\"" \
@@ -119,29 +121,29 @@ bin_PROGRAMS = guix-daemon
sbin_PROGRAMS = guix-register
guix_daemon_SOURCES = \
%D%/nix-daemon/nix-daemon.cc \
%D%/nix-daemon/guix-daemon.cc
nix/nix-daemon/nix-daemon.cc \
nix/nix-daemon/guix-daemon.cc
guix_daemon_CPPFLAGS = \
-DLOCALEDIR=\"$(localedir)\" \
$(libutil_a_CPPFLAGS) \
-I$(top_srcdir)/%D%/libstore
-I$(top_srcdir)/nix/libstore
guix_daemon_LDADD = \
libstore.a libutil.a libformat.a -lbz2 \
$(SQLITE3_LIBS) $(LIBGCRYPT_LIBS)
guix_daemon_headers = \
%D%/nix-daemon/shared.hh
nix/nix-daemon/shared.hh
guix_register_SOURCES = \
%D%/guix-register/guix-register.cc
nix/guix-register/guix-register.cc
guix_register_CPPFLAGS = \
$(libutil_a_CPPFLAGS) \
$(libstore_a_CPPFLAGS) \
-I$(top_srcdir)/%D%/libstore
-I$(top_srcdir)/nix/libstore
# XXX: Should we start using shared libs?
guix_register_LDADD = \
@@ -153,8 +155,8 @@ noinst_HEADERS = \
$(libformat_headers) $(libutil_headers) $(libstore_headers) \
$(guix_daemon_headers)
%D%/libstore/schema.sql.hh: %D%/libstore/schema.sql
$(AM_V_GEN)$(GUILE) --no-auto-compile -c \
nix/libstore/schema.sql.hh: nix/libstore/schema.sql
$(GUILE) --no-auto-compile -c \
"(use-modules (rnrs io ports)) \
(call-with-output-file \"$@\" \
(lambda (out) \
@@ -163,20 +165,20 @@ noinst_HEADERS = \
(write (get-string-all in) out)))))"
nodist_pkglibexec_SCRIPTS = \
%D%/scripts/list-runtime-roots \
%D%/scripts/substitute
nix/scripts/list-runtime-roots \
nix/scripts/substitute
if BUILD_DAEMON_OFFLOAD
nodist_pkglibexec_SCRIPTS += \
%D%/scripts/offload
nix/scripts/offload
endif BUILD_DAEMON_OFFLOAD
# XXX: It'd be better to hide it in $(pkglibexecdir).
nodist_libexec_SCRIPTS = \
%D%/scripts/guix-authenticate
nix/scripts/guix-authenticate
# The '.service' file for systemd.
systemdservicedir = $(libdir)/systemd/system
@@ -184,30 +186,16 @@ nodist_systemdservice_DATA = etc/guix-daemon.service
etc/guix-daemon.service: etc/guix-daemon.service.in \
$(top_builddir)/config.status
$(AM_V_GEN)$(MKDIR_P) "`dirname $@`"; \
$(MKDIR_P) "`dirname "$@"`"
$(SED) -e 's|@''bindir''@|$(bindir)|' < \
"$(srcdir)/etc/guix-daemon.service.in" > "$@.tmp"; \
mv "$@.tmp" "$@"
# The '.conf' job for Upstart.
upstartjobdir = $(libdir)/upstart/system
nodist_upstartjob_DATA = etc/guix-daemon.conf
etc/guix-daemon.conf: etc/guix-daemon.conf.in \
$(top_builddir)/config.status
$(AM_V_GEN)$(MKDIR_P) "`dirname $@`"; \
$(SED) -e 's|@''bindir''@|$(bindir)|' < \
"$(srcdir)/etc/guix-daemon.conf.in" > "$@.tmp"; \
"$(srcdir)/etc/guix-daemon.service.in" > "$@.tmp"
mv "$@.tmp" "$@"
EXTRA_DIST += \
%D%/libstore/schema.sql \
%D%/AUTHORS \
%D%/COPYING \
etc/guix-daemon.service.in \
etc/guix-daemon.conf.in
if CAN_RUN_TESTS
nix/libstore/schema.sql \
nix/AUTHORS \
nix/COPYING \
etc/guix-daemon.service.in
AM_TESTS_ENVIRONMENT += \
top_builddir="$(abs_top_builddir)"
@@ -215,8 +203,6 @@ AM_TESTS_ENVIRONMENT += \
TESTS += \
tests/guix-daemon.sh
endif CAN_RUN_TESTS
clean-local:
-if test -d "$(GUIX_TEST_ROOT)"; then \
find "$(GUIX_TEST_ROOT)" | xargs chmod +w; \
+143
View File
@@ -0,0 +1,143 @@
# GNU Guix --- Functional package management for GNU
# Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
# Copyright © 2013 Andreas Enge <andreas@enge.fr>
#
# 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/>.
info_TEXINFOS = doc/guix.texi
DOT_FILES = \
doc/images/bootstrap-graph.dot \
doc/images/coreutils-graph.dot \
doc/images/coreutils-bag-graph.dot \
doc/images/service-graph.dot \
doc/images/dmd-graph.dot
DOT_VECTOR_GRAPHICS = \
$(DOT_FILES:%.dot=%.eps) \
$(DOT_FILES:%.dot=%.pdf)
EXTRA_DIST += \
doc/contributing.texi \
doc/emacs.texi \
doc/fdl-1.3.texi \
$(DOT_FILES) \
$(DOT_VECTOR_GRAPHICS) \
doc/images/coreutils-size-map.eps \
doc/environment-gdb.scm \
doc/package-hello.scm
OS_CONFIG_EXAMPLES_TEXI = \
doc/os-config-bare-bones.texi \
doc/os-config-desktop.texi
# Bundle this file so that makeinfo finds it in out-of-source-tree builds.
BUILT_SOURCES += $(OS_CONFIG_EXAMPLES_TEXI)
EXTRA_DIST += $(OS_CONFIG_EXAMPLES_TEXI)
MAINTAINERCLEANFILES = $(OS_CONFIG_EXAMPLES_TEXI)
doc/os-config-%.texi: gnu/system/examples/%.tmpl
$(MKDIR_P) "`dirname "$@"`"
cp "$<" "$@"
infoimagedir = $(infodir)/images
dist_infoimage_DATA = \
$(DOT_FILES:%.dot=%.png) \
doc/images/coreutils-size-map.png
# Try hard to obtain an image size and aspect that's reasonable for inclusion
# in an Info or PDF document.
DOT_OPTIONS = \
-Gratio=.9 -Gnodesep=.005 -Granksep=.00005 \
-Nfontsize=9 -Nheight=.1 -Nwidth=.1
.dot.png:
$(DOT) -Tpng $(DOT_OPTIONS) < "$<" > "$@.tmp"
mv "$@.tmp" "$@"
.dot.pdf:
$(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$@.tmp"
mv "$@.tmp" "$@"
.dot.eps:
$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$@.tmp"
mv "$@.tmp" "$@"
.png.eps:
convert "$<" "$@-tmp.eps"
mv "$@-tmp.eps" "$@"
# We cannot add new dependencies to `doc/guix.pdf' & co. (info "(automake)
# Extending"). Using the `-local' rules is imperfect, because they may be
# triggered after the main rule. Oh, well.
pdf-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.pdf)
info-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.png)
ps-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.eps) \
$(top_srcdir)/doc/images/coreutils-size-map.eps
dvi-local: ps-local
# Manual pages.
doc/guix.1: $(SUBCOMMANDS:%=guix/scripts/%.scm)
-LANGUAGE= $(top_builddir)/pre-inst-env \
$(HELP2MAN) --output="$@" guix
# Note: Do not depend on 'guix-daemon' since that would trigger a rebuild even
# for people building from a tarball.
doc/guix-daemon.1: nix/nix-daemon/guix-daemon.cc
-LANGUAGE= $(top_builddir)/pre-inst-env \
$(HELP2MAN) --output="$@" guix-daemon
define subcommand-manual-target
doc/guix-$(1).1: guix/scripts/$(1).scm
-LANGUAGE= $(top_builddir)/pre-inst-env \
$(HELP2MAN) --output="$$@" "guix $(1)"
endef
SUBCOMMANDS := \
archive \
build \
challenge \
download \
edit \
environment \
gc \
hash \
import \
lint \
package \
publish \
pull \
refresh \
size \
system
$(eval $(foreach subcommand,$(SUBCOMMANDS), \
$(call subcommand-manual-target,$(subcommand))))
dist_man1_MANS = \
doc/guix.1 \
$(SUBCOMMANDS:%=doc/guix-%.1)
if BUILD_DAEMON
dist_man1_MANS += \
doc/guix-daemon.1
endif
+22 -141
View File
@@ -7,18 +7,6 @@ grow! Please get in touch with us on @email{guix-devel@@gnu.org} and
reports, patches, and anything that may be helpful to the project. We
particularly welcome help on packaging (@pxref{Packaging Guidelines}).
@cindex code of conduct, of contributors
@cindex contributor covenant
We want to provide a warm, friendly, and harassment-free environment, so
that anyone can contribute to the best of their abilities. To this end
our project uses a ``Contributor Covenant'', which was adapted from
@url{http://contributor-covenant.org/}. You can find a local version in
the @file{CODE-OF-CONDUCT} file in the source tree.
Contributors are not required to use their legal name in patches and
on-line communication; they can use any name or pseudonym of their
choice.
@menu
* Building from Git:: The latest and greatest.
* Running Guix Before It Is Installed:: Hacker tricks.
@@ -39,56 +27,38 @@ the installation instructions (@pxref{Requirements}).
@item @url{http://gnu.org/software/autoconf/, GNU Autoconf};
@item @url{http://gnu.org/software/automake/, GNU Automake};
@item @url{http://gnu.org/software/gettext/, GNU Gettext};
@item @url{http://gnu.org/software/texinfo/, GNU Texinfo};
@item @url{http://www.graphviz.org/, Graphviz};
@item @url{http://www.gnu.org/software/help2man/, GNU Help2man (optional)}.
@end itemize
The easiest way to set up a development environment for Guix is, of
course, by using Guix! The following command starts a new shell where
all the dependencies and appropriate environment variables are set up to
hack on Guix:
Run @command{./bootstrap} to download the Nix daemon source code and to
generate the build system infrastructure using autoconf. It reports an
error if an inappropriate version of the above packages is being used.
@example
guix environment guix
@end example
@xref{Invoking guix environment}, for more information on that command.
Extra dependencies can be added with @option{--ad-hoc}:
@example
guix environment guix --ad-hoc help2man git strace
@end example
Run @command{./bootstrap} to generate the build system infrastructure
using Autoconf and Automake. If you get an error like this one:
@noindent
If you get an error like this one:
@example
configure.ac:46: error: possibly undefined macro: PKG_CHECK_MODULES
@end example
@noindent
it probably means that Autoconf couldnt find @file{pkg.m4}, which is
provided by pkg-config. Make sure that @file{pkg.m4} is available. The
same holds for the @file{guile.m4} set of macros provided by Guile. For
instance, if you installed Automake in @file{/usr/local}, it wouldnt
look for @file{.m4} files in @file{/usr/share}. In that case, you have
to invoke the following command:
provided by @command{pkg-config}. Make sure that @file{pkg.m4} is
available. For instance, if you installed Automake in
@file{/usr/local}, it wouldnt look for @file{.m4} files in
@file{/usr/share}. So you have to invoke the following command in that
case
@example
export ACLOCAL_PATH=/usr/share/aclocal
@end example
@xref{Macro Search Path,,, automake, The GNU Automake Manual}, for
See @pxref{Macro Search Path,,, automake, The GNU Automake Manual} for
more information.
Then, run @command{./configure} as usual. Make sure to pass
@code{--localstatedir=@var{directory}} where @var{directory} is the
@code{localstatedir} value used by your current installation (@pxref{The
Store}, for information about this).
Then, run @command{./configure} as usual.
Finally, you have to invoke @code{make check} to run tests
(@pxref{Running the Test Suite}). If anything
Finally, you have to invoke @code{make check} to run tests. If anything
fails, take a look at installation instructions (@pxref{Installation})
or send a message to the @email{guix-devel@@gnu.org, mailing list}.
@@ -116,46 +86,11 @@ Similarly, for a Guile session using the Guix modules:
@example
$ ./pre-inst-env guile -c '(use-modules (guix utils)) (pk (%current-system))'
;;; ("x86_64-linux")
@end example
@noindent
@cindex REPL
@cindex read-eval-print loop
@dots{} and for a REPL (@pxref{Using Guile Interactively,,, guile, Guile
Reference Manual}):
@example
$ ./pre-inst-env guile
scheme@@(guile-user)> ,use(guix)
scheme@@(guile-user)> ,use(gnu)
scheme@@(guile-user)> (define snakes
(fold-packages
(lambda (package lst)
(if (string-prefix? "python"
(package-name package))
(cons package lst)
lst))
'()))
scheme@@(guile-user)> (length snakes)
$1 = 361
@end example
The @command{pre-inst-env} script sets up all the environment variables
necessary to support this, including @env{PATH} and @env{GUILE_LOAD_PATH}.
Note that @command{./pre-inst-env guix pull} does @emph{not} upgrade the
local source tree; it simply updates the @file{~/.config/guix/latest}
symlink (@pxref{Invoking guix pull}). Run @command{git pull} instead if
you want to upgrade your local source tree.@footnote{If you would like
to set up @command{guix} to use your Git checkout, you can point the
@file{~/.config/guix/latest} symlink to your Git checkout directory.
If you are the sole user of your system, you may also consider pointing
the @file{/root/.config/guix/latest} symlink to point to
@file{~/.config/guix/latest}; this way it will always use the same
@command{guix} as your user does.}
@node The Perfect Setup
@section The Perfect Setup
@@ -176,8 +111,7 @@ that it finds source files from your checkout:
@lisp
;; @r{Assuming the Guix checkout is in ~/src/guix.}
(with-eval-after-load 'geiser-guile
(add-to-list 'geiser-guile-load-path "~/src/guix"))
(add-to-list 'geiser-guile-load-path "~/src/guix")
@end lisp
To actually edit the code, Emacs already has a neat Scheme mode. But in
@@ -288,20 +222,6 @@ name of the new or modified package, and fix any errors it reports
Make sure the package builds on your platform, using @code{guix build
@var{package}}.
@item
@cindex bundling
Make sure the package does not use bundled copies of software already
available as separate packages.
Sometimes, packages include copies of the source code of their
dependencies as a convenience for users. However, as a distribution, we
want to make sure that such packages end up using the copy we already
have in the distribution, if there is one. This improves resource usage
(the dependency is built and stored only once), and allows the
distribution to make transverse changes such as applying security
updates for a given software package in a single place and have them
affect the whole system---something that bundled copies prevent.
@item
Take a look at the profile reported by @command{guix size}
(@pxref{Invoking guix size}). This will allow you to notice references
@@ -314,58 +234,19 @@ For important changes, check that dependent package (if applicable) are
not affected by the change; @code{guix refresh --list-dependent
@var{package}} will help you do that (@pxref{Invoking guix refresh}).
Packages with roughly 100 dependents or more usually have to be
committed to a separate branch. That branch can then be built
separately by our build farm, and later merged into @code{master} once
everything has been successfully built. This allows us to fix issues
before they hit users, and to reduce the window during which pre-built
binaries are not available.
@item
@cindex determinism, of build processes
@cindex reproducible builds, checking
Check whether the package's build process is deterministic. This
typically means checking whether an independent build of the package
yields the exact same result that you obtained, bit for bit.
A simple way to do that is by building the same package several times in
a row on your machine (@pxref{Invoking guix build}):
@example
guix build --rounds=2 my-package
@end example
This is enough to catch a class of common non-determinism issues, such
as timestamps or randomly-generated output in the build result.
Another option is to use @command{guix challenge} (@pxref{Invoking guix
challenge}). You may run it once the package has been committed and
built by @code{hydra.gnu.org} to check whether it obtains the same
result as you did. Better yet: Find another machine that can build it
and run @command{guix publish}. Since the remote build machine is
likely different from yours, this can catch non-determinism issues
related to the hardware---e.g., use of different instruction set
extensions---or to the operating system kernel---e.g., reliance on
@code{uname} or @file{/proc} files.
@item
When writing documentation, please use gender-neutral wording when
referring to people, such as
@uref{https://en.wikipedia.org/wiki/Singular_they, singular
``they''@comma{} ``their''@comma{} ``them''}, and so forth.
@item
Verify that your patch contains only one set of related changes.
Bundling unrelated changes together makes reviewing harder and slower.
Examples of unrelated changes include the addition of several packages,
or a package update along with fixes to that package.
A simple way to do that is with @command{guix challenge}
(@pxref{Invoking guix challenge}). You may run it once the package has
been committed and built by @code{hydra.gnu.org} to check whether it
obtains the same result as you did. Better yet: Find another machine
that can build it and run @command{guix publish}.
@end enumerate
When posting a patch to the mailing list, use @samp{[PATCH] @dots{}} as
a subject. You may use your email client or the @command{git
send-email} command. We prefer to get patches in plain text messages,
either inline or as MIME attachments. You are advised to pay attention if
your email client changes anything like line breaks or indentation which
could could potentially break the patches.
When posting a patch to the mailing list, use @samp{[PATCH] @dots{}} as a
subject. You may use your email client or the @command{git send-mail}
command.
+49 -191
View File
@@ -9,14 +9,11 @@ Guix convenient and fun.
@menu
* Initial Setup: Emacs Initial Setup. Preparing @file{~/.emacs}.
* Package Management: Emacs Package Management. Managing packages and generations.
* Licenses: Emacs Licenses. Interface for licenses of Guix packages.
* Package Source Locations: Emacs Package Locations. Interface for package location files.
* Popup Interface: Emacs Popup Interface. Magit-like interface for guix commands.
* Prettify Mode: Emacs Prettify. Abbreviating @file{/gnu/store/@dots{}} file names.
* Build Log Mode: Emacs Build Log. Highlighting Guix build logs.
* Completions: Emacs Completions. Completing @command{guix} shell command.
* Development: Emacs Development. Tools for Guix developers.
* Hydra: Emacs Hydra. Interface for Guix build farm.
@end menu
@@ -49,19 +46,13 @@ command (@pxref{Emacs Popup Interface}).
@end itemize
When it is done, ``guix.el'' may be configured by requiring
@code{guix-autoloads} file. If you install Guix in your user profile,
this auto-loading is done automatically by our Emacs package
(@pxref{Application Setup}), so a universal recipe for configuring
``guix.el'' is: @command{guix package -i guix}. If you do this, there
is no need to read further.
For the manual installation, you need to add the following code into
your init file (@pxref{Init File,,, emacs, The GNU Emacs Manual}):
When it is done ``guix.el'' may be configured by requiring a special
@code{guix-init} file---i.e., by adding the following code into your
init file (@pxref{Init File,,, emacs, The GNU Emacs Manual}):
@example
(add-to-list 'load-path "/path/to/directory-with-guix.el")
(require 'guix-autoloads nil t)
(require 'guix-init nil t)
@end example
So the only thing you need to figure out is where the directory with
@@ -73,19 +64,17 @@ If it was installed by a package manager of your distribution or by a
usual @code{./configure && make && make install} command sequence, then
elisp files are placed in a standard directory with Emacs packages
(usually it is @file{/usr/share/emacs/site-lisp/}), which is already in
@code{load-path}, so there is no need to add that directory there. Note
that if you don't update this installation periodically, you may get an
outdated Emacs code which does not work with the current Guile code of
Guix.
@code{load-path}, so there is no need to add that directory there.
@item
If you used a binary installation method (@pxref{Binary Installation}),
then Guix is installed somewhere in the store, so the elisp files are
placed in @file{/gnu/store/@dots{}-guix-0.8.2/share/emacs/site-lisp/} or
alike. However it is not recommended to refer directly to a store
directory, as it may be garbage-collected one day. So a better choice
would be to install Guix using Guix itself with @command{guix package -i
guix}.
directory. Instead you can install Guix using Guix itself with
@command{guix package -i guix} command (@pxref{Invoking guix package})
and add @file{~/.guix-profile/share/emacs/site-lisp/} directory to
@code{load-path} variable.
@item
If you did not install Guix at all and prefer a hacking way
@@ -97,10 +86,26 @@ same directory, so your final configuration will look like this:
(let ((dir "/path/to/your-guix-git-tree/emacs"))
(add-to-list 'load-path dir)
(setq guix-load-path dir))
(require 'guix-autoloads nil t)
(require 'guix-init nil t)
@end example
@end itemize
By default, along with autoloading (@pxref{Autoload,,, elisp, The GNU
Emacs Lisp Reference Manual}) the main interactive commands for
``guix.el'' (@pxref{Emacs Commands}), requiring @code{guix-init} will
also autoload commands for the Emacs packages installed in your user
profile.
To disable automatic loading of installed Emacs packages, set
@code{guix-package-enable-at-startup} variable to @code{nil} before
requiring @code{guix-init}. This variable has the same meaning for
Emacs packages installed with Guix, as @code{package-enable-at-startup}
for the built-in Emacs package system (@pxref{Package Installation,,,
emacs, The GNU Emacs Manual}).
You can activate Emacs packages installed in your profile whenever you
want using @kbd{M-x@tie{}guix-emacs-load-autoloads}.
@node Emacs Package Management
@section Package Management
@@ -143,43 +148,19 @@ Commands for displaying packages:
Display all/newest available packages.
@item M-x guix-installed-packages
@itemx M-x guix-installed-user-packages
@itemx M-x guix-installed-system-packages
Display installed packages. As described above, @kbd{M-x
guix-installed-packages} uses an arbitrary profile that you can specify,
while the other commands display packages installed in 2 special
profiles: @file{~/.guix-profile} and @file{/run/current-system/profile}
(only on GuixSD).
Display all installed packages.
@item M-x guix-obsolete-packages
Display obsolete packages (the packages that are installed in a profile
but cannot be found among available packages).
@item M-x guix-packages-by-name
@item M-x guix-search-by-name
Display package(s) with the specified name.
@item M-x guix-packages-by-license
Display package(s) with the specified license.
@item M-x guix-packages-by-location
Display package(s) located in the specified file. These files usually
have the following form: @file{gnu/packages/emacs.scm}, but don't type
them manually! Press @key{TAB} to complete the file name.
@item M-x guix-package-from-file
Display package that the code within the specified file evaluates to.
@xref{Invoking guix package, @code{--install-from-file}}, for an example
of what such a file may look like.
@item M-x guix-search-by-regexp
Search for packages by a specified regexp. By default ``name'',
``synopsis'' and ``description'' of the packages will be searched. This
can be changed by modifying @code{guix-package-search-params} variable.
@item M-x guix-search-by-name
Search for packages with names matching a specified regexp. This
command is the same as @code{guix-search-by-regexp}, except only a
package ``name'' is searched.
can be changed by modifying @code{guix-search-params} variable.
@end table
@@ -209,14 +190,6 @@ date/time prompt,,, org, The Org Manual}).
@end table
Analogously on GuixSD you can also display system generations:
@table @kbd
@item M-x guix-system-generations
@item M-x guix-last-system-generations
@item M-x guix-system-generations-by-time
@end table
You can also invoke the @command{guix pull} command (@pxref{Invoking
guix pull}) from Emacs using:
@@ -228,7 +201,6 @@ With @kbd{C-u}, make it verbose.
Once @command{guix pull} has succeeded, the Guix REPL is restared. This
allows you to keep using the Emacs interface with the updated Guix.
@node Emacs General info
@subsection General information
@@ -255,8 +227,6 @@ prefix argument is used. This has the same meaning as @code{--manifest}
option (@pxref{Invoking guix package}).
@item C-c C-z
@cindex REPL
@cindex read-eval-print loop
Go to the Guix REPL (@pxref{The REPL,,, geiser, Geiser User Manual}).
@item h
@@ -315,8 +285,6 @@ similar to @command{guix edit} command (@pxref{Invoking guix edit}), but
for opening a package recipe in the current Emacs instance.
@item x
Execute actions on the marked packages.
@item B
Display latest builds of the current package (@pxref{Emacs Hydra}).
@end table
A ``generation-list'' buffer additionally provides the following
@@ -369,7 +337,6 @@ emacs, The GNU Emacs Manual}) which can be used to:
@item install/remove a package;
@item jump to a package location;
@item browse home page of a package;
@item browse license URL;
@item describe packages from ``Inputs'' fields.
@end itemize
@@ -445,7 +412,7 @@ changed with the following variables:
By default, the name of a profile is also displayed in a ``list'' or
``info'' buffer name. To change this behavior, use
@code{guix-ui-buffer-name-function} variable.
@code{guix-buffer-name-function} variable.
For example, if you want to display all types of results in a single
buffer (in such case you will probably use a history (@kbd{l}/@kbd{r})
@@ -459,7 +426,8 @@ extensively), you may do it like this:
guix-generation-list-buffer-name name
guix-package-info-buffer-name name
guix-output-info-buffer-name name
guix-generation-info-buffer-name name))
guix-generation-info-buffer-name name
guix-buffer-name-function #'guix-buffer-name-simple))
@end example
@node Emacs Keymaps
@@ -469,12 +437,8 @@ If you want to change default key bindings, use the following keymaps
(@pxref{Init Rebinding,,, emacs, The GNU Emacs Manual}):
@table @code
@item guix-buffer-map
Parent keymap with general keys for any buffer type.
@item guix-ui-map
Parent keymap with general keys for buffers used for Guix package
management (for packages, outputs and generations).
@item guix-root-map
Parent keymap with general keys for all guix modes.
@item guix-list-mode-map
Parent keymap with general keys for ``list'' buffers.
@@ -509,97 +473,28 @@ Keymap with keys available when a point is placed on a button.
@subsubsection Appearance
You can change almost any aspect of ``list'' / ``info'' buffers using
the following variables (@dfn{ENTRY-TYPE} means @code{package},
@code{output} or @code{generation}):
the following variables:
@table @code
@item guix-ENTRY-TYPE-list-format
@itemx guix-ENTRY-TYPE-list-titles
@item guix-list-column-format
@itemx guix-list-column-titles
@itemx guix-list-column-value-methods
Specify the columns, their names, what and how is displayed in ``list''
buffers.
@item guix-ENTRY-TYPE-info-format
@itemx guix-ENTRY-TYPE-info-titles
@itemx guix-info-ignore-empty-values
@item guix-info-displayed-params
@itemx guix-info-insert-methods
@itemx guix-info-ignore-empty-vals
@itemx guix-info-param-title-format
@itemx guix-info-multiline-prefix
@itemx guix-info-indent
@itemx guix-info-fill
@itemx guix-info-fill-column
@itemx guix-info-delimiter
Various settings for ``info'' buffers.
@end table
@node Emacs Licenses
@section Licenses
If you want to browse the URL of a particular license, or to look at a
list of licenses, you may use the following commands:
@table @kbd
@item M-x guix-browse-license-url
Choose a license from a completion list to browse its URL using
@code{browse-url} function (@pxref{Browse-URL,,, emacs, The GNU Emacs
Manual}).
@item M-x guix-licenses
Display a list of available licenses. You can press @kbd{@key{RET}}
there to display packages with this license in the same way as @kbd{M-x
guix-packages-by-license} would do (@pxref{Emacs Commands}).
@item M-x guix-find-license-definition
Open @file{@dots{}/guix/licenses.scm} and move to the specified license.
@end table
@node Emacs Package Locations
@section Package Source Locations
As you know, package definitions are placed in Guile files, also known
as @dfn{package locations}. The following commands should help you not
get lost in these locations:
@table @kbd
@item M-x guix-locations
Display a list of package locations. You can press @key{RET} there to
display packages placed in the current location in the same way as
@kbd{M-x guix-packages-by-location} would do (@pxref{Emacs Commands}).
Note that when the point is on a location button, @key{RET} will open
this location file.
@item M-x guix-find-location
Open the given package definition source file (press @key{TAB} to choose
a location from a completion list).
@item M-x guix-edit
Find location of a specified package. This is an Emacs analog of
@command{guix edit} command (@pxref{Invoking guix edit}). As with
@kbd{M-x guix-packages-by-name}, you can press @key{TAB} to complete a
package name.
@end table
If you are contributing to Guix, you may find it useful for @kbd{M-x
guix-find-location} and @kbd{M-x guix-edit} to open locations from your
Git checkout. This can be done by setting @code{guix-directory}
variable. For example, after this:
@example
(setq guix-directory "~/src/guix")
@end example
@kbd{M-x guix-edit guix} opens
@file{~/src/guix/gnu/packages/package-management.scm} file.
Also you can use @kbd{C-u} prefix argument to specify a directory just
for the current @kbd{M-x guix-find-location} or @kbd{M-x guix-edit}
command.
@node Emacs Popup Interface
@section Popup Interface
@@ -636,7 +531,7 @@ GNU Emacs Manual}).
@end itemize
Several commands (@command{guix graph}, @command{guix system shepherd-graph}
Several commands (@command{guix graph}, @command{guix system dmd-graph}
and @command{guix system extension-graph}) also have a ``View graph''
action, which allows you to view a generated graph using @command{dot}
command (specified by @code{guix-dot-program} variable). By default a
@@ -749,11 +644,12 @@ Toggle (show/hide) the bodies of all build phases.
@end table
There is also @kbd{M-x guix-build-log-minor-mode} which also provides
the same highlighting and the same key bindings as the major mode, but
prefixed with @kbd{C-c}. By default, this minor mode is enabled in
shell buffers (@pxref{Interactive Shell,,, emacs, The GNU Emacs
Manual}). If you don't like it, set
@code{guix-build-log-minor-mode-activate} to nil.
the same highlighting (but not key bindings). And as it is a minor
mode, it can be enabled in any buffer. For example, if you are building
some package in a shell buffer (@pxref{Interactive Shell,,, emacs, The
GNU Emacs Manual}), you may enable @command{guix-build-log-minor-mode}
to make it more colorful. Guix build output is rather specific, so this
new highlighting shouldn't conflict with the existing one.
@node Emacs Completions
@@ -841,41 +737,3 @@ evaluation will be finished in the REPL.
Alternatively, to avoid this limitation, you may just run another Geiser
REPL, and while something is being evaluated in the previous REPL, you
can continue editing a scheme file with the help of the current one.
@node Emacs Hydra
@section Hydra
The continuous integration server at @code{hydra.gnu.org} builds all
the distribution packages on the supported architectures and serves
them as substitutes (@pxref{Substitutes}). Continuous integration is
currently orchestrated by @uref{https://nixos.org/hydra/, Hydra}.
This section describes an Emacs interface to query Hydra to know the
build status of specific packages, discover recent and ongoing builds,
view build logs, and so on. This interface is mostly the same as the
``list''/``info'' interface for displaying packages and generations
(@pxref{Emacs Package Management}).
The following commands are available:
@table @kbd
@item M-x guix-hydra-latest-builds
Display latest failed or successful builds (you will be prompted for a
number of builds). With @kbd{C-u}, you will also be prompted for other
parameters (project, jobset, job and system).
@item M-x guix-hydra-queued-builds
Display scheduled or currently running builds (you will be prompted for
a number of builds).
@item M-x guix-hydra-jobsets
Display available jobsets (you will be prompted for a project).
@end table
In a list of builds you can press @kbd{L} key to display a build log of
the current build. Also both a list of builds and a list of jobsets
provide @kbd{B} key to display latest builds of the current job or
jobset (don't forget about @kbd{C-u}).
+947 -4567
View File
File diff suppressed because it is too large Load Diff
-652
View File
@@ -1,652 +0,0 @@
# htmlxref.cnf - reference file for free Texinfo manuals on the web.
# Modified by Ludovic Courtès <ludo@gnu.org> for the GNU Guix manual.
htmlxrefversion=2016-03-30.07; # UTC
# Copyright 2010, 2011, 2012, 2013, 2014, 2015 Free Software Foundation, Inc.
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
#
# The latest version of this file is available at
# http://ftpmirror.gnu.org/texinfo/htmlxref.cnf.
# Email corrections or additions to bug-texinfo@gnu.org.
# The primary goal is to list all relevant GNU manuals;
# other free manuals are also welcome.
#
# To be included in this list, a manual must:
#
# - have a generic url, e.g., no version numbers;
# - have a unique file name (e.g., manual identifier), i.e., be related to the
# package name. Things like "refman" or "tutorial" don't work.
# - follow the naming convention for nodes described at
# http://www.gnu.org/software/texinfo/manual/texinfo/html_node/HTML-Xref.html
# This is what makeinfo and texi2html implement.
#
# Unless the above criteria are met, it's not possible to generate
# reliable cross-manual references.
#
# For information on automatically generating all the useful formats for
# a manual to put on the web, see
# http://www.gnu.org/prep/maintain/html_node/Manuals-on-Web-Pages.html.
# For people editing this file: when a manual named foo is related to a
# package named bar, the url should contain a variable reference ${BAR}.
# Otherwise, the gnumaint scripts have no way of knowing they are
# associated, and thus gnu.org/manual can't include them.
# shorten references to manuals on www.gnu.org.
G = http://www.gnu.org
GS = ${G}/software
3dldf mono ${GS}/3dldf/manual/user_ref/3DLDF.html
3dldf node ${GS}/3dldf/manual/user_ref/
alive mono ${GS}/alive/manual/alive.html
alive node ${GS}/alive/manual/html_node/
anubis chapter ${GS}/anubis/manual/html_chapter/
anubis section ${GS}/anubis/manual/html_section/
anubis node ${GS}/anubis/manual/html_node/
artanis mono ${GS}/artanis/manual/artanis.html
artanis node ${GS}/artanis/manual/html_node/
aspell section http://aspell.net/man-html/index.html
auctex mono ${GS}/auctex/manual/auctex.html
auctex node ${GS}/auctex/manual/auctex/
autoconf mono ${GS}/autoconf/manual/autoconf.html
autoconf node ${GS}/autoconf/manual/html_node/
autogen mono ${GS}/autogen/manual/html_mono/autogen.html
autogen chapter ${GS}/autogen/manual/html_chapter/
autogen node ${GS}/autoconf/manual/html_node/
automake mono ${GS}/automake/manual/automake.html
automake node ${GS}/automake/manual/html_node/
avl node http://www.stanford.edu/~blp/avl/libavl.html/
bash mono ${GS}/bash/manual/bash.html
bash node ${GS}/bash/manual/html_node/
BINUTILS = http://sourceware.org/binutils/docs
binutils node ${BINUTILS}/binutils/
as node ${BINUTILS}/as/
bfd node ${BINUTILS}/bfd/
gprof node ${BINUTILS}/gprof/
ld node ${BINUTILS}/ld/
bison mono ${GS}/bison/manual/bison.html
bison node ${GS}/bison/manual/html_node/
bpel2owfn mono ${GS}/bpel2owfn/manual/2.0.x/bpel2owfn.html
ccd2cue mono ${GS}/ccd2cue/manual/ccd2cue.html
ccd2cue node ${GS}/ccd2cue/manual/html_node/
cflow mono ${GS}/cflow/manual/cflow.html
cflow node ${GS}/cflow/manual/html_node/
chess mono ${GS}/chess/manual/gnuchess.html
chess node ${GS}/chess/manual/html_node/
combine mono ${GS}/combine/manual/combine.html
combine chapter ${GS}/combine/manual/html_chapter/
combine section ${GS}/combine/manual/html_section/
combine node ${GS}/combine/manual/html_node/
complexity mono ${GS}/complexity/manual/complexity.html
complexity node ${GS}/complexity/manual/html_node/
coreutils mono ${GS}/coreutils/manual/coreutils
coreutils node ${GS}/coreutils/manual/html_node/
cpio mono ${GS}/cpio/manual/cpio
cpio node ${GS}/cpio/manual/html_node/
cssc node ${GS}/cssc/manual/
#cvs cannot be handled here; see http://ximbiot.com/cvs/manual.
ddd mono ${GS}/ddd/manual/html_mono/ddd.html
ddrescue mono ${GS}/ddrescue/manual/ddrescue_manual.html
DICO = http://puszcza.gnu.org.ua/software/dico/manual
dico mono ${DICO}/dico.html
dico chapter ${DICO}/html_chapter/
dico section ${DICO}/html_section/
dico node ${DICO}/html_node/
diffutils mono ${GS}/diffutils/manual/diffutils
diffutils node ${GS}/diffutils/manual/html_node/
ed mono ${GS}/ed/manual/ed_manual.html
EMACS = ${GS}/emacs/manual
emacs mono ${EMACS}/html_mono/emacs.html
emacs node ${EMACS}/html_node/emacs/
#
ada-mode mono ${EMACS}/html_mono/ada-mode.html
ada-mode node ${EMACS}/html_node/ada-mode/
#
autotype mono ${EMACS}/html_mono/autotype.html
autotype node ${EMACS}/html_node/autotype/
#
ccmode mono ${EMACS}/html_mono/ccmode.html
ccmode node ${EMACS}/html_node/ccmode/
#
cl mono ${EMACS}/html_mono/cl.html
cl node ${EMACS}/html_node/cl/
#
ebrowse mono ${EMACS}/html_mono/ebrowse.html
ebrowse node ${EMACS}/html_node/ebrowse/
#
ediff mono ${EMACS}/html_mono/ediff.html
ediff node ${EMACS}/html_node/ediff/
#
eieio mono ${EMACS}/html_mono/eieio.html
eieio node ${EMACS}/html_node/eieio/
#
elisp mono ${EMACS}/html_mono/elisp.html
elisp node ${EMACS}/html_node/elisp/
#
epa mono ${EMACS}/html_mono/epa.html
epa node ${EMACS}/html_node/epa/
#
erc mono ${EMACS}/html_mono/erc.html
erc node ${EMACS}/html_node/erc/
#
dired-x mono ${EMACS}/html_mono/dired-x.html
dired-x node ${EMACS}/html_node/dired-x/
#
eshell mono ${EMACS}/html_mono/eshell.html
eshell node ${EMACS}/html_node/eshell/
#
flymake mono ${EMACS}/html_mono/flymake.html
flymake node ${EMACS}/html_node/flymake/
#
gnus mono ${EMACS}/html_mono/gnus.html
gnus node ${EMACS}/html_node/gnus/
#
idlwave mono ${EMACS}/html_mono/idlwave.html
idlwave node ${EMACS}/html_node/idlwave/
#
message mono ${EMACS}/html_mono/message.html
message node ${EMACS}/html_node/message/
#
mh-e mono ${EMACS}/html_mono/mh-e.html
mh-e node ${EMACS}/html_node/mh-e/
#
nxml-mode mono ${EMACS}/html_mono/nxml-mode.html
nxml-mode node ${EMACS}/html_node/nxml-mode/
#
org mono ${EMACS}/html_mono/org.html
org node ${EMACS}/html_node/org/
#
pcl-cvs mono ${EMACS}/html_mono/pcl-cvs.html
pcl-cvs node ${EMACS}/html_node/pcl-cvs/
#
rcirc mono ${EMACS}/html_mono/rcirc.html
rcirc node ${EMACS}/html_node/rcirc/
#
semantic mono ${EMACS}/html_mono/semantic.html
semantic node ${EMACS}/html_node/semantic/
#
smtp mono ${EMACS}/html_mono/smtpmail.html
smtp node ${EMACS}/html_node/smtpmail/
#
speedbar mono ${EMACS}/html_mono/speedbar.html
speedbar node ${EMACS}/html_node/speedbar/
#
tramp mono ${EMACS}/html_mono/tramp.html
tramp node ${EMACS}/html_node/tramp/
#
vip mono ${EMACS}/html_mono/vip.html
vip node ${EMACS}/html_node/vip/
#
viper mono ${EMACS}/html_mono/viper.html
viper node ${EMACS}/html_node/viper/
#
woman mono ${EMACS}/html_mono/woman.html
woman node ${EMACS}/html_node/woman/
# (end emacs manuals)
easejs mono ${GS}/easejs/manual/easejs.html
easejs node ${GS}/easejs/manual/
emacs-muse node ${GS}/emacs-muse/manual/muse.html
emacs-muse node ${GS}/emacs-muse/manual/html_node/
emms node ${GS}/emms/manual/
findutils mono ${GS}/findutils/manual/html_mono/find.html
findutils node ${GS}/findutils/manual/html_node/find_html
FLEX = http://flex.sourceforge.net
flex node ${FLEX}/manual/
gama mono ${GS}/gama/manual/gama.html
gama node ${GS}/gama/manual/html_node/
GAWK = ${GS}/gawk/manual
gawk mono ${GAWK}/gawk.html
gawk node ${GAWK}/html_node/
gawkinet mono ${GAWK}/gawkinet/gawkinet.html
gawkinet node ${GAWK}/gawkinet/html_node/
gcal mono ${GS}/gcal/manual/gcal.html
gcal node ${GS}/gcal/manual/html_node/
GCC = http://gcc.gnu.org/onlinedocs
gcc node ${GCC}/gcc/
cpp node ${GCC}/cpp/
gcj node ${GCC}/gcj/
gfortran node ${GCC}/gfortran/
gnat_rm node ${GCC}/gnat_rm/
gnat_ugn_unw node ${GCC}/gnat_ugn_unw/
libgomp node ${GCC}/libgomp/
libstdc++ node ${GCC}/libstdc++/
#
gccint node ${GCC}/gccint/
cppinternals node ${GCC}/cppinternals/
gfc-internals node ${GCC}/gfc-internals/
gnat-style node ${GCC}/gnat-style/
libiberty node ${GCC}/libiberty/
GDB = http://sourceware.org/gdb/current/onlinedocs
gdb node ${GDB}/gdb/
stabs node ${GDB}/stabs/
GDBM = http://www.gnu.org.ua/software/gdbm/manual
gdbm mono ${GDBM}/gdbm.html
gdbm chapter ${GDBM}/html_chapter/
gdbm section ${GDBM}/html_section/
gdbm node ${GDBM}/html_node/
gettext mono ${GS}/gettext/manual/gettext.html
gettext node ${GS}/gettext/manual/html_node/
gforth node http://www.complang.tuwien.ac.at/forth/gforth/Docs-html/
global mono ${GS}/global/manual/global.html
gmediaserver node ${GS}/gmediaserver/manual/
gmp node http://www.gmplib.org/manual/
gnu-arch node ${GS}/gnu-arch/tutorial/
gnu-c-manual mono ${GS}/gnu-c-manual/gnu-c-manual.html
gnu-crypto node ${GS}/gnu-crypto/manual/
gnubg mono ${GS}/gnubg/manual/gnubg.html
gnubg node ${GS}/gnubg/manual/html_node/
gnubik mono ${GS}/gnubik/manual/gnubik.html
gnubik node ${GS}/gnubik/manual/html_node/
gnulib mono ${GS}/gnulib/manual/gnulib.html
gnulib node ${GS}/gnulib/manual/html_node/
GNUN = ${GS}/trans-coord/manual
gnun mono ${GNUN}/gnun/gnun.html
gnun node ${GNUN}/gnun/html_node/
web-trans mono ${GNUN}/web-trans/web-trans.html
web-trans node ${GNUN}/web-trans/html_node/
GNUPG = http://www.gnupg.org/documentation/manuals
gnupg node ${GNUPG}/gnupg/
dirmngr node ${GNUPG}/dirmngr/
gcrypt node ${GNUPG}/gcrypt/
libgcrypt node ${GNUPG}/gcrypt/
ksba node ${GNUPG}/ksba/
assuan node ${GNUPG}/assuan/
gpgme node ${GNUPG}/gpgme/
gnuprologjava node ${GS}/gnuprologjava/manual/
gnuschool mono ${GS}/gnuschool/gnuschool.html
GNUSTANDARDS = ${G}/prep
maintain mono ${GNUSTANDARDS}/maintain/maintain.html
maintain node ${GNUSTANDARDS}/maintain/html_node/
#
standards mono ${GNUSTANDARDS}/standards/standards.html
standards node ${GNUSTANDARDS}/standards/html_node/
gnutls mono http://gnutls.org/manual/gnutls.html
gnutls node http://gnutls.org/manual/html_node/
gnutls-guile mono http://gnutls.org/manual/gnutls-guile.html
gnutls-guile node http://gnutls.org/manual/gnutls-guile/
gperf mono ${GS}/gperf/manual/gperf.html
gperf node ${GS}/gperf/manual/html_node/
grep mono ${GS}/grep/manual/grep.html
grep node ${GS}/grep/manual/html_node/
groff node ${GS}/groff/manual/html_node/
GRUB = ${GS}/grub/manual
grub mono ${GRUB}/grub.html
grub node ${GRUB}/html_node/
#
multiboot mono ${GRUB}/multiboot/multiboot.html
multiboot node ${GRUB}/multiboot/html_node/
gsasl mono ${GS}/gsasl/manual/gsasl.html
gsasl node ${GS}/gsasl/manual/html_node/
gsl node ${GS}/gsl/manual/html_node/
gsrc mono ${GS}/gsrc/manual/gsrc.html
gsrc node ${GS}/gsrc/manual/html_node/
gss mono ${GS}/gss/manual/gss.html
gss node ${GS}/gss/manual/html_node/
gtypist mono ${GS}/gtypist/doc/
guile mono ${GS}/guile/manual/guile.html
guile node ${GS}/guile/manual/html_node/
guile-avahi mono http://nongnu.org/guile-avahi/doc/guile-avahi.html
GUILE_GNOME = ${GS}/guile-gnome/docs
gobject node ${GUILE_GNOME}/gobject/html/
glib node ${GUILE_GNOME}/glib/html/
atk node ${GUILE_GNOME}/atk/html/
pango node ${GUILE_GNOME}/pango/html/
pangocairo node ${GUILE_GNOME}/pangocairo/html/
gdk node ${GUILE_GNOME}/gdk/html/
gtk node ${GUILE_GNOME}/gtk/html/
libglade node ${GUILE_GNOME}/libglade/html/
gnome-vfs node ${GUILE_GNOME}/gnome-vfs/html/
libgnomecanvas node ${GUILE_GNOME}/libgnomecanvas/html/
gconf node ${GUILE_GNOME}/gconf/html/
libgnome node ${GUILE_GNOME}/libgnome/html/
libgnomeui node ${GUILE_GNOME}/libgnomeui/html/
corba node ${GUILE_GNOME}/corba/html/
clutter node ${GUILE_GNOME}/clutter/html/
clutter-glx node ${GUILE_GNOME}/clutter-glx/html/
guile-gtk node ${GS}/guile-gtk/docs/guile-gtk/
guile-rpc mono ${GS}/guile-rpc/manual/guile-rpc.html
guile-rpc node ${GS}/guile-rpc/manual/html_node/
guix mono ${GS}/guix/manual/guix.html
guix node ${GS}/guix/manual/html_node/
gv mono ${GS}/gv/manual/gv.html
gv node ${GS}/gv/manual/html_node/
gzip mono ${GS}/gzip/manual/gzip.html
gzip node ${GS}/gzip/manual/html_node/
hello mono ${GS}/hello/manual/hello.html
hello node ${GS}/hello/manual/html_node/
help2man mono ${GS}/help2man/help2man.html
idutils mono ${GS}/idutils/manual/idutils.html
idutils node ${GS}/idutils/manual/html_node/
inetutils mono ${GS}/inetutils/manual/inetutils.html
inetutils node ${GS}/inetutils/manual/html_node/
jwhois mono ${GS}/jwhois/manual/jwhois.html
jwhois node ${GS}/jwhois/manual/html_node/
libc mono ${GS}/libc/manual/html_mono/libc.html
libc node ${GS}/libc/manual/html_node/
LIBCDIO = ${GS}/libcdio
libcdio mono ${LIBCDIO}/libcdio.html
cd-text mono ${LIBCDIO}/cd-text-format.html
libextractor mono ${GS}/libextractor/manual/libextractor.html
libextractor node ${GS}/libextractor/manual/html_node/
libidn mono ${GS}/libidn/manual/libidn.html
libidn node ${GS}/libidn/manual/html_node/
librejs mono ${GS}/librejs/manual/librejs.html
librejs node ${GS}/librejs/manual/html_node/
libmatheval mono ${GS}/libmatheval/manual/libmatheval.html
LIBMICROHTTPD = ${GS}/libmicrohttpd
libmicrohttpd mono ${LIBMICROHTTPD}/manual/libmicrohttpd.html
libmicrohttpd node ${LIBMICROHTTPD}/manual/html_node/
microhttpd-tutorial mono ${LIBMICROHTTPD}/tutorial.html
libtasn1 mono ${GS}/libtasn1/manual/libtasn1.html
libtasn1 node ${GS}/libtasn1/manual/html_node/
libtool mono ${GS}/libtool/manual/libtool.html
libtool node ${GS}/libtool/manual/html_node/
lightning mono ${GS}/lightning/manual/lightning.html
lightning node ${GS}/lightning/manual/html_node/
# The stable/ url redirects immediately, but that's ok.
# The .html extension is omitted on their web site, but it works if given.
LILYPOND = http://lilypond.org/doc/stable/Documentation
lilypond-internals node ${LILYPOND}/internals/
lilypond-learning node ${LILYPOND}/learning/
lilypond-notation node ${LILYPOND}/notation/
lilypond-snippets node ${LILYPOND}/snippets/
lilypond-usage node ${LILYPOND}/usage/
lilypond-web node ${LILYPOND}/web/
music-glossary node ${LILYPOND}/music-glossary/
liquidwar6 mono ${GS}/liquidwar6/manual/liquidwar6.html
liquidwar6 node ${GS}/liquidwar6/manual/html_node/
lispintro mono ${GS}/emacs/emacs-lisp-intro/html_mono/emacs-lisp-intro.html
lispintro node ${GS}/emacs/emacs-lisp-intro/html_node/index.html
LSH = http://www.lysator.liu.se/~nisse/lsh
lsh mono ${LSH}/lsh.html
m4 mono ${GS}/m4/manual/m4.html
m4 node ${GS}/m4/manual/html_node/
mailutils mono ${GS}/mailutils/manual/mailutils.html
mailutils chapter ${GS}/mailutils/manual/html_chapter/
mailutils section ${GS}/mailutils/manual/html_section/
mailutils node ${GS}/mailutils/manual/html_node/
make mono ${GS}/make/manual/make.html
make node ${GS}/make/manual/html_node/
mdk mono ${GS}/mdk/manual/mdk.html
mdk node ${GS}/mdk/manual/html_node/
METAEXCHANGE = http://ftp.gwdg.de/pub/gnu2/iwfmdh/doc/texinfo
iwf_mh node ${METAEXCHANGE}/iwf_mh.html
scantest node ${METAEXCHANGE}/scantest.html
MIT_SCHEME = ${GS}/mit-scheme/documentation
mit-scheme-ref node ${MIT_SCHEME}/mit-scheme-ref/
mit-scheme-user node ${MIT_SCHEME}/mit-scheme-user/
sos node ${MIT_SCHEME}/mit-scheme-sos/
mit-scheme-imail node ${MIT_SCHEME}/mit-scheme-imail/
moe mono ${GS}/moe/manual/moe_manual.html
motti node ${GS}/motti/manual/
mpc node http://www.multiprecision.org/index.php?prog=mpc&page=html
mpfr mono http://www.mpfr.org/mpfr-current/mpfr.html
mtools mono ${GS}/mtools/manual/mtools.html
myserver node http://www.myserverproject.net/documentation/
nano mono http://www.nano-editor.org/dist/latest/nano.html
nettle chapter http://www.lysator.liu.se/~nisse/nettle/nettle.html
ocrad mono ${GS}/ocrad/manual/ocrad_manual.html
parted mono ${GS}/parted/manual/parted.html
parted node ${GS}/parted/manual/html_node/
pascal mono http://www.gnu-pascal.de/gpc/
# can't use pcb since url's contain dates --30nov10
perl mono ${GS}/perl/manual/perldoc-all.html
PIES = http://www.gnu.org.ua/software/pies/manual
pies mono ${PIES}/pies.html
pies chapter ${PIES}/html_chapter/
pies section ${PIES}/html_section/
pies node ${PIES}/html_node/
plotutils mono ${GS}/plotutils/manual/en/plotutils.html
plotutils node ${GS}/plotutils/manual/en/html_node/
proxyknife mono ${GS}/proxyknife/manual/proxyknife.html
proxyknife node ${GS}/proxyknife/manual/html_node/
pspp mono ${GS}/pspp/manual/pspp.html
pspp node ${GS}/pspp/manual/html_node/
pyconfigure mono ${GS}/pyconfigure/manual/pyconfigure.html
pyconfigure node ${GS}/pyconfigure/manual/html_node/
R = http://cran.r-project.org/doc/manuals
R-intro mono ${R}/R-intro.html
R-lang mono ${R}/R-lang.html
R-exts mono ${R}/R-exts.html
R-data mono ${R}/R-data.html
R-admin mono ${R}/R-admin.html
R-ints mono ${R}/R-ints.html
rcs mono ${GS}/rcs/manual/rcs.html
rcs node ${GS}/rcs/manual/html_node/
READLINE = http://cnswww.cns.cwru.edu/php/chet/readline
readline mono ${READLINE}/readline.html
rluserman mono ${READLINE}/rluserman.html
history mono ${READLINE}/history.html
recode mono http://recode.progiciels-bpi.ca/manual/index.html
recutils mono ${GS}/recutils/manual/recutils.html
recutils node ${GS}/recutils/manual/html_node/
reftex mono ${GS}/auctex/manual/reftex.html
reftex node ${GS}/auctex/manual/reftex/
remotecontrol mono ${GS}/remotecontrol/manual/remotecontrol.html
remotecontrol node ${GS}/remotecontrol/manual/html_node/
rottlog mono ${GS}/rottlog/manual/rottlog.html
rottlog node ${GS}/rottlog/manual/html_node/
RUSH = http://www.gnu.org.ua/software/rush/manual
rush mono ${RUSH}/rush.html
rush chapter ${RUSH}/html_chapter/
rush section ${RUSH}/html_section/
rush node ${RUSH}/html_node/
screen mono ${GS}/screen/manual/screen.html
screen node ${GS}/screen/manual/html_node/
sed mono ${GS}/sed/manual/sed.html
sed node ${GS}/sed/manual/html_node/
sharutils mono ${GS}/sharutils/manual/html_mono/sharutils.html
sharutils chapter ${GS}/sharutils/manual/html_chapter/
sharutils node ${GS}/sharutils/manual/html_node/
shepherd mono ${GS}/shepherd/manual/shepherd.html
shepherd node ${GS}/shepherd/manual/html_node/
# can't use mono files since they have generic names
SMALLTALK = ${GS}/smalltalk
smalltalk node ${SMALLTALK}/manual/html_node/
smalltalk-base node ${SMALLTALK}/manual-base/html_node/
smalltalk-libs node ${SMALLTALK}/manual-libs/html_node/
sourceinstall mono ${GS}/sourceinstall/manual/sourceinstall.html
sourceinstall node ${GS}/sourceinstall/manual/html_node/
sqltutor mono ${GS}/sqltutor/manual/sqltutor.html
sqltutor node ${GS}/sqltutor/manual/html_node/
src-highlite mono ${GS}/src-highlite/source-highlight.html
swbis mono ${GS}/swbis/manual.html
tar mono ${GS}/tar/manual/tar.html
tar chapter ${GS}/tar/manual/html_chapter/
tar section ${GS}/tar/manual/html_section/
tar node ${GS}/autoconf/manual/html_node/
teseq mono ${GS}/teseq/teseq.html
teseq node ${GS}/teseq/html_node/
TEXINFO = ${GS}/texinfo/manual
texinfo mono ${TEXINFO}/texinfo/texinfo.html
texinfo node ${TEXINFO}/texinfo/html_node/
#
info mono ${TEXINFO}/info/info.html
info node ${TEXINFO}/info/html_node/
#
info-stnd mono ${TEXINFO}/info-stnd/info-stnd.html
info-stnd node ${TEXINFO}/info-stnd/html_node/
thales node ${GS}/thales/manual/
units mono ${GS}/units/manual/units.html
units node ${GS}/units/manual/html_node/
vc-dwim mono ${GS}/vc-dwim/manual/vc-dwim.html
vc-dwim node ${GS}/vc-dwim/manual/html_node/
wdiff mono ${GS}/wdiff/manual/wdiff.html
wdiff node ${GS}/wdiff/manual/html_node/
websocket4j mono ${GS}/websocket4j/manual/websocket4j.html
websocket4j node ${GS}/websocket4j/manual/html_node/
wget mono ${GS}/wget/manual/wget.html
wget node ${GS}/wget/manual/html_node/
xboard mono ${GS}/xboard/manual/xboard.html
xboard node ${GS}/xboard/manual/html_node/
# emacs-page
# Free TeX-related Texinfo manuals on tug.org.
T = http://tug.org/texinfohtml
dvipng mono ${T}/dvipng.html
dvips mono ${T}/dvips.html
eplain mono ${T}/eplain.html
kpathsea mono ${T}/kpathsea.html
latex2e mono ${T}/latex2e.html
tlbuild mono ${T}/tlbuild.html
web2c mono ${T}/web2c.html
# Local Variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "htmlxrefversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:
-105
View File
@@ -1,105 +0,0 @@
digraph "Guix bag" {
"/gnu/store/rkm2xr9581hfvcimz6a8xav2s5vfjciv-glibc-intermediate-2.22.drv" [label = "glibc-intermediate-2.22", shape = box, fontname = Helvetica];
"/gnu/store/rkm2xr9581hfvcimz6a8xav2s5vfjciv-glibc-intermediate-2.22.drv" -> "/gnu/store/r5bbwfhkj6c65mlfki4vgb0xczm3qmlg-texinfo-6.0.drv" [color = red];
"/gnu/store/rkm2xr9581hfvcimz6a8xav2s5vfjciv-glibc-intermediate-2.22.drv" -> "/gnu/store/w88h2mp610hy4i8758bhq6nrjlilzsym-perl-boot0-5.22.0.drv" [color = red];
"/gnu/store/rkm2xr9581hfvcimz6a8xav2s5vfjciv-glibc-intermediate-2.22.drv" -> "/gnu/store/fxzy6h3c9ls97lw9wgv9m5w2ga7mw0kk-gcc-cross-boot0-4.9.3.drv" [color = red];
"/gnu/store/rkm2xr9581hfvcimz6a8xav2s5vfjciv-glibc-intermediate-2.22.drv" -> "/gnu/store/bhv3jml5s1llmsswnw3wvw57dj44lgjc-binutils-cross-boot0-2.25.1.drv" [color = red];
"/gnu/store/rkm2xr9581hfvcimz6a8xav2s5vfjciv-glibc-intermediate-2.22.drv" -> "/gnu/store/yzr9lpl44ixp4k2g7r6sh4fhsx2qx9vd-make-boot0-4.1.drv" [color = red];
"/gnu/store/rkm2xr9581hfvcimz6a8xav2s5vfjciv-glibc-intermediate-2.22.drv" -> "/gnu/store/hwk4rrydk5amqw5xws5p34gi77j0m7m2-diffutils-boot0-3.3.drv" [color = red];
"/gnu/store/rkm2xr9581hfvcimz6a8xav2s5vfjciv-glibc-intermediate-2.22.drv" -> "/gnu/store/xf07iqpsiygw2z8rvwdf19zjdlhrl03q-findutils-boot0-4.6.0.drv" [color = red];
"/gnu/store/rkm2xr9581hfvcimz6a8xav2s5vfjciv-glibc-intermediate-2.22.drv" -> "/gnu/store/b33cj0h9ii7lnk233sy5q4hlz36cx5x3-file-boot0-5.25.drv" [color = red];
"/gnu/store/rkm2xr9581hfvcimz6a8xav2s5vfjciv-glibc-intermediate-2.22.drv" -> "/gnu/store/dmj22s341y334xwwkimrz4d3d0a4mzdp-glibc-bootstrap-0.drv" [color = red];
"/gnu/store/rkm2xr9581hfvcimz6a8xav2s5vfjciv-glibc-intermediate-2.22.drv" -> "/gnu/store/wp4gm50d3jyzxr9pj5b43j05ildh4mfq-gcc-bootstrap-0.drv" [color = red];
"/gnu/store/rkm2xr9581hfvcimz6a8xav2s5vfjciv-glibc-intermediate-2.22.drv" -> "/gnu/store/xyzv7w42bxs5zhs6b5a9s7gbiq571psm-bootstrap-binaries-0.drv" [color = red];
"/gnu/store/rkm2xr9581hfvcimz6a8xav2s5vfjciv-glibc-intermediate-2.22.drv" -> "/gnu/store/xyzv7w42bxs5zhs6b5a9s7gbiq571psm-bootstrap-binaries-0.drv" [color = red];
"/gnu/store/rkm2xr9581hfvcimz6a8xav2s5vfjciv-glibc-intermediate-2.22.drv" -> "/gnu/store/wp4gm50d3jyzxr9pj5b43j05ildh4mfq-gcc-bootstrap-0.drv" [color = red];
"/gnu/store/rkm2xr9581hfvcimz6a8xav2s5vfjciv-glibc-intermediate-2.22.drv" -> "/gnu/store/xyzv7w42bxs5zhs6b5a9s7gbiq571psm-bootstrap-binaries-0.drv" [color = red];
"/gnu/store/rkm2xr9581hfvcimz6a8xav2s5vfjciv-glibc-intermediate-2.22.drv" -> "/gnu/store/2m0i57ad07cmgxh3ij89d4lmf7lngpdz-linux-libre-headers-3.14.37.drv" [color = red];
"/gnu/store/r5bbwfhkj6c65mlfki4vgb0xczm3qmlg-texinfo-6.0.drv" [label = "texinfo-6.0", shape = box, fontname = Helvetica];
"/gnu/store/r5bbwfhkj6c65mlfki4vgb0xczm3qmlg-texinfo-6.0.drv" -> "/gnu/store/yzr9lpl44ixp4k2g7r6sh4fhsx2qx9vd-make-boot0-4.1.drv" [color = red];
"/gnu/store/r5bbwfhkj6c65mlfki4vgb0xczm3qmlg-texinfo-6.0.drv" -> "/gnu/store/hwk4rrydk5amqw5xws5p34gi77j0m7m2-diffutils-boot0-3.3.drv" [color = red];
"/gnu/store/r5bbwfhkj6c65mlfki4vgb0xczm3qmlg-texinfo-6.0.drv" -> "/gnu/store/xf07iqpsiygw2z8rvwdf19zjdlhrl03q-findutils-boot0-4.6.0.drv" [color = red];
"/gnu/store/r5bbwfhkj6c65mlfki4vgb0xczm3qmlg-texinfo-6.0.drv" -> "/gnu/store/b33cj0h9ii7lnk233sy5q4hlz36cx5x3-file-boot0-5.25.drv" [color = red];
"/gnu/store/r5bbwfhkj6c65mlfki4vgb0xczm3qmlg-texinfo-6.0.drv" -> "/gnu/store/dmj22s341y334xwwkimrz4d3d0a4mzdp-glibc-bootstrap-0.drv" [color = red];
"/gnu/store/r5bbwfhkj6c65mlfki4vgb0xczm3qmlg-texinfo-6.0.drv" -> "/gnu/store/wp4gm50d3jyzxr9pj5b43j05ildh4mfq-gcc-bootstrap-0.drv" [color = red];
"/gnu/store/r5bbwfhkj6c65mlfki4vgb0xczm3qmlg-texinfo-6.0.drv" -> "/gnu/store/sd2k1ljlzpkp3n5rk5y3dp2l73h3qkpp-binutils-bootstrap-0.drv" [color = red];
"/gnu/store/r5bbwfhkj6c65mlfki4vgb0xczm3qmlg-texinfo-6.0.drv" -> "/gnu/store/xyzv7w42bxs5zhs6b5a9s7gbiq571psm-bootstrap-binaries-0.drv" [color = red];
"/gnu/store/r5bbwfhkj6c65mlfki4vgb0xczm3qmlg-texinfo-6.0.drv" -> "/gnu/store/xyzv7w42bxs5zhs6b5a9s7gbiq571psm-bootstrap-binaries-0.drv" [color = red];
"/gnu/store/r5bbwfhkj6c65mlfki4vgb0xczm3qmlg-texinfo-6.0.drv" -> "/gnu/store/w88h2mp610hy4i8758bhq6nrjlilzsym-perl-boot0-5.22.0.drv" [color = red];
"/gnu/store/yzr9lpl44ixp4k2g7r6sh4fhsx2qx9vd-make-boot0-4.1.drv" [label = "make-boot0-4.1", shape = box, fontname = Helvetica];
"/gnu/store/yzr9lpl44ixp4k2g7r6sh4fhsx2qx9vd-make-boot0-4.1.drv" -> "/gnu/store/dmj22s341y334xwwkimrz4d3d0a4mzdp-glibc-bootstrap-0.drv" [color = red];
"/gnu/store/yzr9lpl44ixp4k2g7r6sh4fhsx2qx9vd-make-boot0-4.1.drv" -> "/gnu/store/wp4gm50d3jyzxr9pj5b43j05ildh4mfq-gcc-bootstrap-0.drv" [color = red];
"/gnu/store/yzr9lpl44ixp4k2g7r6sh4fhsx2qx9vd-make-boot0-4.1.drv" -> "/gnu/store/sd2k1ljlzpkp3n5rk5y3dp2l73h3qkpp-binutils-bootstrap-0.drv" [color = red];
"/gnu/store/yzr9lpl44ixp4k2g7r6sh4fhsx2qx9vd-make-boot0-4.1.drv" -> "/gnu/store/xyzv7w42bxs5zhs6b5a9s7gbiq571psm-bootstrap-binaries-0.drv" [color = red];
"/gnu/store/yzr9lpl44ixp4k2g7r6sh4fhsx2qx9vd-make-boot0-4.1.drv" -> "/gnu/store/xyzv7w42bxs5zhs6b5a9s7gbiq571psm-bootstrap-binaries-0.drv" [color = red];
"/gnu/store/dmj22s341y334xwwkimrz4d3d0a4mzdp-glibc-bootstrap-0.drv" [label = "glibc-bootstrap-0", shape = box, fontname = Helvetica];
"/gnu/store/wp4gm50d3jyzxr9pj5b43j05ildh4mfq-gcc-bootstrap-0.drv" [label = "gcc-bootstrap-0", shape = box, fontname = Helvetica];
"/gnu/store/wp4gm50d3jyzxr9pj5b43j05ildh4mfq-gcc-bootstrap-0.drv" -> "/gnu/store/dmj22s341y334xwwkimrz4d3d0a4mzdp-glibc-bootstrap-0.drv" [color = red];
"/gnu/store/sd2k1ljlzpkp3n5rk5y3dp2l73h3qkpp-binutils-bootstrap-0.drv" [label = "binutils-bootstrap-0", shape = box, fontname = Helvetica];
"/gnu/store/xyzv7w42bxs5zhs6b5a9s7gbiq571psm-bootstrap-binaries-0.drv" [label = "bootstrap-binaries-0", shape = box, fontname = Helvetica];
"/gnu/store/hwk4rrydk5amqw5xws5p34gi77j0m7m2-diffutils-boot0-3.3.drv" [label = "diffutils-boot0-3.3", shape = box, fontname = Helvetica];
"/gnu/store/hwk4rrydk5amqw5xws5p34gi77j0m7m2-diffutils-boot0-3.3.drv" -> "/gnu/store/yzr9lpl44ixp4k2g7r6sh4fhsx2qx9vd-make-boot0-4.1.drv" [color = red];
"/gnu/store/hwk4rrydk5amqw5xws5p34gi77j0m7m2-diffutils-boot0-3.3.drv" -> "/gnu/store/dmj22s341y334xwwkimrz4d3d0a4mzdp-glibc-bootstrap-0.drv" [color = red];
"/gnu/store/hwk4rrydk5amqw5xws5p34gi77j0m7m2-diffutils-boot0-3.3.drv" -> "/gnu/store/wp4gm50d3jyzxr9pj5b43j05ildh4mfq-gcc-bootstrap-0.drv" [color = red];
"/gnu/store/hwk4rrydk5amqw5xws5p34gi77j0m7m2-diffutils-boot0-3.3.drv" -> "/gnu/store/sd2k1ljlzpkp3n5rk5y3dp2l73h3qkpp-binutils-bootstrap-0.drv" [color = red];
"/gnu/store/hwk4rrydk5amqw5xws5p34gi77j0m7m2-diffutils-boot0-3.3.drv" -> "/gnu/store/xyzv7w42bxs5zhs6b5a9s7gbiq571psm-bootstrap-binaries-0.drv" [color = red];
"/gnu/store/hwk4rrydk5amqw5xws5p34gi77j0m7m2-diffutils-boot0-3.3.drv" -> "/gnu/store/xyzv7w42bxs5zhs6b5a9s7gbiq571psm-bootstrap-binaries-0.drv" [color = red];
"/gnu/store/xf07iqpsiygw2z8rvwdf19zjdlhrl03q-findutils-boot0-4.6.0.drv" [label = "findutils-boot0-4.6.0", shape = box, fontname = Helvetica];
"/gnu/store/xf07iqpsiygw2z8rvwdf19zjdlhrl03q-findutils-boot0-4.6.0.drv" -> "/gnu/store/yzr9lpl44ixp4k2g7r6sh4fhsx2qx9vd-make-boot0-4.1.drv" [color = red];
"/gnu/store/xf07iqpsiygw2z8rvwdf19zjdlhrl03q-findutils-boot0-4.6.0.drv" -> "/gnu/store/hwk4rrydk5amqw5xws5p34gi77j0m7m2-diffutils-boot0-3.3.drv" [color = red];
"/gnu/store/xf07iqpsiygw2z8rvwdf19zjdlhrl03q-findutils-boot0-4.6.0.drv" -> "/gnu/store/dmj22s341y334xwwkimrz4d3d0a4mzdp-glibc-bootstrap-0.drv" [color = red];
"/gnu/store/xf07iqpsiygw2z8rvwdf19zjdlhrl03q-findutils-boot0-4.6.0.drv" -> "/gnu/store/wp4gm50d3jyzxr9pj5b43j05ildh4mfq-gcc-bootstrap-0.drv" [color = red];
"/gnu/store/xf07iqpsiygw2z8rvwdf19zjdlhrl03q-findutils-boot0-4.6.0.drv" -> "/gnu/store/sd2k1ljlzpkp3n5rk5y3dp2l73h3qkpp-binutils-bootstrap-0.drv" [color = red];
"/gnu/store/xf07iqpsiygw2z8rvwdf19zjdlhrl03q-findutils-boot0-4.6.0.drv" -> "/gnu/store/xyzv7w42bxs5zhs6b5a9s7gbiq571psm-bootstrap-binaries-0.drv" [color = red];
"/gnu/store/xf07iqpsiygw2z8rvwdf19zjdlhrl03q-findutils-boot0-4.6.0.drv" -> "/gnu/store/xyzv7w42bxs5zhs6b5a9s7gbiq571psm-bootstrap-binaries-0.drv" [color = red];
"/gnu/store/b33cj0h9ii7lnk233sy5q4hlz36cx5x3-file-boot0-5.25.drv" [label = "file-boot0-5.25", shape = box, fontname = Helvetica];
"/gnu/store/b33cj0h9ii7lnk233sy5q4hlz36cx5x3-file-boot0-5.25.drv" -> "/gnu/store/yzr9lpl44ixp4k2g7r6sh4fhsx2qx9vd-make-boot0-4.1.drv" [color = red];
"/gnu/store/b33cj0h9ii7lnk233sy5q4hlz36cx5x3-file-boot0-5.25.drv" -> "/gnu/store/dmj22s341y334xwwkimrz4d3d0a4mzdp-glibc-bootstrap-0.drv" [color = red];
"/gnu/store/b33cj0h9ii7lnk233sy5q4hlz36cx5x3-file-boot0-5.25.drv" -> "/gnu/store/wp4gm50d3jyzxr9pj5b43j05ildh4mfq-gcc-bootstrap-0.drv" [color = red];
"/gnu/store/b33cj0h9ii7lnk233sy5q4hlz36cx5x3-file-boot0-5.25.drv" -> "/gnu/store/sd2k1ljlzpkp3n5rk5y3dp2l73h3qkpp-binutils-bootstrap-0.drv" [color = red];
"/gnu/store/b33cj0h9ii7lnk233sy5q4hlz36cx5x3-file-boot0-5.25.drv" -> "/gnu/store/xyzv7w42bxs5zhs6b5a9s7gbiq571psm-bootstrap-binaries-0.drv" [color = red];
"/gnu/store/b33cj0h9ii7lnk233sy5q4hlz36cx5x3-file-boot0-5.25.drv" -> "/gnu/store/xyzv7w42bxs5zhs6b5a9s7gbiq571psm-bootstrap-binaries-0.drv" [color = red];
"/gnu/store/w88h2mp610hy4i8758bhq6nrjlilzsym-perl-boot0-5.22.0.drv" [label = "perl-boot0-5.22.0", shape = box, fontname = Helvetica];
"/gnu/store/w88h2mp610hy4i8758bhq6nrjlilzsym-perl-boot0-5.22.0.drv" -> "/gnu/store/yzr9lpl44ixp4k2g7r6sh4fhsx2qx9vd-make-boot0-4.1.drv" [color = red];
"/gnu/store/w88h2mp610hy4i8758bhq6nrjlilzsym-perl-boot0-5.22.0.drv" -> "/gnu/store/hwk4rrydk5amqw5xws5p34gi77j0m7m2-diffutils-boot0-3.3.drv" [color = red];
"/gnu/store/w88h2mp610hy4i8758bhq6nrjlilzsym-perl-boot0-5.22.0.drv" -> "/gnu/store/xf07iqpsiygw2z8rvwdf19zjdlhrl03q-findutils-boot0-4.6.0.drv" [color = red];
"/gnu/store/w88h2mp610hy4i8758bhq6nrjlilzsym-perl-boot0-5.22.0.drv" -> "/gnu/store/b33cj0h9ii7lnk233sy5q4hlz36cx5x3-file-boot0-5.25.drv" [color = red];
"/gnu/store/w88h2mp610hy4i8758bhq6nrjlilzsym-perl-boot0-5.22.0.drv" -> "/gnu/store/dmj22s341y334xwwkimrz4d3d0a4mzdp-glibc-bootstrap-0.drv" [color = red];
"/gnu/store/w88h2mp610hy4i8758bhq6nrjlilzsym-perl-boot0-5.22.0.drv" -> "/gnu/store/wp4gm50d3jyzxr9pj5b43j05ildh4mfq-gcc-bootstrap-0.drv" [color = red];
"/gnu/store/w88h2mp610hy4i8758bhq6nrjlilzsym-perl-boot0-5.22.0.drv" -> "/gnu/store/sd2k1ljlzpkp3n5rk5y3dp2l73h3qkpp-binutils-bootstrap-0.drv" [color = red];
"/gnu/store/w88h2mp610hy4i8758bhq6nrjlilzsym-perl-boot0-5.22.0.drv" -> "/gnu/store/xyzv7w42bxs5zhs6b5a9s7gbiq571psm-bootstrap-binaries-0.drv" [color = red];
"/gnu/store/w88h2mp610hy4i8758bhq6nrjlilzsym-perl-boot0-5.22.0.drv" -> "/gnu/store/xyzv7w42bxs5zhs6b5a9s7gbiq571psm-bootstrap-binaries-0.drv" [color = red];
"/gnu/store/fxzy6h3c9ls97lw9wgv9m5w2ga7mw0kk-gcc-cross-boot0-4.9.3.drv" [label = "gcc-cross-boot0-4.9.3", shape = box, fontname = Helvetica];
"/gnu/store/fxzy6h3c9ls97lw9wgv9m5w2ga7mw0kk-gcc-cross-boot0-4.9.3.drv" -> "/gnu/store/bhv3jml5s1llmsswnw3wvw57dj44lgjc-binutils-cross-boot0-2.25.1.drv" [color = red];
"/gnu/store/fxzy6h3c9ls97lw9wgv9m5w2ga7mw0kk-gcc-cross-boot0-4.9.3.drv" -> "/gnu/store/dmj22s341y334xwwkimrz4d3d0a4mzdp-glibc-bootstrap-0.drv" [color = red];
"/gnu/store/fxzy6h3c9ls97lw9wgv9m5w2ga7mw0kk-gcc-cross-boot0-4.9.3.drv" -> "/gnu/store/yzr9lpl44ixp4k2g7r6sh4fhsx2qx9vd-make-boot0-4.1.drv" [color = red];
"/gnu/store/fxzy6h3c9ls97lw9wgv9m5w2ga7mw0kk-gcc-cross-boot0-4.9.3.drv" -> "/gnu/store/hwk4rrydk5amqw5xws5p34gi77j0m7m2-diffutils-boot0-3.3.drv" [color = red];
"/gnu/store/fxzy6h3c9ls97lw9wgv9m5w2ga7mw0kk-gcc-cross-boot0-4.9.3.drv" -> "/gnu/store/xf07iqpsiygw2z8rvwdf19zjdlhrl03q-findutils-boot0-4.6.0.drv" [color = red];
"/gnu/store/fxzy6h3c9ls97lw9wgv9m5w2ga7mw0kk-gcc-cross-boot0-4.9.3.drv" -> "/gnu/store/b33cj0h9ii7lnk233sy5q4hlz36cx5x3-file-boot0-5.25.drv" [color = red];
"/gnu/store/fxzy6h3c9ls97lw9wgv9m5w2ga7mw0kk-gcc-cross-boot0-4.9.3.drv" -> "/gnu/store/wp4gm50d3jyzxr9pj5b43j05ildh4mfq-gcc-bootstrap-0.drv" [color = red];
"/gnu/store/fxzy6h3c9ls97lw9wgv9m5w2ga7mw0kk-gcc-cross-boot0-4.9.3.drv" -> "/gnu/store/sd2k1ljlzpkp3n5rk5y3dp2l73h3qkpp-binutils-bootstrap-0.drv" [color = red];
"/gnu/store/fxzy6h3c9ls97lw9wgv9m5w2ga7mw0kk-gcc-cross-boot0-4.9.3.drv" -> "/gnu/store/xyzv7w42bxs5zhs6b5a9s7gbiq571psm-bootstrap-binaries-0.drv" [color = red];
"/gnu/store/fxzy6h3c9ls97lw9wgv9m5w2ga7mw0kk-gcc-cross-boot0-4.9.3.drv" -> "/gnu/store/xyzv7w42bxs5zhs6b5a9s7gbiq571psm-bootstrap-binaries-0.drv" [color = red];
"/gnu/store/bhv3jml5s1llmsswnw3wvw57dj44lgjc-binutils-cross-boot0-2.25.1.drv" [label = "binutils-cross-boot0-2.25.1", shape = box, fontname = Helvetica];
"/gnu/store/bhv3jml5s1llmsswnw3wvw57dj44lgjc-binutils-cross-boot0-2.25.1.drv" -> "/gnu/store/yzr9lpl44ixp4k2g7r6sh4fhsx2qx9vd-make-boot0-4.1.drv" [color = red];
"/gnu/store/bhv3jml5s1llmsswnw3wvw57dj44lgjc-binutils-cross-boot0-2.25.1.drv" -> "/gnu/store/hwk4rrydk5amqw5xws5p34gi77j0m7m2-diffutils-boot0-3.3.drv" [color = red];
"/gnu/store/bhv3jml5s1llmsswnw3wvw57dj44lgjc-binutils-cross-boot0-2.25.1.drv" -> "/gnu/store/xf07iqpsiygw2z8rvwdf19zjdlhrl03q-findutils-boot0-4.6.0.drv" [color = red];
"/gnu/store/bhv3jml5s1llmsswnw3wvw57dj44lgjc-binutils-cross-boot0-2.25.1.drv" -> "/gnu/store/b33cj0h9ii7lnk233sy5q4hlz36cx5x3-file-boot0-5.25.drv" [color = red];
"/gnu/store/bhv3jml5s1llmsswnw3wvw57dj44lgjc-binutils-cross-boot0-2.25.1.drv" -> "/gnu/store/dmj22s341y334xwwkimrz4d3d0a4mzdp-glibc-bootstrap-0.drv" [color = red];
"/gnu/store/bhv3jml5s1llmsswnw3wvw57dj44lgjc-binutils-cross-boot0-2.25.1.drv" -> "/gnu/store/wp4gm50d3jyzxr9pj5b43j05ildh4mfq-gcc-bootstrap-0.drv" [color = red];
"/gnu/store/bhv3jml5s1llmsswnw3wvw57dj44lgjc-binutils-cross-boot0-2.25.1.drv" -> "/gnu/store/sd2k1ljlzpkp3n5rk5y3dp2l73h3qkpp-binutils-bootstrap-0.drv" [color = red];
"/gnu/store/bhv3jml5s1llmsswnw3wvw57dj44lgjc-binutils-cross-boot0-2.25.1.drv" -> "/gnu/store/xyzv7w42bxs5zhs6b5a9s7gbiq571psm-bootstrap-binaries-0.drv" [color = red];
"/gnu/store/bhv3jml5s1llmsswnw3wvw57dj44lgjc-binutils-cross-boot0-2.25.1.drv" -> "/gnu/store/xyzv7w42bxs5zhs6b5a9s7gbiq571psm-bootstrap-binaries-0.drv" [color = red];
"/gnu/store/2m0i57ad07cmgxh3ij89d4lmf7lngpdz-linux-libre-headers-3.14.37.drv" [label = "linux-libre-headers-3.14.37", shape = box, fontname = Helvetica];
"/gnu/store/2m0i57ad07cmgxh3ij89d4lmf7lngpdz-linux-libre-headers-3.14.37.drv" -> "/gnu/store/w88h2mp610hy4i8758bhq6nrjlilzsym-perl-boot0-5.22.0.drv" [color = red];
"/gnu/store/2m0i57ad07cmgxh3ij89d4lmf7lngpdz-linux-libre-headers-3.14.37.drv" -> "/gnu/store/yzr9lpl44ixp4k2g7r6sh4fhsx2qx9vd-make-boot0-4.1.drv" [color = red];
"/gnu/store/2m0i57ad07cmgxh3ij89d4lmf7lngpdz-linux-libre-headers-3.14.37.drv" -> "/gnu/store/hwk4rrydk5amqw5xws5p34gi77j0m7m2-diffutils-boot0-3.3.drv" [color = red];
"/gnu/store/2m0i57ad07cmgxh3ij89d4lmf7lngpdz-linux-libre-headers-3.14.37.drv" -> "/gnu/store/xf07iqpsiygw2z8rvwdf19zjdlhrl03q-findutils-boot0-4.6.0.drv" [color = red];
"/gnu/store/2m0i57ad07cmgxh3ij89d4lmf7lngpdz-linux-libre-headers-3.14.37.drv" -> "/gnu/store/b33cj0h9ii7lnk233sy5q4hlz36cx5x3-file-boot0-5.25.drv" [color = red];
"/gnu/store/2m0i57ad07cmgxh3ij89d4lmf7lngpdz-linux-libre-headers-3.14.37.drv" -> "/gnu/store/dmj22s341y334xwwkimrz4d3d0a4mzdp-glibc-bootstrap-0.drv" [color = red];
"/gnu/store/2m0i57ad07cmgxh3ij89d4lmf7lngpdz-linux-libre-headers-3.14.37.drv" -> "/gnu/store/wp4gm50d3jyzxr9pj5b43j05ildh4mfq-gcc-bootstrap-0.drv" [color = red];
"/gnu/store/2m0i57ad07cmgxh3ij89d4lmf7lngpdz-linux-libre-headers-3.14.37.drv" -> "/gnu/store/sd2k1ljlzpkp3n5rk5y3dp2l73h3qkpp-binutils-bootstrap-0.drv" [color = red];
"/gnu/store/2m0i57ad07cmgxh3ij89d4lmf7lngpdz-linux-libre-headers-3.14.37.drv" -> "/gnu/store/xyzv7w42bxs5zhs6b5a9s7gbiq571psm-bootstrap-binaries-0.drv" [color = red];
"/gnu/store/2m0i57ad07cmgxh3ij89d4lmf7lngpdz-linux-libre-headers-3.14.37.drv" -> "/gnu/store/xyzv7w42bxs5zhs6b5a9s7gbiq571psm-bootstrap-binaries-0.drv" [color = red];
}
@@ -1,4 +1,4 @@
digraph "Guix shepherd-service" {
digraph "Guix dmd-service" {
"user-file-systems" [label = "user-file-systems", shape = box, fontname = Helvetica];
"user-processes" -> "user-file-systems" [color = red];
"user-processes" [label = "user-processes", shape = box, fontname = Helvetica];
+8 -13
View File
@@ -1,20 +1,18 @@
digraph "Service Type Dependencies" {
shepherd [shape = box, fontname = Helvetica];
dmd [shape = box, fontname = Helvetica];
pam [shape = box, fontname = Helvetica];
etc [shape = box, fontname = Helvetica];
profile [shape = box, fontname = Helvetica];
accounts [shape = box, fontname = Helvetica];
activation [shape = box, fontname = Helvetica];
boot [shape = box, fontname = Helvetica];
system [shape = house, fontname = Helvetica];
lshd -> shepherd;
boot [shape = house, fontname = Helvetica];
lshd -> dmd;
lshd -> pam;
udev -> shepherd;
nscd -> shepherd [label = "extends"];
udev -> dmd;
nscd -> dmd [label = "extends"];
"nss-mdns" -> nscd;
"kvm-rules" -> udev;
colord -> udev;
dbus -> shepherd;
dbus -> dmd;
colord -> dbus;
upower -> udev;
upower -> dbus;
@@ -23,7 +21,7 @@ digraph "Service Type Dependencies" {
elogind -> dbus;
elogind -> udev;
elogind -> polkit [label = "extends"];
shepherd -> boot;
dmd -> boot;
colord -> accounts;
accounts -> activation;
accounts -> etc;
@@ -31,10 +29,7 @@ digraph "Service Type Dependencies" {
activation -> boot;
pam -> etc;
elogind -> pam;
guix -> shepherd;
guix -> dmd;
guix -> activation;
guix -> accounts;
boot -> system;
etc -> system;
profile -> system;
}
-157
View File
@@ -1,157 +0,0 @@
# GNU Guix --- Functional package management for GNU
# Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
# Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
# Copyright © 2013 Andreas Enge <andreas@enge.fr>
# Copyright © 2016 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
# Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
#
# 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/>.
info_TEXINFOS = %D%/guix.texi
DOT_FILES = \
%D%/images/bootstrap-graph.dot \
%D%/images/bootstrap-packages.dot \
%D%/images/coreutils-graph.dot \
%D%/images/coreutils-bag-graph.dot \
%D%/images/service-graph.dot \
%D%/images/shepherd-graph.dot
DOT_VECTOR_GRAPHICS = \
$(DOT_FILES:%.dot=%.eps) \
$(DOT_FILES:%.dot=%.pdf)
EXTRA_DIST += \
%D%/htmlxref.cnf \
%D%/contributing.texi \
%D%/emacs.texi \
%D%/fdl-1.3.texi \
$(DOT_FILES) \
$(DOT_VECTOR_GRAPHICS) \
%D%/images/coreutils-size-map.eps \
%D%/environment-gdb.scm \
%D%/package-hello.scm
OS_CONFIG_EXAMPLES_TEXI = \
%D%/os-config-bare-bones.texi \
%D%/os-config-desktop.texi \
%D%/os-config-lightweight-desktop.texi
# Bundle this file so that makeinfo finds it in out-of-source-tree builds.
BUILT_SOURCES += $(OS_CONFIG_EXAMPLES_TEXI)
EXTRA_DIST += $(OS_CONFIG_EXAMPLES_TEXI)
MAINTAINERCLEANFILES = $(OS_CONFIG_EXAMPLES_TEXI)
%D%/os-config-%.texi: gnu/system/examples/%.tmpl
$(AM_V_GEN)$(MKDIR_P) "`dirname $@`"; \
cp "$<" "$@"
infoimagedir = $(infodir)/images
dist_infoimage_DATA = \
$(DOT_FILES:%.dot=%.png) \
%D%/images/coreutils-size-map.png
# Try hard to obtain an image size and aspect that's reasonable for inclusion
# in an Info or PDF document.
DOT_OPTIONS = \
-Gratio=.9 -Gnodesep=.005 -Granksep=.00005 \
-Nfontsize=9 -Nheight=.1 -Nwidth=.1
.dot.png:
$(AM_V_DOT)$(DOT) -Tpng $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \
mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
.dot.pdf:
$(AM_V_DOT)$(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \
mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
.dot.eps:
$(AM_V_DOT)$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"; \
mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
.png.eps:
$(AM_V_GEN)convert "$<" "$@-tmp.eps"; \
mv "$@-tmp.eps" "$@"
# We cannot add new dependencies to `%D%/guix.pdf' & co. (info "(automake)
# Extending"). Using the `-local' rules is imperfect, because they may be
# triggered after the main rule. Oh, well.
pdf-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.pdf)
info-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.png)
ps-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.eps) \
$(top_srcdir)/%D%/images/coreutils-size-map.eps
dvi-local: ps-local
## ----------- ##
## Man pages. ##
## ----------- ##
# The man pages are generated using GNU Help2man. In makefiles rules they
# depend not on the binary, but on the source files. This usage allows a
# manual page to be generated by the maintainer and included in the
# distribution without requiring the end-user to have 'help2man' installed.
# They are built in $(srcdir) like info manuals.
sub_commands_mans = \
$(srcdir)/%D%/guix-archive.1 \
$(srcdir)/%D%/guix-build.1 \
$(srcdir)/%D%/guix-challenge.1 \
$(srcdir)/%D%/guix-download.1 \
$(srcdir)/%D%/guix-edit.1 \
$(srcdir)/%D%/guix-environment.1 \
$(srcdir)/%D%/guix-gc.1 \
$(srcdir)/%D%/guix-hash.1 \
$(srcdir)/%D%/guix-import.1 \
$(srcdir)/%D%/guix-lint.1 \
$(srcdir)/%D%/guix-package.1 \
$(srcdir)/%D%/guix-publish.1 \
$(srcdir)/%D%/guix-pull.1 \
$(srcdir)/%D%/guix-refresh.1 \
$(srcdir)/%D%/guix-size.1 \
$(srcdir)/%D%/guix-system.1
dist_man1_MANS = \
$(srcdir)/%D%/guix.1 \
$(sub_commands_mans)
gen_man = \
LANGUAGE= $(top_builddir)/pre-inst-env $(HELP2MAN) \
$(HELP2MANFLAGS)
HELP2MANFLAGS = --source=GNU --info-page=$(PACKAGE_TARNAME)
$(srcdir)/%D%/guix.1: scripts/guix.in $(sub_commands_mans)
-$(AM_V_HELP2MAN)$(gen_man) --output="$@" `basename "$@" .1`
# The 'case' ensures the man pages are only generated if the corresponding
# source script (the first prerequisite) has been changed. The $(GOBJECTS)
# prerequisite is solely meant to force these docs to be made only after all
# Guile modules have been compiled.
$(srcdir)/%D%/guix-%.1: guix/scripts/%.scm $(GOBJECTS)
-@case '$?' in \
*$<*) $(AM_V_P) && set -x || echo " HELP2MAN $@"; \
$(gen_man) --output="$@" "guix $*";; \
*) : ;; \
esac
if BUILD_DAEMON
dist_man1_MANS += $(srcdir)/%D%/guix-daemon.1
$(srcdir)/%D%/guix-daemon.1: nix/nix-daemon/guix-daemon.cc
-$(AM_V_HELP2MAN)$(gen_man) --output="$@" `basename "$@" .1`
endif
+61
View File
@@ -0,0 +1,61 @@
# GNU Guix --- Functional package management for GNU
# Copyright © 2014, 2015 Alex Kost <alezost@gmail.com>
#
# 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/>.
AUTOLOADS = emacs/guix-autoloads.el
ELFILES = \
emacs/guix-backend.el \
emacs/guix-base.el \
emacs/guix-build-log.el \
emacs/guix-command.el \
emacs/guix-devel.el \
emacs/guix-emacs.el \
emacs/guix-external.el \
emacs/guix-geiser.el \
emacs/guix-guile.el \
emacs/guix-help-vars.el \
emacs/guix-history.el \
emacs/guix-info.el \
emacs/guix-init.el \
emacs/guix-list.el \
emacs/guix-messages.el \
emacs/guix-pcomplete.el \
emacs/guix-popup.el \
emacs/guix-prettify.el \
emacs/guix-profiles.el \
emacs/guix-read.el \
emacs/guix-utils.el \
emacs/guix.el
if HAVE_EMACS
dist_lisp_DATA = \
$(ELFILES) \
$(AUTOLOADS)
nodist_lisp_DATA = emacs/guix-config.el
$(AUTOLOADS): $(ELFILES)
$(EMACS) --batch --eval \
"(let ((backup-inhibited t) \
(generated-autoload-file \
(expand-file-name \"$(AUTOLOADS)\" \"$(srcdir)\"))) \
(update-directory-autoloads \
(expand-file-name \"emacs\" \"$(srcdir)\")))"
endif HAVE_EMACS
-37
View File
@@ -1,37 +0,0 @@
;;; guix-about.el --- Various info about Guix
;; Copyright © 2016 Alex Kost <alezost@gmail.com>
;; 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 Location as published by
;; the Free Software Foundation, either version 3 of the Location, 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 Location for more details.
;; You should have received a copy of the GNU General Public Location
;; along with this program. If not, see <http://www.gnu.org/locations/>.
;;; Commentary:
;; This file provides the code to display various info about Guix (e.g., its
;; version).
;;; Code:
(require 'guix-config)
;;;###autoload
(defun guix-version ()
"Display Guix version in the echo area."
(interactive)
(message "%s %s" guix-config-name guix-config-version))
(provide 'guix-about)
;;; guix-about.el ends here
+31 -86
View File
@@ -1,6 +1,6 @@
;;; guix-backend.el --- Making and using Guix REPL
;; Copyright © 2014, 2015, 2016 Alex Kost <alezost@gmail.com>
;; Copyright © 2014, 2015 Alex Kost <alezost@gmail.com>
;; This file is part of GNU Guix.
@@ -36,13 +36,18 @@
;; running code in the REPL (see
;; <https://github.com/jaor/geiser/issues/28>).
;;
;; If you need to use "guix.el" in another Emacs (i.e. when there is
;; a runnig "guile --listen..." REPL somewhere), you can either change
;; `guix-default-port' in that Emacs instance or set
;; `guix-use-guile-server' to t.
;;
;; Guix REPLs (unlike the usual Geiser REPLs) are not added to
;; `geiser-repl--repls' variable, and thus cannot be used for evaluating
;; while editing scm-files. The only purpose of Guix REPLs is to be an
;; intermediate between "Guix/Guile level" and "Emacs interface level".
;; That being said you can still want to use a Guix REPL while hacking
;; auxiliary scheme-files for "guix.el". You can just use
;; `geiser-connect-local' command with `guix-repl-current-socket' to
;; auxiliary scheme-files for "guix.el". You can just use "M-x
;; connect-to-guile" (connect to "localhost" and `guix-default-port') to
;; have a usual Geiser REPL with all stuff defined by "guix.el" package.
;;; Code:
@@ -53,7 +58,6 @@
(require 'guix-config)
(require 'guix-external)
(require 'guix-emacs)
(require 'guix-profiles)
(defvar guix-load-path guix-config-emacs-interface-directory
"Directory with scheme files for \"guix.el\" package.")
@@ -82,7 +86,7 @@ If you have a slow system, try to increase this time."
:type 'string
:group 'guix-repl)
(defcustom guix-after-start-repl-hook '(guix-set-directory)
(defcustom guix-after-start-repl-hook ()
"Hook called after Guix REPL is started."
:type 'hook
:group 'guix-repl)
@@ -94,24 +98,11 @@ REPL while some packages are being installed/removed in the main REPL."
:type 'boolean
:group 'guix-repl)
(defcustom guix-repl-socket-file-name-function
#'guix-repl-socket-file-name
"Function used to define a socket file name used by Guix REPL.
The function is called without arguments."
:type '(choice (function-item guix-repl-socket-file-name)
(function :tag "Other function"))
(defcustom guix-default-port 37246
"Default port used if `guix-use-guile-server' is non-nil."
:type 'integer
:group 'guix-repl)
(defcustom guix-emacs-activate-after-operation t
"Activate Emacs packages after installing.
If nil, do not load autoloads of the Emacs packages after
they are successfully installed."
:type 'boolean
:group 'guix-repl)
(defvar guix-repl-current-socket nil
"Name of a socket file used by the current Guix REPL.")
(defvar guix-repl-buffer nil
"Main Geiser REPL buffer used for communicating with Guix.
This REPL is used for processing package actions and for
@@ -129,7 +120,7 @@ This REPL is used for receiving information only if
"Hook run before executing an operation in Guix REPL.")
(defvar guix-after-repl-operation-hook
'(guix-repl-autoload-emacs-packages-maybe
'(guix-emacs-load-autoloads-maybe
guix-repl-operation-success-message)
"Hook run after executing successful operation in Guix REPL.")
@@ -144,43 +135,21 @@ This internal variable is used to define what actions should be
executed after the current operation succeeds.
See `guix-eval-in-repl' for details.")
(defun guix-repl-autoload-emacs-packages-maybe ()
"Load autoloads for Emacs packages if needed.
See `guix-emacs-activate-after-operation' for details."
(and guix-emacs-activate-after-operation
;; FIXME Since a user can work with a non-current profile (using
;; C-u before `guix-search-by-name' and other commands), emacs
;; packages can be installed to another profile, and the
;; following code will not work (i.e., the autoloads for this
;; profile will not be loaded).
(guix-emacs-autoload-packages guix-current-profile)))
(defun guix-repl-operation-success-message ()
"Message telling about successful Guix operation."
(message "Guix operation has been performed."))
(defun guix-get-guile-program (&optional socket)
(defun guix-get-guile-program (&optional internal)
"Return a value suitable for `geiser-guile-binary'."
(if (null socket)
(if (or internal
(not guix-use-guile-server))
guix-guile-program
(append (if (listp guix-guile-program)
guix-guile-program
(list guix-guile-program))
(list (concat "--listen=" socket)))))
(defun guix-repl-socket-file-name ()
"Return a name of a socket file used by Guix REPL."
(make-temp-name
(concat (file-name-as-directory temporary-file-directory)
"guix-repl-")))
(defun guix-repl-delete-socket-maybe ()
"Delete `guix-repl-current-socket' file if it exists."
(and guix-repl-current-socket
(file-exists-p guix-repl-current-socket)
(delete-file guix-repl-current-socket)))
(add-hook 'kill-emacs-hook 'guix-repl-delete-socket-maybe)
;; Guile understands "--listen=..." but not "--listen ..."
(list (concat "--listen="
(number-to-string guix-default-port))))))
(defun guix-start-process-maybe (&optional start-msg end-msg)
"Start Geiser REPL configured for Guix if needed.
@@ -207,21 +176,19 @@ display messages."
(get-buffer-process repl))
(and start-msg (message start-msg))
(setq guix-repl-operation-p nil)
(unless internal
;; Guile leaves socket file after exit, so remove it if it
;; exists (after the REPL restart).
(guix-repl-delete-socket-maybe)
(setq guix-repl-current-socket
(and guix-use-guile-server
(or guix-repl-current-socket
(funcall guix-repl-socket-file-name-function)))))
(let ((geiser-guile-binary (guix-get-guile-program
(unless internal
guix-repl-current-socket)))
(geiser-guile-init-file (unless internal guix-helper-file))
(let ((geiser-guile-binary (guix-get-guile-program internal))
(geiser-guile-init-file (or internal guix-helper-file))
(repl (get-buffer-create
(guix-get-repl-buffer-name internal))))
(guix-start-repl repl (and internal guix-repl-current-socket))
(condition-case err
(guix-start-repl repl
(and internal
(geiser-repl--read-address
"localhost" guix-default-port)))
(text-read-only
(error (concat "Couldn't start Guix REPL. Perhaps the port %s is busy.\n"
"See buffer '%s' for details")
guix-default-port (buffer-name repl))))
(set repl-var repl)
(and end-msg (message end-msg))
(unless internal
@@ -235,7 +202,7 @@ this address (it should be defined by
;; A mix of the code from `geiser-repl--start-repl' and
;; `geiser-repl--to-repl-buffer'.
(let ((impl 'guile)
(geiser-guile-load-path (cons (expand-file-name guix-load-path)
(geiser-guile-load-path (cons guix-load-path
geiser-guile-load-path))
(geiser-repl-startup-time guix-repl-startup-time))
(with-current-buffer buffer
@@ -336,28 +303,6 @@ additional internal REPL if it exists."
(interactive "P")
(geiser-repl--switch-to-buffer (guix-get-repl-buffer internal)))
;;; Guix directory
(defvar guix-directory nil
"Default directory with Guix source.
If it is not set by a user, it is set after starting Guile REPL.
This directory is used to define package locations.")
(defun guix-read-directory ()
"Return `guix-directory' or prompt for it.
This function is intended for using in `interactive' forms."
(if current-prefix-arg
(read-directory-name "Directory with Guix modules: "
guix-directory)
guix-directory))
(defun guix-set-directory ()
"Set `guix-directory' if needed."
(or guix-directory
(setq guix-directory
(guix-eval-read "%guix-dir"))))
;;; Evaluating expressions
+888 -73
View File
File diff suppressed because it is too large Load Diff
-624
View File
@@ -1,624 +0,0 @@
;;; guix-buffer.el --- Buffer interface for displaying data -*- lexical-binding: t -*-
;; Copyright © 2014, 2015 Alex Kost <alezost@gmail.com>
;; 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 this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file provides a general 'buffer' interface for displaying an
;; arbitrary data.
;;; Code:
(require 'cl-lib)
(require 'guix-history)
(require 'guix-utils)
(defvar guix-buffer-map
(let ((map (make-sparse-keymap)))
(define-key map (kbd "l") 'guix-history-back)
(define-key map (kbd "r") 'guix-history-forward)
(define-key map (kbd "g") 'revert-buffer)
(define-key map (kbd "R") 'guix-buffer-redisplay)
map)
"Parent keymap for Guix buffer modes.")
;;; Buffer item
(cl-defstruct (guix-buffer-item
(:constructor nil)
(:constructor guix-buffer-make-item
(entries buffer-type entry-type args))
(:copier nil))
entries buffer-type entry-type args)
(defvar-local guix-buffer-item nil
"Data (structure) for the current Guix buffer.
The structure consists of the following elements:
- `entries': list of the currently displayed entries.
Each element of the list is an alist with an entry data of the
following form:
((PARAM . VAL) ...)
PARAM is a name of the entry parameter.
VAL is a value of this parameter.
- `entry-type': type of the currently displayed entries.
- `buffer-type': type of the current buffer.
- `args': search arguments used to get the current entries.")
(put 'guix-buffer-item 'permanent-local t)
(defmacro guix-buffer-with-item (item &rest body)
"Evaluate BODY using buffer ITEM.
The following local variables are available inside BODY:
`%entries', `%buffer-type', `%entry-type', `%args'.
See `guix-buffer-item' for details."
(declare (indent 1) (debug t))
(let ((item-var (make-symbol "item")))
`(let ((,item-var ,item))
(let ((%entries (guix-buffer-item-entries ,item-var))
(%buffer-type (guix-buffer-item-buffer-type ,item-var))
(%entry-type (guix-buffer-item-entry-type ,item-var))
(%args (guix-buffer-item-args ,item-var)))
,@body))))
(defmacro guix-buffer-with-current-item (&rest body)
"Evaluate BODY using `guix-buffer-item'.
See `guix-buffer-with-item' for details."
(declare (indent 0) (debug t))
`(guix-buffer-with-item guix-buffer-item
,@body))
(defmacro guix-buffer-define-current-item-accessor (name)
"Define `guix-buffer-current-NAME' function to access NAME
element of `guix-buffer-item' structure.
NAME should be a symbol."
(let* ((name-str (symbol-name name))
(accessor (intern (concat "guix-buffer-item-" name-str)))
(fun-name (intern (concat "guix-buffer-current-" name-str)))
(doc (format "\
Return '%s' of the current Guix buffer.
See `guix-buffer-item' for details."
name-str)))
`(defun ,fun-name ()
,doc
(and guix-buffer-item
(,accessor guix-buffer-item)))))
(defmacro guix-buffer-define-current-item-accessors (&rest names)
"Define `guix-buffer-current-NAME' functions for NAMES.
See `guix-buffer-define-current-item-accessor' for details."
`(progn
,@(mapcar (lambda (name)
`(guix-buffer-define-current-item-accessor ,name))
names)))
(guix-buffer-define-current-item-accessors
entries entry-type buffer-type args)
(defmacro guix-buffer-define-current-args-accessor (n prefix name)
"Define `PREFIX-NAME' function to access Nth element of 'args'
field of `guix-buffer-item' structure.
PREFIX and NAME should be strings."
(let ((fun-name (intern (concat prefix "-" name)))
(doc (format "\
Return '%s' of the current Guix buffer.
'%s' is the element number %d in 'args' of `guix-buffer-item'."
name name n)))
`(defun ,fun-name ()
,doc
(nth ,n (guix-buffer-current-args)))))
(defmacro guix-buffer-define-current-args-accessors (prefix &rest names)
"Define `PREFIX-NAME' functions for NAMES.
See `guix-buffer-define-current-args-accessor' for details."
`(progn
,@(cl-loop for name in names
for i from 0
collect `(guix-buffer-define-current-args-accessor
,i ,prefix ,name))))
;;; Wrappers for defined variables
(defvar guix-buffer-data nil
"Alist with 'buffer' data.
This alist is filled by `guix-buffer-define-interface' macro.")
(defun guix-buffer-value (buffer-type entry-type symbol)
"Return SYMBOL's value for BUFFER-TYPE/ENTRY-TYPE from `guix-buffer-data'."
(symbol-value
(guix-assq-value guix-buffer-data buffer-type entry-type symbol)))
(defun guix-buffer-get-entries (buffer-type entry-type args)
"Return ENTRY-TYPE entries.
Call an appropriate 'get-entries' function from `guix-buffer'
using ARGS as its arguments."
(apply (guix-buffer-value buffer-type entry-type 'get-entries)
args))
(defun guix-buffer-mode-enable (buffer-type entry-type)
"Turn on major mode to display ENTRY-TYPE ENTRIES in BUFFER-TYPE buffer."
(funcall (guix-buffer-value buffer-type entry-type 'mode)))
(defun guix-buffer-mode-initialize (buffer-type entry-type)
"Set up the current BUFFER-TYPE buffer to display ENTRY-TYPE entries."
(let ((fun (guix-buffer-value buffer-type entry-type 'mode-init)))
(when fun
(funcall fun))))
(defun guix-buffer-insert-entries (entries buffer-type entry-type)
"Show ENTRY-TYPE ENTRIES in the current BUFFER-TYPE buffer."
(funcall (guix-buffer-value buffer-type entry-type 'insert-entries)
entries))
(defun guix-buffer-show-entries-default (entries buffer-type entry-type)
"Show ENTRY-TYPE ENTRIES in the current BUFFER-TYPE buffer."
(let ((inhibit-read-only t))
(erase-buffer)
(guix-buffer-mode-enable buffer-type entry-type)
(guix-buffer-insert-entries entries buffer-type entry-type)
(goto-char (point-min))))
(defun guix-buffer-show-entries (entries buffer-type entry-type)
"Show ENTRY-TYPE ENTRIES in the current BUFFER-TYPE buffer."
(funcall (guix-buffer-value buffer-type entry-type 'show-entries)
entries))
(defun guix-buffer-message (entries buffer-type entry-type args)
"Display a message for BUFFER-ITEM after showing entries."
(let ((fun (guix-buffer-value buffer-type entry-type 'message)))
(when fun
(apply fun entries args))))
(defun guix-buffer-name (buffer-type entry-type args)
"Return name of BUFFER-TYPE buffer for displaying ENTRY-TYPE entries."
(let ((str-or-fun (guix-buffer-value buffer-type entry-type
'buffer-name)))
(if (stringp str-or-fun)
str-or-fun
(apply str-or-fun args))))
(defun guix-buffer-param-title (buffer-type entry-type param)
"Return PARAM title for BUFFER-TYPE/ENTRY-TYPE."
(or (guix-assq-value (guix-buffer-value buffer-type entry-type 'titles)
param)
;; Fallback to a title defined in 'info' interface.
(unless (eq buffer-type 'info)
(guix-assq-value (guix-buffer-value 'info entry-type 'titles)
param))
(guix-symbol-title param)))
(defun guix-buffer-history-size (buffer-type entry-type)
"Return history size for BUFFER-TYPE/ENTRY-TYPE."
(guix-buffer-value buffer-type entry-type 'history-size))
(defun guix-buffer-revert-confirm? (buffer-type entry-type)
"Return 'revert-confirm' value for BUFFER-TYPE/ENTRY-TYPE."
(guix-buffer-value buffer-type entry-type 'revert-confirm))
;;; Displaying entries
(defun guix-buffer-display (buffer)
"Switch to a Guix BUFFER."
(pop-to-buffer buffer
'((display-buffer-reuse-window
display-buffer-same-window))))
(defun guix-buffer-history-item (buffer-item)
"Make and return a history item for displaying BUFFER-ITEM."
(list #'guix-buffer-set buffer-item))
(defun guix-buffer-set (buffer-item &optional history)
"Set up the current buffer for displaying BUFFER-ITEM.
HISTORY should be one of the following:
`nil' - do not save BUFFER-ITEM in history,
`add' - add it to history,
`replace' - replace the current history item."
(guix-buffer-with-item buffer-item
(when %entries
;; Set buffer item before showing entries, so that its value can
;; be used by the code for displaying entries.
(setq guix-buffer-item buffer-item)
(guix-buffer-show-entries %entries %buffer-type %entry-type)
(when history
(funcall (cl-ecase history
(add #'guix-history-add)
(replace #'guix-history-replace))
(guix-buffer-history-item buffer-item))))
(guix-buffer-message %entries %buffer-type %entry-type %args)))
(defun guix-buffer-display-entries-current
(entries buffer-type entry-type args &optional history)
"Show ENTRIES in the current Guix buffer.
See `guix-buffer-item' for the meaning of BUFFER-TYPE, ENTRY-TYPE
and ARGS, and `guix-buffer-set' for the meaning of HISTORY."
(let ((item (guix-buffer-make-item entries buffer-type
entry-type args)))
(guix-buffer-set item history)))
(defun guix-buffer-get-display-entries-current
(buffer-type entry-type args &optional history)
"Search for entries and show them in the current Guix buffer.
See `guix-buffer-display-entries-current' for details."
(guix-buffer-display-entries-current
(guix-buffer-get-entries buffer-type entry-type args)
buffer-type entry-type args history))
(defun guix-buffer-display-entries
(entries buffer-type entry-type args &optional history)
"Show ENTRIES in a BUFFER-TYPE buffer.
See `guix-buffer-display-entries-current' for details."
(let ((buffer (get-buffer-create
(guix-buffer-name buffer-type entry-type args))))
(with-current-buffer buffer
(guix-buffer-display-entries-current
entries buffer-type entry-type args history))
(when entries
(guix-buffer-display buffer))))
(defun guix-buffer-get-display-entries
(buffer-type entry-type args &optional history)
"Search for entries and show them in a BUFFER-TYPE buffer.
See `guix-buffer-display-entries-current' for details."
(guix-buffer-display-entries
(guix-buffer-get-entries buffer-type entry-type args)
buffer-type entry-type args history))
(defun guix-buffer-revert (_ignore-auto noconfirm)
"Update the data in the current Guix buffer.
This function is suitable for `revert-buffer-function'.
See `revert-buffer' for the meaning of NOCONFIRM."
(guix-buffer-with-current-item
(when (or noconfirm
(not (guix-buffer-revert-confirm? %buffer-type %entry-type))
(y-or-n-p "Update the current buffer? "))
(guix-buffer-get-display-entries-current
%buffer-type %entry-type %args 'replace))))
(defvar guix-buffer-after-redisplay-hook nil
"Hook run by `guix-buffer-redisplay'.
This hook is called before seting up a window position.")
(defun guix-buffer-redisplay ()
"Redisplay the current Guix buffer.
Restore the point and window positions after redisplaying.
This function does not update the buffer data, use
'\\[revert-buffer]' if you want the full update."
(interactive)
(let* ((old-point (point))
;; For simplicity, ignore an unlikely case when multiple
;; windows display the same buffer.
(window (car (get-buffer-window-list (current-buffer) nil t)))
(window-start (and window (window-start window))))
(guix-buffer-set guix-buffer-item)
(goto-char old-point)
(run-hooks 'guix-buffer-after-redisplay-hook)
(when window
(set-window-point window (point))
(set-window-start window window-start))))
(defun guix-buffer-redisplay-goto-button ()
"Redisplay the current buffer and go to the next button, if needed."
(let ((guix-buffer-after-redisplay-hook
(cons (lambda ()
(unless (button-at (point))
(forward-button 1)))
guix-buffer-after-redisplay-hook)))
(guix-buffer-redisplay)))
;;; Interface definers
(defmacro guix-define-groups (type &rest args)
"Define `guix-TYPE' and `guix-TYPE-faces' custom groups.
Remaining arguments (ARGS) should have a form [KEYWORD VALUE] ...
Optional keywords:
- `:parent-group' - name of a parent custom group.
- `:parent-faces-group' - name of a parent custom faces group.
- `:group-doc' - docstring of a `guix-TYPE' group.
- `:faces-group-doc' - docstring of a `guix-TYPE-faces' group."
(declare (indent 1))
(let* ((type-str (symbol-name type))
(prefix (concat "guix-" type-str))
(group (intern prefix))
(faces-group (intern (concat prefix "-faces"))))
(guix-keyword-args-let args
((parent-group :parent-group 'guix)
(parent-faces-group :parent-faces-group 'guix-faces)
(group-doc :group-doc
(format "Settings for '%s' buffers."
type-str))
(faces-group-doc :faces-group-doc
(format "Faces for '%s' buffers."
type-str)))
`(progn
(defgroup ,group nil
,group-doc
:group ',parent-group)
(defgroup ,faces-group nil
,faces-group-doc
:group ',group
:group ',parent-faces-group)))))
(defmacro guix-define-entry-type (entry-type &rest args)
"Define general code for ENTRY-TYPE.
See `guix-define-groups'."
(declare (indent 1))
`(guix-define-groups ,entry-type
,@args))
(defmacro guix-define-buffer-type (buffer-type &rest args)
"Define general code for BUFFER-TYPE.
See `guix-define-groups'."
(declare (indent 1))
`(guix-define-groups ,buffer-type
,@args))
(defmacro guix-buffer-define-interface (buffer-type entry-type &rest args)
"Define BUFFER-TYPE interface for displaying ENTRY-TYPE entries.
Remaining arguments (ARGS) should have a form [KEYWORD VALUE] ...
In the following description TYPE means ENTRY-TYPE-BUFFER-TYPE.
Required keywords:
- `:buffer-name' - default value of the generated
`guix-TYPE-buffer-name' variable.
- `:get-entries-function' - default value of the generated
`guix-TYPE-get-function' variable.
- `:show-entries-function' - default value of the generated
`guix-TYPE-show-function' variable.
Alternatively, if `:show-entries-function' is not specified, a
default `guix-TYPE-show-entries' will be generated, and the
following keyword should be specified instead:
- `:insert-entries-function' - default value of the generated
`guix-TYPE-insert-function' variable.
Optional keywords:
- `:message-function' - default value of the generated
`guix-TYPE-message-function' variable.
- `:titles' - default value of the generated
`guix-TYPE-titles' variable.
- `:history-size' - default value of the generated
`guix-TYPE-history-size' variable.
- `:revert-confirm?' - default value of the generated
`guix-TYPE-revert-confirm' variable.
- `:mode-name' - name (a string appeared in the mode-line) of
the generated `guix-TYPE-mode'.
- `:mode-init-function' - default value of the generated
`guix-TYPE-mode-initialize-function' variable.
- `:reduced?' - if non-nil, generate only group, faces group
and titles variable (if specified); all keywords become
optional."
(declare (indent 2))
(let* ((entry-type-str (symbol-name entry-type))
(buffer-type-str (symbol-name buffer-type))
(prefix (concat "guix-" entry-type-str "-"
buffer-type-str))
(group (intern prefix))
(faces-group (intern (concat prefix "-faces")))
(get-entries-var (intern (concat prefix "-get-function")))
(show-entries-var (intern (concat prefix "-show-function")))
(show-entries-fun (intern (concat prefix "-show-entries")))
(message-var (intern (concat prefix "-message-function")))
(buffer-name-var (intern (concat prefix "-buffer-name")))
(titles-var (intern (concat prefix "-titles")))
(history-size-var (intern (concat prefix "-history-size")))
(revert-confirm-var (intern (concat prefix "-revert-confirm"))))
(guix-keyword-args-let args
((get-entries-val :get-entries-function)
(show-entries-val :show-entries-function)
(insert-entries-val :insert-entries-function)
(mode-name :mode-name (capitalize prefix))
(mode-init-val :mode-init-function)
(message-val :message-function)
(buffer-name-val :buffer-name)
(titles-val :titles)
(history-size-val :history-size 20)
(revert-confirm-val :revert-confirm? t)
(reduced? :reduced?))
`(progn
(defgroup ,group nil
,(format "Displaying '%s' entries in '%s' buffer."
entry-type-str buffer-type-str)
:group ',(intern (concat "guix-" entry-type-str))
:group ',(intern (concat "guix-" buffer-type-str)))
(defgroup ,faces-group nil
,(format "Faces for displaying '%s' entries in '%s' buffer."
entry-type-str buffer-type-str)
:group ',group
:group ',(intern (concat "guix-" entry-type-str "-faces"))
:group ',(intern (concat "guix-" buffer-type-str "-faces")))
(defcustom ,titles-var ,titles-val
,(format "Alist of titles of '%s' parameters."
entry-type-str)
:type '(alist :key-type symbol :value-type string)
:group ',group)
,(unless reduced?
`(progn
(defvar ,get-entries-var ,get-entries-val
,(format "\
Function used to receive '%s' entries for '%s' buffer."
entry-type-str buffer-type-str))
(defvar ,show-entries-var
,(or show-entries-val `',show-entries-fun)
,(format "\
Function used to show '%s' entries in '%s' buffer."
entry-type-str buffer-type-str))
(defvar ,message-var ,message-val
,(format "\
Function used to display a message after showing '%s' entries.
If nil, do not display messages."
entry-type-str))
(defcustom ,buffer-name-var ,buffer-name-val
,(format "\
Default name of '%s' buffer for displaying '%s' entries.
May be a string or a function returning a string. The function
is called with the same arguments as `%S'."
buffer-type-str entry-type-str get-entries-var)
:type '(choice string function)
:group ',group)
(defcustom ,history-size-var ,history-size-val
,(format "\
Maximum number of items saved in history of `%S' buffer.
If 0, the history is disabled."
buffer-name-var)
:type 'integer
:group ',group)
(defcustom ,revert-confirm-var ,revert-confirm-val
,(format "\
If non-nil, ask to confirm for reverting `%S' buffer."
buffer-name-var)
:type 'boolean
:group ',group)
(guix-alist-put!
'((get-entries . ,get-entries-var)
(show-entries . ,show-entries-var)
(message . ,message-var)
(buffer-name . ,buffer-name-var)
(history-size . ,history-size-var)
(revert-confirm . ,revert-confirm-var))
'guix-buffer-data ',buffer-type ',entry-type)
,(unless show-entries-val
`(defun ,show-entries-fun (entries)
,(format "\
Show '%s' ENTRIES in the current '%s' buffer."
entry-type-str buffer-type-str)
(guix-buffer-show-entries-default
entries ',buffer-type ',entry-type)))
,(when (or insert-entries-val
(null show-entries-val))
(let ((insert-entries-var
(intern (concat prefix "-insert-function"))))
`(progn
(defvar ,insert-entries-var ,insert-entries-val
,(format "\
Function used to print '%s' entries in '%s' buffer."
entry-type-str buffer-type-str))
(guix-alist-put!
',insert-entries-var 'guix-buffer-data
',buffer-type ',entry-type
'insert-entries))))
,(when (or mode-name
mode-init-val
(null show-entries-val))
(let* ((mode-str (concat prefix "-mode"))
(mode-map-str (concat mode-str "-map"))
(mode (intern mode-str))
(parent-mode (intern
(concat "guix-" buffer-type-str
"-mode")))
(mode-var (intern
(concat mode-str "-function")))
(mode-init-var (intern
(concat mode-str
"-initialize-function"))))
`(progn
(defvar ,mode-var ',mode
,(format "\
Major mode for displaying '%s' entries in '%s' buffer."
entry-type-str buffer-type-str))
(defvar ,mode-init-var ,mode-init-val
,(format "\
Function used to set up '%s' buffer for displaying '%s' entries."
buffer-type-str entry-type-str))
(define-derived-mode ,mode ,parent-mode ,mode-name
,(format "\
Major mode for displaying '%s' entries in '%s' buffer.
\\{%s}"
entry-type-str buffer-type-str mode-map-str)
(setq-local revert-buffer-function
'guix-buffer-revert)
(setq-local guix-history-size
(guix-buffer-history-size
',buffer-type ',entry-type))
(guix-buffer-mode-initialize
',buffer-type ',entry-type))
(guix-alist-put!
',mode-var 'guix-buffer-data
',buffer-type ',entry-type 'mode)
(guix-alist-put!
',mode-init-var 'guix-buffer-data
',buffer-type ',entry-type
'mode-init))))))
(guix-alist-put!
',titles-var 'guix-buffer-data
',buffer-type ',entry-type 'titles)))))
(defvar guix-buffer-font-lock-keywords
(eval-when-compile
`((,(rx "(" (group (or "guix-buffer-with-item"
"guix-buffer-with-current-item"
"guix-buffer-define-interface"
"guix-define-groups"
"guix-define-entry-type"
"guix-define-buffer-type"))
symbol-end)
. 1))))
(font-lock-add-keywords 'emacs-lisp-mode guix-buffer-font-lock-keywords)
(provide 'guix-buffer)
;;; guix-buffer.el ends here
+7 -54
View File
@@ -24,8 +24,6 @@
;;; Code:
(require 'guix-utils)
(defgroup guix-build-log nil
"Settings for `guix-build-log-mode'."
:group 'guix)
@@ -104,13 +102,10 @@
"Face for the number of seconds for a phase."
:group 'guix-build-log-faces)
(defcustom guix-build-log-minor-mode-activate t
"If non-nil, then `guix-build-log-minor-mode' is automatically
activated in `shell-mode' buffers."
:type 'boolean
:group 'guix-build-log)
(defcustom guix-build-log-mode-hook '()
(defcustom guix-build-log-mode-hook
;; Not using `compilation-minor-mode' because it rebinds some standard
;; keys, including M-n/M-p.
'(compilation-shell-minor-mode view-mode)
"Hook run after `guix-build-log-mode' is entered."
:type 'hook
:group 'guix-build-log)
@@ -183,8 +178,9 @@ STATE is a symbol denoting how a build phase was ended. It should be
(3 'guix-build-log-phase-seconds prepend)))
"A list of `font-lock-keywords' for `guix-build-log-mode'.")
(defvar guix-build-log-common-map
(defvar guix-build-log-mode-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map special-mode-map)
(define-key map (kbd "M-n") 'guix-build-log-next-phase)
(define-key map (kbd "M-p") 'guix-build-log-previous-phase)
(define-key map (kbd "TAB") 'guix-build-log-phase-toggle)
@@ -192,26 +188,8 @@ STATE is a symbol denoting how a build phase was ended. It should be
(define-key map (kbd "<backtab>") 'guix-build-log-phase-toggle-all)
(define-key map [(shift tab)] 'guix-build-log-phase-toggle-all)
map)
"Parent keymap for 'build-log' buffers.
For `guix-build-log-mode' this map is used as is.
For `guix-build-log-minor-mode' this map is prefixed with 'C-c'.")
(defvar guix-build-log-mode-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent
map (make-composed-keymap (list guix-build-log-common-map)
special-mode-map))
(define-key map (kbd "c") 'compilation-shell-minor-mode)
(define-key map (kbd "v") 'view-mode)
map)
"Keymap for `guix-build-log-mode' buffers.")
(defvar guix-build-log-minor-mode-map
(let ((map (make-sparse-keymap)))
(define-key map (kbd "C-c") guix-build-log-common-map)
map)
"Keymap for `guix-build-log-minor-mode' buffers.")
(defun guix-build-log-phase-start (&optional with-header?)
"Return the start point of the current build phase.
If WITH-HEADER? is non-nil, do not skip 'starting phase ...' header.
@@ -341,12 +319,9 @@ When Guix Build Log minor mode is enabled, it highlights build
log in the current buffer. This mode can be enabled
programmatically using hooks:
(add-hook 'shell-mode-hook 'guix-build-log-minor-mode)
\\{guix-build-log-minor-mode-map}"
(add-hook 'shell-mode-hook 'guix-build-log-minor-mode)"
:init-value nil
:lighter " Guix-Build-Log"
:keymap guix-build-log-minor-mode-map
:group 'guix-build-log
(if guix-build-log-minor-mode
(font-lock-add-keywords nil guix-build-log-font-lock-keywords)
@@ -354,28 +329,6 @@ programmatically using hooks:
(when font-lock-mode
(font-lock-fontify-buffer)))
;;;###autoload
(defun guix-build-log-minor-mode-activate-maybe ()
"Activate `guix-build-log-minor-mode' depending on
`guix-build-log-minor-mode-activate' variable."
(when guix-build-log-minor-mode-activate
(guix-build-log-minor-mode)))
(defun guix-build-log-find-file (file-or-url)
"Open FILE-OR-URL in `guix-build-log-mode'."
(guix-find-file-or-url file-or-url)
(guix-build-log-mode))
;;;###autoload
(add-hook 'shell-mode-hook 'guix-build-log-minor-mode-activate-maybe)
;;;###autoload
(add-to-list 'auto-mode-alist
;; Regexp for log files (usually placed in /var/log/guix/...)
(cons (rx "/guix/drvs/" (= 2 alnum) "/" (= 30 alnum)
"-" (+ (any alnum "-+.")) ".drv" string-end)
'guix-build-log-mode))
(provide 'guix-build-log)
;;; guix-build-log.el ends here
+32 -144
View File
@@ -1,6 +1,6 @@
;;; guix-command.el --- Popup interface for guix commands -*- lexical-binding: t -*-
;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com>
;; Copyright © 2015 Alex Kost <alezost@gmail.com>
;; This file is part of GNU Guix.
@@ -65,7 +65,6 @@
(require 'guix-help-vars)
(require 'guix-read)
(require 'guix-base)
(require 'guix-build-log)
(require 'guix-guile)
(require 'guix-external)
@@ -132,8 +131,7 @@ to be modified."
(guix-command-define-argument-improver
guix-command-improve-action-argument
'(("container" :char ?C)
("graph" :char ?G)
'(("graph" :char ?G)
("environment" :char ?E)
("publish" :char ?u)
("pull" :char ?P)
@@ -175,9 +173,7 @@ to be modified."
(defvar guix-command-improve-common-build-argument
'(("--no-substitutes" :char ?s)
("--no-build-hook" :char ?h)
("--max-silent-time" :char ?x)
("--rounds" :char ?R :fun read-number)
("--with-input" :char ?W)))
("--max-silent-time" :char ?x)))
(defun guix-command-improve-common-build-argument (argument)
(guix-command-modify-argument-from-alist
@@ -193,18 +189,13 @@ to be modified."
(guix-command-define-argument-improver
guix-command-improve-build-argument
'(("--no-grafts" :char ?g)
("--file" :fun guix-read-file-name)
("--root" :fun guix-read-file-name)
("--sources" :char ?S :fun guix-read-source-type :switch? nil)
("--with-source" :fun guix-read-file-name)))
(guix-command-define-argument-improver
guix-command-improve-environment-argument
'(("--ad-hoc"
:name "--ad-hoc " :fun guix-read-package-names-string
:switch? nil :option? t)
("--expose" :char ?E)
("--share" :char ?S)
'(("--exec" :fun read-shell-command)
("--load" :fun guix-read-file-name)))
(guix-command-define-argument-improver
@@ -243,7 +234,6 @@ to be modified."
:switch? nil :option? t)
("--install-from-file" :fun guix-read-file-name)
("--manifest" :fun guix-read-file-name)
("--profile" :fun guix-read-file-name)
("--do-not-upgrade" :char ?U)
("--roll-back" :char ?R)
("--show" :char ?w :fun guix-read-package-name)))
@@ -251,7 +241,6 @@ to be modified."
(guix-command-define-argument-improver
guix-command-improve-refresh-argument
'(("--select" :fun guix-read-refresh-subset)
("--type" :fun guix-read-refresh-updater-names-string)
("--key-server" :char ?S)))
(guix-command-define-argument-improver
@@ -375,16 +364,11 @@ to be modified."
:name "-- " :char ?= :option? t args)))
(let ((command (car commands)))
(cond
((member command
'("archive" "build" "challenge" "edit"
"graph" "lint" "refresh"))
((member command '("archive" "build" "graph" "edit"
"environment" "lint" "refresh"))
(argument :doc "Packages" :fun 'guix-read-package-names-string))
((equal commands '("container" "exec"))
(argument :doc "PID Command [Args...]"))
((string= command "download")
(argument :doc "URL"))
((string= command "environment")
(argument :doc "Command [Args...]" :fun 'read-shell-command))
((string= command "gc")
(argument :doc "Paths" :fun 'guix-read-file-name))
((member command '("hash" "system"))
@@ -398,22 +382,10 @@ to be modified."
(string= command "import"))
(argument :doc "Package name"))))))
(defvar guix-command-additional-arguments
`((("environment")
,(guix-command-make-argument
:name "++packages " :char ?p :option? t
:doc "build inputs of the specified packages"
:fun 'guix-read-package-names-string)))
"Alist of guix commands and additional arguments for them.
These are 'fake' arguments that are not presented in 'guix' shell
commands.")
(defun guix-command-additional-arguments (&optional commands)
"Return additional arguments for COMMANDS."
(let ((rest-arg (guix-command-rest-argument commands)))
(append (guix-assoc-value guix-command-additional-arguments
commands)
(and rest-arg (list rest-arg)))))
(and rest-arg (list rest-arg))))
;; Ideally only `guix-command-arguments' function should exist with the
;; contents of `guix-command-all-arguments', but we need to make a
@@ -491,113 +463,28 @@ commands.")
"Return actions from ARGUMENTS."
(cl-remove-if-not #'guix-command-argument-action? arguments))
;;; Post processing popup arguments
(defvar guix-command-post-processors
'(("environment"
guix-command-post-process-environment-packages
guix-command-post-process-environment-ad-hoc
guix-command-post-process-rest-multiple-leave)
("hash"
guix-command-post-process-rest-single)
("package"
guix-command-post-process-package-args)
("system"
guix-command-post-process-rest-single))
"Alist of guix commands and functions for post-processing
a list of arguments returned from popup interface.
Each function is called on the returned arguments in turn.")
(defvar guix-command-rest-arg-regexp
(rx string-start "-- " (group (+ any)))
"Regexp to match a string with the 'rest' arguments.")
(defun guix-command-replace-args (args predicate modifier)
"Replace arguments matching PREDICATE from ARGS.
Call MODIFIER on each argument matching PREDICATE and append the
returned list of strings to the end of ARGS. Remove the original
arguments."
(let* ((rest nil)
(defun guix-command-post-process-args (args)
"Adjust appropriately command line ARGS returned from popup command."
;; XXX We need to split "--install foo bar" and similar strings into
;; lists of strings. But some commands (e.g., 'guix hash') accept a
;; file name as the 'rest' argument, and as file names may contain
;; spaces, splitting by spaces will break such names. For example, the
;; following argument: "-- /tmp/file with spaces" will be transformed
;; into the following list: ("--" "/tmp/file" "with" "spaces") instead
;; of the wished ("--" "/tmp/file with spaces").
(let* (rest
(rx (rx string-start
(or "-- " "--install " "--remove ")))
(args (mapcar (lambda (arg)
(if (funcall predicate arg)
(progn
(push (funcall modifier arg) rest)
nil)
(if (string-match-p rx arg)
(progn (push (split-string arg) rest)
nil)
arg))
args)))
(if rest
(apply #'append (delq nil args) rest)
args)))
(cl-defun guix-command-post-process-matching-args (args regexp
&key group split?)
"Modify arguments from ARGS matching REGEXP by moving them to
the end of ARGS list. If SPLIT? is non-nil, split matching
arguments into multiple subarguments."
(guix-command-replace-args
args
(lambda (arg)
(string-match regexp arg))
(lambda (arg)
(let ((val (match-string (or group 0) arg))
(fun (if split? #'split-string #'list)))
(funcall fun val)))))
(defun guix-command-post-process-rest-single (args)
"Modify ARGS by moving '-- ARG' argument to the end of ARGS list."
(guix-command-post-process-matching-args
args guix-command-rest-arg-regexp
:group 1))
(defun guix-command-post-process-rest-multiple (args)
"Modify ARGS by splitting '-- ARG ...' into multiple subarguments
and moving them to the end of ARGS list.
Remove '-- ' string."
(guix-command-post-process-matching-args
args guix-command-rest-arg-regexp
:group 1
:split? t))
(defun guix-command-post-process-rest-multiple-leave (args)
"Modify ARGS by splitting '-- ARG ...' into multiple subarguments
and moving them to the end of ARGS list.
Leave '--' string as a separate argument."
(guix-command-post-process-matching-args
args guix-command-rest-arg-regexp
:split? t))
(defun guix-command-post-process-package-args (args)
"Adjust popup ARGS for 'guix package' command."
(guix-command-post-process-matching-args
args (rx string-start (or "--install " "--remove ") (+ any))
:split? t))
(defun guix-command-post-process-environment-packages (args)
"Adjust popup ARGS for specified packages of 'guix environment'
command."
(guix-command-post-process-matching-args
args (rx string-start "++packages " (group (+ any)))
:group 1
:split? t))
(defun guix-command-post-process-environment-ad-hoc (args)
"Adjust popup ARGS for '--ad-hoc' argument of 'guix environment'
command."
(guix-command-post-process-matching-args
args (rx string-start "--ad-hoc " (+ any))
:split? t))
(defun guix-command-post-process-args (commands args)
"Adjust popup ARGS for guix COMMANDS."
(let* ((command (car commands))
(processors
(append (guix-assoc-value guix-command-post-processors commands)
(guix-assoc-value guix-command-post-processors command))))
(guix-modify args
(or processors
(list #'guix-command-post-process-rest-multiple)))))
;;; 'Execute' actions
@@ -621,7 +508,7 @@ command."
(("size")
,(guix-command-make-argument
:name "view" :char ?v :doc "View map"))
(("system" "shepherd-graph") ,graph-arg)
(("system" "dmd-graph") ,graph-arg)
(("system" "extension-graph") ,graph-arg)))
"Alist of guix commands and additional 'execute' action arguments.")
@@ -647,7 +534,7 @@ command."
("view" . guix-run-view-graph))
(("size")
("view" . guix-run-view-size-map))
(("system" "shepherd-graph")
(("system" "dmd-graph")
("view" . guix-run-view-graph))
(("system" "extension-graph")
("view" . guix-run-view-graph)))
@@ -692,11 +579,12 @@ Perform pull-specific actions after operation, see
open the log file(s)."
(let* ((args (if (member "--log-file" args)
args
(cl-list* (car args) "--log-file" (cdr args))))
(apply #'list (car args) "--log-file" (cdr args))))
(output (guix-command-output args))
(files (split-string output "\n" t)))
(dolist (file files)
(guix-build-log-find-file file))))
(guix-find-file-or-url file)
(guix-build-log-mode))))
(defun guix-run-view-graph (args)
"Run 'guix ARGS ...' graph command, make the image and open it."
@@ -717,9 +605,10 @@ open the log file(s)."
(map-file (or wished-map-file (guix-png-file-name)))
(args (if wished-map-file
args
(cl-list* (car args)
(concat "--map-file=" map-file)
(cdr args)))))
(apply #'list
(car args)
(concat "--map-file=" map-file)
(cdr args)))))
(guix-command-output args)
(guix-find-file map-file)))
@@ -751,8 +640,7 @@ EXECUTOR function is called with the current command line arguments."
,doc
(interactive (,arguments-fun))
(,executor (append ',commands
(guix-command-post-process-args
',commands args))))))
(guix-command-post-process-args args))))))
(defun guix-command-generate-popup-actions (actions &optional commands)
"Generate 'popup' commands from ACTIONS arguments for guix COMMANDS."
+2 -8
View File
@@ -1,7 +1,7 @@
;;; guix-config.el --- Compile-time configuration of Guix.
;; Copyright © 2015 Mathieu Lirzin <mthl@openmailbox.org>
;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com>
;; Copyright © 2015 Alex Kost <alezost@gmail.com>
;; This file is part of GNU Guix.
@@ -20,17 +20,11 @@
;;; Code:
(defconst guix-config-name "@PACKAGE_NAME@"
"Guix full name.")
(defconst guix-config-version "@PACKAGE_VERSION@"
"Guix version.")
(defconst guix-config-emacs-interface-directory
(replace-regexp-in-string "${prefix}" "@prefix@" "@emacsuidir@"))
(defconst guix-config-state-directory
;; This must match `NIX_STATE_DIR' as defined in `nix/local.mk'.
;; This must match `NIX_STATE_DIR' as defined in `daemon.am'.
(or (getenv "NIX_STATE_DIR") "@guix_localstatedir@/guix"))
(defconst guix-config-guile-program "@GUILE@"
-7
View File
@@ -198,7 +198,6 @@ to find 'modify-phases' keywords."
"mbegin"
"mlet"
"mlet*"
"modify-services"
"munless"
"mwhen"
"run-with-state"
@@ -216,7 +215,6 @@ to find 'modify-phases' keywords."
"with-derivation-substitute"
"with-directory-excursion"
"with-error-handling"
"with-imported-modules"
"with-monad"
"with-mutex"
"with-store"))
@@ -290,7 +288,6 @@ Each rule should have a form (SYMBOL VALUE). See `put' for details."
(mlet 2)
(mlet* 2)
(modify-phases 1)
(modify-services 1)
(munless 1)
(mwhen 1)
(operating-system 0)
@@ -307,7 +304,6 @@ Each rule should have a form (SYMBOL VALUE). See `put' for details."
(with-derivation-substitute 2)
(with-directory-excursion 1)
(with-error-handling 0)
(with-imported-modules 1)
(with-monad 1)
(with-mutex 1)
(with-store 1)
@@ -366,9 +362,6 @@ bindings:
(when guix-devel-activate-mode
(guix-devel-mode)))
;;;###autoload
(add-hook 'scheme-mode-hook 'guix-devel-activate-mode-maybe)
(defvar guix-devel-emacs-font-lock-keywords
(eval-when-compile
+47 -67
View File
@@ -1,6 +1,6 @@
;;; guix-emacs.el --- Emacs packages installed with Guix
;; Copyright © 2014, 2015, 2016 Alex Kost <alezost@gmail.com>
;; Copyright © 2014 Alex Kost <alezost@gmail.com>
;; This file is part of GNU Guix.
@@ -24,42 +24,28 @@
;;; Code:
(require 'guix-profiles)
(require 'cl-lib)
(unless (require 'guix-profiles nil t)
(defvar guix-user-profile (expand-file-name "~/.guix-profile")))
(defcustom guix-package-enable-at-startup t
"If non-nil, activate Emacs packages installed in a user profile.
Set this variable to nil before requiring `guix-emacs' file to
avoid loading autoloads of Emacs packages installed in
`guix-user-profile'."
(defcustom guix-emacs-activate-after-operation t
"Activate Emacs packages after installing.
If nil, do not load autoloads of the Emacs packages after
they are successfully installed."
:type 'boolean
:group 'guix)
(defvar guix-emacs-autoloads nil
"List of the last loaded Emacs autoloads.")
(defvar guix-emacs-autoloads-regexp
(rx (group (* any) "-autoloads")
".el" (zero-or-one "c") string-end)
"Regexp to match Emacs 'autoloads' file.")
(defun guix-emacs-directory (&optional profile)
"Return directory with Emacs packages installed in PROFILE.
If PROFILE is nil, use `guix-user-profile'."
(expand-file-name "share/emacs/site-lisp"
(or profile guix-user-profile)))
(defun guix-emacs-find-autoloads (directory)
"Return a list of Emacs 'autoloads' files in DIRECTORY.
The files in the list do not have extensions (.el, .elc)."
(cl-remove-duplicates
(delq nil
(mapcar (lambda (file)
(when (string-match guix-emacs-autoloads-regexp file)
(match-string 1 file)))
(directory-files directory 'full-name nil 'no-sort)))
:test #'string=))
(defun guix-emacs-find-autoloads-in-directory (directory)
"Return list of Emacs 'autoloads' files in DIRECTORY."
(directory-files directory 'full-name "-autoloads\\.el\\'" 'no-sort))
(defun guix-emacs-subdirs (directory)
"Return list of DIRECTORY subdirectories."
@@ -69,54 +55,48 @@ The files in the list do not have extensions (.el, .elc)."
(not (file-directory-p file))))
(directory-files directory 'full-name nil 'no-sort)))
(defun guix-emacs-directories (&optional profile)
"Return the list of directories under PROFILE that contain Emacs packages.
This includes both `share/emacs/site-lisp/guix.d/PACKAGE'
sub-directories and `share/emacs/site-lisp' itself.
(defun guix-emacs-find-autoloads (&optional profile)
"Return list of autoloads of Emacs packages installed in PROFILE.
If PROFILE is nil, use `guix-user-profile'.
Return nil, if Emacs packages are not installed in PROFILE."
(let ((root-dir (guix-emacs-directory (or profile guix-user-profile))))
(when (file-directory-p root-dir)
(let* ((pkgs-dir (expand-file-name "guix.d" root-dir))
(pkgs-dirs (when (file-directory-p pkgs-dir)
(guix-emacs-subdirs pkgs-dir))))
(cons root-dir pkgs-dirs)))))
Return nil if there are no emacs packages installed in PROFILE."
(let ((elisp-root-dir (guix-emacs-directory profile)))
(if (file-directory-p elisp-root-dir)
(let ((elisp-pkgs-dir (expand-file-name "guix.d" elisp-root-dir))
(root-autoloads (guix-emacs-find-autoloads-in-directory
elisp-root-dir)))
(if (file-directory-p elisp-pkgs-dir)
(let ((pkgs-autoloads
(cl-mapcan #'guix-emacs-find-autoloads-in-directory
(guix-emacs-subdirs elisp-pkgs-dir))))
(append root-autoloads pkgs-autoloads))
root-autoloads))
(message "Directory '%s' does not exist." elisp-root-dir)
nil)))
;;;###autoload
(defun guix-emacs-autoload-packages (&rest profiles)
"Autoload Emacs packages installed in PROFILES.
If PROFILES are not specified, use a default user and system
profiles.
(defun guix-emacs-load-autoloads (&optional all)
"Load autoloads for Emacs packages installed in a user profile.
Add autoloads directories to `load-path'.
If ALL is nil, activate only those packages that were installed
after the last activation, otherwise activate all Emacs packages
installed in `guix-user-profile'."
(interactive "P")
(let* ((autoloads (guix-emacs-find-autoloads))
(files (if all
autoloads
(cl-nset-difference autoloads guix-emacs-autoloads
:test #'string=))))
(dolist (file files)
(cl-pushnew (file-name-directory file) load-path
:test #'string=)
(load file 'noerror))
(setq guix-emacs-autoloads autoloads)))
'Autoload' means add directories with Emacs packages to
`load-path' and load 'autoloads' files matching
`guix-emacs-autoloads-regexp'."
(interactive (list (if (fboundp 'guix-profile-prompt)
(funcall 'guix-profile-prompt)
guix-user-profile)))
(let ((profiles (or profiles
(list "/run/current-system/profile"
guix-user-profile))))
(dolist (profile profiles)
(let ((dirs (guix-emacs-directories profile)))
(when dirs
(let* ((autoloads (cl-mapcan #'guix-emacs-find-autoloads
dirs))
(new-autoloads (cl-nset-difference autoloads
guix-emacs-autoloads
:test #'string=)))
(dolist (dir dirs)
(cl-pushnew (directory-file-name dir)
load-path
:test #'string=))
(dolist (file new-autoloads)
(load file 'noerror))
(setq guix-emacs-autoloads
(append new-autoloads guix-emacs-autoloads))))))))
(when guix-package-enable-at-startup
(guix-emacs-autoload-packages))
(defun guix-emacs-load-autoloads-maybe ()
"Load autoloads for Emacs packages if needed.
See `guix-emacs-activate-after-operation' for details."
(and guix-emacs-activate-after-operation
(guix-emacs-load-autoloads)))
(provide 'guix-emacs)
-59
View File
@@ -1,59 +0,0 @@
;;; guix-entry.el --- 'Entry' type -*- lexical-binding: t -*-
;; Copyright © 2015 Alex Kost <alezost@gmail.com>
;; 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 this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file provides an API for 'entry' type which is just an alist of
;; KEY/VALUE pairs (KEY should be a symbol) with the required 'id' KEY.
;;; Code:
(require 'cl-lib)
(require 'guix-utils)
(defalias 'guix-entry-value #'guix-assq-value)
(defun guix-entry-id (entry)
"Return ENTRY ID."
(guix-entry-value entry 'id))
(defun guix-entry-by-id (id entries)
"Return an entry from ENTRIES by its ID."
(cl-find-if (lambda (entry)
(equal (guix-entry-id entry) id))
entries))
(defun guix-entries-by-ids (ids entries)
"Return entries with IDS (a list of identifiers) from ENTRIES."
(cl-remove-if-not (lambda (entry)
(member (guix-entry-id entry) ids))
entries))
(defun guix-replace-entry (id new-entry entries)
"Replace an entry with ID from ENTRIES by NEW-ENTRY.
Return a list of entries with the replaced entry."
(cl-substitute-if new-entry
(lambda (entry)
(equal id (guix-entry-id entry)))
entries
:count 1))
(provide 'guix-entry)
;;; guix-entry.el ends here
+4 -4
View File
@@ -23,7 +23,6 @@
;;; Code:
(require 'cl-lib)
(require 'guix-config)
(defgroup guix-external nil
@@ -68,9 +67,10 @@ If ARGS is nil, use `guix-dot-default-arguments'."
(or guix-dot-program
(error (concat "Couldn't find 'dot'.\n"
"Set guix-dot-program to a proper value")))
(cl-list* guix-dot-program
(concat "-o" output-file)
(or args guix-dot-default-arguments)))
(apply #'list
guix-dot-program
(concat "-o" output-file)
(or args guix-dot-default-arguments)))
(defun guix-dot-file-name ()
"Call `guix-dot-file-name-function'."
+5 -17
View File
@@ -46,23 +46,11 @@ Return a list of strings with result values of evaluation."
(defun guix-geiser-eval-read (str &optional repl)
"Evaluate STR with guile expression using Geiser REPL.
Return elisp expression of the first result value of evaluation."
;; The goal is to convert a string with scheme expression into elisp
;; expression.
(let ((result (car (guix-geiser-eval str repl))))
(cond
((or (string= result "#f")
(string= result "#<unspecified>"))
nil)
((string= result "#t")
t)
(t
(read (replace-regexp-in-string
"[ (]\\(#f\\)" "nil"
(replace-regexp-in-string
"[ (]\\(#t\\)" "t"
result
nil nil 1)
nil nil 1))))))
;; Parsing scheme code with elisp `read' is probably not the best idea.
(read (replace-regexp-in-string
"#f\\|#<unspecified>" "nil"
(replace-regexp-in-string
"#t" "t" (car (guix-geiser-eval str repl))))))
(defun guix-repl-send (cmd &optional save-history)
"Send CMD input string to the current REPL buffer.
+1 -1
View File
@@ -57,7 +57,7 @@ Return nil, if current buffer does not define a module."
(defun guix-guile-boolean (arg)
"Return a string with guile boolean value.
Transform elisp ARG (nil or non-nil) to the guile boolean (#f or #t)."
(if arg "#t" "#f"))
(concat "#" (prin1-to-string (if arg 't 'f))))
(defun guix-guile-keyword-regexp (keyword)
"Return regexp to find guile KEYWORD."
-362
View File
@@ -1,362 +0,0 @@
;;; guix-hydra-build.el --- Interface for Hydra builds -*- lexical-binding: t -*-
;; Copyright © 2015 Alex Kost <alezost@gmail.com>
;; 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 this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file provides an interface for displaying Hydra builds in
;; 'list' and 'info' buffers.
;;; Code:
(require 'cl-lib)
(require 'guix-buffer)
(require 'guix-list)
(require 'guix-info)
(require 'guix-hydra)
(require 'guix-build-log)
(require 'guix-utils)
(guix-hydra-define-entry-type hydra-build
:search-types '((latest . guix-hydra-build-latest-api-url)
(queue . guix-hydra-build-queue-api-url))
:filters '(guix-hydra-build-filter-status)
:filter-names '((nixname . name)
(buildstatus . build-status)
(timestamp . time))
:filter-boolean-params '(finished busy))
(defun guix-hydra-build-get-display (search-type &rest args)
"Search for Hydra builds and show results."
(apply #'guix-list-get-display-entries
'hydra-build search-type args))
(cl-defun guix-hydra-build-latest-prompt-args (&key project jobset
job system)
"Prompt for and return a list of 'latest builds' arguments."
(let* ((number (read-number "Number of latest builds: "))
(project (if current-prefix-arg
(guix-hydra-read-project nil project)
project))
(jobset (if current-prefix-arg
(guix-hydra-read-jobset nil jobset)
jobset))
(job-or-name (if current-prefix-arg
(guix-hydra-read-job nil job)
job))
(job (and job-or-name
(string-match-p guix-hydra-job-regexp
job-or-name)
job-or-name))
(system (if (and (not job)
(or current-prefix-arg
(and job-or-name (not system))))
(if job-or-name
(guix-while-null
(guix-hydra-read-system
(concat job-or-name ".") system))
(guix-hydra-read-system nil system))
system))
(job (or job
(and job-or-name
(concat job-or-name "." system)))))
(list number
:project project
:jobset jobset
:job job
:system system)))
(defun guix-hydra-build-view-log (id)
"View build log of a hydra build ID."
(guix-build-log-find-file (guix-hydra-build-log-url id)))
;;; Defining URLs
(defun guix-hydra-build-url (id)
"Return Hydra URL of a build ID."
(guix-hydra-url "build/" (number-to-string id)))
(defun guix-hydra-build-log-url (id)
"Return Hydra URL of the log file of a build ID."
(concat (guix-hydra-build-url id) "/log/raw"))
(cl-defun guix-hydra-build-latest-api-url
(number &key project jobset job system)
"Return Hydra API URL to receive latest NUMBER of builds."
(guix-hydra-api-url "latestbuilds"
`(("nr" . ,number)
("project" . ,project)
("jobset" . ,jobset)
("job" . ,job)
("system" . ,system))))
(defun guix-hydra-build-queue-api-url (number)
"Return Hydra API URL to receive the NUMBER of queued builds."
(guix-hydra-api-url "queue"
`(("nr" . ,number))))
;;; Filters for processing raw entries
(defun guix-hydra-build-filter-status (entry)
"Add 'status' parameter to 'hydra-build' ENTRY."
(let ((status (if (guix-entry-value entry 'finished)
(guix-hydra-build-status-number->name
(guix-entry-value entry 'build-status))
(if (guix-entry-value entry 'busy)
'running
'scheduled))))
(cons `(status . ,status)
entry)))
;;; Build status
(defface guix-hydra-build-status-running
'((t :inherit bold))
"Face used if hydra build is not finished."
:group 'guix-hydra-build-faces)
(defface guix-hydra-build-status-scheduled
'((t))
"Face used if hydra build is scheduled."
:group 'guix-hydra-build-faces)
(defface guix-hydra-build-status-succeeded
'((t :inherit success))
"Face used if hydra build succeeded."
:group 'guix-hydra-build-faces)
(defface guix-hydra-build-status-cancelled
'((t :inherit warning))
"Face used if hydra build was cancelled."
:group 'guix-hydra-build-faces)
(defface guix-hydra-build-status-failed
'((t :inherit error))
"Face used if hydra build failed."
:group 'guix-hydra-build-faces)
(defvar guix-hydra-build-status-alist
'((0 . succeeded)
(1 . failed-build)
(2 . failed-dependency)
(3 . failed-other)
(4 . cancelled))
"Alist of hydra build status numbers and status names.
Status numbers are returned by Hydra API, names (symbols) are
used internally by the elisp code of this package.")
(defun guix-hydra-build-status-number->name (number)
"Convert build status number to a name.
See `guix-hydra-build-status-alist'."
(guix-assq-value guix-hydra-build-status-alist number))
(defun guix-hydra-build-status-string (status)
"Return a human readable string for build STATUS."
(cl-case status
(scheduled
(guix-get-string "Scheduled" 'guix-hydra-build-status-scheduled))
(running
(guix-get-string "Running" 'guix-hydra-build-status-running))
(succeeded
(guix-get-string "Succeeded" 'guix-hydra-build-status-succeeded))
(cancelled
(guix-get-string "Cancelled" 'guix-hydra-build-status-cancelled))
(failed-build
(guix-hydra-build-status-fail-string))
(failed-dependency
(guix-hydra-build-status-fail-string "dependency"))
(failed-other
(guix-hydra-build-status-fail-string "other"))))
(defun guix-hydra-build-status-fail-string (&optional reason)
"Return a string for a failed build."
(let ((base (guix-get-string "Failed" 'guix-hydra-build-status-failed)))
(if reason
(concat base " (" reason ")")
base)))
(defun guix-hydra-build-finished? (entry)
"Return non-nil, if hydra build was finished."
(guix-entry-value entry 'finished))
(defun guix-hydra-build-running? (entry)
"Return non-nil, if hydra build is running."
(eq (guix-entry-value entry 'status)
'running))
(defun guix-hydra-build-scheduled? (entry)
"Return non-nil, if hydra build is scheduled."
(eq (guix-entry-value entry 'status)
'scheduled))
(defun guix-hydra-build-succeeded? (entry)
"Return non-nil, if hydra build succeeded."
(eq (guix-entry-value entry 'status)
'succeeded))
(defun guix-hydra-build-cancelled? (entry)
"Return non-nil, if hydra build was cancelled."
(eq (guix-entry-value entry 'status)
'cancelled))
(defun guix-hydra-build-failed? (entry)
"Return non-nil, if hydra build failed."
(memq (guix-entry-value entry 'status)
'(failed-build failed-dependency failed-other)))
;;; Hydra build 'info'
(guix-hydra-info-define-interface hydra-build
:mode-name "Hydra-Build-Info"
:buffer-name "*Guix Hydra Build Info*"
:format '((name ignore (simple guix-info-heading))
ignore
guix-hydra-build-info-insert-url
(time format (time))
(status format guix-hydra-build-info-insert-status)
(project format (format guix-hydra-build-project))
(jobset format (format guix-hydra-build-jobset))
(job format (format guix-hydra-build-job))
(system format (format guix-hydra-build-system))
(priority format (format))))
(defface guix-hydra-build-info-project
'((t :inherit link))
"Face for project names."
:group 'guix-hydra-build-info-faces)
(defface guix-hydra-build-info-jobset
'((t :inherit link))
"Face for jobsets."
:group 'guix-hydra-build-info-faces)
(defface guix-hydra-build-info-job
'((t :inherit link))
"Face for jobs."
:group 'guix-hydra-build-info-faces)
(defface guix-hydra-build-info-system
'((t :inherit link))
"Face for system names."
:group 'guix-hydra-build-info-faces)
(defmacro guix-hydra-build-define-button (name)
"Define `guix-hydra-build-NAME' button."
(let* ((name-str (symbol-name name))
(button-name (intern (concat "guix-hydra-build-" name-str)))
(face-name (intern (concat "guix-hydra-build-info-" name-str)))
(keyword (intern (concat ":" name-str))))
`(define-button-type ',button-name
:supertype 'guix
'face ',face-name
'help-echo ,(format "\
Show latest builds for this %s (with prefix, prompt for all parameters)"
name-str)
'action (lambda (btn)
(let ((args (guix-hydra-build-latest-prompt-args
,keyword (button-label btn))))
(apply #'guix-hydra-build-get-display
'latest args))))))
(guix-hydra-build-define-button project)
(guix-hydra-build-define-button jobset)
(guix-hydra-build-define-button job)
(guix-hydra-build-define-button system)
(defun guix-hydra-build-info-insert-url (entry)
"Insert Hydra URL for the build ENTRY."
(guix-insert-button (guix-hydra-build-url (guix-entry-id entry))
'guix-url)
(when (guix-hydra-build-finished? entry)
(guix-info-insert-indent)
(guix-info-insert-action-button
"Build log"
(lambda (btn)
(guix-hydra-build-view-log (button-get btn 'id)))
"View build log"
'id (guix-entry-id entry))))
(defun guix-hydra-build-info-insert-status (status &optional _)
"Insert a string with build STATUS."
(insert (guix-hydra-build-status-string status)))
;;; Hydra build 'list'
(guix-hydra-list-define-interface hydra-build
:mode-name "Hydra-Build-List"
:buffer-name "*Guix Hydra Build List*"
:format '((name nil 30 t)
(system nil 16 t)
(status guix-hydra-build-list-get-status 20 t)
(project nil 10 t)
(jobset nil 17 t)
(time guix-list-get-time 20 t)))
(let ((map guix-hydra-build-list-mode-map))
(define-key map (kbd "B") 'guix-hydra-build-list-latest-builds)
(define-key map (kbd "L") 'guix-hydra-build-list-view-log))
(defun guix-hydra-build-list-get-status (status &optional _)
"Return a string for build STATUS."
(guix-hydra-build-status-string status))
(defun guix-hydra-build-list-latest-builds (number &rest args)
"Display latest NUMBER of Hydra builds of the current job.
Interactively, prompt for NUMBER. With prefix argument, prompt
for all ARGS."
(interactive
(let ((entry (guix-list-current-entry)))
(guix-hydra-build-latest-prompt-args
:project (guix-entry-value entry 'project)
:jobset (guix-entry-value entry 'name)
:job (guix-entry-value entry 'job)
:system (guix-entry-value entry 'system))))
(apply #'guix-hydra-latest-builds number args))
(defun guix-hydra-build-list-view-log ()
"View build log of the current Hydra build."
(interactive)
(guix-hydra-build-view-log (guix-list-current-id)))
;;; Interactive commands
;;;###autoload
(defun guix-hydra-latest-builds (number &rest args)
"Display latest NUMBER of Hydra builds.
ARGS are the same arguments as for `guix-hydra-build-latest-api-url'.
Interactively, prompt for NUMBER. With prefix argument, prompt
for all ARGS."
(interactive (guix-hydra-build-latest-prompt-args))
(apply #'guix-hydra-build-get-display
'latest number args))
;;;###autoload
(defun guix-hydra-queued-builds (number)
"Display the NUMBER of queued Hydra builds."
(interactive "NNumber of queued builds: ")
(guix-hydra-build-get-display 'queue number))
(provide 'guix-hydra-build)
;;; guix-hydra-build.el ends here
-162
View File
@@ -1,162 +0,0 @@
;;; guix-hydra-jobset.el --- Interface for Hydra jobsets -*- lexical-binding: t -*-
;; Copyright © 2015 Alex Kost <alezost@gmail.com>
;; 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 this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file provides an interface for displaying Hydra jobsets in
;; 'list' and 'info' buffers.
;;; Code:
(require 'cl-lib)
(require 'guix-buffer)
(require 'guix-list)
(require 'guix-info)
(require 'guix-hydra)
(require 'guix-hydra-build)
(require 'guix-utils)
(guix-hydra-define-entry-type hydra-jobset
:search-types '((project . guix-hydra-jobset-api-url))
:filters '(guix-hydra-jobset-filter-id)
:filter-names '((nrscheduled . scheduled)
(nrsucceeded . succeeded)
(nrfailed . failed)
(nrtotal . total)))
(defun guix-hydra-jobset-get-display (search-type &rest args)
"Search for Hydra builds and show results."
(apply #'guix-list-get-display-entries
'hydra-jobset search-type args))
;;; Defining URLs
(defun guix-hydra-jobset-url (project jobset)
"Return Hydra URL of a PROJECT's JOBSET."
(guix-hydra-url "jobset/" project "/" jobset))
(defun guix-hydra-jobset-api-url (project)
"Return Hydra API URL for jobsets by PROJECT."
(guix-hydra-api-url "jobsets"
`(("project" . ,project))))
;;; Filters for processing raw entries
(defun guix-hydra-jobset-filter-id (entry)
"Add 'ID' parameter to 'hydra-jobset' ENTRY."
(cons `(id . ,(guix-entry-value entry 'name))
entry))
;;; Hydra jobset 'info'
(guix-hydra-info-define-interface hydra-jobset
:mode-name "Hydra-Jobset-Info"
:buffer-name "*Guix Hydra Jobset Info*"
:format '((name ignore (simple guix-info-heading))
ignore
guix-hydra-jobset-info-insert-url
(project format guix-hydra-jobset-info-insert-project)
(scheduled format (format guix-hydra-jobset-info-scheduled))
(succeeded format (format guix-hydra-jobset-info-succeeded))
(failed format (format guix-hydra-jobset-info-failed))
(total format (format guix-hydra-jobset-info-total))))
(defface guix-hydra-jobset-info-scheduled
'((t))
"Face used for the number of scheduled builds."
:group 'guix-hydra-jobset-info-faces)
(defface guix-hydra-jobset-info-succeeded
'((t :inherit guix-hydra-build-status-succeeded))
"Face used for the number of succeeded builds."
:group 'guix-hydra-jobset-info-faces)
(defface guix-hydra-jobset-info-failed
'((t :inherit guix-hydra-build-status-failed))
"Face used for the number of failed builds."
:group 'guix-hydra-jobset-info-faces)
(defface guix-hydra-jobset-info-total
'((t))
"Face used for the total number of builds."
:group 'guix-hydra-jobset-info-faces)
(defun guix-hydra-jobset-info-insert-project (project entry)
"Insert PROJECT button for the jobset ENTRY."
(let ((jobset (guix-entry-value entry 'name)))
(guix-insert-button
project 'guix-hydra-build-project
'action (lambda (btn)
(let ((args (guix-hydra-build-latest-prompt-args
:project (button-get btn 'project)
:jobset (button-get btn 'jobset))))
(apply #'guix-hydra-build-get-display
'latest args)))
'project project
'jobset jobset)))
(defun guix-hydra-jobset-info-insert-url (entry)
"Insert Hydra URL for the jobset ENTRY."
(guix-insert-button (guix-hydra-jobset-url
(guix-entry-value entry 'project)
(guix-entry-value entry 'name))
'guix-url))
;;; Hydra jobset 'list'
(guix-hydra-list-define-interface hydra-jobset
:mode-name "Hydra-Jobset-List"
:buffer-name "*Guix Hydra Jobset List*"
:format '((name nil 25 t)
(project nil 10 t)
(scheduled nil 12 t)
(succeeded nil 12 t)
(failed nil 9 t)
(total nil 10 t)))
(let ((map guix-hydra-jobset-list-mode-map))
(define-key map (kbd "B") 'guix-hydra-jobset-list-latest-builds))
(defun guix-hydra-jobset-list-latest-builds (number &rest args)
"Display latest NUMBER of Hydra builds of the current jobset.
Interactively, prompt for NUMBER. With prefix argument, prompt
for all ARGS."
(interactive
(let ((entry (guix-list-current-entry)))
(guix-hydra-build-latest-prompt-args
:project (guix-entry-value entry 'project)
:jobset (guix-entry-value entry 'name))))
(apply #'guix-hydra-latest-builds number args))
;;; Interactive commands
;;;###autoload
(defun guix-hydra-jobsets (project)
"Display jobsets of PROJECT."
(interactive (list (guix-hydra-read-project)))
(guix-hydra-jobset-get-display 'project project))
(provide 'guix-hydra-jobset)
;;; guix-hydra-jobset.el ends here
-367
View File
@@ -1,367 +0,0 @@
;;; guix-hydra.el --- Common code for interacting with Hydra -*- lexical-binding: t -*-
;; Copyright © 2015 Alex Kost <alezost@gmail.com>
;; 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 this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file provides some general code for 'list'/'info' interfaces for
;; Hydra (Guix build farm).
;;; Code:
(require 'json)
(require 'guix-buffer)
(require 'guix-entry)
(require 'guix-utils)
(require 'guix-help-vars)
(guix-define-groups hydra)
(defvar guix-hydra-job-regexp
(concat ".*\\." (regexp-opt guix-help-system-types) "\\'")
"Regexp matching a full name of Hydra job (including system).")
(defun guix-hydra-job-name-specification (name version)
"Return Hydra's job name specification by NAME and VERSION."
(concat name "-" version))
(defun guix-hydra-message (entries search-type &rest _)
"Display a message after showing Hydra ENTRIES."
;; XXX Add more messages maybe.
(when (null entries)
(if (eq search-type 'fake)
(message "The update is impossible due to lack of Hydra API.")
(message "Hydra has returned no results."))))
(defun guix-hydra-list-describe (ids)
"Describe 'hydra' entries with IDS (list of identifiers)."
(guix-buffer-display-entries
(guix-entries-by-ids ids (guix-buffer-current-entries))
'info (guix-buffer-current-entry-type)
;; Hydra does not provide an API to receive builds/jobsets by
;; IDs/names, so we use a 'fake' search type.
'(fake)
'add))
;;; Readers
(defvar guix-hydra-projects
'("gnu" "guix")
"List of available Hydra projects.")
(guix-define-readers
:completions-var guix-hydra-projects
:single-reader guix-hydra-read-project
:single-prompt "Project: ")
(guix-define-readers
:single-reader guix-hydra-read-jobset
:single-prompt "Jobset: ")
(guix-define-readers
:single-reader guix-hydra-read-job
:single-prompt "Job: ")
(guix-define-readers
:completions-var guix-help-system-types
:single-reader guix-hydra-read-system
:single-prompt "System: ")
;;; Defining URLs
(defvar guix-hydra-url "http://hydra.gnu.org"
"URL of the Hydra build farm.")
(defun guix-hydra-url (&rest url-parts)
"Return Hydra URL."
(apply #'concat guix-hydra-url "/" url-parts))
(defun guix-hydra-api-url (type args)
"Return URL for receiving data using Hydra API.
TYPE is the name of an allowed method.
ARGS is alist of (KEY . VALUE) pairs.
Skip ARG, if VALUE is nil or an empty string."
(declare (indent 1))
(let* ((fields (mapcar
(lambda (arg)
(pcase arg
(`(,key . ,value)
(unless (or (null value)
(equal "" value))
(concat (guix-hexify key) "="
(guix-hexify value))))
(_ (error "Wrong argument '%s'" arg))))
args))
(fields (mapconcat #'identity (delq nil fields) "&")))
(guix-hydra-url "api/" type "?" fields)))
;;; Receiving data from Hydra
(defun guix-hydra-receive-data (url)
"Return output received from URL and processed with `json-read'."
(with-temp-buffer
(url-insert-file-contents url)
(goto-char (point-min))
(let ((json-key-type 'symbol)
(json-array-type 'list)
(json-object-type 'alist))
(json-read))))
(defun guix-hydra-get-entries (entry-type search-type &rest args)
"Receive ENTRY-TYPE entries from Hydra.
SEARCH-TYPE is one of the types defined by `guix-hydra-define-interface'."
(unless (eq search-type 'fake)
(let* ((url (apply #'guix-hydra-search-url
entry-type search-type args))
(raw-entries (guix-hydra-receive-data url))
(entries (guix-hydra-filter-entries
raw-entries
(guix-hydra-filters entry-type))))
entries)))
;;; Filters for processing raw entries
(defun guix-hydra-filter-entries (entries filters)
"Filter ENTRIES using FILTERS.
Call `guix-modify' on each entry from ENTRIES."
(mapcar (lambda (entry)
(guix-modify entry filters))
entries))
(defun guix-hydra-filter-names (entry name-alist)
"Replace names of ENTRY parameters using NAME-ALIST.
Each element of NAME-ALIST is (OLD-NAME . NEW-NAME) pair."
(mapcar (lambda (param)
(pcase param
(`(,name . ,val)
(let ((new-name (guix-assq-value name-alist name)))
(if new-name
(cons new-name val)
param)))))
entry))
(defun guix-hydra-filter-boolean (entry params)
"Convert number PARAMS (0/1) of ENTRY to boolean values (nil/t)."
(mapcar (lambda (param)
(pcase param
(`(,name . ,val)
(if (memq name params)
(cons name (guix-number->bool val))
param))))
entry))
;;; Wrappers for defined variables
(defvar guix-hydra-entry-type-data nil
"Alist with hydra entry type data.
This alist is filled by `guix-hydra-define-entry-type' macro.")
(defun guix-hydra-entry-type-value (entry-type symbol)
"Return SYMBOL's value for ENTRY-TYPE from `guix-hydra'."
(symbol-value (guix-assq-value guix-hydra-entry-type-data
entry-type symbol)))
(defun guix-hydra-search-url (entry-type search-type &rest args)
"Return URL to receive ENTRY-TYPE entries from Hydra."
(apply (guix-assq-value (guix-hydra-entry-type-value
entry-type 'search-types)
search-type)
args))
(defun guix-hydra-filters (entry-type)
"Return a list of filters for ENTRY-TYPE."
(guix-hydra-entry-type-value entry-type 'filters))
;;; Interface definers
(defmacro guix-hydra-define-entry-type (entry-type &rest args)
"Define general code for ENTRY-TYPE.
Remaining arguments (ARGS) should have a form [KEYWORD VALUE] ...
Required keywords:
- `:search-types' - default value of the generated
`guix-ENTRY-TYPE-search-types' variable.
Optional keywords:
- `:filters' - default value of the generated
`guix-ENTRY-TYPE-filters' variable.
- `:filter-names' - if specified, a generated
`guix-ENTRY-TYPE-filter-names' function for filtering these
names will be added to `guix-ENTRY-TYPE-filters' variable.
- `:filter-boolean-params' - if specified, a generated
`guix-ENTRY-TYPE-filter-boolean' function for filtering these
names will be added to `guix-ENTRY-TYPE-filters' variable.
The rest keyword arguments are passed to
`guix-define-entry-type' macro."
(declare (indent 1))
(let* ((entry-type-str (symbol-name entry-type))
(prefix (concat "guix-" entry-type-str))
(search-types-var (intern (concat prefix "-search-types")))
(filters-var (intern (concat prefix "-filters")))
(get-fun (intern (concat prefix "-get-entries"))))
(guix-keyword-args-let args
((search-types-val :search-types)
(filters-val :filters)
(filter-names-val :filter-names)
(filter-bool-val :filter-boolean-params))
`(progn
(defvar ,search-types-var ,search-types-val
,(format "\
Alist of search types and according URL functions.
Functions are used to define URL to receive '%s' entries."
entry-type-str))
(defvar ,filters-var ,filters-val
,(format "\
List of filters for '%s' parameters.
Each filter is a function that should take an entry as a single
argument, and should also return an entry."
entry-type-str))
,(when filter-bool-val
(let ((filter-bool-var (intern (concat prefix
"-filter-boolean-params")))
(filter-bool-fun (intern (concat prefix
"-filter-boolean"))))
`(progn
(defvar ,filter-bool-var ,filter-bool-val
,(format "\
List of '%s' parameters that should be transformed to boolean values."
entry-type-str))
(defun ,filter-bool-fun (entry)
,(format "\
Run `guix-hydra-filter-boolean' with `%S' variable."
filter-bool-var)
(guix-hydra-filter-boolean entry ,filter-bool-var))
(setq ,filters-var
(cons ',filter-bool-fun ,filters-var)))))
;; Do not move this clause up!: name filtering should be
;; performed before any other filtering, so this filter should
;; be consed after the boolean filter.
,(when filter-names-val
(let* ((filter-names-var (intern (concat prefix
"-filter-names")))
(filter-names-fun filter-names-var))
`(progn
(defvar ,filter-names-var ,filter-names-val
,(format "\
Alist of '%s' parameter names returned by Hydra API and names
used internally by the elisp code of this package."
entry-type-str))
(defun ,filter-names-fun (entry)
,(format "\
Run `guix-hydra-filter-names' with `%S' variable."
filter-names-var)
(guix-hydra-filter-names entry ,filter-names-var))
(setq ,filters-var
(cons ',filter-names-fun ,filters-var)))))
(defun ,get-fun (search-type &rest args)
,(format "\
Receive '%s' entries.
See `guix-hydra-get-entries' for details."
entry-type-str)
(apply #'guix-hydra-get-entries
',entry-type search-type args))
(guix-alist-put!
'((search-types . ,search-types-var)
(filters . ,filters-var))
'guix-hydra-entry-type-data ',entry-type)
(guix-define-entry-type ,entry-type
:parent-group guix-hydra
:parent-faces-group guix-hydra-faces
,@%foreign-args)))))
(defmacro guix-hydra-define-interface (buffer-type entry-type &rest args)
"Define BUFFER-TYPE interface for displaying ENTRY-TYPE entries.
This macro should be called after calling
`guix-hydra-define-entry-type' with the same ENTRY-TYPE.
ARGS are passed to `guix-BUFFER-TYPE-define-interface' macro."
(declare (indent 2))
(let* ((entry-type-str (symbol-name entry-type))
(buffer-type-str (symbol-name buffer-type))
(get-fun (intern (concat "guix-" entry-type-str
"-get-entries")))
(definer (intern (concat "guix-" buffer-type-str
"-define-interface"))))
`(,definer ,entry-type
:get-entries-function ',get-fun
:message-function 'guix-hydra-message
,@args)))
(defmacro guix-hydra-info-define-interface (entry-type &rest args)
"Define 'info' interface for displaying ENTRY-TYPE entries.
See `guix-hydra-define-interface'."
(declare (indent 1))
`(guix-hydra-define-interface info ,entry-type
,@args))
(defmacro guix-hydra-list-define-interface (entry-type &rest args)
"Define 'list' interface for displaying ENTRY-TYPE entries.
Remaining arguments (ARGS) should have a form [KEYWORD VALUE] ...
Optional keywords:
- `:describe-function' - default value of the generated
`guix-ENTRY-TYPE-list-describe-function' variable (if not
specified, use `guix-hydra-list-describe').
The rest keyword arguments are passed to
`guix-hydra-define-interface' macro."
(declare (indent 1))
(guix-keyword-args-let args
((describe-val :describe-function))
`(guix-hydra-define-interface list ,entry-type
:describe-function ,(or describe-val ''guix-hydra-list-describe)
,@args)))
(defvar guix-hydra-font-lock-keywords
(eval-when-compile
`((,(rx "(" (group (or "guix-hydra-define-entry-type"
"guix-hydra-define-interface"
"guix-hydra-info-define-interface"
"guix-hydra-list-define-interface"))
symbol-end)
. 1))))
(font-lock-add-keywords 'emacs-lisp-mode guix-hydra-font-lock-keywords)
(provide 'guix-hydra)
;;; guix-hydra.el ends here
+694 -290
View File
File diff suppressed because it is too large Load Diff
+17 -1
View File
@@ -1,3 +1,19 @@
(require 'guix-autoloads)
(message "(require 'guix-init) is obsolete, use (require 'guix-autoloads) instead.")
(require 'guix-emacs)
(defcustom guix-package-enable-at-startup t
"If non-nil, activate Emacs packages installed in a user profile.
Set this variable to nil before requiring `guix-init' file to
avoid loading autoloads of Emacs packages installed in
`guix-user-profile'."
:type 'boolean
:group 'guix)
(add-to-list 'load-path (guix-emacs-directory))
(when guix-package-enable-at-startup
(guix-emacs-load-autoloads 'all))
(add-hook 'scheme-mode-hook 'guix-devel-activate-mode-maybe)
(provide 'guix-init)
-65
View File
@@ -1,65 +0,0 @@
;;; guix-license.el --- Licenses
;; Copyright © 2016 Alex Kost <alezost@gmail.com>
;; 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 this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file provides the code to work with licenses of Guix packages.
;;; Code:
(require 'guix-read)
(require 'guix-backend)
(require 'guix-guile)
(defun guix-license-file (&optional directory)
"Return name of the file with license definitions.
DIRECTORY is a directory with Guix source (`guix-directory' by default)."
(expand-file-name "guix/licenses.scm"
(or directory guix-directory)))
(defun guix-lookup-license-url (license)
"Return URL of a LICENSE."
(or (guix-eval-read (guix-make-guile-expression
'lookup-license-uri license))
(error "Hm, I don't know URL of '%s' license" license)))
;;;###autoload
(defun guix-find-license-definition (license &optional directory)
"Open licenses file from DIRECTORY and move to the LICENSE definition.
See `guix-license-file' for the meaning of DIRECTORY.
Interactively, with prefix argument, prompt for DIRECTORY."
(interactive
(list (guix-read-license-name)
(guix-read-directory)))
(find-file (guix-license-file directory))
(goto-char (point-min))
(when (re-search-forward (concat "\"" (regexp-quote license) "\"")
nil t)
(beginning-of-defun)
(recenter 1)))
;;;###autoload
(defun guix-browse-license-url (license)
"Browse URL of a LICENSE."
(interactive (list (guix-read-license-name)))
(browse-url (guix-lookup-license-url license)))
(provide 'guix-license)
;;; guix-license.el ends here
+636 -327
View File
File diff suppressed because it is too large Load Diff
-79
View File
@@ -1,79 +0,0 @@
;;; guix-location.el --- Package locations
;; Copyright © 2016 Alex Kost <alezost@gmail.com>
;; 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 Location as published by
;; the Free Software Foundation, either version 3 of the Location, 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 Location for more details.
;; You should have received a copy of the GNU General Public Location
;; along with this program. If not, see <http://www.gnu.org/locations/>.
;;; Commentary:
;; This file provides the code to work with locations of Guix packages.
;;; Code:
(require 'cl-lib)
(require 'guix-backend)
(require 'guix-read)
(require 'guix-guile)
(defun guix-package-location (id-or-name)
"Return location of a package with ID-OR-NAME.
For the meaning of location, see `guix-find-location'."
(guix-eval-read (guix-make-guile-expression
'package-location-string id-or-name)))
;;;###autoload
(defun guix-find-location (location &optional directory)
"Go to LOCATION of a package.
LOCATION is a string of the form:
\"FILE:LINE:COLUMN\"
If FILE is relative, it is considered to be relative to
DIRECTORY (`guix-directory' by default).
Interactively, prompt for LOCATION. With prefix argument, prompt
for DIRECTORY as well."
(interactive
(list (guix-read-package-location)
(guix-read-directory)))
(cl-multiple-value-bind (file line column)
(split-string location ":")
(find-file (expand-file-name file (or directory guix-directory)))
(when (and line column)
(let ((line (string-to-number line))
(column (string-to-number column)))
(goto-char (point-min))
(forward-line (- line 1))
(move-to-column column)
(recenter 1)))))
;;;###autoload
(defun guix-edit (id-or-name &optional directory)
"Edit (go to location of) package with ID-OR-NAME.
See `guix-find-location' for the meaning of package location and
DIRECTORY.
Interactively, with prefix argument, prompt for DIRECTORY."
(interactive
(list (guix-read-package-name)
(guix-read-directory)))
(let ((loc (guix-package-location id-or-name)))
(if loc
(guix-find-location loc directory)
(message "Couldn't find package location."))))
(provide 'guix-location)
;;; guix-location.el ends here
+103 -257
View File
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014, 2015, 2016 Alex Kost <alezost@gmail.com>
;;; Copyright © 2014, 2015 Alex Kost <alezost@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -32,6 +32,14 @@
;; still "name-version" string. So id package parameter in the code
;; below is either an object-address number or a full-name string.
;; To speed-up the process of getting information, the following
;; auxiliary variables are used:
;;
;; - `%packages' - VHash of "package address"/"package" pairs.
;;
;; - `%package-table' - Hash table of
;; "name+version key"/"list of packages" pairs.
;;; Code:
(use-modules
@@ -44,18 +52,17 @@
(srfi srfi-19)
(srfi srfi-26)
(guix)
(guix combinators)
(guix git-download)
(guix grafts)
(guix packages)
(guix profiles)
(guix licenses)
(guix utils)
(guix ui)
(guix scripts)
(guix scripts graph)
(guix scripts lint)
(guix scripts package)
(gnu packages)
(gnu system))
(guix scripts pull)
(gnu packages))
(define-syntax-rule (first-or-false lst)
(and (not (null? lst))
@@ -79,13 +86,13 @@
(define (full-name->name+version spec)
"Given package specification SPEC with or without output,
return two values: name and version. For example, for SPEC
\"foo@0.9.1b:lib\", return \"foo\" and \"0.9.1b\"."
\"foo-0.9.1b:lib\", return \"foo\" and \"0.9.1b\"."
(let-values (((name version output)
(package-specification->name+version+output spec)))
(values name version)))
(define (name+version->full-name name version)
(string-append name "@" version))
(string-append name "-" version))
(define* (make-package-specification name #:optional version output)
(let ((full-name (if version
@@ -95,6 +102,28 @@ return two values: name and version. For example, for SPEC
(string-append full-name ":" output)
full-name)))
(define name+version->key cons)
(define key->name+version car+cdr)
(define %packages
(fold-packages (lambda (pkg res)
(vhash-consq (object-address pkg) pkg res))
vlist-null))
(define %package-table
(let ((table (make-hash-table (vlist-length %packages))))
(vlist-for-each
(lambda (elem)
(match elem
((address . pkg)
(let* ((key (name+version->key (package-name pkg)
(package-version pkg)))
(ref (hash-ref table key)))
(hash-set! table key
(if ref (cons pkg ref) (list pkg)))))))
%packages)
table))
(define (manifest-entry->name+version+output entry)
(values
(manifest-entry-name entry)
@@ -109,26 +138,28 @@ return two values: name and version. For example, for SPEC
(define (manifest-entries->package-specifications entries)
(map manifest-entry->package-specification entries))
(define (profile-package-specifications profile)
"Return a list of package specifications for PROFILE."
(let ((manifest (profile-manifest profile)))
(define (generation-package-specifications profile number)
"Return a list of package specifications for generation NUMBER."
(let ((manifest (profile-manifest
(generation-file-name profile number))))
(manifest-entries->package-specifications
(manifest-entries manifest))))
(define (profile->specifications+paths profile)
"Return a list of package specifications and paths for PROFILE.
(define (generation-package-specifications+paths profile number)
"Return a list of package specifications and paths for generation NUMBER.
Each element of the list is a list of the package specification and its path."
(let ((manifest (profile-manifest profile)))
(let ((manifest (profile-manifest
(generation-file-name profile number))))
(map (lambda (entry)
(list (manifest-entry->package-specification entry)
(manifest-entry-item entry)))
(manifest-entries manifest))))
(define (profile-difference profile1 profile2)
"Return a list of package specifications for outputs installed in PROFILE1
and not installed in PROFILE2."
(let ((specs1 (profile-package-specifications profile1))
(specs2 (profile-package-specifications profile2)))
(define (generation-difference profile number1 number2)
"Return a list of package specifications for outputs installed in generation
NUMBER1 and not installed in generation NUMBER2."
(let ((specs1 (generation-package-specifications profile number1))
(specs2 (generation-package-specifications profile number2)))
(lset-difference string=? specs1 specs2)))
(define (manifest-entries->hash-table entries)
@@ -234,8 +265,7 @@ Example:
"Return a list of full names of the packages from package INPUTS."
(filter-map (match-lambda
((_ (? package? package))
(make-package-specification (package-name package)
(package-version package)))
(package-full-name package))
((_ (? package? package) output)
(make-package-specification (package-name package)
(package-version package)
@@ -264,10 +294,8 @@ Example:
(define (package-unique? package)
"Return #t if PACKAGE is a single package with such name/version."
(match (packages-by-name (package-name package)
(package-version package))
((package) #t)
(_ #f)))
(null? (cdr (packages-by-name (package-name package)
(package-version package)))))
(define %package-param-alist
`((id . ,object-address)
@@ -280,7 +308,6 @@ Example:
(description . ,package-description-string)
(home-url . ,package-home-page)
(outputs . ,package-outputs)
(systems . ,package-supported-systems)
(non-unique . ,(negate package-unique?))
(inputs . ,(lambda (pkg)
(package-inputs-names
@@ -302,39 +329,14 @@ Example:
;;; Finding packages.
(define-values (package-by-address
register-package)
(let ((table (delay (fold-packages
(lambda (package table)
(vhash-consq (object-address package)
package table))
vlist-null))))
(values
(lambda (address)
"Return package by its object ADDRESS."
(match (vhash-assq address (force table))
((_ . package) package)
(_ #f)))
(lambda (package)
"Register PACKAGE by its 'object-address', so that later
'package-by-address' can be used to access it."
(let ((table* (force table)))
(set! table
(delay (vhash-consq (object-address package)
package table*))))))))
(define (package-by-address address)
(and=> (vhash-assq address %packages)
cdr))
(define packages-by-name+version
(let ((table (delay (fold-packages
(lambda (package table)
(let ((file (location-file
(package-location package))))
(vhash-cons (cons (package-name package)
(package-version package))
package table)))
vlist-null))))
(lambda (name version)
"Return packages matching NAME and VERSION."
(vhash-fold* cons '() (cons name version) (force table)))))
(define (packages-by-name+version name version)
(or (hash-ref %package-table
(name+version->key name version))
'()))
(define (packages-by-full-name full-name)
(call-with-values
@@ -402,12 +404,6 @@ MATCH-PARAMS is a list of parameters that REGEXP can match."
(let ((re (make-regexp regexp regexp/icase)))
(matching-packages (cut package-match? <> re))))
(define (packages-by-license license)
"Return a list of packages with LICENSE."
(matching-packages
(lambda (package)
(memq license (list-maybe (package-license package))))))
(define (all-available-packages)
"Return a list of all available packages."
(matching-packages (const #t)))
@@ -421,15 +417,6 @@ MATCH-PARAMS is a list of parameters that REGEXP can match."
'()
(find-newest-available-packages)))
(define (packages-from-file file)
"Return a list of packages from FILE."
(let ((package (load (canonicalize-path file))))
(if (package? package)
(begin
(register-package package)
(list package))
'())))
;;; Making package/output patterns.
@@ -677,35 +664,24 @@ ENTRIES is a list of installed manifest entries."
(manifest-output-proc (apply-to-first manifest-output-patterns))
(regexp-proc (lambda (_ regexp params . __)
(packages-by-regexp regexp params)))
(license-proc (lambda (_ license-name)
(packages-by-license
(lookup-license license-name))))
(location-proc (lambda (_ location)
(packages-by-location-file location)))
(file-proc (lambda (_ file)
(packages-from-file file)))
(all-proc (lambda _ (all-available-packages)))
(newest-proc (lambda _ (newest-available-packages))))
`((package
(id . ,(apply-to-rest ids->package-patterns))
(name . ,(apply-to-rest specifications->package-patterns))
(installed . ,manifest-package-proc)
(generation . ,manifest-package-proc)
(obsolete . ,(apply-to-first obsolete-package-patterns))
(regexp . ,regexp-proc)
(license . ,license-proc)
(location . ,location-proc)
(from-file . ,file-proc)
(all-available . ,all-proc)
(newest-available . ,newest-proc))
(output
(id . ,(apply-to-rest ids->output-patterns))
(name . ,(apply-to-rest specifications->output-patterns))
(installed . ,manifest-output-proc)
(generation . ,manifest-output-proc)
(obsolete . ,(apply-to-first obsolete-output-patterns))
(regexp . ,regexp-proc)
(license . ,license-proc)
(location . ,location-proc)
(from-file . ,file-proc)
(all-available . ,all-proc)
(newest-available . ,newest-proc)))))
@@ -718,13 +694,16 @@ ENTRIES is a list of installed manifest entries."
search-type search-vals)
"Return information about packages or package outputs.
See 'entry-sexps' for details."
(let* ((manifest (profile-manifest profile))
(let* ((profile (if (eq? search-type 'generation)
(generation-file-name profile (car search-vals))
profile))
(manifest (profile-manifest profile))
(patterns (if (and (eq? entry-type 'output)
(eq? search-type 'profile-diff))
(eq? search-type 'generation-diff))
(match search-vals
((p1 p2)
((g1 g2)
(map specification->output-pattern
(profile-difference p1 p2)))
(generation-difference profile g1 g2)))
(_ '()))
(apply (patterns-maker entry-type search-type)
manifest search-vals)))
@@ -786,38 +765,6 @@ See 'entry-sexps' for details."
params)))
(map ->sexp generations)))
(define system-generation-boot-parameters
(memoize
(lambda (profile generation)
"Return boot parameters for PROFILE's system GENERATION."
(let* ((gen-file (generation-file-name profile generation))
(param-file (string-append gen-file "/parameters")))
(call-with-input-file param-file read-boot-parameters)))))
(define (system-generation-param-alist profile)
"Return an alist of system generation parameters and procedures for
PROFILE."
(append (generation-param-alist profile)
`((label . ,(lambda (gen)
(boot-parameters-label
(system-generation-boot-parameters
profile gen))))
(root-device . ,(lambda (gen)
(boot-parameters-root-device
(system-generation-boot-parameters
profile gen))))
(kernel . ,(lambda (gen)
(boot-parameters-kernel
(system-generation-boot-parameters
profile gen)))))))
(define (system-generation-sexps profile params search-type search-vals)
"Return an alist with information about system generations."
(let ((generations (find-generations profile search-type search-vals))
(->sexp (object-transformer (system-generation-param-alist profile)
params)))
(map ->sexp generations)))
;;; Getting package/output/generation entries (alists).
@@ -862,9 +809,6 @@ parameter/value pairs."
((generation)
(generation-sexps profile params
search-type search-vals))
((system-generation)
(system-generation-sexps profile params
search-type search-vals))
(else (entry-type-error entry-type))))
@@ -872,7 +816,9 @@ parameter/value pairs."
(define* (package->manifest-entry* package #:optional output)
(and package
(package->manifest-entry package output)))
(begin
(check-package-freshness package)
(package->manifest-entry package output))))
(define* (make-install-manifest-entries id #:optional output)
(package->manifest-entry* (package-by-id id) output))
@@ -931,16 +877,35 @@ OUTPUTS is a list of package outputs (may be an empty list)."
(new-manifest (manifest-perform-transaction
manifest transaction)))
(unless (and (null? install) (null? remove))
(parameterize ((%graft? (not dry-run?)))
(with-store store
(with-store store
(let* ((derivation (run-with-store store
(mbegin %store-monad
(set-guile-for-build (default-guile))
(profile-derivation new-manifest))))
(derivations (list derivation))
(new-profile (derivation->output-path derivation)))
(set-build-options store
#:print-build-trace #f
#:use-substitutes? use-substitutes?)
(show-manifest-transaction store manifest transaction
#:dry-run? dry-run?)
(build-and-use-profile store profile new-manifest
#:use-substitutes? use-substitutes?
#:dry-run? dry-run?))))))
(show-what-to-build store derivations
#:use-substitutes? use-substitutes?
#:dry-run? dry-run?)
(unless dry-run?
(let ((name (generation-file-name
profile
(+ 1 (generation-number profile)))))
(and (build-derivations store derivations)
(let* ((entries (manifest-entries new-manifest))
(count (length entries)))
(switch-symlinks name new-profile)
(switch-symlinks profile name)
(format #t (N_ "~a package in profile~%"
"~a packages in profile~%"
count)
count)
(display-search-paths entries profile))))))))))
(define (delete-generations* profile generations)
"Delete GENERATIONS from PROFILE.
@@ -950,22 +915,10 @@ GENERATIONS is a list of generation numbers."
(define (package-location-string id-or-name)
"Return a location string of a package with ID-OR-NAME."
(and=> (or (package-by-id id-or-name)
(match (packages-by-name id-or-name)
(() #f)
((package _ ...) package)))
(compose location->string package-location)))
(define (package-store-path package-id)
"Return a list of store directories of outputs of package PACKAGE-ID."
(match (package-by-id package-id)
(#f '())
(package
(with-store store
(map (match-lambda
((_ . drv)
(derivation-output-path drv)))
(derivation-outputs (package-derivation store package)))))))
(and-let* ((package (or (package-by-id id-or-name)
(first (packages-by-name id-or-name))))
(location (package-location package)))
(location->string location)))
(define (package-source-derivation->store-path derivation)
"Return a store path of the package source DERIVATION."
@@ -1002,16 +955,6 @@ GENERATIONS is a list of generation numbers."
(format #t "The source store path: ~a~%"
(package-source-derivation->store-path derivation))))))
(define (package-build-log-file package-id)
"Return the build log file of a package PACKAGE-ID.
Return #f if the build log is not found."
(and-let* ((package (package-by-id package-id)))
(with-store store
(let* ((derivation (package-derivation store package))
(file (derivation-file-name derivation)))
(or (log-file store file)
((@@ (guix scripts build) log-url) store file))))))
;;; Executing guix commands
@@ -1046,20 +989,13 @@ Return #t if the shell command was executed successfully."
(define (graph-type-names)
"Return a list of names of available graph node types."
(map (@ (guix graph) node-type-name)
(@ (guix scripts graph) %node-types)))
(define (refresh-updater-names)
"Return a list of names of available refresh updater types."
(map (@ (guix upstream) upstream-updater-name)
(@ (guix scripts refresh) %updaters)))
(map node-type-name %node-types))
(define (lint-checker-names)
"Return a list of names of available lint checkers."
(map (lambda (checker)
(symbol->string ((@ (guix scripts lint) lint-checker-name)
checker)))
(@ (guix scripts lint) %checkers)))
(symbol->string (lint-checker-name checker)))
%checkers))
(define (package-names)
"Return a list of names of available packages."
@@ -1071,93 +1007,3 @@ Return #t if the shell command was executed successfully."
;; See the comment to 'guix-package-names' function in "guix-popup.el".
(define (package-names-lists)
(map list (package-names)))
;;; Licenses
(define %licenses
(delay
(filter license?
(module-map (lambda (_ var)
(variable-ref var))
(resolve-interface '(guix licenses))))))
(define (licenses)
(force %licenses))
(define (license-names)
"Return a list of names of available licenses."
(map license-name (licenses)))
(define lookup-license
(memoize
(lambda (name)
"Return a license by its name."
(find (lambda (l)
(string=? name (license-name l)))
(licenses)))))
(define (lookup-license-uri name)
"Return a license URI by its name."
(and=> (lookup-license name)
license-uri))
(define %license-param-alist
`((id . ,license-name)
(name . ,license-name)
(url . ,license-uri)
(comment . ,license-comment)))
(define license->sexp
(object-transformer %license-param-alist))
(define (find-licenses search-type . search-values)
"Return a list of licenses depending on SEARCH-TYPE and SEARCH-VALUES."
(case search-type
((id name)
(let ((names search-values))
(filter-map lookup-license names)))
((all)
(licenses))))
(define (license-entries search-type . search-values)
(map license->sexp
(apply find-licenses search-type search-values)))
;;; Package locations
(define-values (packages-by-location-file
package-location-files)
(let* ((table (delay (fold-packages
(lambda (package table)
(let ((file (location-file
(package-location package))))
(vhash-cons file package table)))
vlist-null)))
(files (delay (vhash-fold
(lambda (file _ result)
(if (member file result)
result
(cons file result)))
'()
(force table)))))
(values
(lambda (file)
"Return the (possibly empty) list of packages defined in location FILE."
(vhash-fold* cons '() file (force table)))
(lambda ()
"Return the list of file names of all package locations."
(force files)))))
(define %package-location-param-alist
`((id . ,identity)
(location . ,identity)
(number-of-packages . ,(lambda (location)
(length (packages-by-location-file location))))))
(define package-location->sexp
(object-transformer %package-location-param-alist))
(define (package-location-entries)
(map package-location->sexp (package-location-files)))
+33 -72
View File
@@ -31,22 +31,12 @@
(defvar guix-messages
`((package
(id
,(lambda (_ entries ids)
(guix-message-packages-by-id entries 'package ids)))
(0 "Packages not found.")
(1 "")
(many "%d packages." count))
(name
,(lambda (_ entries names)
(guix-message-packages-by-name entries 'package names)))
(license
,(lambda (_ entries licenses)
(apply #'guix-message-packages-by-license
entries 'package licenses)))
(location
,(lambda (_ entries locations)
(apply #'guix-message-packages-by-location
entries 'package locations)))
(from-file
(0 "No package in file '%s'." val)
(1 "Package from file '%s'." val))
(regexp
(0 "No packages matching '%s'." val)
(1 "A single package matching '%s'." val)
@@ -66,27 +56,23 @@
(obsolete
(0 "No obsolete packages in profile '%s'." profile)
(1 "A single obsolete package in profile '%s'." profile)
(many "%d obsolete packages in profile '%s'." count profile)))
(many "%d obsolete packages in profile '%s'." count profile))
(generation
(0 "No packages installed in generation %d of profile '%s'."
val profile)
(1 "A single package installed in generation %d of profile '%s'."
val profile)
(many "%d packages installed in generation %d of profile '%s'."
count val profile)))
(output
(id
,(lambda (_ entries ids)
(guix-message-packages-by-id entries 'output ids)))
(0 "Package outputs not found.")
(1 "")
(many "%d package outputs." count))
(name
,(lambda (_ entries names)
(guix-message-packages-by-name entries 'output names)))
(license
,(lambda (_ entries licenses)
(apply #'guix-message-packages-by-license
entries 'output licenses)))
(location
,(lambda (_ entries locations)
(apply #'guix-message-packages-by-location
entries 'output locations)))
(from-file
(0 "No package in file '%s'." val)
(1 "Package from file '%s'." val)
(many "Package outputs from file '%s'." val))
(regexp
(0 "No package outputs matching '%s'." val)
(1 "A single package output matching '%s'." val)
@@ -107,7 +93,14 @@
(0 "No obsolete package outputs in profile '%s'." profile)
(1 "A single obsolete package output in profile '%s'." profile)
(many "%d obsolete package outputs in profile '%s'." count profile))
(profile-diff
(generation
(0 "No package outputs installed in generation %d of profile '%s'."
val profile)
(1 "A single package output installed in generation %d of profile '%s'."
val profile)
(many "%d package outputs installed in generation %d of profile '%s'."
count val profile))
(generation-diff
guix-message-outputs-by-diff))
(generation
@@ -154,22 +147,6 @@
(guix-message-string-entry-type
entry-type 'plural)))))
(defun guix-message-packages-by-id (entries entry-type ids)
"Display a message for packages or outputs searched by IDS."
(let* ((count (length entries))
(str-beg (guix-message-string-entries count entry-type))
(str-end (if (> count 1)
(concat "with the following IDs: "
(mapconcat #'guix-get-string ids ", "))
(concat "with ID " (guix-get-string (car ids))))))
(if (zerop count)
(message "%s %s.
Most likely, Guix REPL was restarted, so IDs are not actual
anymore, because they live only during the REPL process.
Try \"M-x guix-search-by-name\"."
str-beg str-end)
(message "%s %s." str-beg str-end))))
(defun guix-message-packages-by-name (entries entry-type names)
"Display a message for packages or outputs searched by NAMES."
(let* ((count (length entries))
@@ -182,20 +159,6 @@ Try \"M-x guix-search-by-name\"."
(guix-message-string-name (car names))))))
(message "%s %s." str-beg str-end)))
(defun guix-message-packages-by-license (entries entry-type license)
"Display a message for packages or outputs searched by LICENSE."
(let* ((count (length entries))
(str-beg (guix-message-string-entries count entry-type))
(str-end (format "with license '%s'" license)))
(message "%s %s." str-beg str-end)))
(defun guix-message-packages-by-location (entries entry-type location)
"Display a message for packages or outputs searched by LOCATION."
(let* ((count (length entries))
(str-beg (guix-message-string-entries count entry-type))
(str-end (format "placed in '%s'" location)))
(message "%s %s." str-beg str-end)))
(defun guix-message-generations-by-time (profile entries times)
"Display a message for generations searched by TIMES."
(let* ((count (length entries))
@@ -206,27 +169,25 @@ Try \"M-x guix-search-by-name\"."
"matching time period '%s' - '%s'.")
str-beg profile time-beg time-end)))
(defun guix-message-outputs-by-diff (_ entries profiles)
"Display a message for outputs searched by PROFILES difference."
(defun guix-message-outputs-by-diff (profile entries generations)
"Display a message for outputs searched by GENERATIONS difference."
(let* ((count (length entries))
(str-beg (guix-message-string-entries count 'output))
(profile1 (car profiles))
(profile2 (cadr profiles)))
(gen1 (car generations))
(gen2 (cadr generations)))
(cl-multiple-value-bind (new old str-action)
(if (string-lessp profile2 profile1)
(list profile1 profile2 "added to")
(list profile2 profile1 "removed from"))
(message "%s %s profile '%s' comparing with profile '%s'."
str-beg str-action new old))))
(if (> gen1 gen2)
(list gen1 gen2 "added to")
(list gen2 gen1 "removed from"))
(message (concat "%s %s generation %d comparing with "
"generation %d of profile '%s'.")
str-beg str-action new old profile))))
(defun guix-result-message (profile entries entry-type
search-type search-vals)
"Display an appropriate message after displaying ENTRIES."
(let* ((type-spec (guix-assq-value guix-messages
(if (eq entry-type 'system-generation)
'generation
entry-type)
search-type))
entry-type search-type))
(fun-or-count-spec (car type-spec)))
(if (functionp fun-or-count-spec)
(funcall fun-or-count-spec profile entries search-vals)
+7 -21
View File
@@ -128,13 +128,6 @@ subcommands, actions, etc. for this guix COMMAND."
guix-help-parse-regexp-group
"graph" "--list-types"))
(guix-memoized-defun guix-pcomplete-refresh-updaters ()
"Return a list of all available refresh updater types."
(guix-pcomplete-run-guix-and-search
guix-help-parse-list-regexp
guix-help-parse-regexp-group
"refresh" "--list-updaters"))
;;; Completing
@@ -216,8 +209,8 @@ group - the argument.")
"Complete argument for guix COMMAND."
(cond
((member command
'("archive" "build" "challenge" "edit" "environment"
"graph" "lint" "refresh" "size"))
'("archive" "build" "graph" "edit" "environment"
"lint" "refresh" "size"))
(while t
(pcomplete-here (guix-pcomplete-all-packages))))
(t (pcomplete-here* (pcomplete-entries)))))
@@ -262,8 +255,7 @@ INPUT is the current partially completed string."
(complete (guix-pcomplete-all-packages)))
((option? "-p" "--profile")
(complete* (pcomplete-dirs)))
((or (option? "-f" "--install-from-file")
(option? "-m" "--manifest"))
((option? "-m" "--manifest")
(complete* (pcomplete-entries)))))
((and (command? "archive" "build" "size")
@@ -271,9 +263,7 @@ INPUT is the current partially completed string."
(complete* guix-help-system-types))
((and (command? "build")
(or (option? "-f" "--file")
(option? "-r" "--root")
(string= "--with-source" option)))
(option? "-r" "--root"))
(complete* (pcomplete-entries)))
((and (command? "graph")
@@ -297,13 +287,9 @@ INPUT is the current partially completed string."
(option? "-u" "--user"))
(complete* (pcmpl-unix-user-names)))
((command? "refresh")
(cond
((option? "-s" "--select")
(complete* guix-help-refresh-subsets))
((option? "-t" "--type")
(guix-pcomplete-complete-comma-args
(guix-pcomplete-refresh-updaters)))))
((and (command? "refresh")
(option? "-s" "--select"))
(complete* guix-help-refresh-subsets))
((and (command? "size")
(option? "-m" "--map-file"))
+1 -14
View File
@@ -1,7 +1,6 @@
;;; guix-profiles.el --- Guix profiles
;; Copyright © 2014, 2015, 2016 Alex Kost <alezost@gmail.com>
;; Copyright © 2015 Mathieu Lirzin <mthl@openmailbox.org>
;; Copyright © 2014 Alex Kost <alezost@gmail.com>
;; This file is part of GNU Guix.
@@ -26,10 +25,6 @@
(expand-file-name "~/.guix-profile")
"User profile.")
(defvar guix-system-profile
(concat guix-config-state-directory "/profiles/system")
"System profile.")
(defvar guix-default-profile
(concat guix-config-state-directory
"/profiles/per-user/"
@@ -40,14 +35,6 @@
(defvar guix-current-profile guix-default-profile
"Current profile.")
(defvar guix-system-profile-regexp
(concat "\\`" (regexp-quote guix-system-profile))
"Regexp matching system profiles.")
(defun guix-system-profile? (profile)
"Return non-nil, if PROFILE is a system one."
(string-match-p guix-system-profile-regexp profile))
(defun guix-profile-prompt (&optional default)
"Prompt for profile and return it.
Use DEFAULT as a start directory. If it is nil, use
+80 -51
View File
@@ -1,6 +1,6 @@
;;; guix-read.el --- Minibuffer readers
;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com>
;; Copyright © 2015 Alex Kost <alezost@gmail.com>
;; This file is part of GNU Guix.
@@ -26,50 +26,95 @@
(require 'guix-help-vars)
(require 'guix-utils)
(require 'guix-backend)
(require 'guix-guile)
(require 'guix-base)
;;; Receivable lists of packages, lint checkers, etc.
(defun guix-read-file-name (prompt &optional dir default-filename
mustmatch initial predicate)
"Read file name.
This function is similar to `read-file-name' except it also
expands the file name."
(expand-file-name (read-file-name prompt dir default-filename
mustmatch initial predicate)))
(guix-memoized-defun guix-graph-type-names ()
"Return a list of names of available graph node types."
(guix-eval-read (guix-make-guile-expression 'graph-type-names)))
(defmacro guix-define-reader (name read-fun completions prompt)
"Define NAME function to read from minibuffer.
READ-FUN may be `completing-read', `completing-read-multiple' or
another function with the same arguments."
`(defun ,name (&optional prompt initial-contents)
(,read-fun ,(if prompt
`(or prompt ,prompt)
'prompt)
,completions nil nil initial-contents)))
(guix-memoized-defun guix-refresh-updater-names ()
"Return a list of names of available refresh updater types."
(guix-eval-read (guix-make-guile-expression 'refresh-updater-names)))
(defmacro guix-define-readers (&rest args)
"Define reader functions.
(guix-memoized-defun guix-lint-checker-names ()
"Return a list of names of available lint checkers."
(guix-eval-read (guix-make-guile-expression 'lint-checker-names)))
ARGS should have a form [KEYWORD VALUE] ... The following
keywords are available:
(guix-memoized-defun guix-package-names ()
"Return a list of names of available packages."
(sort
;; Work around <https://github.com/jaor/geiser/issues/64>:
;; list of strings is parsed much slower than list of lists,
;; so we use 'package-names-lists' instead of 'package-names'.
- `completions-var' - variable used to get completions.
;; (guix-eval-read (guix-make-guile-expression 'package-names))
- `completions-getter' - function used to get completions.
(mapcar #'car
(guix-eval-read (guix-make-guile-expression
'package-names-lists)))
#'string<))
- `single-reader', `single-prompt' - name of a function to read
a single value, and a prompt for it.
(guix-memoized-defun guix-license-names ()
"Return a list of names of available licenses."
(guix-eval-read (guix-make-guile-expression 'license-names)))
- `multiple-reader', `multiple-prompt' - name of a function to
read multiple values, and a prompt for it.
(guix-memoized-defun guix-package-locations ()
"Return a list of available package locations."
(sort (guix-eval-read (guix-make-guile-expression
'package-location-files))
#'string<))
- `multiple-separator' - if specified, another
`<multiple-reader-name>-string' function returning a string
of multiple values separated the specified separator will be
defined."
(let (completions-var
completions-getter
single-reader
single-prompt
multiple-reader
multiple-prompt
multiple-separator)
;;; Readers
;; Process the keyword args.
(while (keywordp (car args))
(pcase (pop args)
(`:completions-var (setq completions-var (pop args)))
(`:completions-getter (setq completions-getter (pop args)))
(`:single-reader (setq single-reader (pop args)))
(`:single-prompt (setq single-prompt (pop args)))
(`:multiple-reader (setq multiple-reader (pop args)))
(`:multiple-prompt (setq multiple-prompt (pop args)))
(`:multiple-separator (setq multiple-separator (pop args)))
(_ (pop args))))
(let ((completions
(cond ((and completions-var completions-getter)
`(or ,completions-var
(setq ,completions-var
(funcall ',completions-getter))))
(completions-var
completions-var)
(completions-getter
`(funcall ',completions-getter)))))
`(progn
,(when (and completions-var
(not (boundp completions-var)))
`(defvar ,completions-var nil))
,(when single-reader
`(guix-define-reader ,single-reader completing-read
,completions ,single-prompt))
,(when multiple-reader
`(guix-define-reader ,multiple-reader completing-read-multiple
,completions ,multiple-prompt))
,(when (and multiple-reader multiple-separator)
(let ((name (intern (concat (symbol-name multiple-reader)
"-string"))))
`(defun ,name (&optional prompt initial-contents)
(guix-concat-strings
(,multiple-reader prompt initial-contents)
,multiple-separator))))))))
(guix-define-readers
:completions-var guix-help-system-types
@@ -91,12 +136,6 @@
:single-reader guix-read-refresh-subset
:single-prompt "Refresh subset: ")
(guix-define-readers
:completions-getter guix-refresh-updater-names
:multiple-reader guix-read-refresh-updater-names
:multiple-prompt "Refresh updater,s: "
:multiple-separator ",")
(guix-define-readers
:completions-var guix-help-key-policies
:single-reader guix-read-key-policy
@@ -132,16 +171,6 @@
:multiple-prompt "Package,s: "
:multiple-separator " ")
(guix-define-readers
:completions-getter guix-license-names
:single-reader guix-read-license-name
:single-prompt "License: ")
(guix-define-readers
:completions-getter guix-package-locations
:single-reader guix-read-package-location
:single-prompt "Location: ")
(provide 'guix-read)
;;; guix-read.el ends here
-456
View File
@@ -1,456 +0,0 @@
;;; guix-ui-generation.el --- Interface for displaying generations -*- lexical-binding: t -*-
;; Copyright © 2014, 2015, 2016 Alex Kost <alezost@gmail.com>
;; 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 this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file provides an interface for displaying profile generations in
;; 'list' and 'info' buffers, and commands for working with them.
;;; Code:
(require 'cl-lib)
(require 'guix-buffer)
(require 'guix-list)
(require 'guix-info)
(require 'guix-ui)
(require 'guix-ui-package)
(require 'guix-base)
(require 'guix-backend)
(require 'guix-guile)
(require 'guix-entry)
(require 'guix-utils)
(require 'guix-profiles)
(guix-ui-define-entry-type generation)
(defun guix-generation-get-display (profile search-type &rest search-values)
"Search for generations and show results.
If PROFILE is nil, use `guix-current-profile'.
See `guix-ui-get-entries' for the meaning of SEARCH-TYPE and
SEARCH-VALUES."
(apply #'guix-list-get-display-entries
'generation
(or profile guix-current-profile)
search-type search-values))
(defun guix-delete-generations (profile generations
&optional operation-buffer)
"Delete GENERATIONS from PROFILE.
Each element from GENERATIONS is a generation number."
(when (or (not guix-operation-confirm)
(y-or-n-p
(let ((count (length generations)))
(if (> count 1)
(format "Delete %d generations from profile '%s'? "
count profile)
(format "Delete generation %d from profile '%s'? "
(car generations) profile)))))
(guix-eval-in-repl
(guix-make-guile-expression
'delete-generations* profile generations)
operation-buffer)))
(defun guix-switch-to-generation (profile generation
&optional operation-buffer)
"Switch PROFILE to GENERATION."
(when (or (not guix-operation-confirm)
(y-or-n-p (format "Switch profile '%s' to generation %d? "
profile generation)))
(guix-eval-in-repl
(guix-make-guile-expression
'switch-to-generation* profile generation)
operation-buffer)))
(defun guix-system-generation? ()
"Return non-nil, if current generation is a system one."
(eq (guix-buffer-current-entry-type)
'system-generation))
(defun guix-generation-current-packages-profile (&optional generation)
"Return a directory where packages are installed for the
current profile's GENERATION."
(guix-packages-profile (guix-ui-current-profile)
generation
(guix-system-generation?)))
;;; Generation 'info'
(guix-ui-info-define-interface generation
:buffer-name "*Guix Generation Info*"
:format '((number format guix-generation-info-insert-number)
(prev-number format (format))
(current format guix-generation-info-insert-current)
(path simple (indent guix-file))
(time format (time)))
:titles '((path . "File name")
(prev-number . "Previous number")))
(defface guix-generation-info-number
'((t :inherit font-lock-keyword-face))
"Face used for a number of a generation."
:group 'guix-generation-info-faces)
(defface guix-generation-info-current
'((t :inherit guix-package-info-installed-outputs))
"Face used if a generation is the current one."
:group 'guix-generation-info-faces)
(defface guix-generation-info-not-current
'((t nil))
"Face used if a generation is not the current one."
:group 'guix-generation-info-faces)
(defun guix-generation-info-insert-number (number &optional _)
"Insert generation NUMBER and action buttons."
(guix-info-insert-value-format number 'guix-generation-info-number)
(guix-info-insert-indent)
(guix-info-insert-action-button
"Packages"
(lambda (btn)
(guix-buffer-get-display-entries
'list guix-package-list-type
(list (guix-generation-current-packages-profile
(button-get btn 'number))
'installed)
'add))
"Show installed packages for this generation"
'number number)
(guix-info-insert-indent)
(guix-info-insert-action-button
"Delete"
(lambda (btn)
(guix-delete-generations (guix-ui-current-profile)
(list (button-get btn 'number))
(current-buffer)))
"Delete this generation"
'number number))
(defun guix-generation-info-insert-current (val entry)
"Insert boolean value VAL showing whether this generation is current."
(if val
(guix-info-insert-value-format "Yes" 'guix-generation-info-current)
(guix-info-insert-value-format "No" 'guix-generation-info-not-current)
(guix-info-insert-indent)
(guix-info-insert-action-button
"Switch"
(lambda (btn)
(guix-switch-to-generation (guix-ui-current-profile)
(button-get btn 'number)
(current-buffer)))
"Switch to this generation (make it the current one)"
'number (guix-entry-value entry 'number))))
;;; Generation 'list'
(guix-ui-list-define-interface generation
:buffer-name "*Guix Generation List*"
:format '((number nil 5 guix-list-sort-numerically-0 :right-align t)
(current guix-generation-list-get-current 10 t)
(time guix-list-get-time 20 t)
(path guix-list-get-file-name 30 t))
:titles '((number . "N."))
:sort-key '(number . t)
:marks '((delete . ?D)))
(let ((map guix-generation-list-mode-map))
(define-key map (kbd "RET") 'guix-generation-list-show-packages)
(define-key map (kbd "+") 'guix-generation-list-show-added-packages)
(define-key map (kbd "-") 'guix-generation-list-show-removed-packages)
(define-key map (kbd "=") 'guix-generation-list-diff)
(define-key map (kbd "D") 'guix-generation-list-diff)
(define-key map (kbd "e") 'guix-generation-list-ediff)
(define-key map (kbd "x") 'guix-generation-list-execute)
(define-key map (kbd "s") 'guix-generation-list-switch)
(define-key map (kbd "c") 'guix-generation-list-switch)
(define-key map (kbd "d") 'guix-generation-list-mark-delete))
(defun guix-generation-list-get-current (val &optional _)
"Return string from VAL showing whether this generation is current.
VAL is a boolean value."
(if val "(current)" ""))
(defun guix-generation-list-switch ()
"Switch current profile to the generation at point."
(interactive)
(let* ((entry (guix-list-current-entry))
(current (guix-entry-value entry 'current))
(number (guix-entry-value entry 'number)))
(if current
(user-error "This generation is already the current one")
(guix-switch-to-generation (guix-ui-current-profile)
number (current-buffer)))))
(defun guix-generation-list-show-packages ()
"List installed packages for the generation at point."
(interactive)
(guix-package-get-display
(guix-generation-current-packages-profile (guix-list-current-id))
'installed))
(defun guix-generation-list-generations-to-compare ()
"Return a sorted list of 2 marked generations for comparing."
(let ((numbers (guix-list-get-marked-id-list 'general)))
(if (/= (length numbers) 2)
(user-error "2 generations should be marked for comparing")
(sort numbers #'<))))
(defun guix-generation-list-profiles-to-compare ()
"Return a sorted list of 2 marked generation profiles for comparing."
(mapcar #'guix-generation-current-packages-profile
(guix-generation-list-generations-to-compare)))
(defun guix-generation-list-show-added-packages ()
"List package outputs added to the latest marked generation.
If 2 generations are marked with \\[guix-list-mark], display
outputs installed in the latest marked generation that were not
installed in the other one."
(interactive)
(guix-buffer-get-display-entries
'list 'output
(cl-list* (guix-ui-current-profile)
'profile-diff
(reverse (guix-generation-list-profiles-to-compare)))
'add))
(defun guix-generation-list-show-removed-packages ()
"List package outputs removed from the latest marked generation.
If 2 generations are marked with \\[guix-list-mark], display
outputs not installed in the latest marked generation that were
installed in the other one."
(interactive)
(guix-buffer-get-display-entries
'list 'output
(cl-list* (guix-ui-current-profile)
'profile-diff
(guix-generation-list-profiles-to-compare))
'add))
(defun guix-generation-list-compare (diff-fun gen-fun)
"Run GEN-FUN on the 2 marked generations and run DIFF-FUN on the results."
(cl-multiple-value-bind (gen1 gen2)
(guix-generation-list-generations-to-compare)
(funcall diff-fun
(funcall gen-fun gen1)
(funcall gen-fun gen2))))
(defun guix-generation-list-ediff-manifests ()
"Run Ediff on manifests of the 2 marked generations."
(interactive)
(guix-generation-list-compare
#'ediff-files
#'guix-profile-generation-manifest-file))
(defun guix-generation-list-diff-manifests ()
"Run Diff on manifests of the 2 marked generations."
(interactive)
(guix-generation-list-compare
#'guix-diff
#'guix-profile-generation-manifest-file))
(defun guix-generation-list-ediff-packages ()
"Run Ediff on package outputs installed in the 2 marked generations."
(interactive)
(guix-generation-list-compare
#'ediff-buffers
#'guix-profile-generation-packages-buffer))
(defun guix-generation-list-diff-packages ()
"Run Diff on package outputs installed in the 2 marked generations."
(interactive)
(guix-generation-list-compare
#'guix-diff
#'guix-profile-generation-packages-buffer))
(defun guix-generation-list-ediff (arg)
"Run Ediff on package outputs installed in the 2 marked generations.
With ARG, run Ediff on manifests of the marked generations."
(interactive "P")
(if arg
(guix-generation-list-ediff-manifests)
(guix-generation-list-ediff-packages)))
(defun guix-generation-list-diff (arg)
"Run Diff on package outputs installed in the 2 marked generations.
With ARG, run Diff on manifests of the marked generations."
(interactive "P")
(if arg
(guix-generation-list-diff-manifests)
(guix-generation-list-diff-packages)))
(defun guix-generation-list-mark-delete (&optional arg)
"Mark the current generation for deletion and move to the next line.
With ARG, mark all generations for deletion."
(interactive "P")
(if arg
(guix-list-mark-all 'delete)
(guix-list--mark 'delete t)))
(defun guix-generation-list-execute ()
"Delete marked generations."
(interactive)
(let ((marked (guix-list-get-marked-id-list 'delete)))
(or marked
(user-error "No generations marked for deletion"))
(guix-delete-generations (guix-ui-current-profile)
marked (current-buffer))))
;;; Inserting packages to compare generations
(defcustom guix-generation-packages-buffer-name-function
#'guix-generation-packages-buffer-name-default
"Function used to define name of a buffer with generation packages.
This function is called with 2 arguments: PROFILE (string) and
GENERATION (number)."
:type '(choice (function-item guix-generation-packages-buffer-name-default)
(function-item guix-generation-packages-buffer-name-long)
(function :tag "Other function"))
:group 'guix-generation)
(defcustom guix-generation-packages-update-buffer t
"If non-nil, always update list of packages during comparing generations.
If nil, generation packages are received only once. So when you
compare generation 1 and generation 2, the packages for both
generations will be received. Then if you compare generation 1
and generation 3, only the packages for generation 3 will be
received. Thus if you use comparing of different generations a
lot, you may set this variable to nil to improve the
performance."
:type 'boolean
:group 'guix-generation)
(defvar guix-generation-output-name-width 30
"Width of an output name \"column\".
This variable is used in auxiliary buffers for comparing generations.")
(defun guix-generation-packages (profile)
"Return a list of sorted packages installed in PROFILE.
Each element of the list is a list of the package specification
and its store path."
(let ((names+paths (guix-eval-read
(guix-make-guile-expression
'profile->specifications+paths profile))))
(sort names+paths
(lambda (a b)
(string< (car a) (car b))))))
(defun guix-generation-packages-buffer-name-default (profile generation)
"Return name of a buffer for displaying GENERATION's package outputs.
Use base name of PROFILE file name."
(let ((profile-name (file-name-base (directory-file-name profile))))
(format "*Guix %s: generation %s*"
profile-name generation)))
(defun guix-generation-packages-buffer-name-long (profile generation)
"Return name of a buffer for displaying GENERATION's package outputs.
Use the full PROFILE file name."
(format "*Guix generation %s (%s)*"
generation profile))
(defun guix-generation-packages-buffer-name (profile generation)
"Return name of a buffer for displaying GENERATION's package outputs."
(funcall guix-generation-packages-buffer-name-function
profile generation))
(defun guix-generation-insert-package (name path)
"Insert package output NAME and store PATH at point."
(insert name)
(indent-to guix-generation-output-name-width 2)
(insert path "\n"))
(defun guix-generation-insert-packages (buffer profile)
"Insert package outputs installed in PROFILE in BUFFER."
(with-current-buffer buffer
(setq buffer-read-only nil
indent-tabs-mode nil)
(erase-buffer)
(mapc (lambda (name+path)
(guix-generation-insert-package
(car name+path) (cadr name+path)))
(guix-generation-packages profile))))
(defun guix-generation-packages-buffer (profile generation &optional system?)
"Return buffer with package outputs installed in PROFILE's GENERATION.
Create the buffer if needed."
(let ((buf-name (guix-generation-packages-buffer-name
profile generation)))
(or (and (null guix-generation-packages-update-buffer)
(get-buffer buf-name))
(let ((buf (get-buffer-create buf-name)))
(guix-generation-insert-packages
buf
(guix-packages-profile profile generation system?))
buf))))
(defun guix-profile-generation-manifest-file (generation)
"Return the file name of a GENERATION's manifest.
GENERATION is a generation number of the current profile."
(guix-manifest-file (guix-ui-current-profile)
generation
(guix-system-generation?)))
(defun guix-profile-generation-packages-buffer (generation)
"Insert GENERATION's package outputs in a buffer and return it.
GENERATION is a generation number of the current profile."
(guix-generation-packages-buffer (guix-ui-current-profile)
generation
(guix-system-generation?)))
;;; Interactive commands
;;;###autoload
(defun guix-generations (&optional profile)
"Display information about all generations.
If PROFILE is nil, use `guix-current-profile'.
Interactively with prefix, prompt for PROFILE."
(interactive (list (guix-ui-read-profile)))
(guix-generation-get-display profile 'all))
;;;###autoload
(defun guix-last-generations (number &optional profile)
"Display information about last NUMBER generations.
If PROFILE is nil, use `guix-current-profile'.
Interactively with prefix, prompt for PROFILE."
(interactive
(list (read-number "The number of last generations: ")
(guix-ui-read-profile)))
(guix-generation-get-display profile 'last number))
;;;###autoload
(defun guix-generations-by-time (from to &optional profile)
"Display information about generations created between FROM and TO.
FROM and TO should be time values.
If PROFILE is nil, use `guix-current-profile'.
Interactively with prefix, prompt for PROFILE."
(interactive
(list (guix-read-date "Find generations (from): ")
(guix-read-date "Find generations (to): ")
(guix-ui-read-profile)))
(guix-generation-get-display profile 'time
(float-time from)
(float-time to)))
(provide 'guix-ui-generation)
;;; guix-ui-generation.el ends here
-150
View File
@@ -1,150 +0,0 @@
;;; guix-ui-license.el --- Interface for displaying licenses
;; Copyright © 2016 Alex Kost <alezost@gmail.com>
;; 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 this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file provides 'list'/'info' interface for displaying licenses of
;; Guix packages.
;;; Code:
(require 'guix-buffer)
(require 'guix-list)
(require 'guix-info)
(require 'guix-backend)
(require 'guix-guile)
(require 'guix-license)
(guix-define-entry-type license)
(defun guix-license-get-entries (search-type &rest args)
"Receive 'license' entries.
SEARCH-TYPE may be one of the following symbols: `all', `id', `name'."
(guix-eval-read
(apply #'guix-make-guile-expression
'license-entries search-type args)))
(defun guix-license-get-display (search-type &rest args)
"Search for licenses and show results."
(apply #'guix-list-get-display-entries
'license search-type args))
(defun guix-license-message (entries search-type &rest args)
"Display a message after showing license ENTRIES."
;; Some objects in (guix licenses) module are procedures (e.g.,
;; 'non-copyleft' or 'x11-style'). Such licenses cannot be "described".
(when (null entries)
(if (cdr args)
(message "Unknown licenses.")
(message "Unknown license."))))
;;; License 'info'
(guix-info-define-interface license
:buffer-name "*Guix License Info*"
:get-entries-function 'guix-license-get-entries
:message-function 'guix-license-message
:format '((name ignore (simple guix-info-heading))
ignore
guix-license-insert-packages-button
(url ignore (simple guix-url))
guix-license-insert-comment
ignore
guix-license-insert-file)
:titles '((url . "URL")))
(declare-function guix-packages-by-license "guix-ui-package")
(defun guix-license-insert-packages-button (entry)
"Insert button to display packages by license ENTRY."
(let ((license (guix-entry-value entry 'name)))
(guix-info-insert-action-button
"Packages"
(lambda (btn)
(guix-packages-by-license (button-get btn 'license)))
(format "Display packages with license '%s'" license)
'license license)))
(defun guix-license-insert-comment (entry)
"Insert 'comment' of a license ENTRY."
(let ((comment (guix-entry-value entry 'comment)))
(if (and comment
(string-match-p "^http" comment))
(guix-info-insert-value-simple comment 'guix-url)
(guix-info-insert-title-simple
(guix-info-param-title 'license 'comment))
(guix-info-insert-value-indent comment))))
(defun guix-license-insert-file (entry)
"Insert button to open license definition."
(let ((license (guix-entry-value entry 'name)))
(guix-insert-button
(guix-license-file) 'guix-file
'help-echo (format "Open definition of license '%s'" license)
'action (lambda (btn)
(guix-find-license-definition (button-get btn 'license)))
'license license)))
;;; License 'list'
(guix-list-define-interface license
:buffer-name "*Guix Licenses*"
:get-entries-function 'guix-license-get-entries
:describe-function 'guix-license-list-describe
:message-function 'guix-license-message
:format '((name nil 40 t)
(url guix-list-get-url 50 t))
:titles '((name . "License"))
:sort-key '(name))
(let ((map guix-license-list-mode-map))
(define-key map (kbd "e") 'guix-license-list-edit)
(define-key map (kbd "RET") 'guix-license-list-show-packages))
(defun guix-license-list-describe (ids)
"Describe licenses with IDS (list of identifiers)."
(guix-buffer-display-entries
(guix-entries-by-ids ids (guix-buffer-current-entries))
'info 'license (cl-list* 'id ids) 'add))
(defun guix-license-list-show-packages ()
"Display packages with the license at point."
(interactive)
(guix-packages-by-license (guix-list-current-id)))
(defun guix-license-list-edit (&optional directory)
"Go to the location of the current license definition.
See `guix-license-file' for the meaning of DIRECTORY."
(interactive (list (guix-read-directory)))
(guix-find-license-definition (guix-list-current-id) directory))
;;; Interactive commands
;;;###autoload
(defun guix-licenses ()
"Display licenses of the Guix packages."
(interactive)
(guix-license-get-display 'all))
(provide 'guix-ui-license)
;;; guix-ui-license.el ends here
-83
View File
@@ -1,83 +0,0 @@
;;; guix-ui-location.el --- Interface for displaying package locations
;; Copyright © 2016 Alex Kost <alezost@gmail.com>
;; 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 Location as published by
;; the Free Software Foundation, either version 3 of the Location, 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 Location for more details.
;; You should have received a copy of the GNU General Public Location
;; along with this program. If not, see <http://www.gnu.org/locations/>.
;;; Commentary:
;; This file provides a 'list' interface for displaying locations of Guix
;; packages.
;;; Code:
(require 'guix-buffer)
(require 'guix-list)
(require 'guix-location)
(require 'guix-backend)
(guix-define-entry-type location)
(defun guix-location-get-entries ()
"Receive 'package location' entries."
(guix-eval-read "(package-location-entries)"))
;;; Location 'list'
(guix-list-define-interface location
:buffer-name "*Guix Package Locations*"
:get-entries-function 'guix-location-get-entries
:format '((location guix-location-list-file-name-specification 50 t)
(number-of-packages nil 10 guix-list-sort-numerically-1
:right-align t))
:sort-key '(location))
(let ((map guix-location-list-mode-map))
(define-key map (kbd "RET") 'guix-location-list-show-packages)
;; "Location Info" buffer is not defined (it would be useless), so
;; unbind "i" key (by default, it is used to display Info buffer).
(define-key map (kbd "i") nil))
(defun guix-location-list-file-name-specification (location &optional _)
"Return LOCATION button specification for `tabulated-list-entries'."
(list location
'face 'guix-list-file-name
'action (lambda (btn)
(guix-find-location (button-get btn 'location)))
'follow-link t
'help-echo (concat "Find location: " location)
'location location))
(declare-function guix-packages-by-location "guix-ui-package")
(defun guix-location-list-show-packages ()
"Display packages placed in the location at point."
(interactive)
(guix-packages-by-location (guix-list-current-id)))
;;; Interactive commands
;;;###autoload
(defun guix-locations ()
"Display locations of the Guix packages."
(interactive)
(guix-list-get-display-entries 'location))
(provide 'guix-ui-location)
;;; guix-ui-location.el ends here
File diff suppressed because it is too large Load Diff
-105
View File
@@ -1,105 +0,0 @@
;;; guix-ui-system-generation.el --- Interface for displaying system generations -*- lexical-binding: t -*-
;; Copyright © 2016 Alex Kost <alezost@gmail.com>
;; 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 this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file provides an interface for displaying system generations
;; in 'list' and 'info' buffers, and commands for working with them.
;;; Code:
(require 'cl-lib)
(require 'guix-list)
(require 'guix-ui)
(require 'guix-ui-generation)
(require 'guix-profiles)
(guix-ui-define-entry-type system-generation)
(defun guix-system-generation-get-display (search-type &rest search-values)
"Search for system generations and show results.
See `guix-ui-get-entries' for the meaning of SEARCH-TYPE and
SEARCH-VALUES."
(apply #'guix-list-get-display-entries
'system-generation
guix-system-profile
search-type search-values))
;;; System generation 'info'
(guix-ui-info-define-interface system-generation
:buffer-name "*Guix Generation Info*"
:format '((number format guix-generation-info-insert-number)
(label format (format))
(prev-number format (format))
(current format guix-generation-info-insert-current)
(path format (format guix-file))
(time format (time))
(root-device format (format))
(kernel format (format guix-file)))
:titles guix-generation-info-titles)
;;; System generation 'list'
;; FIXME It is better to make `guix-generation-list-shared-map' with
;; common keys for both usual and system generations.
(defvar guix-system-generation-list-mode-map
(copy-keymap guix-generation-list-mode-map)
"Keymap for `guix-system-generation-list-mode' buffers.")
(guix-ui-list-define-interface system-generation
:buffer-name "*Guix Generation List*"
:format '((number nil 5 guix-list-sort-numerically-0 :right-align t)
(current guix-generation-list-get-current 10 t)
(label nil 40 t)
(time guix-list-get-time 20 t)
(path guix-list-get-file-name 30 t))
:titles guix-generation-list-titles
:sort-key '(number . t)
:marks '((delete . ?D)))
;;; Interactive commands
;;;###autoload
(defun guix-system-generations ()
"Display information about system generations."
(interactive)
(guix-system-generation-get-display 'all))
;;;###autoload
(defun guix-last-system-generations (number)
"Display information about last NUMBER of system generations."
(interactive "nThe number of last generations: ")
(guix-system-generation-get-display 'last number))
;;;###autoload
(defun guix-system-generations-by-time (from to)
"Display information about system generations created between FROM and TO."
(interactive
(list (guix-read-date "Find generations (from): ")
(guix-read-date "Find generations (to): ")))
(guix-system-generation-get-display
'time (float-time from) (float-time to)))
(provide 'guix-ui-system-generation)
;;; guix-ui-system-generation.el ends here
-323
View File
@@ -1,323 +0,0 @@
;;; guix-ui.el --- Common code for Guix package management interface -*- lexical-binding: t -*-
;; Copyright © 2014, 2015, 2016 Alex Kost <alezost@gmail.com>
;; 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 this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file provides some general code for 'list'/'info' interfaces for
;; packages and generations.
;;; Code:
(require 'cl-lib)
(require 'guix-backend)
(require 'guix-buffer)
(require 'guix-guile)
(require 'guix-utils)
(require 'guix-messages)
(require 'guix-profiles)
(guix-define-groups ui
:group-doc "\
Settings for 'ui' (Guix package management) buffers.
This group includes settings for displaying packages, outputs and
generations in 'list' and 'info' buffers.")
(defvar guix-ui-map
(let ((map (make-sparse-keymap)))
(define-key map (kbd "M") 'guix-apply-manifest)
(define-key map (kbd "C-c C-z") 'guix-switch-to-repl)
map)
"Parent keymap for Guix package/generation buffers.")
(guix-buffer-define-current-args-accessors
"guix-ui-current" "profile" "search-type" "search-values")
(defun guix-ui-read-profile ()
"Return `guix-current-profile' or prompt for it.
This function is intended for using in `interactive' forms."
(if current-prefix-arg
(guix-profile-prompt)
guix-current-profile))
(defun guix-ui-get-entries (profile entry-type search-type search-values
&optional params)
"Receive ENTRY-TYPE entries for PROFILE.
Call an appropriate scheme procedure and return a list of entries.
ENTRY-TYPE should be one of the following symbols: `package',
`output' or `generation'.
SEARCH-TYPE may be one of the following symbols:
- If ENTRY-TYPE is `package' or `output': `id', `name', `regexp',
`all-available', `newest-available', `installed', `obsolete',
`generation'.
- If ENTRY-TYPE is `generation': `id', `last', `all', `time'.
PARAMS is a list of parameters for receiving. If nil, get data
with all available parameters."
(guix-eval-read
(guix-make-guile-expression
'entries
profile params entry-type search-type search-values)))
(defun guix-ui-list-describe (ids)
"Describe 'ui' entries with IDS (list of identifiers)."
(guix-buffer-get-display-entries
'info (guix-buffer-current-entry-type)
(cl-list* (guix-ui-current-profile) 'id ids)
'add))
;;; Buffers and auto updating
(defcustom guix-ui-update-after-operation 'current
"Define what kind of data to update after executing an operation.
After successful executing an operation in the Guix REPL (for
example after installing a package), the data in Guix buffers
will or will not be automatically updated depending on a value of
this variable.
If nil, update nothing (do not revert any buffer).
If `current', update the buffer from which an operation was performed.
If `all', update all Guix buffers (not recommended)."
:type '(choice (const :tag "Do nothing" nil)
(const :tag "Update operation buffer" current)
(const :tag "Update all Guix buffers" all))
:group 'guix-ui)
(defcustom guix-ui-buffer-name-function
#'guix-ui-buffer-name-full
"Function used to define a name of a Guix buffer.
The function is called with 2 arguments: BASE-NAME and PROFILE."
:type '(choice (function-item guix-ui-buffer-name-full)
(function-item guix-ui-buffer-name-short)
(function-item guix-ui-buffer-name-simple)
(function :tag "Other function"))
:group 'guix-ui)
(defun guix-ui-buffer-name-simple (base-name &rest _)
"Return BASE-NAME."
base-name)
(defun guix-ui-buffer-name-short (base-name profile)
"Return buffer name by appending BASE-NAME and PROFILE's base file name."
(guix-compose-buffer-name base-name
(file-name-base (directory-file-name profile))))
(defun guix-ui-buffer-name-full (base-name profile)
"Return buffer name by appending BASE-NAME and PROFILE's full name."
(guix-compose-buffer-name base-name profile))
(defun guix-ui-buffer-name (base-name profile)
"Return Guix buffer name based on BASE-NAME and profile.
See `guix-ui-buffer-name-function' for details."
(funcall guix-ui-buffer-name-function
base-name profile))
(defun guix-ui-buffer? (&optional buffer modes)
"Return non-nil if BUFFER mode is derived from any of the MODES.
If BUFFER is nil, check current buffer.
If MODES is nil, use `guix-list-mode' and `guix-info-mode'."
(with-current-buffer (or buffer (current-buffer))
(apply #'derived-mode-p
(or modes '(guix-list-mode guix-info-mode)))))
(defun guix-ui-buffers (&optional modes)
"Return a list of all buffers with major modes derived from MODES.
If MODES is nil, return list of all Guix 'list' and 'info' buffers."
(cl-remove-if-not (lambda (buf)
(guix-ui-buffer? buf modes))
(buffer-list)))
(defun guix-ui-update-buffer (buffer)
"Update data in a 'list' or 'info' BUFFER."
(with-current-buffer buffer
(guix-buffer-revert nil t)))
(defun guix-ui-update-buffers-after-operation ()
"Update buffers after Guix operation if needed.
See `guix-ui-update-after-operation' for details."
(let ((to-update
(and guix-operation-buffer
(cl-case guix-ui-update-after-operation
(current (and (buffer-live-p guix-operation-buffer)
(guix-ui-buffer? guix-operation-buffer)
(list guix-operation-buffer)))
(all (guix-ui-buffers))))))
(setq guix-operation-buffer nil)
(mapc #'guix-ui-update-buffer to-update)))
(add-hook 'guix-after-repl-operation-hook
'guix-ui-update-buffers-after-operation)
;;; Interface definers
(defmacro guix-ui-define-entry-type (entry-type &rest args)
"Define general code for ENTRY-TYPE.
Remaining arguments (ARGS) should have a form [KEYWORD VALUE] ...
The rest keyword arguments are passed to
`guix-define-entry-type' macro."
(declare (indent 1))
`(guix-define-entry-type ,entry-type
:parent-group guix-ui
:parent-faces-group guix-ui-faces
,@args))
(defmacro guix-ui-define-interface (buffer-type entry-type &rest args)
"Define BUFFER-TYPE interface for displaying ENTRY-TYPE entries.
Remaining arguments (ARGS) should have a form [KEYWORD VALUE] ...
In the following description TYPE means ENTRY-TYPE-BUFFER-TYPE.
Required keywords:
- `:buffer-name' - base part of a buffer name. It is used in a
generated `guix-TYPE-buffer-name' function; see
`guix-ui-buffer-name' for details.
Optional keywords:
- `:required' - default value of the generated
`guix-TYPE-required-params' variable.
The rest keyword arguments are passed to
`guix-BUFFER-TYPE-define-interface' macro.
Along with the mentioned definitions, this macro also defines:
- `guix-TYPE-mode-map' - keymap based on `guix-ui-map' and
`guix-BUFFER-TYPE-mode-map'.
- `guix-TYPE-get-entries' - a wrapper around `guix-ui-get-entries'.
- `guix-TYPE-message' - a wrapper around `guix-result-message'."
(declare (indent 2))
(let* ((entry-type-str (symbol-name entry-type))
(buffer-type-str (symbol-name buffer-type))
(prefix (concat "guix-" entry-type-str "-"
buffer-type-str))
(mode-str (concat prefix "-mode"))
(mode-map (intern (concat mode-str "-map")))
(parent-map (intern (format "guix-%s-mode-map"
buffer-type-str)))
(required-var (intern (concat prefix "-required-params")))
(buffer-name-fun (intern (concat prefix "-buffer-name")))
(get-fun (intern (concat prefix "-get-entries")))
(message-fun (intern (concat prefix "-message")))
(displayed-fun (intern (format "guix-%s-displayed-params"
buffer-type-str)))
(definer (intern (format "guix-%s-define-interface"
buffer-type-str))))
(guix-keyword-args-let args
((buffer-name-val :buffer-name)
(required-val :required ''(id)))
`(progn
(defvar ,mode-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent
map (make-composed-keymap ,parent-map guix-ui-map))
map)
,(format "Keymap for `%s' buffers." mode-str))
(defvar ,required-var ,required-val
,(format "\
List of the required '%s' parameters.
These parameters are received by `%S'
along with the displayed parameters.
Do not remove `id' from this list as it is required for
identifying an entry."
entry-type-str get-fun))
(defun ,buffer-name-fun (profile &rest _)
,(format "\
Return a name of '%s' buffer for displaying '%s' entries.
See `guix-ui-buffer-name' for details."
buffer-type-str entry-type-str)
(guix-ui-buffer-name ,buffer-name-val profile))
(defun ,get-fun (profile search-type &rest search-values)
,(format "\
Receive '%s' entries for displaying them in '%s' buffer.
See `guix-ui-get-entries' for details."
entry-type-str buffer-type-str)
(guix-ui-get-entries
profile ',entry-type search-type search-values
(cl-union ,required-var
(,displayed-fun ',entry-type))))
(defun ,message-fun (entries profile search-type
&rest search-values)
,(format "\
Display a message after showing '%s' entries."
entry-type-str)
(guix-result-message
profile entries ',entry-type search-type search-values))
(,definer ,entry-type
:get-entries-function ',get-fun
:message-function ',message-fun
:buffer-name ',buffer-name-fun
,@%foreign-args)))))
(defmacro guix-ui-info-define-interface (entry-type &rest args)
"Define 'info' interface for displaying ENTRY-TYPE entries.
See `guix-ui-define-interface'."
(declare (indent 1))
`(guix-ui-define-interface info ,entry-type
,@args))
(defmacro guix-ui-list-define-interface (entry-type &rest args)
"Define 'list' interface for displaying ENTRY-TYPE entries.
Remaining arguments (ARGS) should have a form [KEYWORD VALUE] ...
Optional keywords:
- `:describe-function' - default value of the generated
`guix-ENTRY-TYPE-list-describe-function' variable (if not
specified, use `guix-ui-list-describe').
The rest keyword arguments are passed to
`guix-ui-define-interface' macro."
(declare (indent 1))
(guix-keyword-args-let args
((describe-val :describe-function))
`(guix-ui-define-interface list ,entry-type
:describe-function ,(or describe-val ''guix-ui-list-describe)
,@args)))
(defvar guix-ui-font-lock-keywords
(eval-when-compile
`((,(rx "(" (group (or "guix-ui-define-entry-type"
"guix-ui-define-interface"
"guix-ui-info-define-interface"
"guix-ui-list-define-interface"))
symbol-end)
. 1))))
(font-lock-add-keywords 'emacs-lisp-mode guix-ui-font-lock-keywords)
(provide 'guix-ui)
;;; guix-ui.el ends here
+21 -320
View File
@@ -1,6 +1,6 @@
;;; guix-utils.el --- General utility functions -*- lexical-binding: t -*-
;; Copyright © 2014, 2015, 2016 Alex Kost <alezost@gmail.com>
;; Copyright © 2014, 2015 Alex Kost <alezost@gmail.com>
;; This file is part of GNU Guix.
@@ -64,17 +64,6 @@ Use `guix-time-format'."
"Return one-line string from a multi-line STR."
(replace-regexp-in-string "\n" " " str))
(defmacro guix-with-indent (indent &rest body)
"Evaluate BODY and indent inserted text by INDENT number of spaces."
(declare (indent 1) (debug t))
(let ((region-beg-var (make-symbol "region-beg"))
(indent-var (make-symbol "indent")))
`(let ((,region-beg-var (point))
(,indent-var ,indent))
,@body
(unless (zerop ,indent-var)
(indent-rigidly ,region-beg-var (point) ,indent-var)))))
(defun guix-format-insert (val &optional face format)
"Convert VAL into a string and insert it at point.
If FACE is non-nil, propertize VAL with FACE.
@@ -84,33 +73,16 @@ If FORMAT is non-nil, format VAL with FORMAT."
(format format str)
str))))
(cl-defun guix-mapinsert (function sequence separator &key indent column)
(defun guix-mapinsert (function sequence separator)
"Like `mapconcat' but for inserting text.
Apply FUNCTION to each element of SEQUENCE, and insert SEPARATOR
at point between each FUNCTION call.
If INDENT is non-nil, it should be a number of spaces used to
indent each line of the inserted text.
If COLUMN is non-nil, it should be a column number which
shouldn't be exceeded by the inserted text."
(pcase sequence
(`(,first . ,rest)
(let* ((indent (or indent 0))
(max-column (and column (- column indent))))
(guix-with-indent indent
(funcall function first)
(dolist (element rest)
(let ((before-sep-pos (and column (point))))
(insert separator)
(let ((after-sep-pos (and column (point))))
(funcall function element)
(when (and column
(> (current-column) max-column))
(save-excursion
(delete-region before-sep-pos after-sep-pos)
(goto-char before-sep-pos)
(insert "\n")))))))))))
at point between each FUNCTION call."
(when sequence
(funcall function (car sequence))
(mapc (lambda (obj)
(insert separator)
(funcall function obj))
(cdr sequence))))
(defun guix-insert-button (label &optional type &rest properties)
"Make button of TYPE with LABEL and insert it at point.
@@ -121,28 +93,6 @@ See `insert-text-button' for the meaning of PROPERTIES."
:type (or type 'button)
properties)))
(defun guix-buttonize (value button-type separator &rest properties)
"Make BUTTON-TYPE button(s) from VALUE.
Return a string with button(s).
VALUE should be a string or a list of strings. If it is a list
of strings, buttons are separated with SEPARATOR string.
PROPERTIES are passed to `guix-insert-button'."
(with-temp-buffer
(let ((labels (if (listp value) value (list value))))
(guix-mapinsert (lambda (label)
(apply #'guix-insert-button
label button-type properties))
labels
separator))
(buffer-substring (point-min) (point-max))))
(defun guix-button-type? (symbol)
"Return non-nil, if SYMBOL is a button type."
(and symbol
(get symbol 'button-category-symbol)))
(defun guix-split-insert (val &optional face col separator)
"Convert VAL into a string, split it and insert at point.
@@ -161,11 +111,14 @@ Separate inserted lines with SEPARATOR."
(defun guix-split-string (str &optional col)
"Split string STR by lines and return list of result strings.
If COL is non-nil, fill STR to this column."
(let ((str (if col
(guix-get-filled-string str col)
str)))
(split-string str "\n *" t)))
If COL is non-nil and STR is a one-line string longer than COL,
split it into several short lines."
(let ((strings (split-string str "\n *")))
(if (and col
(null (cdr strings)) ; if not multi-line
(> (length str) col))
(split-string (guix-get-filled-string str col) "\n")
strings)))
(defun guix-get-filled-string (str col)
"Return string by filling STR to column COL."
@@ -191,15 +144,6 @@ add both to the end and to the beginning."
(t
(concat separator str separator)))))
(defun guix-hexify (value)
"Convert VALUE to string and hexify it."
(url-hexify-string (guix-get-string value)))
(defun guix-number->bool (number)
"Convert NUMBER to boolean value.
Return nil, if NUMBER is 0; return t otherwise."
(not (zerop number)))
(defun guix-shell-quote-argument (argument)
"Quote shell command ARGUMENT.
This function is similar to `shell-quote-argument', but less strict."
@@ -210,15 +154,6 @@ This function is similar to `shell-quote-argument', but less strict."
(replace-regexp-in-string
(rx (not (any alnum "-=,./\n"))) "\\\\\\&" argument))))
(defun guix-symbol-title (symbol)
"Return SYMBOL's name, a string.
This is like `symbol-name', but fancier."
(if (eq symbol 'id)
"ID"
(let ((str (replace-regexp-in-string "-" " " (symbol-name symbol))))
(concat (capitalize (substring str 0 1))
(substring str 1)))))
(defun guix-command-symbol (&optional args)
"Return symbol by concatenating 'guix' and ARGS (strings)."
(intern (guix-concat-strings (cons "guix" args) "-")))
@@ -240,41 +175,6 @@ If NO-MESSAGE? is non-nil, do not display a message about it."
See also `guix-copy-as-kill'."
(guix-copy-as-kill (guix-command-string args) no-message?))
(defun guix-compose-buffer-name (base-name postfix)
"Return buffer name by appending BASE-NAME and POSTFIX.
In a simple case the result is:
BASE-NAME: POSTFIX
If BASE-NAME is wrapped by '*', then the result is:
*BASE-NAME: POSTFIX*"
(let ((re (rx string-start
(group (? "*"))
(group (*? any))
(group (? "*"))
string-end)))
(or (string-match re base-name)
(error "Unexpected error in defining buffer name"))
(let ((first* (match-string 1 base-name))
(name-body (match-string 2 base-name))
(last* (match-string 3 base-name)))
;; Handle the case when buffer name is wrapped by '*'.
(if (and (string= "*" first*)
(string= "*" last*))
(concat "*" name-body ": " postfix "*")
(concat base-name ": " postfix)))))
(defun guix-completing-read (prompt table &optional predicate
require-match initial-input
hist def inherit-input-method)
"Same as `completing-read' but return nil instead of an empty string."
(let ((res (completing-read prompt table predicate
require-match initial-input
hist def inherit-input-method)))
(unless (string= "" res) res)))
(defun guix-completing-read-multiple (prompt table &optional predicate
require-match initial-input
hist def inherit-input-method)
@@ -293,14 +193,6 @@ Return time value."
(require 'org)
(org-read-date nil t nil prompt))
(defun guix-read-file-name (prompt &optional dir default-filename
mustmatch initial predicate)
"Read file name.
This function is similar to `read-file-name' except it also
expands the file name."
(expand-file-name (read-file-name prompt dir default-filename
mustmatch initial predicate)))
(defcustom guix-find-file-function #'find-file
"Function used to find a file.
The function is called by `guix-find-file' with a file name as a
@@ -334,77 +226,8 @@ single argument."
(while (re-search-forward ,regexp nil t)
,@body)))
(defmacro guix-while-null (&rest body)
"Evaluate BODY until its result becomes non-nil."
(declare (indent 0) (debug t))
(let ((result-var (make-symbol "result")))
`(let (,result-var)
(while (null ,result-var)
(setq ,result-var ,@body))
,result-var)))
(defun guix-modify (object modifiers)
"Apply MODIFIERS to OBJECT.
OBJECT is passed as an argument to the first function from
MODIFIERS list, the returned result is passed to the second
function from the list and so on. Return result of the last
modifier call."
(if (null modifiers)
object
(guix-modify (funcall (car modifiers) object)
(cdr modifiers))))
(defmacro guix-keyword-args-let (args varlist &rest body)
"Parse ARGS, bind variables from VARLIST and eval BODY.
Find keyword values in ARGS, bind them to variables according to
VARLIST, then evaluate BODY.
ARGS is a keyword/value property list.
Each element of VARLIST has a form:
(SYMBOL KEYWORD [DEFAULT-VALUE])
SYMBOL is a varible name. KEYWORD is a symbol that will be
searched in ARGS for an according value. If the value of KEYWORD
does not exist, bind SYMBOL to DEFAULT-VALUE or nil.
The rest arguments (that present in ARGS but not in VARLIST) will
be bound to `%foreign-args' variable.
Example:
(guix-keyword-args-let '(:two 8 :great ! :guix is)
((one :one 1)
(two :two 2)
(foo :smth))
(list one two foo %foreign-args))
=> (1 8 nil (:guix is :great !))"
(declare (indent 2))
(let ((args-var (make-symbol "args")))
`(let (,@(mapcar (lambda (spec)
(pcase-let ((`(,name ,_ ,val) spec))
(list name val)))
varlist)
(,args-var ,args)
%foreign-args)
(while ,args-var
(pcase ,args-var
(`(,key ,val . ,rest-args)
(cl-case key
,@(mapcar (lambda (spec)
(pcase-let ((`(,name ,key ,_) spec))
`(,key (setq ,name val))))
varlist)
(t (setq %foreign-args
(cl-list* key val %foreign-args))))
(setq ,args-var rest-args))))
,@body)))
;;; Alist procedures
;;; Alist accessors
(defmacro guix-define-alist-accessor (name assoc-fun)
"Define NAME function to access alist values using ASSOC-FUN."
@@ -422,48 +245,6 @@ accessed with KEYS."
(guix-define-alist-accessor guix-assq-value assq)
(guix-define-alist-accessor guix-assoc-value assoc)
(defun guix-alist-put (value alist &rest keys)
"Put (add or replace if exists) VALUE to ALIST using KEYS.
Return the new alist.
ALIST is alist of alists of alists ... which can be consecutively
accessed with KEYS.
Example:
(guix-alist-put
'foo
'((one (a . 1) (b . 2))
(two (m . 7) (n . 8)))
'one 'b)
=> ((one (a . 1) (b . foo))
(two (m . 7) (n . 8)))"
(or keys (error "Keys should be specified"))
(guix-alist-put-1 value alist keys))
(defun guix-alist-put-1 (value alist keys)
"Subroutine of `guix-alist-put'."
(cond
((null keys)
value)
((null alist)
(list (cons (car keys)
(guix-alist-put-1 value nil (cdr keys)))))
((eq (car keys) (caar alist))
(cons (cons (car keys)
(guix-alist-put-1 value (cdar alist) (cdr keys)))
(cdr alist)))
(t
(cons (car alist)
(guix-alist-put-1 value (cdr alist) keys)))))
(defun guix-alist-put! (value variable &rest keys)
"Modify alist VARIABLE (symbol) by putting VALUE using KEYS.
See `guix-alist-put' for details."
(set variable
(apply #'guix-alist-put value (symbol-value variable) keys)))
;;; Diff
@@ -474,77 +255,6 @@ See `guix-alist-put' for details."
"Same as `diff', but use `guix-diff-switches' as default."
(diff old new (or switches guix-diff-switches) no-async))
;;; Completing readers definers
(defmacro guix-define-reader (name read-fun completions prompt)
"Define NAME function to read from minibuffer.
READ-FUN may be `completing-read', `completing-read-multiple' or
another function with the same arguments."
`(defun ,name (&optional prompt initial-contents)
(,read-fun ,(if prompt
`(or prompt ,prompt)
'prompt)
,completions nil nil initial-contents)))
(defmacro guix-define-readers (&rest args)
"Define reader functions.
ARGS should have a form [KEYWORD VALUE] ... The following
keywords are available:
- `completions-var' - variable used to get completions.
- `completions-getter' - function used to get completions.
- `single-reader', `single-prompt' - name of a function to read
a single value, and a prompt for it.
- `multiple-reader', `multiple-prompt' - name of a function to
read multiple values, and a prompt for it.
- `multiple-separator' - if specified, another
`<multiple-reader-name>-string' function returning a string
of multiple values separated the specified separator will be
defined."
(guix-keyword-args-let args
((completions-var :completions-var)
(completions-getter :completions-getter)
(single-reader :single-reader)
(single-prompt :single-prompt)
(multiple-reader :multiple-reader)
(multiple-prompt :multiple-prompt)
(multiple-separator :multiple-separator))
(let ((completions
(cond ((and completions-var completions-getter)
`(or ,completions-var
(setq ,completions-var
(funcall ',completions-getter))))
(completions-var
completions-var)
(completions-getter
`(funcall ',completions-getter)))))
`(progn
,(when (and completions-var
(not (boundp completions-var)))
`(defvar ,completions-var nil))
,(when single-reader
`(guix-define-reader ,single-reader guix-completing-read
,completions ,single-prompt))
,(when multiple-reader
`(guix-define-reader ,multiple-reader completing-read-multiple
,completions ,multiple-prompt))
,(when (and multiple-reader multiple-separator)
(let ((name (intern (concat (symbol-name multiple-reader)
"-string"))))
`(defun ,name (&optional prompt initial-contents)
(guix-concat-strings
(,multiple-reader prompt initial-contents)
,multiple-separator))))))))
;;; Memoizing
@@ -582,18 +292,9 @@ See `defun' for the meaning of arguments."
,(or docstring
(format "Memoized version of `%S'." definition))))
(defvar guix-utils-font-lock-keywords
(defvar guix-memoized-font-lock-keywords
(eval-when-compile
`((,(rx "(" (group (or "guix-define-reader"
"guix-define-readers"
"guix-keyword-args-let"
"guix-while-null"
"guix-while-search"
"guix-with-indent"))
symbol-end)
. 1)
(,(rx "("
`((,(rx "("
(group "guix-memoized-" (or "defun" "defalias"))
symbol-end
(zero-or-more blank)
@@ -602,7 +303,7 @@ See `defun' for the meaning of arguments."
(1 font-lock-keyword-face)
(2 font-lock-function-name-face nil t)))))
(font-lock-add-keywords 'emacs-lisp-mode guix-utils-font-lock-keywords)
(font-lock-add-keywords 'emacs-lisp-mode guix-memoized-font-lock-keywords)
(provide 'guix-utils)
+213
View File
@@ -0,0 +1,213 @@
;;; guix.el --- Interface for GNU Guix package manager
;; Copyright © 2014, 2015 Alex Kost <alezost@gmail.com>
;; Package-Requires: ((geiser "0.3"))
;; Keywords: tools
;; 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 this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This package provides an interface for searching, listing and getting
;; information about Guix packages and generations; and for
;; installing/upgrading/removing packages.
;;; Code:
(require 'guix-base)
(require 'guix-list)
(require 'guix-info)
(require 'guix-utils)
(require 'guix-read)
(defgroup guix nil
"Interface for Guix package manager."
:prefix "guix-"
:group 'external)
(defgroup guix-faces nil
"Guix faces."
:group 'guix
:group 'faces)
(defcustom guix-list-single-package nil
"If non-nil, list a package even if it is the only matching result.
If nil, show a single package in the info buffer."
:type 'boolean
:group 'guix)
(defvar guix-search-params '(name synopsis description)
"Default list of package parameters for searching by regexp.")
(defvar guix-search-history nil
"A history of minibuffer prompts.")
(defun guix-get-show-packages (profile search-type &rest search-vals)
"Search for packages and show results.
If PROFILE is nil, use `guix-current-profile'.
See `guix-get-entries' for the meaning of SEARCH-TYPE and
SEARCH-VALS.
Results are displayed in the list buffer, unless a single package
is found and `guix-list-single-package' is nil."
(or profile (setq profile guix-current-profile))
(let ((packages (guix-get-entries profile guix-package-list-type
search-type search-vals
(guix-get-params-for-receiving
'list guix-package-list-type))))
(if (or guix-list-single-package
(cdr packages))
(guix-set-buffer profile packages 'list guix-package-list-type
search-type search-vals)
(let ((packages (guix-get-entries profile guix-package-info-type
search-type search-vals
(guix-get-params-for-receiving
'info guix-package-info-type))))
(guix-set-buffer profile packages 'info guix-package-info-type
search-type search-vals)))))
(defun guix-get-show-generations (profile search-type &rest search-vals)
"Search for generations and show results.
If PROFILE is nil, use `guix-current-profile'.
See `guix-get-entries' for the meaning of SEARCH-TYPE and
SEARCH-VALS."
(apply #'guix-get-show-entries
(or profile guix-current-profile)
'list 'generation search-type search-vals))
;;;###autoload
(defun guix-search-by-name (name &optional profile)
"Search for Guix packages by NAME.
NAME is a string with name specification. It may optionally contain
a version number. Examples: \"guile\", \"guile-2.0.11\".
If PROFILE is nil, use `guix-current-profile'.
Interactively with prefix, prompt for PROFILE."
(interactive
(list (read-string "Package name: " nil 'guix-search-history)
(and current-prefix-arg
(guix-profile-prompt))))
(guix-get-show-packages profile 'name name))
;;;###autoload
(defun guix-search-by-regexp (regexp &optional params profile)
"Search for Guix packages by REGEXP.
PARAMS are package parameters that should be searched.
If PARAMS are not specified, use `guix-search-params'.
If PROFILE is nil, use `guix-current-profile'.
Interactively with prefix, prompt for PROFILE."
(interactive
(list (read-regexp "Regexp: " nil 'guix-search-history)
nil
(and current-prefix-arg
(guix-profile-prompt))))
(guix-get-show-packages profile 'regexp regexp
(or params guix-search-params)))
;;;###autoload
(defun guix-installed-packages (&optional profile)
"Display information about installed Guix packages.
If PROFILE is nil, use `guix-current-profile'.
Interactively with prefix, prompt for PROFILE."
(interactive
(list (and current-prefix-arg
(guix-profile-prompt))))
(guix-get-show-packages profile 'installed))
;;;###autoload
(defun guix-obsolete-packages (&optional profile)
"Display information about obsolete Guix packages.
If PROFILE is nil, use `guix-current-profile'.
Interactively with prefix, prompt for PROFILE."
(interactive
(list (and current-prefix-arg
(guix-profile-prompt))))
(guix-get-show-packages profile 'obsolete))
;;;###autoload
(defun guix-all-available-packages (&optional profile)
"Display information about all available Guix packages.
If PROFILE is nil, use `guix-current-profile'.
Interactively with prefix, prompt for PROFILE."
(interactive
(list (and current-prefix-arg
(guix-profile-prompt))))
(guix-get-show-packages profile 'all-available))
;;;###autoload
(defun guix-newest-available-packages (&optional profile)
"Display information about the newest available Guix packages.
If PROFILE is nil, use `guix-current-profile'.
Interactively with prefix, prompt for PROFILE."
(interactive
(list (and current-prefix-arg
(guix-profile-prompt))))
(guix-get-show-packages profile 'newest-available))
;;;###autoload
(defun guix-generations (&optional profile)
"Display information about all generations.
If PROFILE is nil, use `guix-current-profile'.
Interactively with prefix, prompt for PROFILE."
(interactive
(list (and current-prefix-arg
(guix-profile-prompt))))
(guix-get-show-generations profile 'all))
;;;###autoload
(defun guix-last-generations (number &optional profile)
"Display information about last NUMBER generations.
If PROFILE is nil, use `guix-current-profile'.
Interactively with prefix, prompt for PROFILE."
(interactive
(list (read-number "The number of last generations: ")
(and current-prefix-arg
(guix-profile-prompt))))
(guix-get-show-generations profile 'last number))
;;;###autoload
(defun guix-generations-by-time (from to &optional profile)
"Display information about generations created between FROM and TO.
FROM and TO should be time values.
If PROFILE is nil, use `guix-current-profile'.
Interactively with prefix, prompt for PROFILE."
(interactive
(list (guix-read-date "Find generations (from): ")
(guix-read-date "Find generations (to): ")
(and current-prefix-arg
(guix-profile-prompt))))
(guix-get-show-generations profile 'time
(float-time from)
(float-time to)))
;;;###autoload
(defun guix-edit (id-or-name)
"Edit (go to location of) package with ID-OR-NAME."
(interactive (list (guix-read-package-name)))
(let ((loc (guix-package-location id-or-name)))
(if loc
(guix-find-location loc)
(message "Couldn't find package location."))))
(provide 'guix)
;;; guix.el ends here
-77
View File
@@ -1,77 +0,0 @@
# GNU Guix --- Functional package management for GNU
# Copyright © 2014, 2015, 2016 Alex Kost <alezost@gmail.com>
# Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
#
# 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/>.
AUTOLOADS = %D%/guix-autoloads.el
ELFILES = \
%D%/guix-about.el \
%D%/guix-backend.el \
%D%/guix-base.el \
%D%/guix-build-log.el \
%D%/guix-buffer.el \
%D%/guix-command.el \
%D%/guix-devel.el \
%D%/guix-emacs.el \
%D%/guix-entry.el \
%D%/guix-external.el \
%D%/guix-geiser.el \
%D%/guix-guile.el \
%D%/guix-help-vars.el \
%D%/guix-history.el \
%D%/guix-hydra.el \
%D%/guix-hydra-build.el \
%D%/guix-hydra-jobset.el \
%D%/guix-info.el \
%D%/guix-init.el \
%D%/guix-license.el \
%D%/guix-list.el \
%D%/guix-location.el \
%D%/guix-messages.el \
%D%/guix-pcomplete.el \
%D%/guix-popup.el \
%D%/guix-prettify.el \
%D%/guix-profiles.el \
%D%/guix-read.el \
%D%/guix-ui.el \
%D%/guix-ui-license.el \
%D%/guix-ui-location.el \
%D%/guix-ui-package.el \
%D%/guix-ui-generation.el \
%D%/guix-ui-system-generation.el \
%D%/guix-utils.el
if HAVE_EMACS
dist_lisp_DATA = $(ELFILES)
nodist_lisp_DATA = \
%D%/guix-config.el \
$(AUTOLOADS)
$(AUTOLOADS): $(ELFILES)
$(AM_V_EMACS)$(EMACS) --batch --eval \
"(let ((backup-inhibited t) \
(generated-autoload-file \
(expand-file-name \"$(AUTOLOADS)\" \"$(builddir)\"))) \
(update-directory-autoloads \
(expand-file-name \"emacs\" \"$(srcdir)\")))"
CLEANFILES += $(AUTOLOADS)
endif HAVE_EMACS
-12
View File
@@ -1,12 +0,0 @@
# This is a "job" for the Upstart init system to launch 'guix-daemon'.
# Drop it in /etc/init to have 'guix-daemon' automatically started.
description "Build daemon for GNU Guix"
start on runlevel [2345]
stop on runlevel [016]
task
exec @bindir@/guix-daemon --build-users-group=guixbuild
-4
View File
@@ -7,13 +7,9 @@ Description=Build daemon for GNU Guix
[Service]
ExecStart=@bindir@/guix-daemon --build-users-group=guixbuild
Environment=GUIX_LOCPATH=/root/.guix-profile/lib/locale
RemainAfterExit=yes
StandardOutput=syslog
StandardError=syslog
# See <https://lists.gnu.org/archive/html/guix-devel/2016-04/msg00608.html>.
TasksMax=1024
[Install]
WantedBy=multi-user.target
+767
View File
@@ -0,0 +1,767 @@
# GNU Guix --- Functional package management for GNU
# Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
# Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
# Copyright © 2013, 2014, 2015 Mark H Weaver <mhw@netris.org>
#
# 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/>.
# Definitions for the GNU System: package modules, patches, bootstrap
# binaries.
GNU_SYSTEM_MODULES = \
gnu.scm \
gnu/artwork.scm \
gnu/packages.scm \
gnu/packages/aarddict.scm \
gnu/packages/abduco.scm \
gnu/packages/abiword.scm \
gnu/packages/acct.scm \
gnu/packages/acl.scm \
gnu/packages/admin.scm \
gnu/packages/adns.scm \
gnu/packages/algebra.scm \
gnu/packages/aidc.scm \
gnu/packages/apl.scm \
gnu/packages/apr.scm \
gnu/packages/asciidoc.scm \
gnu/packages/aspell.scm \
gnu/packages/attr.scm \
gnu/packages/audacity.scm \
gnu/packages/audio.scm \
gnu/packages/autogen.scm \
gnu/packages/autotools.scm \
gnu/packages/avahi.scm \
gnu/packages/avr.scm \
gnu/packages/backup.scm \
gnu/packages/base.scm \
gnu/packages/bash.scm \
gnu/packages/bdw-gc.scm \
gnu/packages/bioinformatics.scm \
gnu/packages/bittorrent.scm \
gnu/packages/bison.scm \
gnu/packages/boost.scm \
gnu/packages/bootstrap.scm \
gnu/packages/busybox.scm \
gnu/packages/calcurse.scm \
gnu/packages/ccache.scm \
gnu/packages/cdrom.scm \
gnu/packages/certs.scm \
gnu/packages/check.scm \
gnu/packages/ci.scm \
gnu/packages/cmake.scm \
gnu/packages/code.scm \
gnu/packages/commencement.scm \
gnu/packages/compression.scm \
gnu/packages/conkeror.scm \
gnu/packages/conky.scm \
gnu/packages/cook.scm \
gnu/packages/cpio.scm \
gnu/packages/cppi.scm \
gnu/packages/cross-base.scm \
gnu/packages/crypto.scm \
gnu/packages/cryptsetup.scm \
gnu/packages/cups.scm \
gnu/packages/curl.scm \
gnu/packages/cursynth.scm \
gnu/packages/cyrus-sasl.scm \
gnu/packages/databases.scm \
gnu/packages/datamash.scm \
gnu/packages/dc.scm \
gnu/packages/debug.scm \
gnu/packages/dejagnu.scm \
gnu/packages/dictionaries.scm \
gnu/packages/disk.scm \
gnu/packages/djvu.scm \
gnu/packages/dns.scm \
gnu/packages/docbook.scm \
gnu/packages/doxygen.scm \
gnu/packages/dunst.scm \
gnu/packages/dvtm.scm \
gnu/packages/ebook.scm \
gnu/packages/ed.scm \
gnu/packages/elf.scm \
gnu/packages/emacs.scm \
gnu/packages/enchant.scm \
gnu/packages/engineering.scm \
gnu/packages/enlightenment.scm \
gnu/packages/fcitx.scm \
gnu/packages/feh.scm \
gnu/packages/figlet.scm \
gnu/packages/file.scm \
gnu/packages/finance.scm \
gnu/packages/firmware.scm \
gnu/packages/fish.scm \
gnu/packages/flashing-tools.scm \
gnu/packages/flex.scm \
gnu/packages/fltk.scm \
gnu/packages/fonts.scm \
gnu/packages/fontutils.scm \
gnu/packages/freedesktop.scm \
gnu/packages/freeipmi.scm \
gnu/packages/ftp.scm \
gnu/packages/fribidi.scm \
gnu/packages/fvwm.scm \
gnu/packages/game-development.scm \
gnu/packages/games.scm \
gnu/packages/gawk.scm \
gnu/packages/gcal.scm \
gnu/packages/gcc.scm \
gnu/packages/gd.scm \
gnu/packages/gdb.scm \
gnu/packages/gdbm.scm \
gnu/packages/geeqie.scm \
gnu/packages/gettext.scm \
gnu/packages/ghostscript.scm \
gnu/packages/gimp.scm \
gnu/packages/gkrellm.scm \
gnu/packages/gl.scm \
gnu/packages/glib.scm \
gnu/packages/gnome.scm \
gnu/packages/gnucash.scm \
gnu/packages/gnunet.scm \
gnu/packages/gnupg.scm \
gnu/packages/gnustep.scm \
gnu/packages/gnuzilla.scm \
gnu/packages/gnu-pw-mgr.scm \
gnu/packages/gperf.scm \
gnu/packages/gprolog.scm \
gnu/packages/gps.scm \
gnu/packages/graphics.scm \
gnu/packages/graphviz.scm \
gnu/packages/groff.scm \
gnu/packages/grub.scm \
gnu/packages/grue-hunter.scm \
gnu/packages/gsasl.scm \
gnu/packages/gstreamer.scm \
gnu/packages/gtk.scm \
gnu/packages/guile.scm \
gnu/packages/guile-wm.scm \
gnu/packages/gv.scm \
gnu/packages/gxmessage.scm \
gnu/packages/haskell.scm \
gnu/packages/hugs.scm \
gnu/packages/hurd.scm \
gnu/packages/ibus.scm \
gnu/packages/icu4c.scm \
gnu/packages/idutils.scm \
gnu/packages/image.scm \
gnu/packages/imagemagick.scm \
gnu/packages/indent.scm \
gnu/packages/inkscape.scm \
gnu/packages/irssi.scm \
gnu/packages/iso-codes.scm \
gnu/packages/java.scm \
gnu/packages/jemalloc.scm \
gnu/packages/jrnl.scm \
gnu/packages/julia.scm \
gnu/packages/kde.scm \
gnu/packages/kde-frameworks.scm \
gnu/packages/key-mon.scm \
gnu/packages/language.scm \
gnu/packages/less.scm \
gnu/packages/lesstif.scm \
gnu/packages/libcanberra.scm \
gnu/packages/libdaemon.scm \
gnu/packages/libedit.scm \
gnu/packages/libevent.scm \
gnu/packages/libffcall.scm \
gnu/packages/libffi.scm \
gnu/packages/libftdi.scm \
gnu/packages/calendar.scm \
gnu/packages/libidn.scm \
gnu/packages/libphidget.scm \
gnu/packages/libreoffice.scm \
gnu/packages/libsigsegv.scm \
gnu/packages/libunistring.scm \
gnu/packages/libusb.scm \
gnu/packages/libunwind.scm \
gnu/packages/libupnp.scm \
gnu/packages/lightning.scm \
gnu/packages/links.scm \
gnu/packages/linux.scm \
gnu/packages/lirc.scm \
gnu/packages/lisp.scm \
gnu/packages/llvm.scm \
gnu/packages/lout.scm \
gnu/packages/lsh.scm \
gnu/packages/lsof.scm \
gnu/packages/lua.scm \
gnu/packages/lxde.scm \
gnu/packages/lxqt.scm \
gnu/packages/lynx.scm \
gnu/packages/m4.scm \
gnu/packages/machine-learning.scm \
gnu/packages/man.scm \
gnu/packages/mail.scm \
gnu/packages/make-bootstrap.scm \
gnu/packages/markdown.scm \
gnu/packages/maths.scm \
gnu/packages/mc.scm \
gnu/packages/mcrypt.scm \
gnu/packages/messaging.scm \
gnu/packages/mg.scm \
gnu/packages/miscfiles.scm \
gnu/packages/mit-krb5.scm \
gnu/packages/moe.scm \
gnu/packages/moreutils.scm \
gnu/packages/mpd.scm \
gnu/packages/mp3.scm \
gnu/packages/mpi.scm \
gnu/packages/multiprecision.scm \
gnu/packages/music.scm \
gnu/packages/mtools.scm \
gnu/packages/nano.scm \
gnu/packages/ncdu.scm \
gnu/packages/ncurses.scm \
gnu/packages/netpbm.scm \
gnu/packages/nettle.scm \
gnu/packages/networking.scm \
gnu/packages/ninja.scm \
gnu/packages/node.scm \
gnu/packages/noweb.scm \
gnu/packages/ntp.scm \
gnu/packages/nutrition.scm \
gnu/packages/nvi.scm \
gnu/packages/ocaml.scm \
gnu/packages/ocr.scm \
gnu/packages/onc-rpc.scm \
gnu/packages/openbox.scm \
gnu/packages/openldap.scm \
gnu/packages/openstack.scm \
gnu/packages/orpheus.scm \
gnu/packages/ots.scm \
gnu/packages/package-management.scm \
gnu/packages/parallel.scm \
gnu/packages/password-utils.scm \
gnu/packages/patchutils.scm \
gnu/packages/pciutils.scm \
gnu/packages/pcre.scm \
gnu/packages/pdf.scm \
gnu/packages/pem.scm \
gnu/packages/perl.scm \
gnu/packages/photo.scm \
gnu/packages/pkg-config.scm \
gnu/packages/plotutils.scm \
gnu/packages/polkit.scm \
gnu/packages/popt.scm \
gnu/packages/pth.scm \
gnu/packages/pulseaudio.scm \
gnu/packages/pumpio.scm \
gnu/packages/pretty-print.scm \
gnu/packages/protobuf.scm \
gnu/packages/pv.scm \
gnu/packages/python.scm \
gnu/packages/qemu.scm \
gnu/packages/qt.scm \
gnu/packages/ratpoison.scm \
gnu/packages/rc.scm \
gnu/packages/rdesktop.scm \
gnu/packages/rdf.scm \
gnu/packages/readline.scm \
gnu/packages/rrdtool.scm \
gnu/packages/rsync.scm \
gnu/packages/ruby.scm \
gnu/packages/rush.scm \
gnu/packages/samba.scm \
gnu/packages/sawfish.scm \
gnu/packages/scanner.scm \
gnu/packages/scheme.scm \
gnu/packages/screen.scm \
gnu/packages/sdl.scm \
gnu/packages/search.scm \
gnu/packages/serveez.scm \
gnu/packages/shishi.scm \
gnu/packages/skarnet.scm \
gnu/packages/skribilo.scm \
gnu/packages/slang.scm \
gnu/packages/slim.scm \
gnu/packages/smalltalk.scm \
gnu/packages/ssh.scm \
gnu/packages/stalonetray.scm \
gnu/packages/statistics.scm \
gnu/packages/suckless.scm \
gnu/packages/swig.scm \
gnu/packages/sxiv.scm \
gnu/packages/synergy.scm \
gnu/packages/task-management.scm \
gnu/packages/tbb.scm \
gnu/packages/tcl.scm \
gnu/packages/tcsh.scm \
gnu/packages/telephony.scm \
gnu/packages/texinfo.scm \
gnu/packages/texlive.scm \
gnu/packages/textutils.scm \
gnu/packages/time.scm \
gnu/packages/tls.scm \
gnu/packages/tmux.scm \
gnu/packages/tor.scm \
gnu/packages/tre.scm \
gnu/packages/tv.scm \
gnu/packages/unrtf.scm \
gnu/packages/upnp.scm \
gnu/packages/uucp.scm \
gnu/packages/valgrind.scm \
gnu/packages/version-control.scm \
gnu/packages/video.scm \
gnu/packages/vim.scm \
gnu/packages/vpn.scm \
gnu/packages/vtk.scm \
gnu/packages/w3m.scm \
gnu/packages/wdiff.scm \
gnu/packages/web.scm \
gnu/packages/webkit.scm \
gnu/packages/weechat.scm \
gnu/packages/wget.scm \
gnu/packages/wicd.scm \
gnu/packages/wine.scm \
gnu/packages/wm.scm \
gnu/packages/wordnet.scm \
gnu/packages/wv.scm \
gnu/packages/wxwidgets.scm \
gnu/packages/xfig.scm \
gnu/packages/xiph.scm \
gnu/packages/xml.scm \
gnu/packages/xnee.scm \
gnu/packages/xdisorg.scm \
gnu/packages/xorg.scm \
gnu/packages/xfce.scm \
gnu/packages/yasm.scm \
gnu/packages/yubico.scm \
gnu/packages/zile.scm \
gnu/packages/zip.scm \
gnu/packages/zsh.scm \
\
gnu/services.scm \
gnu/services/avahi.scm \
gnu/services/base.scm \
gnu/services/databases.scm \
gnu/services/dbus.scm \
gnu/services/desktop.scm \
gnu/services/dmd.scm \
gnu/services/lirc.scm \
gnu/services/networking.scm \
gnu/services/ssh.scm \
gnu/services/web.scm \
gnu/services/xorg.scm \
\
gnu/system.scm \
gnu/system/file-systems.scm \
gnu/system/grub.scm \
gnu/system/install.scm \
gnu/system/linux.scm \
gnu/system/linux-container.scm \
gnu/system/linux-initrd.scm \
gnu/system/locale.scm \
gnu/system/nss.scm \
gnu/system/shadow.scm \
gnu/system/vm.scm \
\
gnu/build/activation.scm \
gnu/build/file-systems.scm \
gnu/build/install.scm \
gnu/build/linux-boot.scm \
gnu/build/linux-container.scm \
gnu/build/linux-initrd.scm \
gnu/build/linux-modules.scm \
gnu/build/vm.scm
patchdir = $(guilemoduledir)/gnu/packages/patches
dist_patch_DATA = \
gnu/packages/patches/abiword-explictly-cast-bools.patch \
gnu/packages/patches/abiword-link-plugins-against-backend.patch \
gnu/packages/patches/abiword-no-include-glib-internal-headers.patch \
gnu/packages/patches/abiword-pass-no-undefined-to-linker.patch \
gnu/packages/patches/abiword-use-proper-png-api.patch \
gnu/packages/patches/abiword-wmf-version-lookup-fix.patch \
gnu/packages/patches/acl-hurd-path-max.patch \
gnu/packages/patches/aegis-constness-error.patch \
gnu/packages/patches/aegis-perl-tempdir1.patch \
gnu/packages/patches/aegis-perl-tempdir2.patch \
gnu/packages/patches/aegis-test-fixup-1.patch \
gnu/packages/patches/aegis-test-fixup-2.patch \
gnu/packages/patches/agg-am_c_prototype.patch \
gnu/packages/patches/alsa-lib-mips-atomic-fix.patch \
gnu/packages/patches/apr-skip-getservbyname-test.patch \
gnu/packages/patches/ath9k-htc-firmware-binutils.patch \
gnu/packages/patches/ath9k-htc-firmware-gcc.patch \
gnu/packages/patches/ath9k-htc-firmware-objcopy.patch \
gnu/packages/patches/audacity-fix-ffmpeg-binding.patch \
gnu/packages/patches/automake-skip-amhello-tests.patch \
gnu/packages/patches/avahi-localstatedir.patch \
gnu/packages/patches/avidemux-install-to-lib.patch \
gnu/packages/patches/avrdude-fix-libusb.patch \
gnu/packages/patches/bash-completion-directories.patch \
gnu/packages/patches/bedtools-32bit-compilation.patch \
gnu/packages/patches/bowtie-fix-makefile.patch \
gnu/packages/patches/bigloo-gc-shebangs.patch \
gnu/packages/patches/binutils-ld-new-dtags.patch \
gnu/packages/patches/binutils-loongson-workaround.patch \
gnu/packages/patches/bitlbee-configure-doc-fix.patch \
gnu/packages/patches/boost-mips-avoid-m32.patch \
gnu/packages/patches/calibre-drop-unrar.patch \
gnu/packages/patches/calibre-no-updates-dialog.patch \
gnu/packages/patches/cdparanoia-fpic.patch \
gnu/packages/patches/chmlib-inttypes.patch \
gnu/packages/patches/clang-libc-search-path.patch \
gnu/packages/patches/clucene-pkgconfig.patch \
gnu/packages/patches/cmake-fix-tests.patch \
gnu/packages/patches/cpio-gets-undeclared.patch \
gnu/packages/patches/cpufrequtils-fix-aclocal.patch \
gnu/packages/patches/crda-optional-gcrypt.patch \
gnu/packages/patches/crossmap-allow-system-pysam.patch \
gnu/packages/patches/cssc-gets-undeclared.patch \
gnu/packages/patches/cssc-missing-include.patch \
gnu/packages/patches/clucene-contribs-lib.patch \
gnu/packages/patches/cursynth-wave-rand.patch \
gnu/packages/patches/dbus-localstatedir.patch \
gnu/packages/patches/dealii-p4est-interface.patch \
gnu/packages/patches/diffutils-gets-undeclared.patch \
gnu/packages/patches/dfu-programmer-fix-libusb.patch \
gnu/packages/patches/doxygen-test.patch \
gnu/packages/patches/doxygen-tmake.patch \
gnu/packages/patches/duplicity-piped-password.patch \
gnu/packages/patches/duplicity-test_selection-tmp.patch \
gnu/packages/patches/elfutils-tests-ptrace.patch \
gnu/packages/patches/emacs-exec-path.patch \
gnu/packages/patches/eudev-rules-directory.patch \
gnu/packages/patches/evilwm-lost-focus-bug.patch \
gnu/packages/patches/expat-CVE-2015-1283.patch \
gnu/packages/patches/fastcap-mulGlobal.patch \
gnu/packages/patches/fastcap-mulSetup.patch \
gnu/packages/patches/fasthenry-spAllocate.patch \
gnu/packages/patches/fasthenry-spBuild.patch \
gnu/packages/patches/fasthenry-spUtils.patch \
gnu/packages/patches/fasthenry-spSolve.patch \
gnu/packages/patches/fasthenry-spFactor.patch \
gnu/packages/patches/findutils-absolute-paths.patch \
gnu/packages/patches/findutils-localstatedir.patch \
gnu/packages/patches/flashrom-use-libftdi1.patch \
gnu/packages/patches/flex-bison-tests.patch \
gnu/packages/patches/flint-ldconfig.patch \
gnu/packages/patches/fltk-shared-lib-defines.patch \
gnu/packages/patches/freeimage-CVE-2015-0852.patch \
gnu/packages/patches/fuse-CVE-2015-3202.patch \
gnu/packages/patches/gawk-shell.patch \
gnu/packages/patches/gcc-arm-link-spec-fix.patch \
gnu/packages/patches/gcc-cross-environment-variables.patch \
gnu/packages/patches/gcc-libvtv-runpath.patch \
gnu/packages/patches/gcc-5.0-libvtv-runpath.patch \
gnu/packages/patches/geoclue-config.patch \
gnu/packages/patches/ghostscript-CVE-2015-3228.patch \
gnu/packages/patches/ghostscript-runpath.patch \
gnu/packages/patches/gitolite-openssh-6.8-compat.patch \
gnu/packages/patches/glib-networking-ssl-cert-file.patch \
gnu/packages/patches/glib-tests-desktop.patch \
gnu/packages/patches/glib-tests-homedir.patch \
gnu/packages/patches/glib-tests-prlimit.patch \
gnu/packages/patches/glib-tests-timer.patch \
gnu/packages/patches/glib-tests-gapplication.patch \
gnu/packages/patches/glibc-bootstrap-system.patch \
gnu/packages/patches/glibc-ldd-x86_64.patch \
gnu/packages/patches/glibc-locales.patch \
gnu/packages/patches/glibc-locale-incompatibility.patch \
gnu/packages/patches/glibc-o-largefile.patch \
gnu/packages/patches/glibc-versioned-locpath.patch \
gnu/packages/patches/gmp-arm-asm-nothumb.patch \
gnu/packages/patches/gmp-faulty-test.patch \
gnu/packages/patches/gnucash-price-quotes-perl.patch \
gnu/packages/patches/gnutls-doc-fix.patch \
gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch \
gnu/packages/patches/gobject-introspection-cc.patch \
gnu/packages/patches/gobject-introspection-girepository.patch \
gnu/packages/patches/grep-CVE-2015-1345.patch \
gnu/packages/patches/grub-gets-undeclared.patch \
gnu/packages/patches/grub-freetype.patch \
gnu/packages/patches/gsl-poly-test-fix-pt1.patch \
gnu/packages/patches/gsl-poly-test-fix-pt2.patch \
gnu/packages/patches/guile-1.8-cpp-4.5.patch \
gnu/packages/patches/guile-arm-fixes.patch \
gnu/packages/patches/guile-default-utf8.patch \
gnu/packages/patches/guile-linux-syscalls.patch \
gnu/packages/patches/guile-present-coding.patch \
gnu/packages/patches/guile-relocatable.patch \
gnu/packages/patches/guile-rsvg-pkgconfig.patch \
gnu/packages/patches/gtkglext-disable-disable-deprecated.patch \
gnu/packages/patches/hop-bigloo-4.0b.patch \
gnu/packages/patches/hop-linker-flags.patch \
gnu/packages/patches/hwloc-gather-topology-lstopo.patch \
gnu/packages/patches/hydra-automake-1.15.patch \
gnu/packages/patches/hydra-disable-darcs-test.patch \
gnu/packages/patches/icecat-avoid-bundled-includes.patch \
gnu/packages/patches/icecat-freetype-2.6.patch \
gnu/packages/patches/icu4c-CVE-2014-6585.patch \
gnu/packages/patches/icu4c-CVE-2015-1270.patch \
gnu/packages/patches/icu4c-CVE-2015-4760.patch \
gnu/packages/patches/imagemagick-test-segv.patch \
gnu/packages/patches/irrlicht-mesa-10.patch \
gnu/packages/patches/jbig2dec-ignore-testtest.patch \
gnu/packages/patches/julia-0.3.10-fix-empty-array.patch \
gnu/packages/patches/kmod-module-directory.patch \
gnu/packages/patches/lftp-dont-save-unknown-host-fingerprint.patch \
gnu/packages/patches/liba52-enable-pic.patch \
gnu/packages/patches/liba52-link-with-libm.patch \
gnu/packages/patches/liba52-set-soname.patch \
gnu/packages/patches/liba52-use-mtune-not-mcpu.patch \
gnu/packages/patches/libarchive-CVE-2013-0211.patch \
gnu/packages/patches/libarchive-fix-lzo-test-case.patch \
gnu/packages/patches/libarchive-mtree-filename-length-fix.patch \
gnu/packages/patches/libbonobo-activation-test-race.patch \
gnu/packages/patches/libcanberra-sound-theme-freedesktop.patch \
gnu/packages/patches/libevent-dns-tests.patch \
gnu/packages/patches/libmtp-devices.patch \
gnu/packages/patches/liboop-mips64-deplibs-fix.patch \
gnu/packages/patches/liblxqt-include.patch \
gnu/packages/patches/libmad-armv7-thumb-pt1.patch \
gnu/packages/patches/libmad-armv7-thumb-pt2.patch \
gnu/packages/patches/libmad-frame-length.patch \
gnu/packages/patches/libmad-mips-newgcc.patch \
gnu/packages/patches/libtheora-config-guess.patch \
gnu/packages/patches/libtool-skip-tests2.patch \
gnu/packages/patches/libssh-CVE-2014-0017.patch \
gnu/packages/patches/libunwind-CVE-2015-3239.patch \
gnu/packages/patches/libwmf-CAN-2004-0941.patch \
gnu/packages/patches/libwmf-CVE-2006-3376.patch \
gnu/packages/patches/libwmf-CVE-2007-0455.patch \
gnu/packages/patches/libwmf-CVE-2007-2756.patch \
gnu/packages/patches/libwmf-CVE-2007-3472.patch \
gnu/packages/patches/libwmf-CVE-2007-3473.patch \
gnu/packages/patches/libwmf-CVE-2007-3477.patch \
gnu/packages/patches/libwmf-CVE-2009-1364.patch \
gnu/packages/patches/libwmf-CVE-2009-3546.patch \
gnu/packages/patches/libwmf-CVE-2015-0848+CVE-2015-4588.patch \
gnu/packages/patches/libwmf-CVE-2015-4695.patch \
gnu/packages/patches/libwmf-CVE-2015-4696.patch \
gnu/packages/patches/lirc-localstatedir.patch \
gnu/packages/patches/libpthread-glibc-preparation.patch \
gnu/packages/patches/lm-sensors-hwmon-attrs.patch \
gnu/packages/patches/lua-pkgconfig.patch \
gnu/packages/patches/lua51-liblua-so.patch \
gnu/packages/patches/luajit-no_ldconfig.patch \
gnu/packages/patches/luajit-symlinks.patch \
gnu/packages/patches/luit-posix.patch \
gnu/packages/patches/m4-gets-undeclared.patch \
gnu/packages/patches/make-impure-dirs.patch \
gnu/packages/patches/mars-install.patch \
gnu/packages/patches/mars-sfml-2.3.patch \
gnu/packages/patches/maxima-defsystem-mkdir.patch \
gnu/packages/patches/mc-fix-ncurses-build.patch \
gnu/packages/patches/mcron-install.patch \
gnu/packages/patches/mdadm-gcc-4.9-fix.patch \
gnu/packages/patches/mhash-keygen-test-segfault.patch \
gnu/packages/patches/mit-krb5-init-fix.patch \
gnu/packages/patches/mpc123-initialize-ao.patch \
gnu/packages/patches/mplayer2-theora-fix.patch \
gnu/packages/patches/module-init-tools-moduledir.patch \
gnu/packages/patches/mumps-build-parallelism.patch \
gnu/packages/patches/mupdf-buildsystem-fix.patch \
gnu/packages/patches/mutt-store-references.patch \
gnu/packages/patches/net-tools-bitrot.patch \
gnu/packages/patches/ngircd-handle-zombies.patch \
gnu/packages/patches/ngircd-no-dns-in-tests.patch \
gnu/packages/patches/ninja-tests.patch \
gnu/packages/patches/ninja-zero-mtime.patch \
gnu/packages/patches/nss-pkgconfig.patch \
gnu/packages/patches/nvi-assume-preserve-path.patch \
gnu/packages/patches/nvi-dbpagesize-binpower.patch \
gnu/packages/patches/nvi-db4.patch \
gnu/packages/patches/openexr-missing-samples.patch \
gnu/packages/patches/openjpeg-CVE-2015-6581.patch \
gnu/packages/patches/openjpeg-use-after-free-fix.patch \
gnu/packages/patches/openssl-runpath.patch \
gnu/packages/patches/openssl-c-rehash.patch \
gnu/packages/patches/orpheus-cast-errors-and-includes.patch \
gnu/packages/patches/ots-no-include-missing-file.patch \
gnu/packages/patches/patchelf-page-size.patch \
gnu/packages/patches/patchelf-rework-for-arm.patch \
gnu/packages/patches/patchutils-xfail-gendiff-tests.patch \
gnu/packages/patches/patch-hurd-path-max.patch \
gnu/packages/patches/perl-autosplit-default-time.patch \
gnu/packages/patches/perl-finance-quote-unuse-mozilla-ca.patch \
gnu/packages/patches/perl-gd-options-passthrough-and-fontconfig.patch \
gnu/packages/patches/perl-module-pluggable-search.patch \
gnu/packages/patches/perl-net-amazon-s3-moose-warning.patch \
gnu/packages/patches/perl-net-ssleay-disable-ede-test.patch \
gnu/packages/patches/perl-no-sys-dirs.patch \
gnu/packages/patches/perl-tk-x11-discover.patch \
gnu/packages/patches/pidgin-add-search-path.patch \
gnu/packages/patches/pingus-sdl-libs-config.patch \
gnu/packages/patches/plotutils-libpng-jmpbuf.patch \
gnu/packages/patches/polkit-drop-test.patch \
gnu/packages/patches/portaudio-audacity-compat.patch \
gnu/packages/patches/preseq-1.0.2-install-to-PREFIX.patch \
gnu/packages/patches/preseq-1.0.2-link-with-libbam.patch \
gnu/packages/patches/procps-make-3.82.patch \
gnu/packages/patches/pt-scotch-build-parallelism.patch \
gnu/packages/patches/pulseaudio-fix-mult-test.patch \
gnu/packages/patches/pulseaudio-longer-test-timeout.patch \
gnu/packages/patches/pycairo-wscript.patch \
gnu/packages/patches/pybugz-encode-error.patch \
gnu/packages/patches/pybugz-stty.patch \
gnu/packages/patches/pyqt-configure.patch \
gnu/packages/patches/python-2.7-search-paths.patch \
gnu/packages/patches/python-3-search-paths.patch \
gnu/packages/patches/python-disable-ssl-test.patch \
gnu/packages/patches/python-fix-tests.patch \
gnu/packages/patches/python2-rdflib-drop-sparqlwrapper.patch \
gnu/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch \
gnu/packages/patches/qemu-CVE-2015-6855.patch \
gnu/packages/patches/qt4-ldflags.patch \
gnu/packages/patches/ratpoison-shell.patch \
gnu/packages/patches/readline-link-ncurses.patch \
gnu/packages/patches/ripperx-missing-file.patch \
gnu/packages/patches/sed-hurd-path-max.patch \
gnu/packages/patches/scheme48-tests.patch \
gnu/packages/patches/scotch-test-threading.patch \
gnu/packages/patches/sdl-libx11-1.6.patch \
gnu/packages/patches/serf-comment-style-fix.patch \
gnu/packages/patches/serf-deflate-buckets-test-fix.patch \
gnu/packages/patches/slim-session.patch \
gnu/packages/patches/slim-config.patch \
gnu/packages/patches/slim-sigusr1.patch \
gnu/packages/patches/soprano-find-clucene.patch \
gnu/packages/patches/superlu-dist-scotchmetis.patch \
gnu/packages/patches/tar-d_ino_in_dirent-fix.patch \
gnu/packages/patches/tar-skip-unreliable-tests.patch \
gnu/packages/patches/tcsh-fix-autotest.patch \
gnu/packages/patches/texi2html-document-encoding.patch \
gnu/packages/patches/texi2html-i18n.patch \
gnu/packages/patches/tidy-CVE-2015-5522+5523.patch \
gnu/packages/patches/tvtime-gcc41.patch \
gnu/packages/patches/tvtime-pngoutput.patch \
gnu/packages/patches/tvtime-videodev2.patch \
gnu/packages/patches/tvtime-xmltv.patch \
gnu/packages/patches/unzip-CVE-2014-8139.patch \
gnu/packages/patches/unzip-CVE-2014-8140.patch \
gnu/packages/patches/unzip-CVE-2014-8141.patch \
gnu/packages/patches/unzip-CVE-2014-9636.patch \
gnu/packages/patches/unzip-allow-greater-hostver-values.patch \
gnu/packages/patches/unzip-attribs-overflow.patch \
gnu/packages/patches/unzip-fix-overflows-and-infloop.patch \
gnu/packages/patches/unzip-format-secure.patch \
gnu/packages/patches/unzip-initialize-symlink-flag.patch \
gnu/packages/patches/unzip-overflow-long-fsize.patch \
gnu/packages/patches/unzip-remove-build-date.patch \
gnu/packages/patches/util-linux-tests.patch \
gnu/packages/patches/upower-builddir.patch \
gnu/packages/patches/valgrind-enable-arm.patch \
gnu/packages/patches/vpnc-script.patch \
gnu/packages/patches/vtk-mesa-10.patch \
gnu/packages/patches/w3m-fix-compile.patch \
gnu/packages/patches/webkitgtk-2.4-sql-init-string.patch \
gnu/packages/patches/weex-vacopy.patch \
gnu/packages/patches/wicd-bitrate-none-fix.patch \
gnu/packages/patches/wicd-get-selected-profile-fix.patch \
gnu/packages/patches/wicd-template-instantiation.patch \
gnu/packages/patches/wicd-urwid-1.3.patch \
gnu/packages/patches/wmctrl-64-fix.patch \
gnu/packages/patches/xf86-video-ark-remove-mibstore.patch \
gnu/packages/patches/xf86-video-ast-remove-mibstore.patch \
gnu/packages/patches/xf86-video-geode-glibc-2.20.patch \
gnu/packages/patches/xf86-video-glint-remove-mibstore.patch \
gnu/packages/patches/xf86-video-i128-remove-mibstore.patch \
gnu/packages/patches/xf86-video-intel-compat-api.patch \
gnu/packages/patches/xf86-video-intel-glibc-2.20.patch \
gnu/packages/patches/xf86-video-mach64-glibc-2.20.patch \
gnu/packages/patches/xf86-video-mga-glibc-2.20.patch \
gnu/packages/patches/xf86-video-nv-remove-mibstore.patch \
gnu/packages/patches/xf86-video-openchrome-glibc-2.20.patch \
gnu/packages/patches/xf86-video-r128-glibc-2.20.patch \
gnu/packages/patches/xf86-video-siliconmotion-remove-mibstore.patch \
gnu/packages/patches/xf86-video-sis-fix-exa-crash.patch \
gnu/packages/patches/xf86-video-sis-update-api.patch \
gnu/packages/patches/xf86-video-tdfx-remove-mibstore.patch \
gnu/packages/patches/xf86-video-tga-remove-mibstore.patch \
gnu/packages/patches/xf86-video-trident-remove-mibstore.patch \
gnu/packages/patches/xf86-video-vmware-glibc-2.20.patch \
gnu/packages/patches/xfce4-panel-plugins.patch \
gnu/packages/patches/xfce4-settings-defaults.patch \
gnu/packages/patches/xmodmap-asprintf.patch \
gnu/packages/patches/zathura-plugindir-environment-variable.patch
MISC_DISTRO_FILES = \
gnu/packages/ld-wrapper.in
bootstrapdir = $(guilemoduledir)/gnu/packages/bootstrap
bootstrap_x86_64_linuxdir = $(bootstrapdir)/x86_64-linux
bootstrap_i686_linuxdir = $(bootstrapdir)/i686-linux
bootstrap_armhf_linuxdir = $(bootstrapdir)/armhf-linux
bootstrap_mips64el_linuxdir = $(bootstrapdir)/mips64el-linux
dist_bootstrap_x86_64_linux_DATA = \
gnu/packages/bootstrap/x86_64-linux/bash \
gnu/packages/bootstrap/x86_64-linux/mkdir \
gnu/packages/bootstrap/x86_64-linux/tar \
gnu/packages/bootstrap/x86_64-linux/xz
dist_bootstrap_i686_linux_DATA = \
gnu/packages/bootstrap/i686-linux/bash \
gnu/packages/bootstrap/i686-linux/mkdir \
gnu/packages/bootstrap/i686-linux/tar \
gnu/packages/bootstrap/i686-linux/xz
dist_bootstrap_armhf_linux_DATA = \
gnu/packages/bootstrap/armhf-linux/bash \
gnu/packages/bootstrap/armhf-linux/mkdir \
gnu/packages/bootstrap/armhf-linux/tar \
gnu/packages/bootstrap/armhf-linux/xz
dist_bootstrap_mips64el_linux_DATA = \
gnu/packages/bootstrap/mips64el-linux/bash \
gnu/packages/bootstrap/mips64el-linux/mkdir \
gnu/packages/bootstrap/mips64el-linux/tar \
gnu/packages/bootstrap/mips64el-linux/xz
# Big bootstrap binaries are not included in the tarball. Instead, they
# are downloaded.
nodist_bootstrap_x86_64_linux_DATA = \
gnu/packages/bootstrap/x86_64-linux/guile-2.0.9.tar.xz
nodist_bootstrap_i686_linux_DATA = \
gnu/packages/bootstrap/i686-linux/guile-2.0.9.tar.xz
nodist_bootstrap_armhf_linux_DATA = \
gnu/packages/bootstrap/armhf-linux/guile-2.0.11.tar.xz
nodist_bootstrap_mips64el_linux_DATA = \
gnu/packages/bootstrap/mips64el-linux/guile-2.0.9.tar.xz
# Those files must remain executable, so they remain executable once
# imported into the store.
set-bootstrap-executable-permissions:
chmod +x $(DESTDIR)$(bootstrapdir)/*/{bash,mkdir,tar,xz}
DISTCLEANFILES = \
$(nodist_bootstrap_x86_64_linux_DATA) \
$(nodist_bootstrap_i686_linux_DATA) \
$(nodist_bootstrap_armhf_linux_DATA) \
$(nodist_bootstrap_mips64el_linux_DATA)
# Method to download a file from an external source.
DOWNLOAD_FILE = \
GUILE_LOAD_COMPILED_PATH="$(top_builddir):$$GUILE_LOAD_COMPILED_PATH" \
$(GUILE) --no-auto-compile -L "$(top_builddir)" -L "$(top_srcdir)" \
"$(top_srcdir)/build-aux/download.scm"
gnu/packages/bootstrap/x86_64-linux/guile-2.0.9.tar.xz:
$(MKDIR_P) `dirname "$@"`
$(DOWNLOAD_FILE) "$@" "037b103522a2d0d7d69c7ffd8de683dfe5bb4b59c1fafd70b4ffd397fd2f57f0"
gnu/packages/bootstrap/i686-linux/guile-2.0.9.tar.xz:
$(MKDIR_P) `dirname "$@"`
$(DOWNLOAD_FILE) "$@" "b757cd46bf13ecac83fb8e955fb50096ac2d17bb610ca8eb816f29302a00a846"
gnu/packages/bootstrap/armhf-linux/guile-2.0.11.tar.xz:
$(MKDIR_P) `dirname "$@"`
$(DOWNLOAD_FILE) "$@" "e551d05d4d385d6706ab8d574856a087758294dc90ab4c06e70a157a685e23d6"
gnu/packages/bootstrap/mips64el-linux/guile-2.0.9.tar.xz:
$(MKDIR_P) `dirname "$@"`
$(DOWNLOAD_FILE) "$@" "994680f0001346864aa2c2cc5110f380ee7518dcd701c614291682b8e948f73b"
+2 -3
View File
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015 Joshua S. Grant <jgrant@parenthetical.io>
;;;
;;; This file is part of GNU Guix.
@@ -32,10 +32,9 @@
(begin
(define %public-modules
'((gnu system)
(gnu system mapped-devices)
(gnu system file-systems)
(gnu system grub) ; 'grub-configuration'
(gnu system pam)
(gnu system linux) ; 'base-pam-services'
(gnu system shadow) ; 'user-account'
(gnu system linux-initrd)
(gnu system nss)
+2 -4
View File
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;;
;;; This file is part of GNU Guix.
@@ -91,9 +91,7 @@
(mkdir-p home)
(for-each (lambda (file)
(let ((target (string-append home "/" file)))
(copy-recursively (string-append directory "/" file)
target
#:log (%make-void-port "w"))
(copy-file (string-append directory "/" file) target)
(make-file-writable target)))
files)))
+37 -172
View File
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -18,13 +18,11 @@
(define-module (gnu build file-systems)
#:use-module (guix build utils)
#:use-module (guix build bournish)
#:use-module (rnrs io ports)
#:use-module (rnrs bytevectors)
#:use-module (ice-9 match)
#:use-module (ice-9 rdelim)
#:use-module (ice-9 format)
#:use-module (ice-9 regex)
#:use-module (system foreign)
#:autoload (system repl repl) (start-repl)
#:use-module (srfi srfi-1)
@@ -32,15 +30,10 @@
#:export (disk-partitions
partition-label-predicate
partition-uuid-predicate
partition-luks-uuid-predicate
find-partition-by-label
find-partition-by-uuid
find-partition-by-luks-uuid
canonicalize-device-spec
uuid->string
string->uuid
MS_RDONLY
MS_NOSUID
MS_NODEV
@@ -81,11 +74,6 @@
"Bind-mount SOURCE at TARGET."
(mount source target "" MS_BIND))
;;;
;;; Ext2 file systems.
;;;
(define-syntax %ext2-endianness
;; Endianness of ext2 file systems.
(identifier-syntax (endianness little)))
@@ -143,63 +131,6 @@ if DEVICE does not contain an ext2 file system."
#f
(list->string (map integer->char bytes))))))
;;;
;;; LUKS encrypted devices.
;;;
;; The LUKS header format is described in "LUKS On-Disk Format Specification":
;; <http://wiki.cryptsetup.googlecode.com/git/LUKS-standard/>. We follow
;; version 1.2.1 of this document.
(define-syntax %luks-endianness
;; Endianness of LUKS headers.
(identifier-syntax (endianness big)))
(define-syntax %luks-header-size
;; Size in bytes of the LUKS header, including key slots.
(identifier-syntax 592))
(define %luks-magic
;; The 'LUKS_MAGIC' constant.
(u8-list->bytevector (append (map char->integer (string->list "LUKS"))
(list #xba #xbe))))
(define (sub-bytevector bv start size)
"Return a copy of the SIZE bytes of BV starting from offset START."
(let ((result (make-bytevector size)))
(bytevector-copy! bv start result 0 size)
result))
(define (read-luks-header file)
"Read a LUKS header from FILE. Return the raw header on success, and #f if
not valid header was found."
(call-with-input-file file
(lambda (port)
(let ((header (make-bytevector %luks-header-size)))
(match (get-bytevector-n! port header 0 (bytevector-length header))
((? eof-object?)
#f)
((? number? len)
(and (= len (bytevector-length header))
(let ((magic (sub-bytevector header 0 6)) ;XXX: inefficient
(version (bytevector-u16-ref header 6 %luks-endianness)))
(and (bytevector=? magic %luks-magic)
(= version 1)
header)))))))))
(define (luks-header-uuid header)
"Return the LUKS UUID from HEADER, as a 16-byte bytevector."
;; 40 bytes are reserved for the UUID, but in practice, it contains the 36
;; bytes of its ASCII representation.
(let ((uuid (sub-bytevector header 168 36)))
(string->uuid (utf8->string uuid))))
;;;
;;; Partition lookup.
;;;
(define (disk-partitions)
"Return the list of device names corresponding to valid disk partitions."
(define (partition? major minor)
@@ -231,53 +162,42 @@ not valid header was found."
(loop (cons name parts))
(loop parts))))))))))
(define (ENOENT-safe proc)
"Wrap the one-argument PROC such that ENOENT errors are caught and lead to a
warning and #f as the result."
(lambda (device)
(catch 'system-error
(lambda ()
(proc device))
(lambda args
;; When running on the hand-made /dev,
;; 'disk-partitions' could return partitions for which
;; we have no /dev node. Handle that gracefully.
(if (= ENOENT (system-error-errno args))
(begin
(format (current-error-port)
"warning: device '~a' not found~%" device)
#f)
(apply throw args))))))
(define (read-ext2-superblock* device)
"Like 'read-ext2-superblock', but return #f when DEVICE does not exist
instead of throwing an exception."
(catch 'system-error
(lambda ()
(read-ext2-superblock device))
(lambda args
;; When running on the hand-made /dev,
;; 'disk-partitions' could return partitions for which
;; we have no /dev node. Handle that gracefully.
(if (= ENOENT (system-error-errno args))
(begin
(format (current-error-port)
"warning: device '~a' not found~%" device)
#f)
(apply throw args)))))
(define (partition-predicate read field =)
"Return a predicate that returns true if the FIELD of partition header that
was READ is = to the given value."
(let ((read (ENOENT-safe read)))
(lambda (expected)
"Return a procedure that, when applied to a partition name such as \"sda1\",
(define (partition-predicate field =)
"Return a predicate that returns true if the FIELD of an ext2 superblock is
= to the given value."
(lambda (expected)
"Return a procedure that, when applied to a partition name such as \"sda1\",
returns #t if that partition's volume name is LABEL."
(lambda (part)
(let* ((device (string-append "/dev/" part))
(sblock (read device)))
(and sblock
(let ((actual (field sblock)))
(and actual
(= actual expected)))))))))
(lambda (part)
(let* ((device (string-append "/dev/" part))
(sblock (read-ext2-superblock* device)))
(and sblock
(let ((actual (field sblock)))
(and actual
(= actual expected))))))))
(define partition-label-predicate
(partition-predicate read-ext2-superblock
ext2-superblock-volume-name
string=?))
(partition-predicate ext2-superblock-volume-name string=?))
(define partition-uuid-predicate
(partition-predicate read-ext2-superblock
ext2-superblock-uuid
bytevector=?))
(define partition-luks-uuid-predicate
(partition-predicate read-luks-header
luks-header-uuid
bytevector=?))
(partition-predicate ext2-superblock-uuid bytevector=?))
(define (find-partition-by-label label)
"Return the first partition found whose volume name is LABEL, or #f if none
@@ -293,18 +213,6 @@ or #f if none was found."
(disk-partitions))
(cut string-append "/dev/" <>)))
(define (find-partition-by-luks-uuid uuid)
"Return the first LUKS partition whose unique identifier is UUID (a bytevector),
or #f if none was found."
(and=> (find (partition-luks-uuid-predicate uuid)
(disk-partitions))
(cut string-append "/dev/" <>)))
;;;
;;; UUIDs.
;;;
(define-syntax %network-byte-order
(identifier-syntax (endianness big)))
@@ -320,41 +228,6 @@ like \"6b700d61-5550-48a1-874c-a3d86998990e\"."
(format #f "~8,'0x-~4,'0x-~4,'0x-~4,'0x-~12,'0x"
time-low time-mid time-hi clock-seq node)))
(define %uuid-rx
;; The regexp of a UUID.
(make-regexp "^([[:xdigit:]]{8})-([[:xdigit:]]{4})-([[:xdigit:]]{4})-([[:xdigit:]]{4})-([[:xdigit:]]{12})$"))
(define (string->uuid str)
"Parse STR as a DCE UUID (see <https://tools.ietf.org/html/rfc4122>) and
return its contents as a 16-byte bytevector. Return #f if STR is not a valid
UUID representation."
(and=> (regexp-exec %uuid-rx str)
(lambda (match)
(letrec-syntax ((hex->number
(syntax-rules ()
((_ index)
(string->number (match:substring match index)
16))))
(put!
(syntax-rules ()
((_ bv index (number len) rest ...)
(begin
(bytevector-uint-set! bv index number
(endianness big) len)
(put! bv (+ index len) rest ...)))
((_ bv index)
bv))))
(let ((time-low (hex->number 1))
(time-mid (hex->number 2))
(time-hi (hex->number 3))
(clock-seq (hex->number 4))
(node (hex->number 5))
(uuid (make-bytevector 16)))
(put! uuid 0
(time-low 4) (time-mid 2) (time-hi 2)
(clock-seq 2) (node 6)))))))
(define* (canonicalize-device-spec spec #:optional (title 'any))
"Return the device name corresponding to SPEC. TITLE is a symbol, one of
the following:
@@ -378,12 +251,9 @@ the following:
;; The realm of canonicalization.
(if (eq? title 'any)
(if (string? spec)
;; The "--root=SPEC" kernel command-line option always provides a
;; string, but the string can represent a device, a UUID, or a
;; label. So check for all three.
(cond ((string-prefix? "/" spec) 'device)
((string->uuid spec) 'uuid)
(else 'label))
(if (string-prefix? "/" spec)
'device
'label)
'uuid)
title))
@@ -409,11 +279,7 @@ the following:
;; Resolve the label.
(resolve find-partition-by-label spec identity))
((uuid)
(resolve find-partition-by-uuid
(if (string? spec)
(string->uuid spec)
spec)
uuid->string))
(resolve find-partition-by-uuid spec uuid->string))
(else
(error "unknown device title" title))))
@@ -435,10 +301,9 @@ the following:
(sleep 3)
(reboot))
(code
(format (current-error-port) "'~a' exited with code ~a on ~a; \
spawning Bourne-like REPL~%"
(format (current-error-port) "'~a' exited with code ~a on ~a; spawning REPL~%"
fsck code device)
(start-repl %bournish-language)))))
(start-repl)))))
(define (mount-flags->bit-mask flags)
"Return the number suitable for the 'flags' argument of 'mount' that
+2 -2
View File
@@ -103,7 +103,7 @@ STORE."
(directory ,store 0 30000 #o1775)
(directory "/etc")
(directory "/var/log") ; for shepherd
(directory "/var/log") ; for dmd
(directory "/var/guix/gcroots")
(directory "/var/empty") ; for no-login accounts
(directory "/var/db") ; for dhclient, etc.
@@ -159,7 +159,7 @@ as created and modified at the Epoch."
;; read-only store.
(unless (eq? (stat:type s) 'symlink)
(utime file 0 0 0 0))))
(find-files directory #:directories? #t)))
(find-files directory "")))
(define* (register-closure store closure
#:key (deduplicate? #t))
+6 -5
View File
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -242,10 +242,10 @@ the last argument of `mknod'."
is true, mount ROOT read-only and make it a union with a writable tmpfs using
UNIONFS."
(define (mark-as-not-killable pid)
;; Tell the 'user-processes' shepherd service that PID must be kept alive
;; when shutting down.
(mkdir-p "/root/etc/shepherd")
(let ((port (open-file "/root/etc/shepherd/do-not-kill" "a")))
;; Tell the 'user-processes' dmd service that PID must be kept alive when
;; shutting down.
(mkdir-p "/root/etc/dmd")
(let ((port (open-file "/root/etc/dmd/do-not-kill" "a")))
(chmod port #o600)
(write pid port)
(newline port)
@@ -381,6 +381,7 @@ to it are lost."
(start-repl))
(display "loading kernel modules...\n")
(current-module-debugging-port (current-output-port))
(for-each (cut load-linux-module* <>
#:lookup-module lookup-module)
(map lookup-module linux-modules))
+18 -59
View File
@@ -19,36 +19,16 @@
(define-module (gnu build linux-container)
#:use-module (ice-9 format)
#:use-module (ice-9 match)
#:use-module (ice-9 rdelim)
#:use-module (srfi srfi-98)
#:use-module (guix utils)
#:use-module (guix build utils)
#:use-module (guix build syscalls)
#:use-module ((gnu build file-systems) #:select (mount-file-system))
#:export (user-namespace-supported?
unprivileged-user-namespace-supported?
setgroups-supported?
%namespaces
#:export (%namespaces
run-container
call-with-container
container-excursion))
(define (user-namespace-supported?)
"Return #t if user namespaces are supported on this system."
(file-exists? "/proc/self/ns/user"))
(define (unprivileged-user-namespace-supported?)
"Return #t if user namespaces can be created by unprivileged users."
(let ((userns-file "/proc/sys/kernel/unprivileged_userns_clone"))
(if (file-exists? userns-file)
(eqv? #\1 (call-with-input-file userns-file read-char))
#t)))
(define (setgroups-supported?)
"Return #t if the setgroups proc file, introduced in Linux-libre 3.19,
exists."
(file-exists? "/proc/self/setgroups"))
(define %namespaces
'(mnt pid ipc uts user net))
@@ -185,7 +165,7 @@ host user identifiers to map into the user namespace."
"Return the number suitable for the 'flags' argument of 'clone' that
corresponds to the symbols in NAMESPACES."
;; Use the same flags as fork(3) in addition to the namespace flags.
(apply logior SIGCHLD
(apply logior SIGCHLD CLONE_CHILD_CLEARTID CLONE_CHILD_SETTID
(map (match-lambda
('mnt CLONE_NEWNS)
('uts CLONE_NEWUTS)
@@ -205,53 +185,32 @@ host user identifiers to map into the user namespace."
;; The parent process must initialize the user namespace for the child
;; before it can boot. To negotiate this, a pipe is used such that the
;; child process blocks until the parent writes to it.
(match (socketpair PF_UNIX SOCK_STREAM 0)
((child . parent)
(match (pipe)
((in . out)
(let ((flags (namespaces->bit-mask namespaces)))
(match (clone flags)
(0
(call-with-clean-exit
(lambda ()
(close-port parent)
(close out)
;; Wait for parent to set things up.
(match (read child)
('ready
(purify-environment)
(when (memq 'mnt namespaces)
(catch #t
(lambda ()
(mount-file-systems root mounts
#:mount-/proc? (memq 'pid namespaces)
#:mount-/sys? (memq 'net
namespaces)))
(lambda args
;; Forward the exception to the parent process.
(write args child)
(primitive-exit 3))))
;; TODO: Manage capabilities.
(write 'ready child)
(close-port child)
(thunk))
(_ ;parent died or something
(primitive-exit 2))))))
(read in)
(close in)
(purify-environment)
(when (memq 'mnt namespaces)
(mount-file-systems root mounts
#:mount-/proc? (memq 'pid namespaces)
#:mount-/sys? (memq 'net namespaces)))
;; TODO: Manage capabilities.
(thunk))))
(pid
(close-port child)
(when (memq 'user namespaces)
(initialize-user-namespace pid host-uids))
;; TODO: Initialize cgroups.
(write 'ready parent)
(newline parent)
;; Check whether the child process' setup phase succeeded.
(let ((message (read parent)))
(close-port parent)
(match message
('ready ;success
pid)
(((? symbol? key) args ...) ;exception
(apply throw key args))
(_ ;unexpected termination
#f)))))))))
(close in)
(write 'ready out)
(close out)
pid))))))
(define* (call-with-container mounts thunk #:key (namespaces %namespaces)
(host-uids 1))
+20 -68
View File
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -96,21 +96,6 @@ contains module names, not actual file names."
name
(dot-ko name)))
(define (normalize-module-name module)
"Return the \"canonical\" name for MODULE, replacing hyphens with
underscores."
;; See 'modname_normalize' in libkmod.
(string-map (lambda (chr)
(case chr
((#\-) #\_)
(else chr)))
module))
(define (file-name->module-name file)
"Return the module name corresponding to FILE, stripping the trailing '.ko'
and normalizing it."
(normalize-module-name (basename file ".ko")))
(define* (recursive-module-dependencies files
#:key (lookup-module dot-ko))
"Return the topologically-sorted list of file names of the modules depended
@@ -145,24 +130,6 @@ LOOKUP-MODULE to the module name."
(((modules . _) ...)
modules))))
(define (module-black-list)
"Return the black list of modules that must not be loaded. This black list
is specified using 'modprobe.blacklist=MODULE1,MODULE2,...' on the kernel
command line; it is honored by libkmod for users that pass
'KMOD_PROBE_APPLY_BLACKLIST', which includes 'modprobe --use-blacklist' and
udev."
(define parameter
"modprobe.blacklist=")
(let ((command (call-with-input-file "/proc/cmdline"
get-string-all)))
(append-map (lambda (arg)
(if (string-prefix? parameter arg)
(string-tokenize (string-drop arg (string-length parameter))
%not-comma)
'()))
(string-tokenize command))))
(define (module-loaded? module)
"Return #t if MODULE is already loaded. MODULE must be a Linux module name,
not a file name."
@@ -171,44 +138,29 @@ not a file name."
(define* (load-linux-module* file
#:key
(recursive? #t)
(lookup-module dot-ko)
(black-list (module-black-list)))
"Load Linux module from FILE, the name of a '.ko' file; return true on
success, false otherwise. When RECURSIVE? is true, load its dependencies
first (à la 'modprobe'.) The actual files containing modules depended on are
obtained by calling LOOKUP-MODULE with the module name. Modules whose name
appears in BLACK-LIST are not loaded."
(lookup-module dot-ko))
"Load Linux module from FILE, the name of a `.ko' file. When RECURSIVE? is
true, load its dependencies first (à la 'modprobe'.) The actual files
containing modules depended on are obtained by calling LOOKUP-MODULE with the
module name."
(define (slurp module)
;; TODO: Use 'finit_module' to reduce memory usage.
;; TODO: Use 'mmap' to reduce memory usage.
(call-with-input-file file get-bytevector-all))
(define (black-listed? module)
(let ((result (member module black-list)))
(when result
(format (current-module-debugging-port)
"not loading module '~a' because it's black-listed~%"
module))
result))
(when recursive?
(for-each (cut load-linux-module* <> #:lookup-module lookup-module)
(map lookup-module (module-dependencies file))))
(define (load-dependencies file)
(let ((dependencies (module-dependencies file)))
(every (cut load-linux-module* <> #:lookup-module lookup-module)
(map lookup-module dependencies))))
(format (current-module-debugging-port)
"loading Linux module from '~a'...~%" file)
(and (not (black-listed? (file-name->module-name file)))
(or (not recursive?)
(load-dependencies file))
(begin
(format (current-module-debugging-port)
"loading Linux module from '~a'...~%" file)
(catch 'system-error
(lambda ()
(load-linux-module (slurp file)))
(lambda args
;; If this module was already loaded and we're in modprobe style, ignore
;; the error.
(or (and recursive? (= EEXIST (system-error-errno args)))
(apply throw args)))))))
(catch 'system-error
(lambda ()
(load-linux-module (slurp file)))
(lambda args
;; If this module was already loaded and we're in modprobe style, ignore
;; the error.
(unless (and recursive? (= EEXIST (system-error-errno args)))
(apply throw args)))))
;;; linux-modules.scm ends here
-206
View File
@@ -1,206 +0,0 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
;;;
;;; 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 (gnu build marionette)
#:use-module (srfi srfi-9)
#:use-module (srfi srfi-26)
#:use-module (rnrs io ports)
#:use-module (ice-9 match)
#:export (marionette?
make-marionette
marionette-eval
marionette-control
%qwerty-us-keystrokes
marionette-type))
;;; Commentary:
;;;
;;; Instrumentation tools for QEMU virtual machines (VMs). A "marionette" is
;;; essentially a VM (a QEMU instance) with its monitor connected to a
;;; Unix-domain socket, and with a REPL inside the guest listening on a
;;; virtual console, which is itself connected to the host via a Unix-domain
;;; socket--these are the marionette's strings, connecting it to the almighty
;;; puppeteer.
;;;
;;; Code:
(define-record-type <marionette>
(marionette command pid monitor repl)
marionette?
(command marionette-command) ;list of strings
(pid marionette-pid) ;integer
(monitor marionette-monitor) ;port
(repl marionette-repl)) ;port
(define* (wait-for-monitor-prompt port #:key (quiet? #t))
"Read from PORT until we have seen all of QEMU's monitor prompt. When
QUIET? is false, the monitor's output is written to the current output port."
(define full-prompt
(string->list "(qemu) "))
(let loop ((prompt full-prompt)
(matches '())
(prefix '()))
(match prompt
(()
;; It's useful to set QUIET? so we don't display the echo of our own
;; commands.
(unless quiet?
(for-each (lambda (line)
(format #t "qemu monitor: ~a~%" line))
(string-tokenize (list->string (reverse prefix))
(char-set-complement (char-set #\newline))))))
((chr rest ...)
(let ((read (read-char port)))
(cond ((eqv? read chr)
(loop rest (cons read matches) prefix))
((eof-object? read)
(error "EOF while waiting for QEMU monitor prompt"
(list->string (reverse prefix))))
(else
(loop full-prompt
'()
(cons read (append matches prefix))))))))))
(define* (make-marionette command
#:key (socket-directory "/tmp") (timeout 20))
"Return a QEMU marionette--i.e., a virtual machine with open connections to the
QEMU monitor and to the guest's backdoor REPL."
(define (file->sockaddr file)
(make-socket-address AF_UNIX
(string-append socket-directory "/" file)))
(define extra-options
(list "-nographic"
"-monitor" (string-append "unix:" socket-directory "/monitor")
"-chardev" (string-append "socket,id=repl,path=" socket-directory
"/repl")
"-device" "virtio-serial"
"-device" "virtconsole,chardev=repl"))
(let ((monitor (socket AF_UNIX SOCK_STREAM 0))
(repl (socket AF_UNIX SOCK_STREAM 0)))
(bind monitor (file->sockaddr "monitor"))
(listen monitor 1)
(bind repl (file->sockaddr "repl"))
(listen repl 1)
(match (primitive-fork)
(0
(catch #t
(lambda ()
(close monitor)
(close repl)
(match command
((program . args)
(apply execl program program
(append args extra-options)))))
(lambda (key . args)
(print-exception (current-error-port)
(stack-ref (make-stack #t) 1)
key args)
(primitive-exit 1))))
(pid
(format #t "QEMU runs as PID ~a~%" pid)
(sigaction SIGALRM
(lambda (signum)
(display "time is up!\n") ;FIXME: break
#t))
(alarm timeout)
(match (accept monitor)
((monitor-conn . _)
(display "connected to QEMU's monitor\n")
(close-port monitor)
(wait-for-monitor-prompt monitor-conn)
(display "read QEMU monitor prompt\n")
(match (accept repl)
((repl-conn . addr)
(display "connected to guest REPL\n")
(close-port repl)
(match (read repl-conn)
('ready
(alarm 0)
(sigaction SIGALRM SIG_DFL)
(display "marionette is ready\n")
(marionette (append command extra-options) pid
monitor-conn repl-conn)))))))))))
(define (marionette-eval exp marionette)
"Evaluate EXP in MARIONETTE's backdoor REPL. Return the result."
(match marionette
(($ <marionette> command pid monitor repl)
(write exp repl)
(newline repl)
(read repl))))
(define (marionette-control command marionette)
"Run COMMAND in the QEMU monitor of MARIONETTE. COMMAND is a string such as
\"sendkey ctrl-alt-f1\" or \"screendump foo.ppm\" (info \"(qemu-doc)
pcsys_monitor\")."
(match marionette
(($ <marionette> _ _ monitor)
(display command monitor)
(newline monitor)
(wait-for-monitor-prompt monitor))))
(define %qwerty-us-keystrokes
;; Maps "special" characters to their keystrokes.
'((#\newline . "ret")
(#\space . "spc")
(#\- . "minus")
(#\+ . "shift-equal")
(#\* . "shift-8")
(#\= . "equal")
(#\? . "shift-slash")
(#\[ . "bracket_left")
(#\] . "bracket_right")
(#\( . "shift-9")
(#\) . "shift-0")
(#\/ . "slash")
(#\< . "less")
(#\> . "shift-less")
(#\. . "dot")
(#\, . "comma")
(#\; . "semicolon")
(#\bs . "backspace")
(#\tab . "tab")))
(define* (string->keystroke-commands str
#:optional
(keystrokes
%qwerty-us-keystrokes))
"Return a list of QEMU monitor commands to send the keystrokes corresponding
to STR. KEYSTROKES is an alist specifying a mapping from characters to
keystrokes."
(string-fold-right (lambda (chr result)
(cons (string-append "sendkey "
(or (assoc-ref keystrokes chr)
(string chr)))
result))
'()
str))
(define* (marionette-type str marionette
#:key (keystrokes %qwerty-us-keystrokes))
"Type STR on MARIONETTE's keyboard, using the KEYSTROKES alist to map characters
to actual keystrokes."
(for-each (cut marionette-control <> marionette)
(string->keystroke-commands str keystrokes)))
;;; marionette.scm ends here
+8 -17
View File
@@ -1,7 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -55,8 +53,8 @@
(define* (qemu-command #:optional (system %host-type))
"Return the default name of the QEMU command for SYSTEM."
(let ((cpu (substring system 0
(string-index system #\-))))
(let ((cpu (substring %host-type 0
(string-index %host-type #\-))))
(string-append "qemu-system-"
(if (string-match "^i[3456]86$" cpu)
"i386"
@@ -99,7 +97,7 @@ the #:references-graphs parameter of 'derivation'."
(_ #f))
(unless (zero?
(apply system* qemu "-nographic" "-no-reboot"
(apply system* qemu "-enable-kvm" "-nographic" "-no-reboot"
"-m" (number->string memory-size)
"-net" "nic,model=virtio"
"-virtfs"
@@ -113,17 +111,10 @@ the #:references-graphs parameter of 'derivation'."
"-initrd" initrd
"-append" (string-append "console=ttyS0 --load="
builder)
(append
(if make-disk-image?
`("-drive" ,(string-append "file=" image-file
",if=virtio"))
'())
;; Only enable kvm if we see /dev/kvm exists.
;; This allows users without hardware virtualization to still
;; use these commands.
(if (file-exists? "/dev/kvm")
'("-enable-kvm")
'()))))
(if make-disk-image?
`("-drive" ,(string-append "file=" image-file
",if=virtio"))
'())))
(error "qemu failed" qemu))
(if make-disk-image?
-935
View File
@@ -1,935 +0,0 @@
# GNU Guix --- Functional package management for GNU
# Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
# Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
# Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
# Copyright © 2013, 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
# Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
# Copyright © 2016 Kei Kebreau <kei@openmailbox.org>
#
# 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/>.
# Definitions for the GNU System: package modules, patches, bootstrap
# binaries.
GNU_SYSTEM_MODULES = \
gnu.scm \
%D%/artwork.scm \
%D%/packages.scm \
%D%/packages/abduco.scm \
%D%/packages/abiword.scm \
%D%/packages/acct.scm \
%D%/packages/acl.scm \
%D%/packages/admin.scm \
%D%/packages/adns.scm \
%D%/packages/algebra.scm \
%D%/packages/aidc.scm \
%D%/packages/animation.scm \
%D%/packages/anthy.scm \
%D%/packages/apl.scm \
%D%/packages/apr.scm \
%D%/packages/aspell.scm \
%D%/packages/assembly.scm \
%D%/packages/attr.scm \
%D%/packages/audacity.scm \
%D%/packages/audio.scm \
%D%/packages/augeas.scm \
%D%/packages/autogen.scm \
%D%/packages/autotools.scm \
%D%/packages/avahi.scm \
%D%/packages/avr.scm \
%D%/packages/backup.scm \
%D%/packages/base.scm \
%D%/packages/bash.scm \
%D%/packages/bdw-gc.scm \
%D%/packages/bioinformatics.scm \
%D%/packages/bittorrent.scm \
%D%/packages/bison.scm \
%D%/packages/boost.scm \
%D%/packages/bootstrap.scm \
%D%/packages/busybox.scm \
%D%/packages/c.scm \
%D%/packages/calcurse.scm \
%D%/packages/ccache.scm \
%D%/packages/cdrom.scm \
%D%/packages/certs.scm \
%D%/packages/check.scm \
%D%/packages/ci.scm \
%D%/packages/cmake.scm \
%D%/packages/code.scm \
%D%/packages/commencement.scm \
%D%/packages/compression.scm \
%D%/packages/conkeror.scm \
%D%/packages/conky.scm \
%D%/packages/connman.scm \
%D%/packages/cook.scm \
%D%/packages/cpio.scm \
%D%/packages/cppi.scm \
%D%/packages/cross-base.scm \
%D%/packages/crypto.scm \
%D%/packages/cryptsetup.scm \
%D%/packages/cups.scm \
%D%/packages/curl.scm \
%D%/packages/cyrus-sasl.scm \
%D%/packages/databases.scm \
%D%/packages/datamash.scm \
%D%/packages/datastructures.scm \
%D%/packages/dav.scm \
%D%/packages/dc.scm \
%D%/packages/debug.scm \
%D%/packages/dejagnu.scm \
%D%/packages/dico.scm \
%D%/packages/dictionaries.scm \
%D%/packages/dillo.scm \
%D%/packages/disk.scm \
%D%/packages/djvu.scm \
%D%/packages/dns.scm \
%D%/packages/docbook.scm \
%D%/packages/docker.scm \
%D%/packages/documentation.scm \
%D%/packages/dunst.scm \
%D%/packages/dvtm.scm \
%D%/packages/ebook.scm \
%D%/packages/ed.scm \
%D%/packages/education.scm \
%D%/packages/elf.scm \
%D%/packages/elixir.scm \
%D%/packages/emacs.scm \
%D%/packages/enchant.scm \
%D%/packages/engineering.scm \
%D%/packages/enlightenment.scm \
%D%/packages/entr.scm \
%D%/packages/erlang.scm \
%D%/packages/fcitx.scm \
%D%/packages/feh.scm \
%D%/packages/figlet.scm \
%D%/packages/file.scm \
%D%/packages/finance.scm \
%D%/packages/firmware.scm \
%D%/packages/fish.scm \
%D%/packages/flashing-tools.scm \
%D%/packages/flex.scm \
%D%/packages/fltk.scm \
%D%/packages/fonts.scm \
%D%/packages/fontutils.scm \
%D%/packages/freedesktop.scm \
%D%/packages/freeipmi.scm \
%D%/packages/ftp.scm \
%D%/packages/fribidi.scm \
%D%/packages/fvwm.scm \
%D%/packages/game-development.scm \
%D%/packages/games.scm \
%D%/packages/gawk.scm \
%D%/packages/gcal.scm \
%D%/packages/gcc.scm \
%D%/packages/gd.scm \
%D%/packages/gdb.scm \
%D%/packages/geo.scm \
%D%/packages/geeqie.scm \
%D%/packages/gettext.scm \
%D%/packages/ghostscript.scm \
%D%/packages/gimp.scm \
%D%/packages/gkrellm.scm \
%D%/packages/gl.scm \
%D%/packages/glib.scm \
%D%/packages/gnome.scm \
%D%/packages/gnu-doc.scm \
%D%/packages/gnucash.scm \
%D%/packages/gnunet.scm \
%D%/packages/gnupg.scm \
%D%/packages/gnustep.scm \
%D%/packages/gnuzilla.scm \
%D%/packages/gnu-pw-mgr.scm \
%D%/packages/golang.scm \
%D%/packages/gperf.scm \
%D%/packages/gprolog.scm \
%D%/packages/gps.scm \
%D%/packages/graphics.scm \
%D%/packages/graphviz.scm \
%D%/packages/groff.scm \
%D%/packages/grub.scm \
%D%/packages/gsasl.scm \
%D%/packages/gstreamer.scm \
%D%/packages/gtk.scm \
%D%/packages/guile.scm \
%D%/packages/guile-wm.scm \
%D%/packages/gv.scm \
%D%/packages/gxmessage.scm \
%D%/packages/haskell.scm \
%D%/packages/hexedit.scm \
%D%/packages/hugs.scm \
%D%/packages/hurd.scm \
%D%/packages/ibus.scm \
%D%/packages/icu4c.scm \
%D%/packages/idutils.scm \
%D%/packages/image.scm \
%D%/packages/imagemagick.scm \
%D%/packages/indent.scm \
%D%/packages/inklingreader.scm \
%D%/packages/inkscape.scm \
%D%/packages/irc.scm \
%D%/packages/iso-codes.scm \
%D%/packages/java.scm \
%D%/packages/jemalloc.scm \
%D%/packages/jrnl.scm \
%D%/packages/julia.scm \
%D%/packages/kde.scm \
%D%/packages/kde-frameworks.scm \
%D%/packages/key-mon.scm \
%D%/packages/kodi.scm \
%D%/packages/language.scm \
%D%/packages/ldc.scm \
%D%/packages/lego.scm \
%D%/packages/less.scm \
%D%/packages/lesstif.scm \
%D%/packages/libbsd.scm \
%D%/packages/libcanberra.scm \
%D%/packages/libdaemon.scm \
%D%/packages/libedit.scm \
%D%/packages/libevent.scm \
%D%/packages/libffcall.scm \
%D%/packages/libffi.scm \
%D%/packages/libftdi.scm \
%D%/packages/calendar.scm \
%D%/packages/libidn.scm \
%D%/packages/libphidget.scm \
%D%/packages/libreoffice.scm \
%D%/packages/libsigsegv.scm \
%D%/packages/libunistring.scm \
%D%/packages/libusb.scm \
%D%/packages/libunwind.scm \
%D%/packages/libupnp.scm \
%D%/packages/links.scm \
%D%/packages/linux.scm \
%D%/packages/lirc.scm \
%D%/packages/lisp.scm \
%D%/packages/llvm.scm \
%D%/packages/lout.scm \
%D%/packages/logging.scm \
%D%/packages/lsof.scm \
%D%/packages/lua.scm \
%D%/packages/lxde.scm \
%D%/packages/lxqt.scm \
%D%/packages/lynx.scm \
%D%/packages/m4.scm \
%D%/packages/machine-learning.scm \
%D%/packages/man.scm \
%D%/packages/mail.scm \
%D%/packages/make-bootstrap.scm \
%D%/packages/markdown.scm \
%D%/packages/marst.scm \
%D%/packages/mate.scm \
%D%/packages/maths.scm \
%D%/packages/mc.scm \
%D%/packages/mcrypt.scm \
%D%/packages/messaging.scm \
%D%/packages/mg.scm \
%D%/packages/mit-krb5.scm \
%D%/packages/moe.scm \
%D%/packages/moreutils.scm \
%D%/packages/mpd.scm \
%D%/packages/mp3.scm \
%D%/packages/mpi.scm \
%D%/packages/multiprecision.scm \
%D%/packages/music.scm \
%D%/packages/mtools.scm \
%D%/packages/nano.scm \
%D%/packages/ncdu.scm \
%D%/packages/ncurses.scm \
%D%/packages/netpbm.scm \
%D%/packages/nettle.scm \
%D%/packages/networking.scm \
%D%/packages/ninja.scm \
%D%/packages/node.scm \
%D%/packages/noweb.scm \
%D%/packages/ntp.scm \
%D%/packages/nutrition.scm \
%D%/packages/nvi.scm \
%D%/packages/ocaml.scm \
%D%/packages/ocr.scm \
%D%/packages/onc-rpc.scm \
%D%/packages/openbox.scm \
%D%/packages/openldap.scm \
%D%/packages/openstack.scm \
%D%/packages/orpheus.scm \
%D%/packages/ots.scm \
%D%/packages/owncloud.scm \
%D%/packages/package-management.scm \
%D%/packages/parallel.scm \
%D%/packages/password-utils.scm \
%D%/packages/patchutils.scm \
%D%/packages/pciutils.scm \
%D%/packages/pcre.scm \
%D%/packages/pdf.scm \
%D%/packages/pem.scm \
%D%/packages/perl.scm \
%D%/packages/photo.scm \
%D%/packages/pkg-config.scm \
%D%/packages/plotutils.scm \
%D%/packages/polkit.scm \
%D%/packages/popt.scm \
%D%/packages/pth.scm \
%D%/packages/pulseaudio.scm \
%D%/packages/pumpio.scm \
%D%/packages/pretty-print.scm \
%D%/packages/protobuf.scm \
%D%/packages/pv.scm \
%D%/packages/python.scm \
%D%/packages/qemu.scm \
%D%/packages/qt.scm \
%D%/packages/ragel.scm \
%D%/packages/rails.scm \
%D%/packages/ratpoison.scm \
%D%/packages/rc.scm \
%D%/packages/rdesktop.scm \
%D%/packages/rdf.scm \
%D%/packages/readline.scm \
%D%/packages/rrdtool.scm \
%D%/packages/rsync.scm \
%D%/packages/ruby.scm \
%D%/packages/rush.scm \
%D%/packages/samba.scm \
%D%/packages/sawfish.scm \
%D%/packages/scanner.scm \
%D%/packages/scheme.scm \
%D%/packages/screen.scm \
%D%/packages/scribus.scm \
%D%/packages/sdl.scm \
%D%/packages/search.scm \
%D%/packages/serialization.scm \
%D%/packages/serveez.scm \
%D%/packages/shellutils.scm \
%D%/packages/shishi.scm \
%D%/packages/skarnet.scm \
%D%/packages/skribilo.scm \
%D%/packages/slang.scm \
%D%/packages/slim.scm \
%D%/packages/smalltalk.scm \
%D%/packages/speech.scm \
%D%/packages/spice.scm \
%D%/packages/ssh.scm \
%D%/packages/stalonetray.scm \
%D%/packages/statistics.scm \
%D%/packages/suckless.scm \
%D%/packages/swig.scm \
%D%/packages/sxiv.scm \
%D%/packages/synergy.scm \
%D%/packages/task-management.scm \
%D%/packages/tbb.scm \
%D%/packages/tcl.scm \
%D%/packages/tcsh.scm \
%D%/packages/telephony.scm \
%D%/packages/terminals.scm \
%D%/packages/texinfo.scm \
%D%/packages/tex.scm \
%D%/packages/textutils.scm \
%D%/packages/time.scm \
%D%/packages/tls.scm \
%D%/packages/tmux.scm \
%D%/packages/tor.scm \
%D%/packages/tre.scm \
%D%/packages/tv.scm \
%D%/packages/unrtf.scm \
%D%/packages/upnp.scm \
%D%/packages/uucp.scm \
%D%/packages/valgrind.scm \
%D%/packages/version-control.scm \
%D%/packages/video.scm \
%D%/packages/vim.scm \
%D%/packages/vpn.scm \
%D%/packages/vtk.scm \
%D%/packages/w3m.scm \
%D%/packages/wdiff.scm \
%D%/packages/web.scm \
%D%/packages/webkit.scm \
%D%/packages/wget.scm \
%D%/packages/wicd.scm \
%D%/packages/wine.scm \
%D%/packages/wm.scm \
%D%/packages/wordnet.scm \
%D%/packages/wv.scm \
%D%/packages/wxwidgets.scm \
%D%/packages/xfig.scm \
%D%/packages/xiph.scm \
%D%/packages/xml.scm \
%D%/packages/xnee.scm \
%D%/packages/xdisorg.scm \
%D%/packages/xorg.scm \
%D%/packages/xfce.scm \
%D%/packages/yubico.scm \
%D%/packages/zile.scm \
%D%/packages/zip.scm \
%D%/packages/zsh.scm \
\
%D%/services.scm \
%D%/services/avahi.scm \
%D%/services/base.scm \
%D%/services/databases.scm \
%D%/services/dbus.scm \
%D%/services/desktop.scm \
%D%/services/dict.scm \
%D%/services/lirc.scm \
%D%/services/mail.scm \
%D%/services/mcron.scm \
%D%/services/networking.scm \
%D%/services/shepherd.scm \
%D%/services/herd.scm \
%D%/services/ssh.scm \
%D%/services/web.scm \
%D%/services/xorg.scm \
\
%D%/system.scm \
%D%/system/file-systems.scm \
%D%/system/grub.scm \
%D%/system/install.scm \
%D%/system/linux-container.scm \
%D%/system/linux-initrd.scm \
%D%/system/locale.scm \
%D%/system/mapped-devices.scm \
%D%/system/nss.scm \
%D%/system/pam.scm \
%D%/system/shadow.scm \
%D%/system/vm.scm \
\
%D%/build/activation.scm \
%D%/build/file-systems.scm \
%D%/build/install.scm \
%D%/build/linux-boot.scm \
%D%/build/linux-container.scm \
%D%/build/linux-initrd.scm \
%D%/build/linux-modules.scm \
%D%/build/marionette.scm \
%D%/build/vm.scm \
\
%D%/tests.scm \
%D%/tests/base.scm \
%D%/tests/install.scm
patchdir = $(guilemoduledir)/%D%/packages/patches
dist_patch_DATA = \
%D%/packages/patches/4store-fix-buildsystem.patch \
%D%/packages/patches/a2ps-CVE-2001-1593.patch \
%D%/packages/patches/a2ps-CVE-2014-0466.patch \
%D%/packages/patches/abiword-explictly-cast-bools.patch \
%D%/packages/patches/abiword-wmf-version-lookup-fix.patch \
%D%/packages/patches/acl-hurd-path-max.patch \
%D%/packages/patches/aegis-constness-error.patch \
%D%/packages/patches/aegis-perl-tempdir1.patch \
%D%/packages/patches/aegis-perl-tempdir2.patch \
%D%/packages/patches/aegis-test-fixup-1.patch \
%D%/packages/patches/aegis-test-fixup-2.patch \
%D%/packages/patches/agg-am_c_prototype.patch \
%D%/packages/patches/alsa-lib-mips-atomic-fix.patch \
%D%/packages/patches/antiword-CVE-2014-8123.patch \
%D%/packages/patches/apr-skip-getservbyname-test.patch \
%D%/packages/patches/arb-ldconfig.patch \
%D%/packages/patches/ath9k-htc-firmware-binutils.patch \
%D%/packages/patches/ath9k-htc-firmware-gcc.patch \
%D%/packages/patches/ath9k-htc-firmware-objcopy.patch \
%D%/packages/patches/audacity-fix-ffmpeg-binding.patch \
%D%/packages/patches/automake-skip-amhello-tests.patch \
%D%/packages/patches/automake-regexp-syntax.patch \
%D%/packages/patches/automake-test-gzip-warning.patch \
%D%/packages/patches/avahi-localstatedir.patch \
%D%/packages/patches/avidemux-install-to-lib.patch \
%D%/packages/patches/awesome-reproducible-png.patch \
%D%/packages/patches/bash-completion-directories.patch \
%D%/packages/patches/bigloo-gc-shebangs.patch \
%D%/packages/patches/binutils-ld-new-dtags.patch \
%D%/packages/patches/binutils-loongson-workaround.patch \
%D%/packages/patches/byobu-writable-status.patch \
%D%/packages/patches/calibre-drop-unrar.patch \
%D%/packages/patches/calibre-no-updates-dialog.patch \
%D%/packages/patches/cdparanoia-fpic.patch \
%D%/packages/patches/chmlib-inttypes.patch \
%D%/packages/patches/clang-libc-search-path.patch \
%D%/packages/patches/clang-3.8-libc-search-path.patch \
%D%/packages/patches/clucene-pkgconfig.patch \
%D%/packages/patches/cmake-fix-tests.patch \
%D%/packages/patches/cpio-gets-undeclared.patch \
%D%/packages/patches/cpio-CVE-2016-2037.patch \
%D%/packages/patches/cpufrequtils-fix-aclocal.patch \
%D%/packages/patches/crda-optional-gcrypt.patch \
%D%/packages/patches/crossmap-allow-system-pysam.patch \
%D%/packages/patches/csound-header-ordering.patch \
%D%/packages/patches/cssc-gets-undeclared.patch \
%D%/packages/patches/cssc-missing-include.patch \
%D%/packages/patches/clucene-contribs-lib.patch \
%D%/packages/patches/cursynth-wave-rand.patch \
%D%/packages/patches/dbus-helper-search-path.patch \
%D%/packages/patches/devil-CVE-2009-3994.patch \
%D%/packages/patches/devil-fix-libpng.patch \
%D%/packages/patches/dico-idxgcide-bug.patch \
%D%/packages/patches/dico-libtool-deterministic.patch \
%D%/packages/patches/diffutils-gets-undeclared.patch \
%D%/packages/patches/dfu-programmer-fix-libusb.patch \
%D%/packages/patches/doc++-include-directives.patch \
%D%/packages/patches/doc++-segfault-fix.patch \
%D%/packages/patches/doxygen-test.patch \
%D%/packages/patches/duplicity-piped-password.patch \
%D%/packages/patches/duplicity-test_selection-tmp.patch \
%D%/packages/patches/elfutils-tests-ptrace.patch \
%D%/packages/patches/elixir-disable-failing-tests.patch \
%D%/packages/patches/einstein-build.patch \
%D%/packages/patches/emacs-exec-path.patch \
%D%/packages/patches/emacs-fix-scheme-indent-function.patch \
%D%/packages/patches/emacs-scheme-complete-scheme-r5rs-info.patch \
%D%/packages/patches/emacs-source-date-epoch.patch \
%D%/packages/patches/eudev-rules-directory.patch \
%D%/packages/patches/evilwm-lost-focus-bug.patch \
%D%/packages/patches/expat-CVE-2012-6702-and-CVE-2016-5300.patch \
%D%/packages/patches/expat-CVE-2015-1283-refix.patch \
%D%/packages/patches/expat-CVE-2016-0718.patch \
%D%/packages/patches/fastcap-mulGlobal.patch \
%D%/packages/patches/fastcap-mulSetup.patch \
%D%/packages/patches/fasthenry-spAllocate.patch \
%D%/packages/patches/fasthenry-spBuild.patch \
%D%/packages/patches/fasthenry-spUtils.patch \
%D%/packages/patches/fasthenry-spSolve.patch \
%D%/packages/patches/fasthenry-spFactor.patch \
%D%/packages/patches/findutils-localstatedir.patch \
%D%/packages/patches/findutils-test-xargs.patch \
%D%/packages/patches/flashrom-use-libftdi1.patch \
%D%/packages/patches/flint-ldconfig.patch \
%D%/packages/patches/fltk-shared-lib-defines.patch \
%D%/packages/patches/fltk-xfont-on-demand.patch \
%D%/packages/patches/fontforge-svg-modtime.patch \
%D%/packages/patches/fossil-test-fixes.patch \
%D%/packages/patches/freeimage-CVE-2015-0852.patch \
%D%/packages/patches/gawk-fts-test.patch \
%D%/packages/patches/gawk-shell.patch \
%D%/packages/patches/gcc-arm-link-spec-fix.patch \
%D%/packages/patches/gcc-cross-environment-variables.patch \
%D%/packages/patches/gcc-libvtv-runpath.patch \
%D%/packages/patches/gcc-5.0-libvtv-runpath.patch \
%D%/packages/patches/gd-fix-gd2-read-test.patch \
%D%/packages/patches/gd-fix-tests-on-i686.patch \
%D%/packages/patches/gegl-CVE-2012-4433.patch \
%D%/packages/patches/geoclue-config.patch \
%D%/packages/patches/ghostscript-CVE-2015-3228.patch \
%D%/packages/patches/ghostscript-runpath.patch \
%D%/packages/patches/gimp-CVE-2016-4994.patch \
%D%/packages/patches/glib-networking-ssl-cert-file.patch \
%D%/packages/patches/glib-tests-timer.patch \
%D%/packages/patches/glibc-bootstrap-system.patch \
%D%/packages/patches/glibc-ldd-x86_64.patch \
%D%/packages/patches/glibc-locales.patch \
%D%/packages/patches/glibc-o-largefile.patch \
%D%/packages/patches/glibc-versioned-locpath.patch \
%D%/packages/patches/gmp-arm-asm-nothumb.patch \
%D%/packages/patches/gmp-faulty-test.patch \
%D%/packages/patches/gnome-tweak-tool-search-paths.patch \
%D%/packages/patches/gnucash-price-quotes-perl.patch \
%D%/packages/patches/gobject-introspection-absolute-shlib-path.patch \
%D%/packages/patches/gobject-introspection-cc.patch \
%D%/packages/patches/gobject-introspection-girepository.patch \
%D%/packages/patches/grep-timing-sensitive-test.patch \
%D%/packages/patches/grub-CVE-2015-8370.patch \
%D%/packages/patches/grub-gets-undeclared.patch \
%D%/packages/patches/grub-freetype.patch \
%D%/packages/patches/guile-1.8-cpp-4.5.patch \
%D%/packages/patches/guile-arm-fixes.patch \
%D%/packages/patches/guile-default-utf8.patch \
%D%/packages/patches/guile-linux-syscalls.patch \
%D%/packages/patches/guile-present-coding.patch \
%D%/packages/patches/guile-relocatable.patch \
%D%/packages/patches/guile-rsvg-pkgconfig.patch \
%D%/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch \
%D%/packages/patches/gtk2-theme-paths.patch \
%D%/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch \
%D%/packages/patches/gtkglext-disable-disable-deprecated.patch \
%D%/packages/patches/hdf5-config-date.patch \
%D%/packages/patches/higan-remove-march-native-flag.patch \
%D%/packages/patches/hop-bigloo-4.0b.patch \
%D%/packages/patches/hop-linker-flags.patch \
%D%/packages/patches/hydra-automake-1.15.patch \
%D%/packages/patches/hydra-disable-darcs-test.patch \
%D%/packages/patches/hypre-doc-tables.patch \
%D%/packages/patches/hypre-ldflags.patch \
%D%/packages/patches/icecat-avoid-bundled-includes.patch \
%D%/packages/patches/icecat-CVE-2016-2818-pt1.patch \
%D%/packages/patches/icecat-CVE-2016-2818-pt2.patch \
%D%/packages/patches/icecat-CVE-2016-2818-pt3.patch \
%D%/packages/patches/icecat-CVE-2016-2818-pt4.patch \
%D%/packages/patches/icecat-CVE-2016-2818-pt5.patch \
%D%/packages/patches/icecat-CVE-2016-2818-pt6.patch \
%D%/packages/patches/icecat-CVE-2016-2818-pt7.patch \
%D%/packages/patches/icecat-CVE-2016-2818-pt8.patch \
%D%/packages/patches/icecat-CVE-2016-2818-pt9.patch \
%D%/packages/patches/icecat-CVE-2016-2819.patch \
%D%/packages/patches/icecat-CVE-2016-2821.patch \
%D%/packages/patches/icecat-CVE-2016-2824.patch \
%D%/packages/patches/icecat-CVE-2016-2828.patch \
%D%/packages/patches/icecat-CVE-2016-2831.patch \
%D%/packages/patches/icedtea-remove-overrides.patch \
%D%/packages/patches/icu4c-CVE-2014-6585.patch \
%D%/packages/patches/icu4c-CVE-2015-1270.patch \
%D%/packages/patches/icu4c-CVE-2015-4760.patch \
%D%/packages/patches/id3lib-CVE-2007-4460.patch \
%D%/packages/patches/ilmbase-fix-tests.patch \
%D%/packages/patches/inkscape-drop-wait-for-targets.patch \
%D%/packages/patches/irrlicht-mesa-10.patch \
%D%/packages/patches/jansson-CVE-2016-4425.patch \
%D%/packages/patches/jasper-CVE-2007-2721.patch \
%D%/packages/patches/jasper-CVE-2008-3520.patch \
%D%/packages/patches/jasper-CVE-2008-3522.patch \
%D%/packages/patches/jasper-CVE-2011-4516-and-CVE-2011-4517.patch \
%D%/packages/patches/jasper-CVE-2014-8137.patch \
%D%/packages/patches/jasper-CVE-2014-8138.patch \
%D%/packages/patches/jasper-CVE-2014-8157.patch \
%D%/packages/patches/jasper-CVE-2014-8158.patch \
%D%/packages/patches/jasper-CVE-2014-9029.patch \
%D%/packages/patches/jasper-CVE-2016-1577.patch \
%D%/packages/patches/jasper-CVE-2016-1867.patch \
%D%/packages/patches/jasper-CVE-2016-2089.patch \
%D%/packages/patches/jasper-CVE-2016-2116.patch \
%D%/packages/patches/jbig2dec-ignore-testtest.patch \
%D%/packages/patches/khmer-use-libraries.patch \
%D%/packages/patches/kmod-module-directory.patch \
%D%/packages/patches/ldc-disable-tests.patch \
%D%/packages/patches/lftp-dont-save-unknown-host-fingerprint.patch \
%D%/packages/patches/liba52-enable-pic.patch \
%D%/packages/patches/liba52-link-with-libm.patch \
%D%/packages/patches/liba52-set-soname.patch \
%D%/packages/patches/liba52-use-mtune-not-mcpu.patch \
%D%/packages/patches/libbonobo-activation-test-race.patch \
%D%/packages/patches/libcanberra-sound-theme-freedesktop.patch \
%D%/packages/patches/libcmis-fix-test-onedrive.patch \
%D%/packages/patches/libdrm-symbol-check.patch \
%D%/packages/patches/libevent-dns-tests.patch \
%D%/packages/patches/libextractor-ffmpeg-3.patch \
%D%/packages/patches/liboop-mips64-deplibs-fix.patch \
%D%/packages/patches/libotr-test-auth-fix.patch \
%D%/packages/patches/liblxqt-include.patch \
%D%/packages/patches/libmad-armv7-thumb-pt1.patch \
%D%/packages/patches/libmad-armv7-thumb-pt2.patch \
%D%/packages/patches/libmad-frame-length.patch \
%D%/packages/patches/libmad-mips-newgcc.patch \
%D%/packages/patches/libssh-0.6.5-CVE-2016-0739.patch \
%D%/packages/patches/libtar-CVE-2013-4420.patch \
%D%/packages/patches/libtheora-config-guess.patch \
%D%/packages/patches/libtiff-CVE-2015-8665+CVE-2015-8683.patch \
%D%/packages/patches/libtiff-oob-accesses-in-decode.patch \
%D%/packages/patches/libtiff-oob-write-in-nextdecode.patch \
%D%/packages/patches/libtool-skip-tests2.patch \
%D%/packages/patches/libunwind-CVE-2015-3239.patch \
%D%/packages/patches/libvpx-CVE-2016-2818.patch \
%D%/packages/patches/libwmf-CAN-2004-0941.patch \
%D%/packages/patches/libwmf-CVE-2006-3376.patch \
%D%/packages/patches/libwmf-CVE-2007-0455.patch \
%D%/packages/patches/libwmf-CVE-2007-2756.patch \
%D%/packages/patches/libwmf-CVE-2007-3472.patch \
%D%/packages/patches/libwmf-CVE-2007-3473.patch \
%D%/packages/patches/libwmf-CVE-2007-3477.patch \
%D%/packages/patches/libwmf-CVE-2009-1364.patch \
%D%/packages/patches/libwmf-CVE-2009-3546.patch \
%D%/packages/patches/libwmf-CVE-2015-0848+CVE-2015-4588.patch \
%D%/packages/patches/libwmf-CVE-2015-4695.patch \
%D%/packages/patches/libwmf-CVE-2015-4696.patch \
%D%/packages/patches/libxslt-generated-ids.patch \
%D%/packages/patches/lirc-localstatedir.patch \
%D%/packages/patches/lm-sensors-hwmon-attrs.patch \
%D%/packages/patches/lua-CVE-2014-5461.patch \
%D%/packages/patches/lua-pkgconfig.patch \
%D%/packages/patches/lua51-liblua-so.patch \
%D%/packages/patches/lua52-liblua-so.patch \
%D%/packages/patches/luajit-no_ldconfig.patch \
%D%/packages/patches/luajit-symlinks.patch \
%D%/packages/patches/luit-posix.patch \
%D%/packages/patches/m4-gets-undeclared.patch \
%D%/packages/patches/make-impure-dirs.patch \
%D%/packages/patches/mars-install.patch \
%D%/packages/patches/mars-sfml-2.3.patch \
%D%/packages/patches/matplotlib-setupext-tk.patch \
%D%/packages/patches/maxima-defsystem-mkdir.patch \
%D%/packages/patches/mcron-install.patch \
%D%/packages/patches/mcrypt-CVE-2012-4409.patch \
%D%/packages/patches/mcrypt-CVE-2012-4426.patch \
%D%/packages/patches/mcrypt-CVE-2012-4527.patch \
%D%/packages/patches/mhash-keygen-test-segfault.patch \
%D%/packages/patches/mpc123-initialize-ao.patch \
%D%/packages/patches/mplayer2-theora-fix.patch \
%D%/packages/patches/module-init-tools-moduledir.patch \
%D%/packages/patches/mumps-build-parallelism.patch \
%D%/packages/patches/mupen64plus-ui-console-notice.patch \
%D%/packages/patches/mutt-store-references.patch \
%D%/packages/patches/mysql-fix-failing-test.patch \
%D%/packages/patches/nasm-no-ps-pdf.patch \
%D%/packages/patches/net-tools-bitrot.patch \
%D%/packages/patches/netcdf-config-date.patch \
%D%/packages/patches/ngircd-handle-zombies.patch \
%D%/packages/patches/ngircd-no-dns-in-tests.patch \
%D%/packages/patches/ninja-tests.patch \
%D%/packages/patches/ninja-zero-mtime.patch \
%D%/packages/patches/nss-pkgconfig.patch \
%D%/packages/patches/nvi-assume-preserve-path.patch \
%D%/packages/patches/nvi-dbpagesize-binpower.patch \
%D%/packages/patches/nvi-db4.patch \
%D%/packages/patches/ocaml-CVE-2015-8869.patch \
%D%/packages/patches/ocaml-findlib-make-install.patch \
%D%/packages/patches/openexr-missing-samples.patch \
%D%/packages/patches/openjpeg-CVE-2015-6581.patch \
%D%/packages/patches/openjpeg-use-after-free-fix.patch \
%D%/packages/patches/openssl-runpath.patch \
%D%/packages/patches/openssl-c-rehash-in.patch \
%D%/packages/patches/openssl-CVE-2016-2177.patch \
%D%/packages/patches/openssl-CVE-2016-2178.patch \
%D%/packages/patches/orpheus-cast-errors-and-includes.patch \
%D%/packages/patches/ots-no-include-missing-file.patch \
%D%/packages/patches/patchelf-page-size.patch \
%D%/packages/patches/patchelf-rework-for-arm.patch \
%D%/packages/patches/patchutils-xfail-gendiff-tests.patch \
%D%/packages/patches/patch-hurd-path-max.patch \
%D%/packages/patches/pcre-CVE-2016-3191.patch \
%D%/packages/patches/pcre2-CVE-2016-3191.patch \
%D%/packages/patches/perl-CVE-2015-8607.patch \
%D%/packages/patches/perl-CVE-2016-2381.patch \
%D%/packages/patches/perl-autosplit-default-time.patch \
%D%/packages/patches/perl-deterministic-ordering.patch \
%D%/packages/patches/perl-finance-quote-unuse-mozilla-ca.patch \
%D%/packages/patches/perl-gd-options-passthrough-and-fontconfig.patch \
%D%/packages/patches/perl-io-socket-ssl-openssl-1.0.2f-fix.patch \
%D%/packages/patches/perl-net-amazon-s3-moose-warning.patch \
%D%/packages/patches/perl-net-ssleay-disable-ede-test.patch \
%D%/packages/patches/perl-no-build-time.patch \
%D%/packages/patches/perl-no-sys-dirs.patch \
%D%/packages/patches/perl-module-pluggable-search.patch \
%D%/packages/patches/perl-source-date-epoch.patch \
%D%/packages/patches/pidgin-add-search-path.patch \
%D%/packages/patches/pinball-const-fix.patch \
%D%/packages/patches/pinball-cstddef.patch \
%D%/packages/patches/pinball-missing-separators.patch \
%D%/packages/patches/pinball-src-deps.patch \
%D%/packages/patches/pinball-system-ltdl.patch \
%D%/packages/patches/pingus-sdl-libs-config.patch \
%D%/packages/patches/plink-1.07-unclobber-i.patch \
%D%/packages/patches/plotutils-libpng-jmpbuf.patch \
%D%/packages/patches/polkit-drop-test.patch \
%D%/packages/patches/portaudio-audacity-compat.patch \
%D%/packages/patches/portmidi-modular-build.patch \
%D%/packages/patches/procmail-ambiguous-getline-debian.patch \
%D%/packages/patches/procmail-CVE-2014-3618.patch \
%D%/packages/patches/procps-non-linux.patch \
%D%/packages/patches/pt-scotch-build-parallelism.patch \
%D%/packages/patches/pulseaudio-fix-mult-test.patch \
%D%/packages/patches/pulseaudio-longer-test-timeout.patch \
%D%/packages/patches/pycairo-wscript.patch \
%D%/packages/patches/pybugz-encode-error.patch \
%D%/packages/patches/pybugz-stty.patch \
%D%/packages/patches/pygpgme-disable-problematic-tests.patch \
%D%/packages/patches/pyqt-configure.patch \
%D%/packages/patches/python-2-deterministic-build-info.patch \
%D%/packages/patches/python-2.7-search-paths.patch \
%D%/packages/patches/python-2.7-source-date-epoch.patch \
%D%/packages/patches/python-3-deterministic-build-info.patch \
%D%/packages/patches/python-3-search-paths.patch \
%D%/packages/patches/python-dendropy-exclude-failing-tests.patch \
%D%/packages/patches/python-disable-ssl-test.patch \
%D%/packages/patches/python-fix-tests.patch \
%D%/packages/patches/python-ipython-inputhook-ctype.patch \
%D%/packages/patches/python-rarfile-fix-tests.patch \
%D%/packages/patches/python2-rdflib-drop-sparqlwrapper.patch \
%D%/packages/patches/python-configobj-setuptools.patch \
%D%/packages/patches/python-paste-remove-website-test.patch \
%D%/packages/patches/python-paste-remove-timing-test.patch \
%D%/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch \
%D%/packages/patches/qt4-ldflags.patch \
%D%/packages/patches/rapicorn-isnan.patch \
%D%/packages/patches/ratpoison-shell.patch \
%D%/packages/patches/readline-link-ncurses.patch \
%D%/packages/patches/ripperx-missing-file.patch \
%D%/packages/patches/rpm-CVE-2014-8118.patch \
%D%/packages/patches/rsem-makefile.patch \
%D%/packages/patches/ruby-concurrent-ignore-broken-test.patch \
%D%/packages/patches/ruby-puma-ignore-broken-test.patch \
%D%/packages/patches/ruby-symlinkfix.patch \
%D%/packages/patches/ruby-tzinfo-data-ignore-broken-test.patch\
%D%/packages/patches/rush-CVE-2013-6889.patch \
%D%/packages/patches/sed-hurd-path-max.patch \
%D%/packages/patches/scheme48-tests.patch \
%D%/packages/patches/scotch-test-threading.patch \
%D%/packages/patches/sdl-libx11-1.6.patch \
%D%/packages/patches/serf-comment-style-fix.patch \
%D%/packages/patches/serf-deflate-buckets-test-fix.patch \
%D%/packages/patches/slim-session.patch \
%D%/packages/patches/slim-config.patch \
%D%/packages/patches/slim-sigusr1.patch \
%D%/packages/patches/slurm-configure-remove-nonfree-contribs.patch \
%D%/packages/patches/soprano-find-clucene.patch \
%D%/packages/patches/superlu-dist-scotchmetis.patch \
%D%/packages/patches/synfig-build-fix.patch \
%D%/packages/patches/t1lib-CVE-2010-2642.patch \
%D%/packages/patches/t1lib-CVE-2011-0764.patch \
%D%/packages/patches/t1lib-CVE-2011-1552+CVE-2011-1553+CVE-2011-1554.patch \
%D%/packages/patches/tar-skip-unreliable-tests.patch \
%D%/packages/patches/tcl-mkindex-deterministic.patch \
%D%/packages/patches/tclxml-3.2-install.patch \
%D%/packages/patches/tcsh-fix-autotest.patch \
%D%/packages/patches/teensy-loader-cli-help.patch \
%D%/packages/patches/texi2html-document-encoding.patch \
%D%/packages/patches/texi2html-i18n.patch \
%D%/packages/patches/tidy-CVE-2015-5522+5523.patch \
%D%/packages/patches/tinyxml-use-stl.patch \
%D%/packages/patches/tk-find-library.patch \
%D%/packages/patches/ttf2eot-cstddef.patch \
%D%/packages/patches/ttfautohint-source-date-epoch.patch \
%D%/packages/patches/tophat-build-with-later-seqan.patch \
%D%/packages/patches/torsocks-dns-test.patch \
%D%/packages/patches/totem-debug-format-fix.patch \
%D%/packages/patches/tuxpaint-stamps-path.patch \
%D%/packages/patches/unzip-CVE-2014-8139.patch \
%D%/packages/patches/unzip-CVE-2014-8140.patch \
%D%/packages/patches/unzip-CVE-2014-8141.patch \
%D%/packages/patches/unzip-CVE-2014-9636.patch \
%D%/packages/patches/unzip-CVE-2015-7696.patch \
%D%/packages/patches/unzip-CVE-2015-7697.patch \
%D%/packages/patches/unzip-allow-greater-hostver-values.patch \
%D%/packages/patches/unzip-attribs-overflow.patch \
%D%/packages/patches/unzip-overflow-on-invalid-input.patch \
%D%/packages/patches/unzip-format-secure.patch \
%D%/packages/patches/unzip-initialize-symlink-flag.patch \
%D%/packages/patches/unzip-overflow-long-fsize.patch \
%D%/packages/patches/unzip-remove-build-date.patch \
%D%/packages/patches/util-linux-tests.patch \
%D%/packages/patches/upower-builddir.patch \
%D%/packages/patches/valgrind-enable-arm.patch \
%D%/packages/patches/vorbis-tools-CVE-2014-9638+CVE-2014-9639.patch \
%D%/packages/patches/vorbis-tools-CVE-2014-9640.patch \
%D%/packages/patches/vorbis-tools-CVE-2015-6749.patch \
%D%/packages/patches/vpnc-script.patch \
%D%/packages/patches/vte-CVE-2012-2738-pt1.patch \
%D%/packages/patches/vte-CVE-2012-2738-pt2.patch \
%D%/packages/patches/vtk-mesa-10.patch \
%D%/packages/patches/w3m-libgc.patch \
%D%/packages/patches/w3m-force-ssl_verify_server-on.patch \
%D%/packages/patches/w3m-disable-sslv2-and-sslv3.patch \
%D%/packages/patches/w3m-disable-weak-ciphers.patch \
%D%/packages/patches/weechat-python.patch \
%D%/packages/patches/weex-vacopy.patch \
%D%/packages/patches/wicd-bitrate-none-fix.patch \
%D%/packages/patches/wicd-get-selected-profile-fix.patch \
%D%/packages/patches/wicd-urwid-1.3.patch \
%D%/packages/patches/wicd-wpa2-ttls.patch \
%D%/packages/patches/wmctrl-64-fix.patch \
%D%/packages/patches/woff2-libbrotli.patch \
%D%/packages/patches/wordnet-CVE-2008-2149.patch \
%D%/packages/patches/wordnet-CVE-2008-3908-pt1.patch \
%D%/packages/patches/wordnet-CVE-2008-3908-pt2.patch \
%D%/packages/patches/wpa-supplicant-CVE-2015-5310.patch \
%D%/packages/patches/wpa-supplicant-CVE-2015-5314.patch \
%D%/packages/patches/wpa-supplicant-CVE-2015-5315.patch \
%D%/packages/patches/wpa-supplicant-CVE-2015-5316.patch \
%D%/packages/patches/wpa-supplicant-CVE-2016-4476.patch \
%D%/packages/patches/wpa-supplicant-CVE-2016-4477-pt1.patch \
%D%/packages/patches/wpa-supplicant-CVE-2016-4477-pt2.patch \
%D%/packages/patches/wpa-supplicant-CVE-2016-4477-pt3.patch \
%D%/packages/patches/wpa-supplicant-CVE-2016-4477-pt4.patch \
%D%/packages/patches/xdotool-fix-makefile.patch \
%D%/packages/patches/xf86-video-ark-remove-mibstore.patch \
%D%/packages/patches/xf86-video-ast-remove-mibstore.patch \
%D%/packages/patches/xf86-video-geode-glibc-2.20.patch \
%D%/packages/patches/xf86-video-glint-remove-mibstore.patch \
%D%/packages/patches/xf86-video-i128-remove-mibstore.patch \
%D%/packages/patches/xf86-video-intel-compat-api.patch \
%D%/packages/patches/xf86-video-intel-glibc-2.20.patch \
%D%/packages/patches/xf86-video-mach64-glibc-2.20.patch \
%D%/packages/patches/xf86-video-nv-remove-mibstore.patch \
%D%/packages/patches/xf86-video-openchrome-glibc-2.20.patch \
%D%/packages/patches/xf86-video-tga-remove-mibstore.patch \
%D%/packages/patches/xfce4-panel-plugins.patch \
%D%/packages/patches/xfce4-session-fix-xflock4.patch \
%D%/packages/patches/xfce4-settings-defaults.patch \
%D%/packages/patches/xmodmap-asprintf.patch \
%D%/packages/patches/libyaml-CVE-2014-9130.patch \
%D%/packages/patches/zathura-plugindir-environment-variable.patch
MISC_DISTRO_FILES = \
%D%/packages/ld-wrapper.in
bootstrapdir = $(guilemoduledir)/%D%/packages/bootstrap
bootstrap_x86_64_linuxdir = $(bootstrapdir)/x86_64-linux
bootstrap_i686_linuxdir = $(bootstrapdir)/i686-linux
bootstrap_armhf_linuxdir = $(bootstrapdir)/armhf-linux
bootstrap_mips64el_linuxdir = $(bootstrapdir)/mips64el-linux
dist_bootstrap_x86_64_linux_DATA = \
%D%/packages/bootstrap/x86_64-linux/bash \
%D%/packages/bootstrap/x86_64-linux/mkdir \
%D%/packages/bootstrap/x86_64-linux/tar \
%D%/packages/bootstrap/x86_64-linux/xz
dist_bootstrap_i686_linux_DATA = \
%D%/packages/bootstrap/i686-linux/bash \
%D%/packages/bootstrap/i686-linux/mkdir \
%D%/packages/bootstrap/i686-linux/tar \
%D%/packages/bootstrap/i686-linux/xz
dist_bootstrap_armhf_linux_DATA = \
%D%/packages/bootstrap/armhf-linux/bash \
%D%/packages/bootstrap/armhf-linux/mkdir \
%D%/packages/bootstrap/armhf-linux/tar \
%D%/packages/bootstrap/armhf-linux/xz
dist_bootstrap_mips64el_linux_DATA = \
%D%/packages/bootstrap/mips64el-linux/bash \
%D%/packages/bootstrap/mips64el-linux/mkdir \
%D%/packages/bootstrap/mips64el-linux/tar \
%D%/packages/bootstrap/mips64el-linux/xz
# Big bootstrap binaries are not included in the tarball. Instead, they
# are downloaded.
nodist_bootstrap_x86_64_linux_DATA = \
%D%/packages/bootstrap/x86_64-linux/guile-2.0.9.tar.xz
nodist_bootstrap_i686_linux_DATA = \
%D%/packages/bootstrap/i686-linux/guile-2.0.9.tar.xz
nodist_bootstrap_armhf_linux_DATA = \
%D%/packages/bootstrap/armhf-linux/guile-2.0.11.tar.xz
nodist_bootstrap_mips64el_linux_DATA = \
%D%/packages/bootstrap/mips64el-linux/guile-2.0.9.tar.xz
# Those files must remain executable, so they remain executable once
# imported into the store.
set-bootstrap-executable-permissions:
chmod +x $(DESTDIR)$(bootstrapdir)/*/{bash,mkdir,tar,xz}
DISTCLEANFILES = \
$(nodist_bootstrap_x86_64_linux_DATA) \
$(nodist_bootstrap_i686_linux_DATA) \
$(nodist_bootstrap_armhf_linux_DATA) \
$(nodist_bootstrap_mips64el_linux_DATA)
# Method to download a file from an external source.
DOWNLOAD_FILE = \
GUILE_LOAD_COMPILED_PATH="$(top_builddir):$$GUILE_LOAD_COMPILED_PATH" \
$(GUILE) --no-auto-compile -L "$(top_builddir)" -L "$(top_srcdir)" \
"$(top_srcdir)/build-aux/download.scm"
%D%/packages/bootstrap/x86_64-linux/guile-2.0.9.tar.xz:
$(AM_V_DL)$(MKDIR_P) `dirname "$@"`; \
$(DOWNLOAD_FILE) "$@" \
"037b103522a2d0d7d69c7ffd8de683dfe5bb4b59c1fafd70b4ffd397fd2f57f0"
%D%/packages/bootstrap/i686-linux/guile-2.0.9.tar.xz:
$(AM_V_DL)$(MKDIR_P) `dirname "$@"`; \
$(DOWNLOAD_FILE) "$@" \
"b757cd46bf13ecac83fb8e955fb50096ac2d17bb610ca8eb816f29302a00a846"
%D%/packages/bootstrap/armhf-linux/guile-2.0.11.tar.xz:
$(AM_V_DL)$(MKDIR_P) `dirname "$@"`; \
$(DOWNLOAD_FILE) "$@" \
"e551d05d4d385d6706ab8d574856a087758294dc90ab4c06e70a157a685e23d6"
%D%/packages/bootstrap/mips64el-linux/guile-2.0.9.tar.xz:
$(AM_V_DL)$(MKDIR_P) `dirname "$@"`; \
$(DOWNLOAD_FILE) "$@" \
"994680f0001346864aa2c2cc5110f380ee7518dcd701c614291682b8e948f73b"
+170 -62
View File
@@ -1,9 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -24,10 +22,9 @@
#:use-module (guix packages)
#:use-module (guix ui)
#:use-module (guix utils)
#:use-module (guix combinators)
#:use-module ((guix build utils)
#:select ((package-name->name+version
. hyphen-separated-name->name+version)))
#:use-module ((guix ftp-client) #:select (ftp-open))
#:use-module (guix gnu-maintenance)
#:use-module (guix upstream)
#:use-module (ice-9 ftw)
#:use-module (ice-9 vlist)
#:use-module (ice-9 match)
@@ -38,19 +35,23 @@
#:use-module (srfi srfi-35)
#:use-module (srfi srfi-39)
#:export (search-patch
search-patches
search-bootstrap-binary
%patch-path
%bootstrap-binaries-path
%package-module-path
fold-packages
scheme-modules ;XXX: for lack of a better place
find-packages-by-name
find-best-packages-by-name
find-newest-available-packages
package-direct-dependents
package-transitive-dependents
package-covering-dependents
check-package-freshness
specification->package
specification->package+output))
@@ -79,11 +80,6 @@
(&message (message (format #f (_ "~a: patch not found")
file-name)))))))
(define-syntax-rule (search-patches file-name ...)
"Return the list of absolute file names corresponding to each
FILE-NAME found in %PATCH-PATH."
(list (search-patch file-name) ...))
(define (search-bootstrap-binary file-name system)
"Search the bootstrap binary FILE-NAME for SYSTEM. Raise an error if not
found."
@@ -159,8 +155,8 @@ returned list is sorted in alphabetical order."
(map string->symbol
(string-tokenize (string-drop-right file 4) not-slash)))))
(define* (scheme-modules directory #:optional sub-directory)
"Return the list of Scheme modules available under DIRECTORY.
(define* (package-modules directory #:optional sub-directory)
"Return the list of modules that provide packages for the distribution.
Optionally, narrow the search to SUB-DIRECTORY."
(define prefix-len
(string-length directory))
@@ -185,9 +181,9 @@ search."
(fold-right (lambda (spec result)
(match spec
((? string? directory)
(append (scheme-modules directory) result))
(append (package-modules directory) result))
((directory . sub-directory)
(append (scheme-modules directory sub-directory)
(append (package-modules directory sub-directory)
result))))
'()
path))
@@ -200,8 +196,7 @@ same package twice."
(fold2 (lambda (module result seen)
(fold2 (lambda (var result seen)
(if (and (package? var)
(not (vhash-assq var seen))
(not (hidden-package? var)))
(not (vhash-assq var seen)))
(values (proc var result)
(vhash-consq var #t seen))
(values result seen)))
@@ -267,6 +262,63 @@ VERSION."
((_ version pkgs ...) pkgs)
(#f '()))))
(define* (vhash-refq vhash key #:optional (dflt #f))
"Look up KEY in the vhash VHASH, and return the value (if any) associated
with it. If KEY is not found, return DFLT (or `#f' if no DFLT argument is
supplied). Uses `eq?' for equality testing."
(or (and=> (vhash-assq key vhash) cdr)
dflt))
(define package-dependencies
(memoize
(lambda ()
"Return a vhash keyed by package, and with associated values that are a
list of packages that depend on that package."
(fold-packages
(lambda (package dag)
(fold
(lambda (in d)
;; Insert a graph edge from each of package's inputs to package.
(vhash-consq in
(cons package (vhash-refq d in '()))
(vhash-delq in d)))
dag
(match (package-direct-inputs package)
(((labels packages . _) ...)
packages) )))
vlist-null))))
(define (package-direct-dependents packages)
"Return a list of packages from the distribution that directly depend on the
packages in PACKAGES."
(delete-duplicates
(concatenate
(map (lambda (p)
(vhash-refq (package-dependencies) p '()))
packages))))
(define (package-transitive-dependents packages)
"Return the transitive dependent packages of the distribution packages in
PACKAGES---i.e. the dependents of those packages, plus their dependents,
recursively."
(let ((dependency-dag (package-dependencies)))
(fold-tree
cons '()
(lambda (node) (vhash-refq dependency-dag node))
;; Start with the dependents to avoid including PACKAGES in the result.
(package-direct-dependents packages))))
(define (package-covering-dependents packages)
"Return a minimal list of packages from the distribution whose dependencies
include all of PACKAGES and all packages that depend on PACKAGES."
(let ((dependency-dag (package-dependencies)))
(fold-tree-leaves
cons '()
(lambda (node) (vhash-refq dependency-dag node))
;; Start with the dependents to avoid including PACKAGES in the result.
(package-direct-dependents packages))))
(define %sigint-prompt
;; The prompt to jump to upon SIGINT.
@@ -289,63 +341,119 @@ return its return value."
(lambda (k signum)
(handler signum))))
;;;
;;; Package specification.
;;;
(define-syntax-rule (waiting exp fmt rest ...)
"Display the given message while EXP is being evaluated."
(let* ((message (format #f fmt rest ...))
(blank (make-string (string-length message) #\space)))
(display message (current-error-port))
(force-output (current-error-port))
(call-with-sigint-handler
(lambda ()
(dynamic-wind
(const #f)
(lambda () exp)
(lambda ()
;; Clear the line.
(display #\cr (current-error-port))
(display blank (current-error-port))
(display #\cr (current-error-port))
(force-output (current-error-port)))))
(lambda (signum)
(format (current-error-port) " interrupted by signal ~a~%" SIGINT)
#f))))
(define* (%find-package spec name version #:key fallback?)
(match (find-best-packages-by-name name version)
((pkg . pkg*)
(unless (null? pkg*)
(warning (_ "ambiguous package specification `~a'~%") spec)
(warning (_ "choosing ~a from ~a~%")
(package-full-name pkg)
(location->string (package-location pkg))))
(when fallback?
(warning (_ "deprecated NAME-VERSION syntax; \
use NAME@VERSION instead~%")))
pkg)
(_
(if version
(leave (_ "~A: package not found for version ~a~%") name version)
(if (not fallback?)
;; XXX: Fallback to the older specification style with an hyphen
;; between NAME and VERSION, for backward compatibility.
(call-with-values
(lambda ()
(hyphen-separated-name->name+version name))
(cut %find-package spec <> <> #:fallback? #t))
(define ftp-open*
;; Memoizing version of `ftp-open'. The goal is to avoid initiating a new
;; FTP connection for each package, esp. since most of them are to the same
;; server. This has a noticeable impact when doing "guix upgrade -u".
(memoize ftp-open))
;; The fallback case didn't find anything either, so bail out.
(leave (_ "~A: unknown package~%") name))))))
(define (check-package-freshness package)
"Check whether PACKAGE has a newer version available upstream, and report
it."
;; TODO: Automatically inject the upstream version when desired.
(catch #t
(lambda ()
(when (false-if-exception (gnu-package? package))
(let ((name (package-name package))
(full-name (package-full-name package)))
;; XXX: This could work with non-GNU packages as well. However,
;; GNU's FTP-based updater would be too slow if it weren't memoized,
;; and the generic interface in (guix upstream) doesn't support
;; that.
(match (waiting (latest-release name
#:ftp-open ftp-open*
#:ftp-close (const #f))
(_ "looking for the latest release of GNU ~a...") name)
((? upstream-source? source)
(let ((latest-version
(string-append (upstream-source-package source) "-"
(upstream-source-version source))))
(when (version>? latest-version full-name)
(format (current-error-port)
(_ "~a: note: using ~a \
but ~a is available upstream~%")
(location->string (package-location package))
full-name latest-version))))
(_ #t)))))
(lambda (key . args)
;; Silently ignore networking errors rather than preventing
;; installation.
(case key
((getaddrinfo-error ftp-error) #f)
(else (apply throw key args))))))
(define (specification->package spec)
"Return a package matching SPEC. SPEC may be a package name, or a package
name followed by an at-sign and a version number. If the version number is not
name followed by a hyphen and a version number. If the version number is not
present, return the preferred newest version."
(let-values (((name version) (package-name->name+version spec)))
(%find-package spec name version)))
(let-values (((name version)
(package-name->name+version spec)))
(match (find-best-packages-by-name name version)
((p) ; one match
p)
((p x ...) ; several matches
(warning (_ "ambiguous package specification `~a'~%") spec)
(warning (_ "choosing ~a from ~a~%")
(package-full-name p)
(location->string (package-location p)))
p)
(_ ; no matches
(if version
(leave (_ "~A: package not found for version ~a~%")
name version)
(leave (_ "~A: unknown package~%") name))))))
(define* (specification->package+output spec #:optional (output "out"))
"Return the package and output specified by SPEC, or #f and #f; SPEC may
optionally contain a version number and an output name, as in these examples:
guile
guile@2.0.9
guile-2.0.9
guile:debug
guile@2.0.9:debug
guile-2.0.9:debug
If SPEC does not specify a version number, return the preferred newest
version; if SPEC does not specify an output, return OUTPUT."
(define (ensure-output p sub-drv)
(if (member sub-drv (package-outputs p))
sub-drv
(leave (_ "package `~a' lacks output `~a'~%")
(package-full-name p)
sub-drv)))
(let-values (((name version sub-drv)
(package-specification->name+version+output spec output)))
(match (%find-package spec name version)
(#f
(values #f #f))
(package
(if (member sub-drv (package-outputs package))
(values package sub-drv)
(leave (_ "package `~a' lacks output `~a'~%")
(package-full-name package)
sub-drv))))))
(match (find-best-packages-by-name name version)
((p)
(values p (ensure-output p sub-drv)))
((p p* ...)
(warning (_ "ambiguous package specification `~a'~%")
spec)
(warning (_ "choosing ~a from ~a~%")
(package-full-name p)
(location->string (package-location p)))
(values p (ensure-output p sub-drv)))
(()
(leave (_ "~a: package not found~%") spec)))))
+70
View File
@@ -0,0 +1,70 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
;;;
;;; 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 (gnu packages aarddict)
#:use-module ((guix licenses) #:select (gpl3))
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system python)
#:use-module (gnu packages python)
#:use-module (gnu packages qt))
(define-public aarddict
(package
(name "aarddict")
(version "0.9.3")
(source
(origin
(method url-fetch)
(uri (string-append "https://github.com/aarddict/desktop/archive/"
version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"12h7m0z7nd7rg8avpi9syd265k0rhh4vbdh464nq0jzdg8m9p28c"))))
(build-system python-build-system)
(inputs
`(("python2-pyicu" ,python2-pyicu)
("python2-pyqt-4" ,python2-pyqt-4)
("python2-setuptools" ,python2-setuptools)
("python2-simplejson" ,python2-simplejson)
("python2-sip" ,python2-sip)))
(arguments
`(#:python ,python-2 ; incompatible with Python 3
#:phases
(alist-cons-before
'build 'configure
;; Force data into the output instead of the python package.
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(substitute* "setup.py"
(("sys.prefix") (string-append "'" out "'")))))
%standard-phases)))
(home-page "http://aarddict.org/index.html")
(synopsis
"Dictionary program and offline Wikipedia reader")
(description
"Aard Dictionary is a free, fast, easy to use word lookup program that
looks up words fast even with huge dictionaries like English Wikipedia;
looks up words in multiple dictionaries in multiple languages without
switching;
works great as offline Wikipedia reader;
is keyboard navigation friendly;
has efficient, highly compressed dictionary data storage format with
ability to verify data integrity built-in.")
(license gpl3)))
+3 -4
View File
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015, 2016 Leo Famulari <leo@famulari.name>
;;; Copyright © 2015 Leo Famulari <leo@famulari.name>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -25,15 +25,14 @@
(define-public abduco
(package
(name "abduco")
(version "0.6")
(version "0.4")
(source (origin
(method url-fetch)
(uri (string-append
"http://www.brain-dump.org/projects/abduco/abduco-"
version ".tar.gz"))
(sha256
(base32
"1x1m58ckwsprljgmdy93mvgjyg9x3cqrzdf3mysp0mx97zhhj2f9"))))
(base32 "1fxwg2s5w183p0rwzsxizy9jdnilv5qqs647l3wl3khny6fp58xx"))))
(build-system gnu-build-system)
(arguments
`(#:make-flags (list "CC=gcc"
+15 -24
View File
@@ -1,6 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 Marek Benc <merkur32@gmail.com>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -23,7 +22,6 @@
#:use-module (guix download)
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
#:use-module (gnu packages autotools)
#:use-module (gnu packages boost)
#:use-module (gnu packages compression)
#:use-module (gnu packages enchant)
@@ -43,7 +41,7 @@
(define-public abiword
(package
(name "abiword")
(version "3.0.1")
(version "2.8.6")
(source
(origin
(method url-fetch)
@@ -51,10 +49,15 @@
(string-append "http://abisource.org/downloads/" name "/" version
"/source/" name "-" version ".tar.gz"))
(sha256
(base32 "1ik591rx15nn3n1297cwykl8wvrlgj78i528id9wbidgy3xzd570"))
(base32 "059sd2apxdmcacc4pll880i7vm18h0kyjsq299m1mz3c7ak8k46r"))
(patches
(search-patches "abiword-wmf-version-lookup-fix.patch"
"abiword-explictly-cast-bools.patch"))))
(list
(search-patch "abiword-wmf-version-lookup-fix.patch")
(search-patch "abiword-no-include-glib-internal-headers.patch")
(search-patch "abiword-explictly-cast-bools.patch")
(search-patch "abiword-use-proper-png-api.patch")
(search-patch "abiword-pass-no-undefined-to-linker.patch")
(search-patch "abiword-link-plugins-against-backend.patch")))))
(build-system gnu-build-system)
(arguments ;; NOTE: rsvg is disabled, since Abiword
@@ -62,31 +65,22 @@
(list
"--enable-clipart" ;; TODO: The following plugins have unresolved
"--enable-templates" ;; dependencies: aiksaurus, grammar, wpg, gda,
(string-append ;; wordperfect, psion, mathview.
(string-append ;; wordperfect, psion, mathview, goffice.
"--enable-plugins="
"applix " "babelfish " "bmp " "clarisworks " "collab " "command "
"docbook " "eml " "epub " "freetranslation " "garble " "gdict "
"gimp " "goffice " "google " "hancom " "hrtext " "iscii " "kword "
"latex " "loadbindings " "mht " "mif " "mswrite " "opendocument "
"docbook " "eml " "freetranslation " "garble " "gdict " "gimp "
"google " "hancom " "hrtext " "iscii " "kword " "latex "
"loadbindings " "mht " "mif " "mswrite " "opendocument "
"openwriter " "openxml " "opml " "ots " "paint " "passepartout "
"pdb " "pdf " "presentation " "s5 " "sdw " "t602 " "urldict "
"wikipedia " "wmf " "wml " "xslfo"))
;; tests fail with: Gtk-CRITICAL **: gtk_settings_get_for_screen:
;; assertion 'GDK_IS_SCREEN (screen)' failed
;; GLib-GObject-CRITICAL **: g_object_get_qdata:
;; assertion 'G_IS_OBJECT (object)' failed
;; Manually starting the X server before the test phase did not help
;; the tests to pass.
#:tests? #f))
"wikipedia " "wmf " "wml " "xslfo"))))
(inputs
`(("boost" ,boost)
("enchant" ,enchant)
("fontconfig" ,fontconfig)
("fribidi" ,fribidi)
("glib" ,glib)
("goffice" ,goffice)
("gtk+" ,gtk+)
("libchamplain" ,libchamplain)
("gtk+" ,gtk+-2)
("libglade" ,libglade)
("libgsf" ,libgsf)
("libjpeg" ,libjpeg)
@@ -94,17 +88,14 @@
("librsvg" ,librsvg)
("libwmf" ,libwmf)
("libxml2" ,libxml2)
("libxslt" ,libxslt)
("ots" ,ots)
("popt" ,popt)
("readline" ,readline)
("telepathy" ,telepathy-glib)
("wv" ,wv)
("zlib" ,zlib)))
(native-inputs
`(("intltool" ,intltool)
("glib:bin" ,glib "bin")
("libtool" ,libtool)
("pkg-config" ,pkg-config)))
(home-page "http://abisource.org/")
(synopsis "Word processing program")
+1 -1
View File
@@ -41,7 +41,7 @@
(sha256
(base32
"08qd9s3wfhv0ajswsylnfwr5h0d7j9d4rgip855nrh400nxp940p"))
(patches (search-patches "acl-hurd-path-max.patch"))))
(patches (list (search-patch "acl-hurd-path-max.patch")))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f ; FIXME: Investigate test suite failures
+166 -649
View File
File diff suppressed because it is too large Load Diff
+1 -28
View File
@@ -1,6 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -21,8 +20,7 @@
#:use-module (guix licenses)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu)
#:use-module (gnu packages pkg-config))
#:use-module (guix build-system gnu))
(define-public adns
(package
@@ -55,28 +53,3 @@ functionality. The library is asynchronous, allowing several concurrent
calls. The package also includes several command-line utilities for use in
scripts.")
(license gpl3+)))
(define-public c-ares
(package
(name "c-ares")
(version "1.11.0")
(source (origin
(method url-fetch)
(uri (string-append
"http://c-ares.haxx.se/download/" name "-" version
".tar.gz"))
(sha256
(base32
"1z9y1f835dpi1ka2a2vzjygm3djdvr01036ml4l2js6r2xk2wqdk"))))
(build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)))
(home-page "http://c-ares.haxx.se/")
(synopsis "C library for asynchronous DNS requests")
(description
"C-ares is a C library that performs DNS requests and name resolution
asynchronously. It is intended for applications which need to perform DNS
queries without blocking, or need to perform multiple DNS queries in parallel.
The primary examples of such applications are servers which communicate with
multiple clients and programs with graphical user interfaces.")
(license (x11-style "http://c-ares.haxx.se/license.html"))))
+9 -12
View File
@@ -1,6 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 John Darringon <jmd@gnu.org>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -34,10 +33,9 @@
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/barcode/barcode-"
version ".tar.xz"))
(sha256
(base32
"1indapql5fjz0bysyc88cmc54y8phqrbi7c76p71fgjp45jcyzp8"))))
version ".tar.xz"))
(sha256 (base32
"1indapql5fjz0bysyc88cmc54y8phqrbi7c76p71fgjp45jcyzp8"))))
(build-system gnu-build-system)
(synopsis "Convert text strings to printed bars in various standards")
(description "GNU Barcode is a flexible tool to produce printed barcodes
@@ -50,15 +48,14 @@ formats.")
(define-public qrencode
(package
(name "qrencode")
(version "3.4.4")
(version "3.4.3")
(source (origin
(method url-fetch)
(uri (string-append
"https://fukuchi.org/works/qrencode/qrencode-" version
".tar.gz"))
(sha256
(base32
"0wiagx7i8p9zal53smf5abrnh9lr31mv0p36wg017401jrmf5577"))))
"http://fukuchi.org/works/qrencode/qrencode-" version
".tar.bz2"))
(sha256 (base32
"163sb580p570p27imc6jhkfdw15kzp8vy1jq92nip1rwa63i9myz"))))
(build-system gnu-build-system)
(inputs `(("libpng" ,libpng)))
(native-inputs `(("pkg-config" ,pkg-config)))
@@ -68,4 +65,4 @@ symbol, a kind of 2D symbology that can be scanned by handy terminals such as
a mobile phone with CCD. The capacity of QR Code is up to 7000 digits or 4000
characters, and is highly robust.")
(license license:lgpl2.1+)
(home-page "https://fukuchi.org/works/qrencode")))
(home-page "http://fukuchi.org/works/qrencode")))
+41 -227
View File
@@ -1,9 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2012, 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2013, 2015 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -22,24 +20,12 @@
(define-module (gnu packages algebra)
#:use-module (gnu packages)
#:use-module (gnu packages autotools)
#:use-module (gnu packages compression)
#:use-module (gnu packages documentation)
#:use-module (gnu packages fltk)
#:use-module (gnu packages gl)
#:use-module (gnu packages graphviz)
#:use-module (gnu packages image)
#:use-module (gnu packages multiprecision)
#:use-module (gnu packages maths)
#:use-module (gnu packages mpi)
#:use-module (gnu packages perl)
#:use-module (gnu packages readline)
#:use-module (gnu packages flex)
#:use-module (gnu packages python)
#:use-module (gnu packages tcsh)
#:use-module (gnu packages tex)
#:use-module (gnu packages xiph)
#:use-module (gnu packages xorg)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
@@ -79,7 +65,7 @@ multiplication routines such as ToomCook and the FFT.")
(define-public cm
(package
(name "cm")
(version "0.3")
(version "0.2.1")
(source (origin
(method url-fetch)
(uri (string-append
@@ -87,7 +73,7 @@ multiplication routines such as ToomCook and the FFT.")
version ".tar.gz"))
(sha256
(base32
"1nf5kr0nqmhbzrsrinky18z0ighjpsmb5cr8zyg8jf04bfbyrfmc"))))
"1r5dx5qy0ka2sq26n9jll9iy4sjqg0jp5r3jnbjhpgxvmj8jbhq8"))))
(build-system gnu-build-system)
(propagated-inputs
`(("mpfrcx" ,mpfrcx)
@@ -101,7 +87,7 @@ imaginary quadratic number fields and of elliptic curves with complex
multiplication via floating point approximations. It consists of libraries
that can be called from within a C program and of executable command
line applications.")
(license license:gpl3+)
(license license:gpl2+)
(home-page "http://cm.multiprecision.org/")))
(define-public fplll
@@ -128,7 +114,7 @@ solve the shortest vector problem.")
(define-public pari-gp
(package
(name "pari-gp")
(version "2.7.6")
(version "2.7.4")
(source (origin
(method url-fetch)
(uri (string-append
@@ -136,23 +122,24 @@ solve the shortest vector problem.")
version ".tar.gz"))
(sha256
(base32
"04dqi697czd8mmw8aiwzrkgbvkjassqagg6lfy3lkf1k5qi9g9rr"))))
"0k1qqagfl6zn7gvwmsqffj6g9yrzqvszwh2mblhmxpjlw1pigfh8"))))
(build-system gnu-build-system)
(native-inputs `(("texlive" ,texlive-minimal)))
(inputs `(("gmp" ,gmp)
("libx11" ,libx11)
("perl" ,perl)
("readline" ,readline)))
(arguments
'(#:make-flags '("all")
'(#:make-flags '("gp")
;; FIXME: building the documentation requires tex; once this is
;; available, replace "gp" by "all"
#:test-target "dobench"
#:phases (modify-phases %standard-phases
(replace 'configure
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(zero?
(system* "./Configure"
(string-append "--prefix=" out)))))))))
#:phases
(alist-replace
'configure
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(zero?
(system* "./Configure" (string-append "--prefix=" out)))))
%standard-phases)))
(synopsis "PARI/GP, a computer algebra system for number theory")
(description
"PARI/GP is a widely used computer algebra system designed for fast
@@ -168,7 +155,7 @@ PARI is also available as a C library to allow for faster computations.")
(define-public gp2c
(package
(name "gp2c")
(version "0.0.9pl5")
(version "0.0.9pl3")
(source (origin
(method url-fetch)
(uri (string-append
@@ -176,7 +163,7 @@ PARI is also available as a C library to allow for faster computations.")
version ".tar.gz"))
(sha256
(base32
"1q003mkagc5ib6lqb2xfay7j4ffkwv7xlnznp6wdrq2sbqq4vyak"))))
"0wbghihwlcx3w4j1la3bjf5gcrkk6lp9syw6iimqndq1f73ijlq3"))))
(build-system gnu-build-system)
(native-inputs `(("perl" ,perl)))
(inputs `(("pari-gp" ,pari-gp)))
@@ -199,68 +186,6 @@ GP2C, the GP to C compiler, translates GP scripts to PARI programs.")
(license license:gpl2)
(home-page "http://pari.math.u-bordeaux.fr/")))
(define-public giac-xcas
(package
(name "giac-xcas")
(version "1.2.2-75")
(source (origin
(method url-fetch)
;; "~parisse/giac" is not used because the maintainer regularly
;; overwrites the release tarball there, introducing a checksum
;; mismatch every time. See
;; <https://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/README>
(uri (string-append "https://www-fourier.ujf-grenoble.fr/"
"~parisse/debian/dists/stable/main/"
"source/giac_" version ".tar.gz"))
(sha256
(base32
"0vs111fkd900wkm7yypaxmplc8i8j63d9shc3fbdhddn7cdj70b1"))))
(build-system gnu-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-bin-cp
(lambda _
;; Some Makefiles contain hard-coded "/bin/cp".
(substitute* (find-files "doc" "^Makefile")
(("/bin/cp") (which "cp")))
#t))
(add-after 'unpack 'disable-broken-test
(lambda _
;; Disable failing test. Actually, the results are correct but
;; a sorting discrepancy prevents the test from being validated.
(substitute* "check/Makefile.in"
(("chk_fhan16") ""))
#t)))))
(inputs
`(("fltk" ,fltk)
("gmp" ,gmp)
("gsl" ,gsl)
("lapack" ,lapack)
("libao" ,ao)
("libjpeg" ,libjpeg)
("libpng" ,libpng)
("libx11" ,libx11)
("libxinerama" ,libxinerama)
("libxft" ,libxft)
("libxt" ,libxt)
("mesa" ,mesa)
("mpfi" ,mpfi)
("mpfr" ,mpfr)
("ntl" ,ntl)
("perl" ,perl)
("pari-gp" ,pari-gp)
("tcsh" ,tcsh)
("texlive" ,texlive-minimal)))
(native-inputs `(("readline" ,readline)))
(home-page "https://www-fourier.ujf-grenoble.fr/~parisse/giac.html")
(synopsis "Computer algebra system")
(description
"Giac/Xcas is a computer algebra system. It has a compatibility mode for
maple, mupad and the TI89. It is available as a standalone program (graphic
or text interfaces) or as a C++ library.")
(license license:gpl3+)))
(define-public flint
(package
(name "flint")
@@ -272,7 +197,7 @@ or text interfaces) or as a C++ library.")
version ".tar.gz"))
(sha256 (base32
"11syazv1a8rrnac3wj3hnyhhflpqcmq02q8pqk2m6g2k6h0gxwfb"))
(patches (search-patches "flint-ldconfig.patch"))))
(patches (map search-patch '("flint-ldconfig.patch")))))
(build-system gnu-build-system)
(propagated-inputs
`(("gmp" ,gmp)
@@ -311,7 +236,7 @@ fast arithmetic.")
(define-public arb
(package
(name "arb")
(version "2.8.1")
(version "2.7.0")
(source (origin
(method url-fetch)
(uri (string-append
@@ -320,8 +245,7 @@ fast arithmetic.")
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"04hhcpshfkcq9fr4hixbhpps50yf9drk62xgkvlcaj5kb4nyrx7l"))
(patches (search-patches "arb-ldconfig.patch"))))
"1rwkffs57v8mry63rq8l2dyw69zfs9rg5fpbfllqp3nkjnkp1fly"))))
(build-system gnu-build-system)
(propagated-inputs
`(("flint" ,flint))) ; flint.h is included by arf.h
@@ -355,116 +279,6 @@ real and complex numbers, with automatic, rigorous error control.")
(license license:gpl2+)
(home-page "http://fredrikj.net/arb/")))
(define-public ntl
(package
(name "ntl")
(version "9.7.0")
(source (origin
(method url-fetch)
(uri (string-append "http://shoup.net/ntl/ntl-"
version ".tar.gz"))
(sha256 (base32
"115frp5flyvw9wghz4zph1b3llmr5nbxk1skgsggckr81fh3gmxq"))))
(build-system gnu-build-system)
(native-inputs
`(("libtool" ,libtool)
("perl" ,perl))) ; for configuration
;; FIXME: Add optional input gf2x once available; then also add
;; configure flag "NTL_GF2X_LIB=on".
(inputs
`(("gmp" ,gmp)))
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'configure
(lambda* (#:key outputs #:allow-other-keys)
(chdir "src")
(system* "./configure"
(string-append "PREFIX=" (assoc-ref outputs "out"))
;; Do not build especially for the build machine.
"NATIVE=off"
;; Also do not tune to the build machine.
"WIZARD=off"
"SHARED=on")
#t)))))
(synopsis "C++ library for number theory")
(description
"NTL is a C++ library providing data structures and algorithms
for manipulating signed, arbitrary length integers, and for vectors,
matrices, and polynomials over the integers and over finite fields.")
(license license:gpl2+)
(home-page "http://shoup.net/ntl/")))
(define-public singular
(package
(name "singular")
(version "4.0.3")
(source (origin
(method url-fetch)
(uri (string-append "http://www.mathematik.uni-kl.de/ftp/pub/"
"Math/Singular/SOURCES/"
(string-join (string-split version #\.) "-")
"/singular-" version ".tar.gz"))
(sha256 (base32
"0viidy2fz62rln9p0s9qfs7fnm55c6fw1agydd1py26gxylp1ksc"))))
(build-system gnu-build-system)
(native-inputs
`(("doxygen" ,doxygen)
("graphviz" ,graphviz)
("perl" ,perl)))
(inputs
`(("cddlib" ,cddlib)
("gmp" ,gmp)
("flint" ,flint)
("mpfr" ,mpfr)
("ntl" ,ntl)
("python" ,python-2)
("readline" ,readline)))
(arguments
`(#:configure-flags
(list (string-append "--with-ntl="
(assoc-ref %build-inputs "ntl")))))
(synopsis "Computer algebra system for polynomial computations")
(description
"Singular is a computer algebra system for polynomial computations,
with special emphasis on commutative and non-commutative algebra, algebraic
geometry and singularity theory.")
;; Singular itself is dual licensed gpl2 or gpl3, but some of the
;; libraries with which it links are licensed under lgpl3+, so the
;; combined work becomes gpl3. See COPYING in the source code.
(license license:gpl3)
(home-page "http://www.singular.uni-kl.de/index.php")))
(define-public gmp-ecm
(package
(name "gmp-ecm")
(version "7.0")
(source (origin
(method url-fetch)
(uri (string-append "https://gforge.inria.fr/frs/download.php/"
"file/35642/ecm-"
version ".tar.gz"))
(sha256 (base32
"00jzzwqp49m01vwsr9z1w7bvm8lb69l3f62x7qr8sfz0xiczxnpm"))))
(build-system gnu-build-system)
(inputs
`(("gmp" ,gmp)))
(arguments
`(#:configure-flags '("--enable-shared"
;; Disable specific assembly routines, which depend
;; on the subarchitecture of the build machine,
;; and use gmp instead.
"--disable-asm-redc")))
(synopsis "Integer factorization library using the elliptic curve method")
(description
"GMP-ECM factors integers using the elliptic curve method (ECM) as well
as the P-1 and P+1 algorithms. It provides a library and a stand-alone
binary.")
;; Most files are under lgpl3+, but some are under gpl3+ or gpl2+,
;; so the combined work is under gpl3+.
(license license:gpl3+)
(home-page "http://ecm.gforge.inria.fr/")))
(define-public bc
(package
(name "bc")
@@ -567,15 +381,14 @@ cosine/ sine transforms or DCT/DST).")
(define-public eigen
(package
(name "eigen")
(version "3.2.8")
(version "3.2.6")
(source (origin
(method url-fetch)
(uri (string-append "https://bitbucket.org/eigen/eigen/get/"
version ".tar.bz2"))
(sha256
(base32
"0mby6my1djsg8681fcvlaq0i4kd17fja9qn5f713j3xpfbb66akj"))
(file-name (string-append name "-" version ".tar.bz2"))
"0gil5ksmgcg6v3nw0v613mvpzz4n33xhawqs8l7fj7rnlpwm4cwa"))
(modules '((guix build utils)))
(snippet
;; There are 3 test failures in the "unsupported" directory,
@@ -583,28 +396,29 @@ cosine/ sine transforms or DCT/DST).")
;; anyway, so just skip them.
'(substitute* "CMakeLists.txt"
(("add_subdirectory\\(unsupported\\)")
"# Do not build the tests for unsupported features.\n")
;; Work around
;; <http://eigen.tuxfamily.org/bz/show_bug.cgi?id=1114>.
(("\"include/eigen3\"")
"\"${CMAKE_INSTALL_PREFIX}/include/eigen3\"")))))
"# Do not build the tests for unsupported features.\n")))))
(build-system cmake-build-system)
(arguments
'(;; Turn off debugging symbols to save space.
#:build-type "Release"
#:phases (modify-phases %standard-phases
(replace 'check
(lambda _
(let* ((cores (parallel-job-count))
(dash-j (format #f "-j~a" cores)))
;; First build the tests, in parallel. See
;; <http://eigen.tuxfamily.org/index.php?title=Tests>.
(and (zero? (system* "make" "buildtests" dash-j))
;; Use 'make check', as per
;; <http://eigen.tuxfamily.org/index.php?title=Tests>.
#:test-target "check"
;; Then run 'CTest' with -V so we get more
;; details upon failure.
(zero? (system* "ctest" "-V" dash-j)))))))))
#:phases (alist-cons-before
'check 'build-tests
(lambda _
;; First build the tests, in parallel.
;; See <http://eigen.tuxfamily.org/index.php?title=Tests>.
(let* ((cores (parallel-job-count))
(dash-j (format #f "-j~a" cores)))
;; These variables are supposed to be honored.
(setenv "EIGEN_MAKE_ARGS" dash-j)
(setenv "EIGEN_CTEST_ARGS" dash-j)
(zero? (system* "make" "buildtests" dash-j))))
%standard-phases)))
(home-page "http://eigen.tuxfamily.org")
(synopsis "C++ template library for linear algebra")
(description
-178
View File
@@ -1,178 +0,0 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; 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 (gnu packages animation)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix utils)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
#:use-module (gnu packages boost)
#:use-module (gnu packages compression)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnome)
#:use-module (gnu packages graphics)
#:use-module (gnu packages gtk)
#:use-module (gnu packages image)
#:use-module (gnu packages imagemagick)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages video))
(define-public etl
(package
(name "etl")
(version "0.04.19")
(source (origin
(method url-fetch)
;; Keep this synchronized with the synfig release version.
(uri (string-append "mirror://sourceforge/synfig/releases/"
"1.0.2/source/ETL-" version ".tar.gz"))
(sha256
(base32
"070c70slizrklq1gbgja8m49xfmq65wlcd6hz6418cpx0wd4r55s"))))
(build-system gnu-build-system)
(home-page "http://www.synfig.org")
(synopsis "Extended C++ template library")
(description
"ETL is a class and template library designed to add new datatypes and
functions which combine well with the existing types and functions from the
C++ @dfn{Standard Template Library} (STL).")
(license license:gpl3+)))
(define-public synfig
(package
(name "synfig")
(version "1.0.2")
(source (origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/synfig/releases/"
version "/source/synfig-" version
".tar.gz"))
(sha256
(base32
"1d3z2r78j3rkff47q3wl0ami69y3l4nyi5r9zclymb8ar7mgkk9l"))
(patches (search-patches "synfig-build-fix.patch"))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags
;; The Boost library path is taken from the value of BOOST_LDFLAGS.
(list (string-append "BOOST_LDFLAGS=-L"
(assoc-ref %build-inputs "boost")
"/lib"))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'adapt-to-libxml++-changes
(lambda _
(substitute* "configure"
(("libxml\\+\\+-2\\.6") "libxml++-3.0"))
(substitute* (append (find-files "src/modules/" "\\.cpp$")
(find-files "src/synfig/" "\\.(cpp|h)$"))
(("add_child\\(") "add_child_element(")
(("get_child_text\\(") "get_first_child_text(")
(("set_child_text\\(") "set_first_child_text(")
(("remove_child\\(") "remove_node("))
(substitute* "src/modules/mod_svg/svg_parser.cpp"
(("xmlpp::Node::NodeList") "xmlpp::Node::const_NodeList"))
#t))
(add-before 'configure 'set-flags
(lambda _
;; Compile with C++11, required by libsigc++.
(setenv "CXXFLAGS" "-D__STDC_CONSTANT_MACROS -std=gnu++11")
#t)))))
(inputs
`(("boost" ,boost)
("ffmpeg" ,ffmpeg)
("libdv" ,libdv)
("libjpeg" ,libjpeg)
("libpng" ,libpng)
("libmng" ,libmng)
("zlib" ,zlib)))
;; synfig.pc lists the following as required: Magick++ freetype2
;; fontconfig OpenEXR ETL glibmm-2.4 giomm-2.4 libxml++-3.0 sigc++-2.0
;; cairo pango pangocairo mlt++
(propagated-inputs
`(("cairo" ,cairo)
("etl" ,etl)
("fontconfig" ,fontconfig)
("freetype" ,freetype)
("glibmm" ,glibmm)
("imagemagick" ,imagemagick)
("libxml++" ,libxml++)
("libsigc++" ,libsigc++)
("mlt" ,mlt)
("openexr" ,openexr)
("pango" ,pango)))
(native-inputs
`(("pkg-config" ,pkg-config)))
(home-page "http://www.synfig.org")
(synopsis "Vector-based 2D animation renderer")
(description
"Synfig is a vector-based 2D animation package. It is designed to be
capable of producing feature-film quality animation. It eliminates the need
for tweening, preventing the need to hand-draw each frame.")
(license license:gpl3+)))
(define-public synfigstudio
(package
(name "synfigstudio")
(version "1.0.2")
(source (origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/synfig/releases/"
version "/source/synfigstudio-" version
".tar.gz"))
(sha256
(base32
"1xa74dlgkpjn0gzdcs0x25z7wg0806v2wygvvi73f7sn1fm88ig4"))
(modules '((guix build utils)))
(snippet
'(begin
(substitute* "src/synfigapp/pluginmanager.cpp"
(("xmlpp::Node\\* n =") "const xmlpp::Node* n =")
(("xmlpp::Node::NodeList") "xmlpp::Node::const_NodeList"))
;; Some files are ISO-8859-1 encoded.
(with-fluids ((%default-port-encoding #f))
(substitute* (find-files "src/" "\\.(cpp|h)$")
(("#include <sigc\\+\\+/retype\\.h>")
"#include <sigc++/adaptors/retype.h>")
(("#include <sigc\\+\\+/hide\\.h>")
"#include <sigc++/adaptors/hide.h>")
(("#include <sigc\\+\\+/object\\.h>")
"#include <sigc++/trackable.h>")))
#t))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags
(list "CXXFLAGS=-std=gnu++11")))
(inputs
`(("gtkmm" ,gtkmm)
("libsigc++" ,libsigc++)
("synfig" ,synfig)))
(native-inputs
`(("pkg-config" ,pkg-config)
("intltool" ,intltool)))
(home-page "http://www.synfig.org")
(synopsis "Vector-based 2D animation package (GUI)")
(description
"Synfig is a vector-based 2D animation package. It is designed to
be capable of producing feature-film quality animation. It eliminates the
need for tweening, preventing the need to hand-draw each frame. This package
contains the graphical user interface for synfig.")
(license license:gpl3+)))
-64
View File
@@ -1,64 +0,0 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
;;;
;;; 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 (gnu packages anthy)
#:use-module (guix licenses)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu))
(define-public anthy
(package
(name "anthy")
(version "9100h")
(source (origin
(method url-fetch)
;; The URI does not appear to be easily guessable. For
;; example, you cannot download version "9100g" simply
;; by replacing "9100h" in the URI.
(uri "http://tcpdiag.dl.osdn.jp/anthy/37536/anthy-9100h.tar.gz")
(sha256
(base32
"0ism4zibcsa5nl77wwi12vdsfjys3waxcphn1p5s7d0qy1sz0mnj"))))
(build-system gnu-build-system)
;; Anthy also contains elisp modules for using anthy within Emacs.
;; However, these modules are incompatible with the latest version
;; of Emacs. This is because they rely on the presence of
;; last-command-char, which was removed in Emacs 24.3. So, we
;; don't try to install them here at this time.
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'check
(lambda _
(with-directory-excursion "test"
(zero? (system* "./anthy" "--all"))))))))
(home-page "http://anthy.osdn.jp/")
(synopsis "Japanese input method")
(description "Anthy is a Japanese input method for converting
hiragana text to mixed kana and kanji. It is written in the C
programming language. Anthy stores personal customizations (words it
has learned from the user's input, words the user has explicitly
added, etc.) in the ~/.anthy/ directory. This package contains the
anthy C libraries, the cannadic and alt-cannadic kana dictionaries, as
well as command-line tools for using anthy and managing
dictionaries.")
;; Most of anthy is lgpl2.1+. However, some files (e.g., from
;; alt-cannadic) use gpl2. See the file "COPYING" in the anthy
;; source for details.
(license (list lgpl2.1+ gpl2))))
+1 -1
View File
@@ -39,7 +39,7 @@
(base32
"0ypn51xblix5ys9xy7da3ngdydip0qqh9rdq8nz54w9aq8lys0vx"))
(patches
(search-patches "apr-skip-getservbyname-test.patch"))
(list (search-patch "apr-skip-getservbyname-test.patch")))
(patch-flags '("-p0"))))
(build-system gnu-build-system)
(arguments
+52
View File
@@ -0,0 +1,52 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
;;;
;;; 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 (gnu packages asciidoc)
#:use-module (guix licenses)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (gnu packages python)
#:use-module (guix build-system gnu)
#:autoload (gnu packages zip) (unzip))
(define-public asciidoc
(package
(name "asciidoc")
(version "8.6.9")
(source (origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/asciidoc/asciidoc-"
version ".tar.gz"))
(sha256
(base32
"1w71nk527lq504njmaf0vzr93pgahkgzzxzglrq6bay8cw2rvnvq"))))
(build-system gnu-build-system)
(arguments '(#:tests? #f)) ; no 'check' target
(inputs `(("python" ,python-2)))
(home-page "http://www.methods.co.nz/asciidoc/")
(synopsis "Text-based document generation system")
(description
"AsciiDoc is a text document format for writing notes, documentation,
articles, books, ebooks, slideshows, web pages, man pages and blogs.
AsciiDoc files can be translated to many formats including HTML, PDF,
EPUB, man page.
AsciiDoc is highly configurable: both the AsciiDoc source file syntax and
the backend output markups (which can be almost any type of SGML/XML
markup) can be customized and extended by the user.")
(license gpl2+)))
+3 -28
View File
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com>
;;; Copyright © 2015 Alex Kost <alezost@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -38,16 +38,6 @@
(base32
"1qgn5psfyhbrnap275xjfrzppf5a83fb67gpql0kfqv37al869gm"))))
(build-system gnu-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'install 'wrap-aspell
(lambda* (#:key outputs #:allow-other-keys)
(let ((bin/aspell (string-append (assoc-ref outputs "out")
"/bin/aspell")))
(wrap-program bin/aspell
'("ASPELL_CONF" "" =
("${ASPELL_CONF:-\"dict-dir ${GUIX_PROFILE:-$HOME/.guix-profile}/lib/aspell\"}")))))))))
(inputs `(("perl" ,perl)))
(home-page "http://aspell.net/")
(synopsis "Spell checker")
@@ -99,10 +89,10 @@ dictionaries, including personal ones.")
(define-public aspell-dict-en
(aspell-dictionary "en" "English"
#:version "2016.01.19-0"
#:version "7.1-0"
#:sha256
(base32
"01h4cl4lngp6mcfbyb47cjrc2gspyg2519dvknd97ki896nx7vcn")))
"02ldfiny4iakgfgy4sdrzjqdzi7l1rmb6y30lv31kfy5x31g77gz")))
(define-public aspell-dict-eo
(aspell-dictionary "eo" "Esperanto"
@@ -132,18 +122,3 @@ dictionaries, including personal ones.")
#:sha256
(base32
"0ip6nq43hcr7vvzbv4lwwmlwgfa60hrhsldh9xy3zg2prv6bcaaw")))
(define-public aspell-dict-it
(aspell-dictionary "it" "Italian"
#:version "2.2_20050523-0"
#:sha256
(base32
"1gdf7bc1a0kmxsmphdqq8pl01h667mjsj6hihy6kqy14k5qdq69v")))
(define-public aspell-dict-nl
(aspell-dictionary "nl" "Dutch"
#:version "0.50-2"
#:prefix "aspell-"
#:sha256
(base32
"0ffb87yjsh211hllpc4b9khqqrblial4pzi1h9r3v465z1yhn3j4")))
-114
View File
@@ -1,114 +0,0 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2013, 2015 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; 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 (gnu packages assembly)
#:use-module (guix build-system gnu)
#:use-module (guix download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (gnu packages)
#:use-module (gnu packages perl)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages python)
#:use-module (gnu packages xml))
(define-public nasm
(package
(name "nasm")
(version "2.12.01")
(source (origin
(method url-fetch)
(uri (string-append "http://www.nasm.us/pub/nasm/releasebuilds/"
version "/" name "-" version ".tar.xz"))
(sha256
(base32
"12bl6vc5sjp9nnhf0iwy6l27vq783y0rxrjpp8sy84h5cb7a3fwx"))
(patches (search-patches "nasm-no-ps-pdf.patch"))))
(build-system gnu-build-system)
(native-inputs `(("perl" ,perl) ;for doc and test target
("texinfo" ,texinfo)))
(arguments
`(#:test-target "test"
#:phases (modify-phases %standard-phases
(add-after 'install 'install-info
(lambda _
(zero? (system* "make" "install_doc")))))))
(home-page "http://www.nasm.us/")
(synopsis "80x86 and x86-64 assembler")
(description
"NASM, the Netwide Assembler, is an 80x86 and x86-64 assembler designed
for portability and modularity. It supports a range of object file formats,
including Linux and *BSD a.out, ELF, COFF, Mach-O, Microsoft 16-bit OBJ,
Windows32 and Windows64. It will also output plain binary files. Its syntax
is designed to be simple and easy to understand, similar to Intel's but less
complex. It supports all currently known x86 architectural extensions, and
has strong support for macros.")
(supported-systems '("x86_64-linux" "i686-linux"))
(license license:bsd-3)))
(define-public yasm
(package
(name "yasm")
(version "1.3.0")
(source (origin
(method url-fetch)
(uri (string-append
"http://www.tortall.net/projects/yasm/releases/yasm-"
version ".tar.gz"))
(sha256
(base32
"0gv0slmm0qpq91za3v2v9glff3il594x5xsrbgab7xcmnh0ndkix"))))
(build-system gnu-build-system)
(inputs
`(("python" ,python-wrapper)
("xmlto" ,xmlto)))
(home-page "http://yasm.tortall.net/")
(synopsis "Rewrite of the NASM assembler")
(description
"Yasm is a complete rewrite of the NASM assembler.
Yasm currently supports the x86 and AMD64 instruction sets, accepts NASM
and GAS assembler syntaxes, outputs binary, ELF32, ELF64, 32 and 64-bit
Mach-O, RDOFF2, COFF, Win32, and Win64 object formats, and generates source
debugging information in STABS, DWARF 2, and CodeView 8 formats.")
(license (license:non-copyleft "file://COPYING"
"See COPYING in the distribution."))))
(define-public lightning
(package
(name "lightning")
(version "2.1.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/lightning/lightning-"
version ".tar.gz"))
(sha256
(base32
"19j9nwl88k660045s40cbz5zrl1wpd2mcxnnc8qqnnaj311a58qz"))))
(build-system gnu-build-system)
(synopsis "Library for generating assembly code at runtime")
(description
"GNU Lightning is a library that generates assembly language code at
run-time. Thus, it is useful in creating Just-In-Time compilers. It
abstracts over the target CPU by exposing a standardized RISC instruction set
to the clients.")
(home-page "http://www.gnu.org/software/lightning/")
(license license:gpl3+)))
+36 -31
View File
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2012, 2013, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -28,41 +28,46 @@
(define-public attr
(package
(name "attr")
(version "2.4.47")
(source (origin
(method url-fetch)
(uri (string-append "mirror://savannah/attr/attr-"
version ".src.tar.gz"))
(sha256
(base32
"0nd8y0m6awc9ahv0ciiwf8gy54c8d3j51pw9xg7f7cn579jjyxr5"))))
(version "2.4.46")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://savannah/attr/attr-"
version ".src.tar.gz"))
(sha256
(base32
"07qf6kb2zk512az481bbnsk9jycn477xpva1a726n5pzlzf9pmnw"))))
(build-system gnu-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'configure 'patch-makefile-SHELL
(lambda _
(patch-makefile-SHELL "include/buildmacros")))
(replace 'install
(lambda _
(zero? (system* "make"
"install"
"install-lib"
"install-dev"))))
(replace 'check
(lambda* (#:key target #:allow-other-keys)
;; Use the right shell.
(substitute* "test/run"
(("/bin/sh")
(which "bash")))
(alist-cons-after
'configure 'patch-makefile-SHELL
(lambda _
(patch-makefile-SHELL "include/buildmacros"))
(alist-replace
'install
(lambda _
(zero? (system* "make"
"install"
"install-lib"
"install-dev")))
;; When building natively, run the tests.
(unless target
(system* "make" "tests" "-C" "test"))
;; When building natively, adjust the test cases.
,(if (%current-target-system)
'%standard-phases
'(alist-replace 'check
(lambda _
;; Use the right shell.
(substitute* "test/run"
(("/bin/sh")
(which "bash")))
;; XXX: Ignore the test result since this is
;; dependent on the underlying file system.
#t)))))
(system* "make" "tests" "-C" "test")
;; XXX: Ignore the test result since this is
;; dependent on the underlying file system.
#t)
%standard-phases))))))
(inputs
;; Perl is needed to run tests; remove it from cross builds.
(if (%current-target-system)
+4 -3
View File
@@ -42,11 +42,12 @@
(source
(origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/audacity/audacity/" version
"/audacity-minsrc-" version ".tar.xz"))
(uri
(string-append
"mirror://sourceforge/audacity/audacity-minsrc-" version ".tar.xz"))
(sha256
(base32 "1cs2w3fwqylpqmfwkvlgdx5lhclpckfil7pqibl37qlbnf4qvndh"))
(patches (search-patches "audacity-fix-ffmpeg-binding.patch"))))
(patches (list (search-patch "audacity-fix-ffmpeg-binding.patch")))))
(build-system gnu-build-system)
(inputs
;; TODO: Add portSMF and libwidgetextra once they're packaged. In-tree
+96 -613
View File
@@ -1,10 +1,9 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2015 Alex Kost <alezost@gmail.com>
;;; Copyright © 2015, 2016 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -31,7 +30,6 @@
#:use-module (guix build-system waf)
#:use-module (guix build-system trivial)
#:use-module (guix build-system cmake)
#:use-module (guix build-system python)
#:use-module (gnu packages)
#:use-module (gnu packages algebra)
#:use-module (gnu packages autotools)
@@ -44,8 +42,6 @@
#:use-module (gnu packages databases)
#:use-module (gnu packages file)
#:use-module (gnu packages flex)
#:use-module (gnu packages fltk)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages gettext)
#:use-module (gnu packages glib)
#:use-module (gnu packages gtk)
@@ -62,7 +58,6 @@
#:use-module (gnu packages python)
#:use-module (gnu packages rdf)
#:use-module (gnu packages readline)
#:use-module (gnu packages webkit)
#:use-module (gnu packages xiph)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
@@ -72,26 +67,15 @@
(define-public alsa-modular-synth
(package
(name "alsa-modular-synth")
(version "2.1.2")
(version "2.1.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/alsamodular/alsamodular"
"/" version "/ams-" version ".tar.bz2"))
(uri (string-append "mirror://sourceforge/alsamodular/ams-"
version ".tar.bz2"))
(sha256
(base32
"1azbrhpfk4nnybr7kgmc7w6al6xnzppg853vas8gmkh185kk11l0"))))
"1nb7qzzqlqa2x8h797jbwi18ihnfkxqg9lyi0c4nvf8ybwzxkzd2"))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags '("--enable-qt5")
#:phases
(modify-phases %standard-phases
;; Insert an extra space between linker flags.
(add-before 'configure 'add-missing-space
(lambda _
(substitute* "configure"
(("LIBS\\+=\\$LIBSsave") "LIBS+=\" $LIBSsave\"")
(("CFLAGS\\+=\\$CFLAGSsave") "CFLAGS+=\" $CFLAGSsave\""))
#t)))))
(inputs
`(("alsa-lib" ,alsa-lib)
;; We cannot use zita-alsa-pcmi (the successor of clalsadrv) due to
@@ -101,8 +85,7 @@
("jack" ,jack-1)
("ladspa" ,ladspa)
("liblo" ,liblo)
("qtbase" ,qtbase)
("qttools" ,qttools)))
("qt" ,qt-4)))
(native-inputs
`(("pkg-config" ,pkg-config)))
(home-page "http://alsamodular.sourceforge.net/")
@@ -145,7 +128,7 @@ Filter) modules follow the convention of 1V / Octave.")
(native-inputs
`(("pkg-config" ,pkg-config)))
(home-page "http://aubio.org/")
(synopsis "Library for audio labelling")
(synopsis "A library for audio labelling")
(description
"aubio is a tool designed for the extraction of annotations from audio
signals. Its features include segmenting a sound file before each of its
@@ -169,32 +152,33 @@ streams from live audio.")
libdir "/vamp" "\"]"))))
#t))
(define-public ardour
(define-public ardour-3
(package
(name "ardour")
(version "4.7")
(version "3.5.403")
(source (origin
;; The project only provides tarballs upon individual request
;; (or after payment) so we take the code from git.
(method git-fetch)
(uri (git-reference
(url "git://git.ardour.org/ardour/ardour.git")
(commit version)))
(snippet
;; Ardour expects this file to exist at build time. The revision
;; is the output of
;; git describe HEAD | sed 's/^[A-Za-z]*+//'
;; Ardour expects this file to exist at build time. It can be
;; created from a git checkout with:
;; ./waf create_stored_revision
'(call-with-output-file
"libs/ardour/revision.cc"
(lambda (port)
(format port "#include \"ardour/revision.h\"
namespace ARDOUR { const char* revision = \"4.7-219-g0e36f8e\" ; }"))))
namespace ARDOUR { const char* revision = \"3.5-403-gec2cb31\" ; }"))))
(sha256
(base32
"149gswphz77m3pkzsn2nqbm6yvcfa3fva560bcvjzlgb73f64q5l"))
"01b0wxh0wlxjfz5j8gcwwqhxc6q2kn4njz2fcmzv9fr3xaya5dbp"))
(file-name (string-append name "-" version))))
(build-system waf-build-system)
(arguments
`(#:configure-flags '("--cxx11") ; required by gtkmm
#:phases
`(#:phases
(modify-phases %standard-phases
(add-after
'unpack 'set-rpath-in-LDFLAGS
@@ -246,6 +230,35 @@ record, edit, mix and master audio and MIDI projects. It is targeted at audio
engineers, musicians, soundtrack editors and composers.")
(license license:gpl2+)))
(define-public ardour
(package (inherit ardour-3)
(name "ardour")
(version "4.2")
(source (origin
(method git-fetch)
(uri (git-reference
(url "git://git.ardour.org/ardour/ardour.git")
(commit version)))
(snippet
;; Ardour expects this file to exist at build time. It can be
;; created from a git checkout with:
;; ./waf create_stored_revision
'(call-with-output-file
"libs/ardour/revision.cc"
(lambda (port)
(format port "#include \"ardour/revision.h\"
namespace ARDOUR { const char* revision = \"4.2\" ; }"))))
(sha256
(base32
"1j8zw0bvh16qwyy8qrqynpak9nghl9j3qhjjcdl7wh9raafjqc00"))
(file-name (string-append name "-" version))))
(arguments
(substitute-keyword-arguments (package-arguments ardour-3)
((#:phases phases)
`(modify-phases ,phases
(replace 'set-rpath-in-LDFLAGS
,(ardour-rpath-phase (version-prefix version 1)))))))))
(define-public azr3
(package
(name "azr3")
@@ -288,8 +301,9 @@ plugins are provided.")
(version "0.0.60")
(source (origin
(method url-fetch)
(uri (string-append "http://calf-studio-gear.org/files/calf-"
version ".tar.gz"))
(uri (string-append
"mirror://sourceforge/calf/calf/"
version "/calf-" version ".tar.gz"))
(sha256
(base32
"019fwg00jv217a5r767z7szh7vdrarybac0pr2sk26xp81kibrx9"))))
@@ -334,15 +348,8 @@ tools (analyzer, mono/stereo tools, crossovers).")
version "/Csound" version ".tar.gz"))
(sha256
(base32
"0a1sni6lr7qpwywpggbkp0ia3h9bwwgf9i87gsag8ra2h30v82hd"))
(patches (search-patches "csound-header-ordering.patch"))))
"0a1sni6lr7qpwywpggbkp0ia3h9bwwgf9i87gsag8ra2h30v82hd"))))
(build-system cmake-build-system)
(arguments
;; Work around this error on x86_64 with libc 2.22+:
;; libmvec.so.1: error adding symbols: DSO missing from command line
(if (string-prefix? "x86_64" (or (%current-target-system) (%current-system)))
'(#:configure-flags '("-DCMAKE_EXE_LINKER_FLAGS=-lmvec"))
'()))
(inputs
`(("alsa-lib" ,alsa-lib)
("boost" ,boost)
@@ -408,319 +415,6 @@ language and software synthesizer.")
ALSA PCM devices.")
(license license:gpl2+)))
(define-public amb-plugins
(package
(name "amb-plugins")
(version "0.8.1")
(source (origin
(method url-fetch)
(uri (string-append
"http://kokkinizita.linuxaudio.org"
"/linuxaudio/downloads/AMB-plugins-"
version ".tar.bz2"))
(sha256
(base32
"0x4blm4visjqj0ndqr0cg776v3b7lvplpc8cgi9n51llhavn0jpl"))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f ; no "check" target
#:phases
(modify-phases %standard-phases
;; no configure script
(delete 'configure)
(add-before 'install 'prepare-target-directory
(lambda* (#:key outputs #:allow-other-keys)
(mkdir-p (string-append (assoc-ref outputs "out") "/lib/ladspa"))
#t))
(add-after 'unpack 'override-target-directory-and-tool-paths
(lambda* (#:key outputs #:allow-other-keys)
(substitute* "Makefile"
(("/usr/lib/ladspa")
(string-append (assoc-ref outputs "out") "/lib/ladspa"))
(("/usr/bin/install") (which "install"))
(("/bin/rm") "#"))
#t)))))
(home-page "http://kokkinizita.linuxaudio.org")
(synopsis "LADSPA ambisonics plugins")
(description
"The AMB plugins are a set of LADSPA ambisonics plugins, mainly to be
used within Ardour. Features include: mono and stereo to B-format panning,
horizontal rotator, square, hexagon and cube decoders.")
(license license:gpl2+)))
(define-public mcp-plugins
(package
(name "mcp-plugins")
(version "0.4.0")
(source (origin
(method url-fetch)
(uri (string-append
"http://kokkinizita.linuxaudio.org"
"/linuxaudio/downloads/MCP-plugins-"
version ".tar.bz2"))
(sha256
(base32
"06a9r1l85jmg7l1cvc3788mk8ra0xagjfy1rmhw3b80y4n0vlnvc"))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f ; no "check" target
#:phases
(modify-phases %standard-phases
;; no configure script
(delete 'configure)
(add-before 'install 'prepare-target-directory
(lambda* (#:key outputs #:allow-other-keys)
(mkdir-p (string-append (assoc-ref outputs "out") "/lib/ladspa"))
#t))
(add-after 'unpack 'override-target-directory
(lambda* (#:key outputs #:allow-other-keys)
(substitute* "Makefile"
(("/usr") (assoc-ref outputs "out")))
#t)))))
(home-page "http://kokkinizita.linuxaudio.org")
(synopsis "Chorus, phaser, and vintage high-pass and low-pass filters")
(description
"This package provides various LADSPA plugins. @code{cs_chorus} and
@code{cs_phaser} provide chorus and phaser effects, respectively;
@code{mvclpf24} provides four implementations of the low-pass filter used in
vintage Moog synthesizers; @code{mvchpf24} is based on the voltage-controlled
high-pass filter by Robert Moog. The filters attempt to accurately emulate
the non-linear circuit elements of their original analog counterparts.")
(license license:gpl2+)))
(define-public rev-plugins
(package
(name "rev-plugins")
(version "0.7.1")
(source (origin
(method url-fetch)
(uri (string-append
"http://kokkinizita.linuxaudio.org"
"/linuxaudio/downloads/REV-plugins-"
version ".tar.bz2"))
(sha256
(base32
"1ikpinxm00pkfi259bnkzhsy3miagrjgdihaaf5x4v7zac29j3g7"))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f ; no "check" target
#:phases
(modify-phases %standard-phases
;; no configure script
(delete 'configure)
(add-before 'install 'prepare-target-directory
(lambda* (#:key outputs #:allow-other-keys)
(mkdir-p (string-append (assoc-ref outputs "out") "/lib/ladspa"))
#t))
(add-after 'unpack 'override-target-directory
(lambda* (#:key outputs #:allow-other-keys)
(substitute* "Makefile"
(("/usr") (assoc-ref outputs "out")))
#t)))))
(home-page "http://kokkinizita.linuxaudio.org")
(synopsis "LADSPA reverb plugin")
(description
"This package provides a stereo reverb LADSPA plugin based on the
well-known greverb.")
(license license:gpl2+)))
(define-public fil-plugins
(package
(name "fil-plugins")
(version "0.3.0")
(source (origin
(method url-fetch)
(uri (string-append
"http://kokkinizita.linuxaudio.org"
"/linuxaudio/downloads/FIL-plugins-"
version ".tar.bz2"))
(sha256
(base32
"1scfv9j7jrp50r565haa4rvxn1vk2ss86xssl5qgcr8r45qz42qw"))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f ; no "check" target
#:phases
(modify-phases %standard-phases
;; no configure script
(delete 'configure)
(add-before 'install 'prepare-target-directory
(lambda* (#:key outputs #:allow-other-keys)
(mkdir-p (string-append (assoc-ref outputs "out") "/lib/ladspa"))
#t))
(add-after 'unpack 'override-target-directory
(lambda* (#:key outputs #:allow-other-keys)
(substitute* "Makefile"
(("/usr") (assoc-ref outputs "out")))
#t)))))
(home-page "http://kokkinizita.linuxaudio.org")
(synopsis "LADSPA four-band parametric equalizer plugin")
(description
"This package provides a LADSPA plugin for a four-band parametric
equalizer. Each section has an active/bypass switch, frequency, bandwidth and
gain controls. There is also a global bypass switch and gain control.
The 2nd order resonant filters are implemented using a Mitra-Regalia style
lattice filter, which is stable even while parameters are being changed.
All switches and controls are internally smoothed, so they can be used 'live'
without any clicks or zipper noises. This makes this plugin suitable for use
in systems that allow automation of plugin control ports, such as Ardour, or
for stage use.")
(license license:gpl2+)))
(define-public ste-plugins
(package
(name "ste-plugins")
(version "0.0.2")
(source (origin
(method url-fetch)
(uri (string-append
"http://kokkinizita.linuxaudio.org"
"/linuxaudio/downloads/STE-plugins-"
version ".tar.bz2"))
(sha256
(base32
"0s3c9w5xihs87cnd1lh9xgj3maabjdyh6bl766qp5lhkg3ax8zy6"))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f ; no "check" target
#:phases
(modify-phases %standard-phases
;; no configure script
(delete 'configure)
(add-before 'install 'prepare-target-directory
(lambda* (#:key outputs #:allow-other-keys)
(mkdir-p (string-append (assoc-ref outputs "out") "/lib/ladspa"))
#t))
(add-after 'unpack 'override-target-directory
(lambda* (#:key outputs #:allow-other-keys)
(substitute* "Makefile"
(("/usr") (assoc-ref outputs "out")))
#t)))))
(home-page "http://kokkinizita.linuxaudio.org")
(synopsis "LADSPA stereo width plugin")
(description
"This package provides a LADSPA plugin to manipulate the stereo width of
audio signals.")
(license license:gpl2+)))
(define-public vco-plugins
(package
(name "vco-plugins")
(version "0.3.0")
(source (origin
(method url-fetch)
(uri (string-append
"http://kokkinizita.linuxaudio.org"
"/linuxaudio/downloads/VCO-plugins-"
version ".tar.bz2"))
(sha256
(base32
"1xzqdg3b07r7zww05y9bb737l9dxvfkv28m3fyak1aazaci3rsgl"))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f ; no "check" target
#:phases
(modify-phases %standard-phases
;; no configure script
(delete 'configure)
(add-before 'install 'prepare-target-directory
(lambda* (#:key outputs #:allow-other-keys)
(mkdir-p (string-append (assoc-ref outputs "out") "/lib/ladspa"))
#t))
(add-after 'unpack 'override-target-directory
(lambda* (#:key outputs #:allow-other-keys)
(substitute* "Makefile"
(("/usr") (assoc-ref outputs "out"))
(("/bin/cp") (which "cp")))
#t)))))
(home-page "http://kokkinizita.linuxaudio.org")
(synopsis "LADSPA plugin for synthesizer oscillators")
(description
"The @code{blvco} LADSPA plugin provides three anti-aliased oscillators:
@enumerate
@item Pulse-VCO, a dirac pulse oscillator with flat amplitude spectrum
@item Saw-VCO, a sawtooth oscillator with 1/F amplitude spectrum
@item Rec-VCO, a square / rectange oscillator
@end enumerate\n
All oscillators are low-pass filtered to provide waveforms similar to the
output of analog synthesizers such as the Moog Voyager.")
(license license:gpl2+)))
(define-public wah-plugins
(package
(name "wah-plugins")
(version "0.1.0")
(source (origin
(method url-fetch)
(uri (string-append
"http://kokkinizita.linuxaudio.org"
"/linuxaudio/downloads/WAH-plugins-"
version ".tar.bz2"))
(sha256
(base32
"1wkbjarxdhjixkh7d5abralj11dj2xxg644fz3ycd7qyfgfvjfgd"))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f ; no "check" target
#:phases
(modify-phases %standard-phases
;; no configure script
(delete 'configure)
(add-before 'install 'prepare-target-directory
(lambda* (#:key outputs #:allow-other-keys)
(mkdir-p (string-append (assoc-ref outputs "out") "/lib/ladspa"))
#t))
(add-after 'unpack 'override-target-directory
(lambda* (#:key outputs #:allow-other-keys)
(substitute* "Makefile"
(("/usr") (assoc-ref outputs "out")))
#t)))))
(home-page "http://kokkinizita.linuxaudio.org")
(synopsis "LADSPA Autowah effect plugin")
(description
"This package provides a LADSPA plugin for a Wah effect with envelope
follower.")
(license license:gpl2+)))
(define-public g2reverb
(package
(name "g2reverb")
(version "0.7.1")
(source (origin
(method url-fetch)
(uri (string-append
"http://kokkinizita.linuxaudio.org"
"/linuxaudio/downloads/g2reverb-"
version ".tar.bz2"))
(sha256
(base32
"18wb8vj1kky5glr76s34awbi8qzplsmf3wjbd7a12hfv4j0bkwrj"))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f ; no "check" target
#:phases
(modify-phases %standard-phases
;; no configure script
(delete 'configure)
(add-before 'install 'prepare-target-directory
(lambda* (#:key outputs #:allow-other-keys)
(mkdir-p (string-append (assoc-ref outputs "out") "/lib/ladspa"))
#t))
(add-after 'unpack 'override-target-directory
(lambda* (#:key outputs #:allow-other-keys)
(substitute* "Makefile"
(("/usr") (assoc-ref outputs "out")))
#t)))))
(home-page "http://kokkinizita.linuxaudio.org")
(synopsis "LADSPA stereo reverb plugin")
(description
"This package provides a LADSPA plugin for a stereo reverb effect.")
(license license:gpl2+)))
(define-public fluidsynth
(package
(name "fluidsynth")
@@ -766,8 +460,8 @@ also play midifiles using a Soundfont.")
(version "2.7")
(source (origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/faac/faad2-src/faad2-"
version "/faad2-" version ".zip"))
(uri (string-append
"mirror://sourceforge/faac/faad2-" version ".zip"))
(sha256
(base32
"16f3l16c00sg0wkrkm3vzv0gy3g97x309vw788igs0cap2x1ak3z"))))
@@ -864,15 +558,15 @@ patches that can be used with softsynths such as Timidity and WildMidi.")
(define-public guitarix
(package
(name "guitarix")
(version "0.35.0")
(version "0.33.0")
(source (origin
(method url-fetch)
(uri (string-append
"mirror://sourceforge/guitarix/guitarix/guitarix2-"
version ".tar.xz"))
"mirror://sourceforge/guitarix/guitarix2-"
version ".tar.bz2"))
(sha256
(base32
"10hijqrrl8xil46kgsac10ysfxysisxlibm2rz133zyig5n63jdw"))))
"1w6dg2n0alfjsx1iy6s53783invygwxk11p1i65cc3nq3zlidcgx"))))
(build-system waf-build-system)
(arguments
`(#:tests? #f ; no "check" target
@@ -880,8 +574,7 @@ patches that can be used with softsynths such as Timidity and WildMidi.")
#:configure-flags
(list
;; Add the output lib directory to the RUNPATH.
(string-append "--ldflags=-Wl,-rpath=" %output "/lib")
"--cxxflags=-std=c++11")))
(string-append "--ldflags=-Wl,-rpath=" %output "/lib"))))
(inputs
`(("libsndfile" ,libsndfile)
("boost" ,boost)
@@ -893,7 +586,6 @@ patches that can be used with softsynths such as Timidity and WildMidi.")
("jack" ,jack-1)
("gtkmm" ,gtkmm-2)
("gtk+" ,gtk+-2)
("webkitgtk/gtk+-2" ,webkitgtk/gtk+-2)
("fftwf" ,fftwf)
("lrdf" ,lrdf)
("zita-resampler" ,zita-resampler)
@@ -919,56 +611,6 @@ from a simple noise gate to modulation effects like flanger, phaser or
auto-wah.")
(license license:gpl2+)))
(define-public rakarrack
(package
(name "rakarrack")
(version "0.6.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/rakarrack/rakarrack/"
"rakarrack-" version "/rakarrack-"
version ".tar.bz2"))
(sha256
(base32
"1rpf63pdn54c4yg13k7cb1w1c7zsvl97c4qxcpz41c8l91xd55kn"))
(modules '((guix build utils)))
(snippet
'(begin
(substitute* '("src/process.C"
"src/global.h")
(("#include <Fl/") "#include <FL/"))
#t))))
(build-system gnu-build-system)
(inputs
`(("alsa-utils" ,alsa-utils)
("fltk" ,fltk)
("libx11" ,libx11)
("libxext" ,libxext)
("libxfixes" ,libxfixes)
("libxft" ,libxft)
("libxrender" ,libxrender)
("libxpm" ,libxpm)
("fontconfig" ,fontconfig)
("freetype" ,freetype)
("jack" ,jack-1)
("alsa-lib" ,alsa-lib)
("libsndfile" ,libsndfile)
("libsamplerate" ,libsamplerate)
("zlib" ,zlib)))
(home-page "http://rakarrack.sourceforge.net/")
(synopsis "Audio effects processor")
(description
"Rakarrack is a richly featured multi-effects processor emulating a
guitar effects pedalboard. Effects include compressor, expander, noise gate,
equalizers, exciter, flangers, chorus, various delay and reverb effects,
distortion modules and many more. Most of the effects engine is built from
modules found in the excellent software synthesizer ZynAddSubFX. Presets and
user interface are optimized for guitar, but Rakarrack processes signals in
stereo while it does not apply internal band-limiting filtering, and thus is
well suited to all musical instruments and vocals.")
;; The code is explicitly licensed under the GPL version 2 only.
(license license:gpl2)))
(define-public ir
(package
(name "ir")
@@ -1065,8 +707,7 @@ synchronous execution of all clients, and low latency operation.")
"03b0iiyk3ng3vh5s8gaqwn565vik7910p56mlbk512bw3dhbdwc8"))))
(build-system waf-build-system)
(arguments
`(#:python ,python-2
#:tests? #f ; no check target
`(#:tests? #f ; no check target
#:configure-flags '("--dbus"
"--alsa")
#:phases
@@ -1079,22 +720,13 @@ synchronous execution of all clients, and low latency operation.")
((".*CFLAGS.*-Wall.*" m)
(string-append m
" conf.env.append_unique('LINKFLAGS',"
"'-Wl,-rpath=" %output "/lib')\n")))))
(add-after 'install 'wrap-python-scripts
(lambda* (#:key inputs outputs #:allow-other-keys)
;; Make sure 'jack_control' runs with the correct PYTHONPATH.
(let* ((out (assoc-ref outputs "out"))
(path (getenv "PYTHONPATH")))
(wrap-program (string-append out "/bin/jack_control")
`("PYTHONPATH" ":" prefix (,path))))
#t)))))
"'-Wl,-rpath=" %output "/lib')\n"))))))))
(inputs
`(("alsa-lib" ,alsa-lib)
("dbus" ,dbus)
("expat" ,expat)
("libsamplerate" ,libsamplerate)
("opus" ,opus)
("python2-dbus" ,python2-dbus)
("readline" ,readline)))
(native-inputs
`(("pkg-config" ,pkg-config)))
@@ -1113,22 +745,14 @@ synchronous execution of all clients, and low latency operation.")
(base32
"1f1hcq74n3ziw8bk97mn5a1vgw028dxikv3fchaxd430pbbhqgl9"))))
(build-system waf-build-system)
(arguments
`(#:tests? #f ; no check target
#:phases
(modify-phases %standard-phases
(add-before
'configure 'set-flags
(lambda _
;; Compile with C++11, required by gtkmm.
(setenv "CXXFLAGS" "-std=c++11")
#t)))))
(arguments `(#:tests? #f)) ; no check target
(inputs
`(("lv2" ,lv2)
("lilv" ,lilv)
("suil" ,suil)
("gtk" ,gtk+-2)
("gtkmm" ,gtkmm-2)
("qt" ,qt-4)
("jack" ,jack-1)))
(native-inputs
`(("pkg-config" ,pkg-config)))
@@ -1144,20 +768,15 @@ plugin function as a JACK application.")
(package
(name "ladspa")
(version "1.13")
(source
(origin
(method url-fetch)
;; Since the official link is dead,
;; we download the tarball from Debian or Internet Archive.
(uri (list (string-append "http://http.debian.net"
"/debian/pool/main/l/ladspa-sdk/ladspa-sdk_"
version ".orig.tar.gz")
(string-append "https://web.archive.org/web/20140717172251/"
"http://www.ladspa.org/download/ladspa_sdk_"
version ".tgz")))
(sha256
(base32
"0srh5n2l63354bc0srcrv58rzjkn4gv8qjqzg8dnq3rs4m7kzvdm"))))
(source (origin
(method url-fetch)
(uri (string-append
"http://www.ladspa.org/download/ladspa_sdk_"
version
".tgz"))
(sha256
(base32
"0srh5n2l63354bc0srcrv58rzjkn4gv8qjqzg8dnq3rs4m7kzvdm"))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f ; the "test" target is a listening test only
@@ -1175,9 +794,7 @@ plugin function as a JACK application.")
(("^CC.*") "CC = gcc\n")
(("^CPP.*") "CPP = g++\n"))))
(alist-delete 'build %standard-phases))))
;; Since the home page is gone, we provide a link to the archived version.
(home-page
"https://web.archive.org/web/20140729190945/http://www.ladspa.org/")
(home-page "http://ladspa.org")
(synopsis "Linux Audio Developer's Simple Plugin API (LADSPA)")
(description
"LADSPA is a standard that allows software audio processors and effects
@@ -1230,8 +847,8 @@ connections between them.")
(version "3.1.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/bs2b/libbs2b/" version
"/libbs2b-" version ".tar.lzma"))
(uri (string-append
"mirror://sourceforge/bs2b/libbs2b-" version ".tar.lzma"))
(sha256
(base32
"1mcc4gjkmphczjybnsrip3gq1f974knzys7x49bv197xk3fn8wdr"))))
@@ -1253,8 +870,10 @@ essential distortions.")
(version "0.28")
(source (origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/liblo/liblo/" version
"/liblo-" version ".tar.gz"))
(uri (string-append
"mirror://sourceforge/liblo/liblo-"
version
".tar.gz"))
(sha256
(base32
"02drgnpirvl2ihvzgsmn02agr5sj3vipzzw9vma56qlkgfvak56s"))))
@@ -1270,34 +889,6 @@ essential distortions.")
implementation of the Open Sound Control (OSC) protocol.")
(license license:lgpl2.1+)))
(define-public python-pyliblo
(package
(name "python-pyliblo")
(version "0.10.0")
(source (origin
(method url-fetch)
(uri (string-append "http://das.nasophon.de/download/pyliblo-"
version ".tar.gz"))
(sha256
(base32
"13vry6xhxm7adnbyj28w1kpwrh0kf7nw83cz1yq74wl21faz2rzw"))))
(build-system python-build-system)
(arguments `(#:tests? #f)) ;no tests
(inputs
`(("python-cython" ,python-cython)
("liblo" ,liblo)))
(home-page "http://das.nasophon.de/pyliblo/")
(synopsis "Python bindings for liblo")
(description
"Pyliblo is a Python wrapper for the liblo Open Sound Control (OSC)
library. It supports almost the complete functionality of liblo, allowing you
to send and receive OSC messages using a nice and simple Python API. Also
included are the command line utilities @code{send_osc} and @code{dump_osc}.")
(license license:lgpl2.1+)))
(define-public python2-pyliblo
(package-with-python2 python-pyliblo))
(define-public lilv
(package
(name "lilv")
@@ -1434,16 +1025,7 @@ software.")
#:configure-flags
(list (string-append "--boost-includes="
(assoc-ref %build-inputs "boost")
"/include"))
#:phases (modify-phases %standard-phases
(add-before
'configure 'set-flags
(lambda* (#:key inputs #:allow-other-keys)
;; See e.g. https://github.com/lvtk/lvtk/issues/21
(setenv "LDFLAGS"
(string-append
"-L" (assoc-ref inputs "boost") "/lib "
"-lboost_system")))))))
"/include"))))
(inputs
`(("boost" ,boost)
("lv2" ,lv2)))
@@ -1707,9 +1289,9 @@ Suil currently supports every combination of Gtk 2, Qt 4, and X11.")
(version "2.14.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/timidity/TiMidity++"
"/TiMidity++-" version
"/TiMidity++-" version ".tar.bz2"))
(uri (string-append
"mirror://sourceforge/timidity/TiMidity++-"
version ".tar.bz2"))
(sha256
(base32
"0xk41w4qbk23z1fvqdyfblbz10mmxsllw0svxzjw5sa9y11vczzr"))))
@@ -1869,7 +1451,7 @@ encode and decode wavpack files.")
(source (origin
(method url-fetch)
(uri (string-append
"mirror://sourceforge/modplug-xmms/"
"mirror://sourceforge/project/modplug-xmms/"
name "/" version "/" name "-" version ".tar.gz"))
(sha256
(base32
@@ -1887,14 +1469,14 @@ surround and reverb.")
(define-public libxmp
(package
(name "libxmp")
(version "4.3.10")
(version "4.3.8")
(source (origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/xmp/libxmp/" version "/"
(uri (string-append "mirror://sourceforge/xmp/libxmp/"
name "-" version ".tar.gz"))
(sha256
(base32
"1gm5xa0ca7ypcbj3bkmj3k1vvzl7nkch8gjyrm8p1a9vgzr0n761"))))
"0h06091hlpgc6ds4pjmfq8sx4snw7av3nhny180q4pwfyasjb6ny"))))
(build-system gnu-build-system)
(home-page "http://xmp.sourceforge.net/")
(synopsis "Module player library")
@@ -1910,7 +1492,7 @@ Scream Tracker 3 (S3M), Fast Tracker II (XM), and Impulse Tracker (IT).")
(version "4.0.10")
(source (origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/xmp/xmp/" version "/"
(uri (string-append "mirror://sourceforge/xmp/xmp/"
name "-" version ".tar.gz"))
(sha256
(base32
@@ -1970,8 +1552,8 @@ control functionality, or just for playing around with the sound effects.")
(version "14.4.2")
(source (origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/sox/sox/" version "/"
name "-" version ".tar.bz2"))
(uri (string-append "mirror://sourceforge/sox/sox-"
version ".tar.bz2"))
(sha256
(base32
"170lx90r1nlnb2j6lg00524iwvqy72p48vii4xc5prrh8dnrb9l1"))))
@@ -2033,8 +1615,8 @@ conversion. It may be used, for example, to resample PCM-encoded audio.")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/twolame/twolame/" version
"/twolame-" version ".tar.gz"))
(uri (string-append
"mirror://sourceforge/twolame/twolame-" version ".tar.gz"))
(sha256
(base32 "0ahiqqng5pidwhj1wzph4vxxgxxgcfa3gl0gywipzx2ii7s35wwq"))))
(build-system gnu-build-system)
@@ -2064,7 +1646,7 @@ portions of LAME.")
".tgz"))
(sha256
(base32 "0mwddk4qzybaf85wqfhxqlf0c5im9il8z03rd4n127k8y2jj9q4g"))
(patches (search-patches "portaudio-audacity-compat.patch"))))
(patches (list (search-patch "portaudio-audacity-compat.patch")))))
(build-system gnu-build-system)
(inputs
;; TODO: Add ASIHPI.
@@ -2096,14 +1678,14 @@ interface.")
(define-public qsynth
(package
(name "qsynth")
(version "0.4.1")
(version "0.4.0")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/qsynth/qsynth/" version
"/qsynth-" version ".tar.gz"))
(uri (string-append
"mirror://sourceforge/qsynth/qsynth-" version ".tar.gz"))
(sha256
(base32 "034p6mbwrjnxd9b6h20cidxi4ilkk3cgpjp154j0jzjs1ipf7x2h"))))
(base32 "1chc89v9hcjw3k4rvzakl8g56wv24kh48fzv1gfs4iv8vhyl3j4x"))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f)) ; no "check" phase
@@ -2201,11 +1783,6 @@ result.")
"http://kokkinizita.linuxaudio.org"
"/linuxaudio/downloads/zita-convolver-"
version ".tar.bz2"))
(snippet
;; Don't optimize for a specific processor architecture.
'(substitute* "libs/Makefile"
(("^CXXFLAGS \\+= -march=native") "")))
(modules '((guix build utils)))
(sha256
(base32
"14qrnczhp5mbwhky64il7kxc4hl1mmh495v60va7i2qnhasr6zmz"))))
@@ -2248,11 +1825,6 @@ engine.")
"http://kokkinizita.linuxaudio.org"
"/linuxaudio/downloads/zita-resampler-"
version ".tar.bz2"))
(snippet
;; Don't optimize for a specific processor architecture.
'(substitute* '("apps/Makefile" "libs/Makefile")
(("^CXXFLAGS \\+= -march=native") "")))
(modules '((guix build utils)))
(sha256
(base32
"0r9ary5sc3y8vba5pad581ha7mgsrlyai83w7w4x2fmhfy64q0wq"))))
@@ -2332,92 +1904,3 @@ access to ALSA PCM devices, taking care of the many functions required to
open, initialise and use a hw: device in mmap mode, and providing floating
point audio data.")
(license license:gpl3+)))
(define-public cuetools
(package
(name "cuetools")
(version "1.4.1")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/svend/cuetools/archive/"
version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"01xi3rvdmil9nawsha04iagjylqr1l9v9vlzk99scs8c207l58i4"))))
(build-system gnu-build-system)
;; The source tarball is not bootstrapped.
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'bootstrap
(lambda _ (zero? (system* "autoreconf" "-vfi")))))))
;; Bootstrapping tools
(native-inputs
`(("autoconf" ,autoconf)
("automake" ,automake)
("flex" ,flex)
("bison" ,bison)))
(synopsis "Cue and toc file parsers and utilities")
(description "Cuetools is a set of programs that are useful for manipulating
and using CUE sheet (cue) files and Table of Contents (toc) files. CUE and TOC
files are a way to represent the layout of a data or audio CD in a
machine-readable ASCII format.")
(home-page "https://github.com/svend/cuetools")
(license license:gpl2+)))
(define-public shntool
(package
(name "shntool")
(version "3.0.10")
(source (origin
(method url-fetch)
(uri (string-append "http://etree.org/shnutils/shntool/dist/src/"
"shntool-" version ".tar.gz"))
(sha256
(base32
"00i1rbjaaws3drkhiczaign3lnbhr161b7rbnjr8z83w8yn2wc3l"))))
(build-system gnu-build-system)
(synopsis "WAVE audio data processing tool")
(description "shntool is a multi-purpose WAVE data processing and reporting
utility. File formats are abstracted from its core, so it can process any file
that contains WAVE data, compressed or not---provided there exists a format
module to handle that particular file type.")
(home-page "http://etree.org/shnutils/shntool/")
;; 'install-sh' bears the x11 license
(license (list license:gpl2+ license:x11))))
(define-public dcadec
(package
(name "dcadec")
(version "0.2.0")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/foo86/dcadec/archive/v"
version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0i0dpypgqkhhi4v1fmsp2way6w9kbcix3c7q79pmg39yvrzj17gd"))))
(build-system gnu-build-system)
(arguments
;; Test files are missing: https://github.com/foo86/dcadec/issues/53
'(#:tests? #f
#:make-flags
(list "CC=gcc"
;; Build shared library.
"CONFIG_SHARED=1"
(string-append "PREFIX=" (assoc-ref %outputs "out"))
;; Set proper runpath.
(string-append "LDFLAGS=-Wl,-rpath="
(assoc-ref %outputs "out")
"/lib"))
#:phases
(modify-phases %standard-phases
;; No configure script, just a hand-written Makefile.
(delete 'configure))))
(synopsis "DTS Coherent Acoustics decoder")
(description "Dcadec is a DTS Coherent Acoustics surround sound decoder
with support for HD extensions.")
(home-page "https://github.com/foo86/dcadec")
(license license:lgpl2.1+)))
-59
View File
@@ -1,59 +0,0 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; 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 (gnu packages augeas)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix utils)
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
#:use-module (gnu packages readline)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages xml))
(define-public augeas
(package
(name "augeas")
(version "1.4.0")
(source (origin
(method url-fetch)
(uri (string-append "http://download.augeas.net/augeas-"
version ".tar.gz"))
(sha256
(base32
"0c2vncn0afmgwggnqa5s5z7m3zbcc66bi8v9m1h9w0i9q9xax7v5"))))
(build-system gnu-build-system)
;; Marked as "required" in augeas.pc
(propagated-inputs
`(("libxml2" ,libxml2)))
(inputs
`(("readline" ,readline)))
(native-inputs
`(("pkg-config" ,pkg-config)))
(home-page "http://augeas.net/")
(synopsis "Edit configuration files programmatically")
(description
"Augeas is a library and command line tool for programmatically editing
configuration files in a controlled manner. Augeas exposes a tree of all
configuration settings and a simple local API for manipulating the tree.
Augeas then modifies underlying configuration files according to the changes
that have been made to the tree; it does as little modeling of configurations
as possible, and focuses exclusivley on transforming the tree-oriented syntax
of its public API to the myriad syntaxes of individual configuration files.")
(license license:lgpl2.1+)))

Some files were not shown because too many files have changed in this diff Show More