forked from tribes/guix
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c18c53117f |
+1
-6
@@ -24,7 +24,6 @@
|
||||
(eval . (put 'guard 'scheme-indent-function 1))
|
||||
(eval . (put 'lambda* 'scheme-indent-function 1))
|
||||
(eval . (put 'substitute* 'scheme-indent-function 1))
|
||||
(eval . (put 'match-record 'scheme-indent-function 2))
|
||||
|
||||
;; 'modify-phases' and its keywords.
|
||||
(eval . (put 'modify-phases 'scheme-indent-function 1))
|
||||
@@ -73,16 +72,12 @@
|
||||
(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 'with-extensions 'scheme-indent-function 1))
|
||||
|
||||
(eval . (put 'with-database 'scheme-indent-function 2))
|
||||
|
||||
(eval . (put 'call-with-container 'scheme-indent-function 1))
|
||||
(eval . (put 'container-excursion 'scheme-indent-function 1))
|
||||
(eval . (put 'eventually 'scheme-indent-function 1))
|
||||
|
||||
(eval . (put 'call-with-progress-reporter 'scheme-indent-function 1))
|
||||
|
||||
;; Recognize '~', '+', and '$', as used for gexps, as quotation symbols.
|
||||
;; This notably allows '(' in Paredit to not insert a space when the
|
||||
;; preceding symbol is one of these.
|
||||
(eval . (modify-syntax-entry ?~ "'"))
|
||||
|
||||
+1
-19
@@ -28,21 +28,6 @@
|
||||
/configure
|
||||
/doc/*.1
|
||||
/doc/.dirstamp
|
||||
/doc/guix.*.aux
|
||||
/doc/guix.*.cp
|
||||
/doc/guix.*.cps
|
||||
/doc/guix.*.fn
|
||||
/doc/guix.*.fns
|
||||
/doc/guix.*.html
|
||||
/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/guix.aux
|
||||
/doc/guix.cp
|
||||
/doc/guix.cps
|
||||
@@ -62,13 +47,12 @@
|
||||
/doc/os-config-desktop.texi
|
||||
/doc/stamp-vti
|
||||
/doc/version.texi
|
||||
/doc/version-*.texi
|
||||
/etc/guix-daemon.cil
|
||||
/etc/guix-daemon.conf
|
||||
/etc/guix-daemon.service
|
||||
/etc/guix-publish.conf
|
||||
/etc/guix-publish.service
|
||||
/guix-daemon
|
||||
/guix-register
|
||||
/guix/config.scm
|
||||
/libformat.a
|
||||
/libstore.a
|
||||
@@ -94,7 +78,6 @@
|
||||
/nix/scripts/list-runtime-roots
|
||||
/nix/scripts/offload
|
||||
/nix/scripts/substitute
|
||||
/po/doc/*.mo
|
||||
/po/guix/*.gmo
|
||||
/po/guix/*.insert-header
|
||||
/po/guix/*.mo
|
||||
@@ -146,4 +129,3 @@ tmp
|
||||
/nix/scripts/download
|
||||
/etc/indent-code.el
|
||||
/.version
|
||||
/doc/stamp-[0-9]
|
||||
|
||||
@@ -33,7 +33,7 @@ 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> <kkebreau@posteo.net>
|
||||
Kei Kebreau <kei@openmailbox.org>
|
||||
Leo Famulari <leo@famulari.name> <lfamular@gmail.com>
|
||||
Ludovic Courtès <ludo@gnu.org> <ludovic.courtes@inria.fr>
|
||||
Marek Benc <dusxmt@gmx.com> <merkur32@gmail.com>
|
||||
@@ -42,19 +42,15 @@ Mathieu Lirzin <mthl@gnu.org> <mthl@openmailbox.org>
|
||||
Mathieu Lirzin <mthl@gnu.org> <mathieu.lirzin@openmailbox.org>
|
||||
Mathieu Othacehe <m.othacehe@gmail.com>
|
||||
Nikita Karetnikov <nikita@karetnikov.org> <nikita.karetnikov@gmail.com>
|
||||
Nils Gillmann <ng0@n0.is> ng0 <ng0@n0.is>
|
||||
Nils Gillmann <ng0@n0.is> ng0 <ng0@crash.cx>
|
||||
Nils Gillmann <ng0@n0.is> ng0 <ng0@crash.cx>
|
||||
Nils Gillmann <ng0@n0.is> <ng0@infotropique.org>
|
||||
Nils Gillmann <ng0@n0.is> <ng0@no-reply.infotropique.org>
|
||||
Nils Gillmann <ng0@n0.is> <ng0@no-reply.pragmatique.xyz>
|
||||
Nils Gillmann <ng0@n0.is> <ng0@pragmatique.xyz>
|
||||
Nils Gillmann <ng0@n0.is> <contact.ng0@cryptolab.net>
|
||||
Nils Gillmann <ng0@n0.is> <ng0@we.make.ritual.n0.is>
|
||||
Nils Gillmann <ng0@n0.is> <ngillmann@runbox.com>
|
||||
Nils Gillmann <ng0@n0.is> <niasterisk@grrlz.net>
|
||||
Nils Gillmann <ng0@n0.is> <ng@niasterisk.space>
|
||||
Nils Gillmann <ng0@n0.is> <ng0@libertad.pw>
|
||||
ng0 <ng0@no-reply.infotropique.org>
|
||||
ng0 <ng0@no-reply.infotropique.org> <ng0@no-reply.pragmatique.xyz>
|
||||
ng0 <ng0@no-reply.infotropique.org> <ng0@pragmatique.xyz>
|
||||
ng0 <ng0@no-reply.infotropique.org> <contact.ng0@cryptolab.net>
|
||||
ng0 <ng0@no-reply.infotropique.org> <ng0@we.make.ritual.n0.is>
|
||||
ng0 <ng0@no-reply.infotropique.org> <ngillmann@runbox.com>
|
||||
ng0 <ng0@no-reply.infotropique.org> <niasterisk@grrlz.net>
|
||||
ng0 <ng0@no-reply.infotropique.org> <ng@niasterisk.space>
|
||||
ng0 <ng0@no-reply.infotropique.org> <ng0@libertad.pw>
|
||||
Pjotr Prins <pjotr.guix@thebird.nl> <pjotr.public01@thebird.nl>
|
||||
Pjotr Prins <pjotr.guix@thebird.nl> <pjotr.public12@thebird.nl>
|
||||
Pjotr Prins <pjotr.guix@thebird.nl> <pjotr.public12@email>
|
||||
@@ -68,7 +64,6 @@ Sou Bunnbu (宋文武) <iyzsong@gmail.com>
|
||||
Sou Bunnbu (宋文武) <iyzsong@gmail.com> <iyzsong@member.fsf.org>
|
||||
Stefan Reichör <stefan@xsteve.at>
|
||||
Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
|
||||
Theodoros Foradis <theodoros.for@openmailbox.org> <theodoros@foradis.org>
|
||||
Thomas Danckaert <thomas.danckaert@gmail.com> <post@thomasdanckaert.be>
|
||||
Tobias Geerinckx-Rice <me@tobias.gr> <tobias.geerinckx.rice@gmail.com>
|
||||
Tomáš Čech <sleep_walker@gnu.org> <sleep_walker@suse.cz>
|
||||
|
||||
+37
-64
@@ -1,78 +1,51 @@
|
||||
Contributor Covenant Code of Conduct
|
||||
Contributor Code of Conduct
|
||||
|
||||
Note: In the sequel, "project" refers to GNU Guix, and "project
|
||||
maintainer(s)" refers to maintainer(s) of GNU Guix.
|
||||
|
||||
Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as
|
||||
contributors and maintainers pledge to making participation in our project and
|
||||
our community a harassment-free experience for everyone, regardless of age, body
|
||||
size, disability, ethnicity, gender identity and expression, level of experience,
|
||||
education, socio-economic status, nationality, personal appearance, race,
|
||||
religion, or sexual identity and orientation.
|
||||
|
||||
Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
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 and unwelcome sexual attention or
|
||||
advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* The use of sexualized language or imagery
|
||||
* Personal attacks
|
||||
* Trolling or insulting/derogatory comments
|
||||
* Public or private harassment
|
||||
* Publishing others’ private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
* 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.
|
||||
|
||||
Our Responsibilities
|
||||
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.
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable
|
||||
behavior and are expected to take appropriate and fair corrective action in
|
||||
response to any instances of unacceptable behavior.
|
||||
This Code of Conduct applies both within project spaces and in public
|
||||
spaces when an individual is representing the project or its community.
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community. Examples of
|
||||
representing a project or community include using an official project e-mail
|
||||
address, posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event. Representation of a project may be
|
||||
further defined and clarified by project maintainers.
|
||||
|
||||
Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting the project team 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. The project team is
|
||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||
faith may face temporary or permanent repercussions as determined by other
|
||||
members of the project’s leadership.
|
||||
|
||||
Attribution
|
||||
|
||||
This Code of Conduct is adapted from the Contributor Covenant, version 1.4,
|
||||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||
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/
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
Copyright © 2012, 2013, 2014, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
|
||||
Copyright © 2015, 2017 Mathieu Lirzin <mthl@gnu.org>
|
||||
Copyright © 2017 Leo Famulari <leo@famulari.name>
|
||||
Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
|
||||
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
@@ -62,12 +61,3 @@ after two weeks, and if you’re confident, it’s OK to commit.
|
||||
|
||||
That last part is subject to being adjusted, allowing individuals to commit
|
||||
directly on non-controversial changes on parts they’re familiar with.
|
||||
|
||||
* Using emacs-debbugs
|
||||
|
||||
Bug reports and patches are tracked using debbugs. If you are on emacs, you
|
||||
can use emacs-debbugs.
|
||||
|
||||
List all open bug reports on guix-patches with
|
||||
|
||||
C-u M-x debbugs-gnu <RET> <RET> guix-patches <RET> n y
|
||||
|
||||
+40
-128
@@ -1,17 +1,12 @@
|
||||
# GNU Guix --- Functional package management for GNU
|
||||
# Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
|
||||
# Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
|
||||
# Copyright © 2013 Andreas Enge <andreas@enge.fr>
|
||||
# Copyright © 2015, 2017 Alex Kost <alezost@gmail.com>
|
||||
# Copyright © 2016, 2018 Mathieu Lirzin <mthl@gnu.org>
|
||||
# Copyright © 2016, 2017, 2018 Mark H Weaver <mhw@netris.org>
|
||||
# Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
|
||||
# Copyright © 2016, 2017 Mark H Weaver <mhw@netris.org>
|
||||
# Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
|
||||
# Copyright © 2017 Leo Famulari <leo@famulari.name>
|
||||
# Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
|
||||
# Copyright © 2017 Jan Nieuwenhuizen <janneke@gnu.org>
|
||||
# Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
|
||||
# Copyright © 2018 Nils Gillmann <ng0@n0.is>
|
||||
# Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
|
||||
# Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
|
||||
#
|
||||
# This file is part of GNU Guix.
|
||||
#
|
||||
@@ -28,22 +23,8 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
MSGMERGE_UPDATE = @MSGMERGE@ --update
|
||||
|
||||
bin_SCRIPTS = scripts/guix
|
||||
|
||||
# Handle substitution of fully-expanded Autoconf variables.
|
||||
do_subst = $(SED) \
|
||||
-e 's,[@]GUILE[@],$(GUILE),g' \
|
||||
-e 's,[@]guilemoduledir[@],$(guilemoduledir),g' \
|
||||
-e 's,[@]guileobjectdir[@],$(guileobjectdir),g' \
|
||||
-e 's,[@]localedir[@],$(localedir),g'
|
||||
|
||||
scripts/guix: scripts/guix.in Makefile
|
||||
$(AM_V_at)rm -f $@ $@-t
|
||||
$(AM_V_at)$(MKDIR_P) "$(@D)"
|
||||
$(AM_V_GEN)$(do_subst) < "$(srcdir)/$@.in" > "$@-t"
|
||||
$(AM_V_at)chmod a+x,a-w "$@-t" && mv -f "$@-t" "$@"
|
||||
bin_SCRIPTS = \
|
||||
scripts/guix
|
||||
|
||||
nodist_noinst_SCRIPTS = \
|
||||
pre-inst-env \
|
||||
@@ -51,11 +32,9 @@ nodist_noinst_SCRIPTS = \
|
||||
|
||||
# Modules that are not compiled but are installed nonetheless, such as
|
||||
# build-side modules with unusual dependencies.
|
||||
MODULES_NOT_COMPILED = \
|
||||
guix/man-db.scm
|
||||
MODULES_NOT_COMPILED =
|
||||
|
||||
include gnu/local.mk
|
||||
include po/doc/local.mk
|
||||
|
||||
MODULES = \
|
||||
guix/base16.scm \
|
||||
@@ -67,7 +46,6 @@ MODULES = \
|
||||
guix/hash.scm \
|
||||
guix/pk-crypto.scm \
|
||||
guix/pki.scm \
|
||||
guix/progress.scm \
|
||||
guix/combinators.scm \
|
||||
guix/memoization.scm \
|
||||
guix/utils.scm \
|
||||
@@ -86,27 +64,20 @@ MODULES = \
|
||||
guix/derivations.scm \
|
||||
guix/grafts.scm \
|
||||
guix/gnu-maintenance.scm \
|
||||
guix/self.scm \
|
||||
guix/upstream.scm \
|
||||
guix/licenses.scm \
|
||||
guix/glob.scm \
|
||||
guix/git.scm \
|
||||
guix/graph.scm \
|
||||
guix/cache.scm \
|
||||
guix/cve.scm \
|
||||
guix/workers.scm \
|
||||
guix/zlib.scm \
|
||||
guix/build-system.scm \
|
||||
guix/build-system/android-ndk.scm \
|
||||
guix/build-system/ant.scm \
|
||||
guix/build-system/cargo.scm \
|
||||
guix/build-system/cmake.scm \
|
||||
guix/build-system/dub.scm \
|
||||
guix/build-system/emacs.scm \
|
||||
guix/build-system/font.scm \
|
||||
guix/build-system/go.scm \
|
||||
guix/build-system/meson.scm \
|
||||
guix/build-system/minify.scm \
|
||||
guix/build-system/asdf.scm \
|
||||
guix/build-system/glib-or-gtk.scm \
|
||||
guix/build-system/gnu.scm \
|
||||
@@ -117,31 +88,23 @@ MODULES = \
|
||||
guix/build-system/waf.scm \
|
||||
guix/build-system/r.scm \
|
||||
guix/build-system/ruby.scm \
|
||||
guix/build-system/scons.scm \
|
||||
guix/build-system/texlive.scm \
|
||||
guix/build-system/trivial.scm \
|
||||
guix/ftp-client.scm \
|
||||
guix/http-client.scm \
|
||||
guix/gnupg.scm \
|
||||
guix/elf.scm \
|
||||
guix/profiling.scm \
|
||||
guix/store.scm \
|
||||
guix/cvs-download.scm \
|
||||
guix/svn-download.scm \
|
||||
guix/i18n.scm \
|
||||
guix/ui.scm \
|
||||
guix/build/android-ndk-build-system.scm \
|
||||
guix/build/ant-build-system.scm \
|
||||
guix/build/download.scm \
|
||||
guix/build/download-nar.scm \
|
||||
guix/build/cargo-build-system.scm \
|
||||
guix/build/cmake-build-system.scm \
|
||||
guix/build/dub-build-system.scm \
|
||||
guix/build/emacs-build-system.scm \
|
||||
guix/build/meson-build-system.scm \
|
||||
guix/build/minify-build-system.scm \
|
||||
guix/build/font-build-system.scm \
|
||||
guix/build/go-build-system.scm \
|
||||
guix/build/asdf-build-system.scm \
|
||||
guix/build/git.scm \
|
||||
guix/build/hg.scm \
|
||||
@@ -153,7 +116,6 @@ MODULES = \
|
||||
guix/build/ocaml-build-system.scm \
|
||||
guix/build/r-build-system.scm \
|
||||
guix/build/ruby-build-system.scm \
|
||||
guix/build/scons-build-system.scm \
|
||||
guix/build/texlive-build-system.scm \
|
||||
guix/build/waf-build-system.scm \
|
||||
guix/build/haskell-build-system.scm \
|
||||
@@ -161,7 +123,6 @@ MODULES = \
|
||||
guix/build/utils.scm \
|
||||
guix/build/union.scm \
|
||||
guix/build/profiles.scm \
|
||||
guix/build/compile.scm \
|
||||
guix/build/pull.scm \
|
||||
guix/build/rpath.scm \
|
||||
guix/build/cvs.scm \
|
||||
@@ -177,7 +138,6 @@ MODULES = \
|
||||
guix/build/make-bootstrap.scm \
|
||||
guix/search-paths.scm \
|
||||
guix/packages.scm \
|
||||
guix/import/print.scm \
|
||||
guix/import/utils.scm \
|
||||
guix/import/gnu.scm \
|
||||
guix/import/snix.scm \
|
||||
@@ -201,7 +161,6 @@ MODULES = \
|
||||
guix/scripts/authenticate.scm \
|
||||
guix/scripts/refresh.scm \
|
||||
guix/scripts/system.scm \
|
||||
guix/scripts/system/search.scm \
|
||||
guix/scripts/lint.scm \
|
||||
guix/scripts/challenge.scm \
|
||||
guix/scripts/import/cran.scm \
|
||||
@@ -223,22 +182,18 @@ MODULES = \
|
||||
if HAVE_GUILE_JSON
|
||||
|
||||
MODULES += \
|
||||
guix/ci.scm \
|
||||
guix/docker.scm \
|
||||
guix/import/cpan.scm \
|
||||
guix/import/crate.scm \
|
||||
guix/import/gem.scm \
|
||||
guix/import/github.scm \
|
||||
guix/import/gnome.scm \
|
||||
guix/import/json.scm \
|
||||
guix/import/pypi.scm \
|
||||
guix/import/stackage.scm \
|
||||
guix/scripts/import/crate.scm \
|
||||
guix/scripts/import/gem.scm \
|
||||
guix/scripts/import/json.scm \
|
||||
guix/scripts/import/pypi.scm \
|
||||
guix/scripts/import/stackage.scm \
|
||||
guix/scripts/weather.scm
|
||||
guix/scripts/import/stackage.scm
|
||||
|
||||
endif
|
||||
|
||||
@@ -251,6 +206,13 @@ MODULES += \
|
||||
|
||||
endif HAVE_GUILE_SSH
|
||||
|
||||
if HAVE_GUILE_GIT
|
||||
|
||||
MODULES += \
|
||||
guix/git.scm
|
||||
|
||||
endif HAVE_GUILE_GIT
|
||||
|
||||
if BUILD_DAEMON_OFFLOAD
|
||||
|
||||
MODULES += \
|
||||
@@ -258,38 +220,24 @@ MODULES += \
|
||||
|
||||
endif BUILD_DAEMON_OFFLOAD
|
||||
|
||||
# Scheme implementation of the build daemon and related functionality.
|
||||
STORE_MODULES = \
|
||||
guix/store/database.scm \
|
||||
guix/store/deduplication.scm
|
||||
|
||||
MODULES += $(STORE_MODULES)
|
||||
|
||||
# Internal modules with test suite support.
|
||||
dist_noinst_DATA = guix/tests.scm guix/tests/http.scm
|
||||
|
||||
# Auxiliary files for packages.
|
||||
AUX_FILES = \
|
||||
gnu/packages/aux-files/emacs/guix-emacs.el \
|
||||
gnu/packages/aux-files/linux-libre/4.17-arm.conf \
|
||||
gnu/packages/aux-files/linux-libre/4.17-arm64.conf \
|
||||
gnu/packages/aux-files/linux-libre/4.17-i686.conf \
|
||||
gnu/packages/aux-files/linux-libre/4.17-x86_64.conf \
|
||||
gnu/packages/aux-files/linux-libre/4.14-arm.conf \
|
||||
gnu/packages/aux-files/linux-libre/4.14-i686.conf \
|
||||
gnu/packages/aux-files/linux-libre/4.14-x86_64.conf \
|
||||
gnu/packages/aux-files/linux-libre/4.12-i686.conf \
|
||||
gnu/packages/aux-files/linux-libre/4.12-x86_64.conf \
|
||||
gnu/packages/aux-files/linux-libre/4.9-i686.conf \
|
||||
gnu/packages/aux-files/linux-libre/4.9-x86_64.conf \
|
||||
gnu/packages/aux-files/linux-libre/4.4-i686.conf \
|
||||
gnu/packages/aux-files/linux-libre/4.4-x86_64.conf \
|
||||
gnu/packages/aux-files/linux-libre/4.1-i686.conf \
|
||||
gnu/packages/aux-files/linux-libre/4.1-x86_64.conf \
|
||||
gnu/packages/aux-files/run-in-namespace.c
|
||||
gnu/packages/aux-files/linux-libre/4.1-x86_64.conf
|
||||
|
||||
# Templates, examples.
|
||||
EXAMPLES = \
|
||||
gnu/system/examples/bare-bones.tmpl \
|
||||
gnu/system/examples/beaglebone-black.tmpl \
|
||||
gnu/system/examples/desktop.tmpl \
|
||||
gnu/system/examples/lightweight-desktop.tmpl \
|
||||
gnu/system/examples/vm-image.tmpl
|
||||
@@ -297,7 +245,6 @@ EXAMPLES = \
|
||||
GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go $(dist_noinst_DATA:%.scm=%.go)
|
||||
|
||||
nobase_dist_guilemodule_DATA = \
|
||||
guix/store/schema.sql \
|
||||
$(MODULES) $(MODULES_NOT_COMPILED) $(AUX_FILES) $(EXAMPLES) \
|
||||
$(MISC_DISTRO_FILES)
|
||||
nobase_nodist_guilemodule_DATA = guix/config.scm
|
||||
@@ -327,14 +274,12 @@ SCM_TESTS = \
|
||||
tests/hash.scm \
|
||||
tests/pk-crypto.scm \
|
||||
tests/pki.scm \
|
||||
tests/print.scm \
|
||||
tests/sets.scm \
|
||||
tests/modules.scm \
|
||||
tests/gnu-maintenance.scm \
|
||||
tests/substitute.scm \
|
||||
tests/builders.scm \
|
||||
tests/derivations.scm \
|
||||
tests/glob.scm \
|
||||
tests/grafts.scm \
|
||||
tests/ui.scm \
|
||||
tests/records.scm \
|
||||
@@ -370,15 +315,12 @@ SCM_TESTS = \
|
||||
tests/workers.scm \
|
||||
tests/zlib.scm \
|
||||
tests/file-systems.scm \
|
||||
tests/uuid.scm \
|
||||
tests/system.scm \
|
||||
tests/services.scm \
|
||||
tests/scripts-build.scm \
|
||||
tests/containers.scm \
|
||||
tests/pack.scm \
|
||||
tests/import-utils.scm \
|
||||
tests/store-database.scm \
|
||||
tests/store-deduplication.scm
|
||||
tests/import-utils.scm
|
||||
|
||||
if HAVE_GUILE_JSON
|
||||
|
||||
@@ -395,7 +337,6 @@ SH_TESTS = \
|
||||
tests/guix-download.sh \
|
||||
tests/guix-gc.sh \
|
||||
tests/guix-hash.sh \
|
||||
tests/guix-pack.sh \
|
||||
tests/guix-package.sh \
|
||||
tests/guix-package-net.sh \
|
||||
tests/guix-system.sh \
|
||||
@@ -406,6 +347,13 @@ SH_TESTS = \
|
||||
tests/guix-graph.sh \
|
||||
tests/guix-lint.sh
|
||||
|
||||
if BUILD_DAEMON
|
||||
|
||||
SH_TESTS += tests/guix-register.sh
|
||||
|
||||
endif BUILD_DAEMON
|
||||
|
||||
|
||||
TESTS = $(SCM_TESTS) $(SH_TESTS)
|
||||
|
||||
AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)" GUILE_AUTO_COMPILE=0
|
||||
@@ -443,7 +391,7 @@ check-local:
|
||||
|
||||
endif !CAN_RUN_TESTS
|
||||
|
||||
check-system: $(GOBJECTS)
|
||||
check-system: $(GOBJECTS) $(BOOTSTRAP_GUILE_TARBALLS)
|
||||
$(AM_V_at)$(top_builddir)/pre-inst-env \
|
||||
$(GUILE) --no-auto-compile \
|
||||
-e '(@@ (run-system-tests) run-system-tests)' \
|
||||
@@ -452,41 +400,28 @@ check-system: $(GOBJECTS)
|
||||
# Public key used to sign substitutes from hydra.gnu.org & co.
|
||||
dist_pkgdata_DATA = \
|
||||
hydra.gnu.org.pub \
|
||||
berlin.guixsd.org.pub
|
||||
bayfront.guixsd.org.pub
|
||||
|
||||
# Bash completion file.
|
||||
dist_bashcompletion_DATA = etc/completion/bash/guix \
|
||||
etc/completion/bash/guix-daemon
|
||||
dist_bashcompletion_DATA = etc/completion/bash/guix
|
||||
|
||||
# Zsh completion file.
|
||||
dist_zshcompletion_DATA = etc/completion/zsh/_guix
|
||||
|
||||
# Fish completion file.
|
||||
dist_fishcompletion_DATA = etc/completion/fish/guix.fish
|
||||
|
||||
# SELinux policy
|
||||
dist_selinux_policy_DATA = etc/guix-daemon.cil
|
||||
|
||||
EXTRA_DIST += \
|
||||
EXTRA_DIST = \
|
||||
HACKING \
|
||||
ROADMAP \
|
||||
TODO \
|
||||
CODE-OF-CONDUCT \
|
||||
.dir-locals.el \
|
||||
scripts/guix.in \
|
||||
etc/guix-install.sh \
|
||||
build-aux/build-self.scm \
|
||||
build-aux/compile-all.scm \
|
||||
build-aux/hydra/evaluate.scm \
|
||||
build-aux/hydra/gnu-system.scm \
|
||||
build-aux/hydra/guix.scm \
|
||||
build-aux/hydra/guix-modular.scm \
|
||||
build-aux/cuirass/gnu-system.scm \
|
||||
build-aux/cuirass/guix-modular.scm \
|
||||
build-aux/cuirass/hydra-to-cuirass.scm \
|
||||
build-aux/check-available-binaries.scm \
|
||||
build-aux/check-final-inputs-self-contained.scm \
|
||||
build-aux/compile-as-derivation.scm \
|
||||
build-aux/download.scm \
|
||||
build-aux/generate-authors.scm \
|
||||
build-aux/test-driver.scm \
|
||||
build-aux/update-guix-package.scm \
|
||||
@@ -514,7 +449,6 @@ endif !BUILD_DAEMON_OFFLOAD
|
||||
|
||||
|
||||
CLEANFILES = \
|
||||
$(bin_SCRIPTS) \
|
||||
$(GOBJECTS) \
|
||||
$(SCM_TESTS:tests/%.scm=%.log)
|
||||
|
||||
@@ -552,13 +486,6 @@ $(guix_install_go_files): install-nobase_dist_guilemoduleDATA
|
||||
install-data-hook: set-bootstrap-executable-permissions
|
||||
touch "$(DESTDIR)$(guileobjectdir)/guix/config.go"
|
||||
|
||||
# Assuming Guix is already installed and the daemon is up and running, this
|
||||
# rule builds from $(srcdir), creating and building derivations.
|
||||
as-derivation:
|
||||
$(AM_V_at)echo "Building Guix in Guix..." ; \
|
||||
$(GUILE) --no-auto-compile \
|
||||
"$(top_srcdir)/build-aux/compile-as-derivation.scm" \
|
||||
"$(abs_top_srcdir)"
|
||||
|
||||
SUBDIRS = po/guix po/packages
|
||||
BUILT_SOURCES =
|
||||
@@ -640,7 +567,7 @@ SOURCE_TARBALLS = \
|
||||
$(foreach ext,tar.gz,$(PACKAGE_FULL_TARNAME).$(ext))
|
||||
|
||||
# Systems supported by Guix.
|
||||
SUPPORTED_SYSTEMS ?= x86_64-linux i686-linux armhf-linux aarch64-linux
|
||||
SUPPORTED_SYSTEMS ?= x86_64-linux i686-linux armhf-linux
|
||||
|
||||
# Guix binary tarballs.
|
||||
BINARY_TARBALLS = \
|
||||
@@ -653,11 +580,14 @@ GUIXSD_SUPPORTED_SYSTEMS ?= x86_64-linux i686-linux
|
||||
GUIXSD_VM_SYSTEMS ?= x86_64-linux
|
||||
|
||||
# Prefix of the GuixSD installation image file name.
|
||||
GUIXSD_IMAGE_BASE = guixsd-install-$(PACKAGE_VERSION)
|
||||
GUIXSD_IMAGE_BASE = guixsd-usb-install-$(PACKAGE_VERSION)
|
||||
|
||||
# Prefix of the GuixSD VM image file name.
|
||||
GUIXSD_VM_IMAGE_BASE = guixsd-vm-image-$(PACKAGE_VERSION)
|
||||
|
||||
# Size of the VM image (for x86_64 typically).
|
||||
GUIXSD_VM_IMAGE_SIZE ?= 2GiB
|
||||
|
||||
# The release process works in several phases:
|
||||
#
|
||||
# 0. We assume the developer created a 'vX.Y' tag.
|
||||
@@ -701,21 +631,21 @@ release: dist
|
||||
for system in $(GUIXSD_SUPPORTED_SYSTEMS) ; do \
|
||||
image=`$(top_builddir)/pre-inst-env \
|
||||
guix system disk-image \
|
||||
--file-system-type=iso9660 \
|
||||
--system=$$system \
|
||||
gnu/system/install.scm` ; \
|
||||
if [ ! -f "$$image" ] ; then \
|
||||
echo "failed to produced GuixSD installation image for $$system" >&2 ; \
|
||||
exit 1 ; \
|
||||
fi ; \
|
||||
xz < "$$image" > "$(releasedir)/$(GUIXSD_IMAGE_BASE).$$system.iso.xz.tmp" ; \
|
||||
mv "$(releasedir)/$(GUIXSD_IMAGE_BASE).$$system.iso.xz.tmp" \
|
||||
"$(releasedir)/$(GUIXSD_IMAGE_BASE).$$system.iso.xz" ; \
|
||||
xz < "$$image" > "$(releasedir)/$(GUIXSD_IMAGE_BASE).$$system.xz.tmp" ; \
|
||||
mv "$(releasedir)/$(GUIXSD_IMAGE_BASE).$$system.xz.tmp" \
|
||||
"$(releasedir)/$(GUIXSD_IMAGE_BASE).$$system.xz" ; \
|
||||
done
|
||||
for system in $(GUIXSD_VM_SYSTEMS) ; do \
|
||||
image=`$(top_builddir)/pre-inst-env \
|
||||
guix system vm-image \
|
||||
--system=$$system \
|
||||
--image-size=$(GUIXSD_VM_IMAGE_SIZE) \
|
||||
gnu/system/examples/vm-image.tmpl` ; \
|
||||
if [ ! -f "$$image" ] ; then \
|
||||
echo "failed to produced GuixSD VM image for $$system" >&2 ; \
|
||||
@@ -749,7 +679,6 @@ assert-no-store-file-names: $(distdir)/ChangeLog
|
||||
$(AM_V_at)if grep -r --exclude=*.texi --exclude=*.info \
|
||||
--exclude=*.info-[0-9] --exclude=*.dot \
|
||||
--exclude=*.eps --exclude-dir=bootstrap \
|
||||
--exclude=guix-manual.pot --exclude=guix-manual.*.po \
|
||||
--exclude=guix-prettify.el \
|
||||
--exclude=ChangeLog \
|
||||
-E "$(storedir)/[a-z0-9]{32}-" $(distdir) ; \
|
||||
@@ -776,19 +705,10 @@ hydra-jobs.scm: $(GOBJECTS)
|
||||
"$(top_srcdir)/build-aux/hydra/gnu-system.scm" > "$@.tmp"
|
||||
$(AM_V_at)mv "$@.tmp" "$@"
|
||||
|
||||
# Compute the Cuirass jobs and write them in the target file.
|
||||
cuirass-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/cuirass/gnu-system.scm" \
|
||||
cuirass > "$@.tmp"
|
||||
$(AM_V_at)mv "$@.tmp" "$@"
|
||||
|
||||
.PHONY: gen-ChangeLog gen-AUTHORS gen-tarball-version
|
||||
.PHONY: assert-no-store-file-names assert-binaries-available
|
||||
.PHONY: assert-final-inputs-self-contained
|
||||
.PHONY: clean-go make-go as-derivation
|
||||
.PHONY: clean-go make-go
|
||||
.PHONY: update-guix-package update-NEWS release
|
||||
|
||||
## -------------- ##
|
||||
@@ -806,11 +726,3 @@ AM_V_DOT_0 = @echo " DOT " $@;
|
||||
AM_V_HELP2MAN = $(AM_V_HELP2MAN_$(V))
|
||||
AM_V_HELP2MAN_ = $(AM_V_HELP2MAN_$(AM_DEFAULT_VERBOSITY))
|
||||
AM_V_HELP2MAN_0 = @echo " HELP2MAN" $@;
|
||||
|
||||
AM_V_PO4A = $(AM_V_PO4A_$(V))
|
||||
AM_V_PO4A_ = $(AM_V_PO4A_$(AM_DEFAULT_VERBOSITY))
|
||||
AM_V_PO4A_0 = @echo " PO4A" $@;
|
||||
|
||||
AM_V_POXREF = $(AM_V_POXREF_$(V))
|
||||
AM_V_POXREF_ = $(AM_V_POXREF_$(AM_DEFAULT_VERBOSITY))
|
||||
AM_V_POXREF_0 = @echo " POXREF" $@;
|
||||
|
||||
@@ -1,43 +1,42 @@
|
||||
-*- mode: org -*-
|
||||
|
||||
[[https://www.gnu.org/software/guix/][GNU Guix]] (IPA: /ɡiːks/) is a purely functional package manager, and
|
||||
associated free software distribution, for the [[https://www.gnu.org/gnu/gnu.html][GNU system]]. In addition
|
||||
[[http://www.gnu.org/software/guix/][GNU Guix]] (IPA: /ɡiːks/) is a purely functional package manager, and
|
||||
associated free software distribution, for the [[http://www.gnu.org/gnu/gnu.html][GNU system]]. In addition
|
||||
to standard package management features, Guix supports transactional
|
||||
upgrades and roll-backs, unprivileged package management, per-user
|
||||
profiles, and garbage collection.
|
||||
|
||||
It provides [[https://www.gnu.org/software/guile/][Guile]] Scheme APIs, including a high-level embedded
|
||||
It provides [[http://www.gnu.org/software/guile/][Guile]] Scheme APIs, including a high-level embedded
|
||||
domain-specific languages (EDSLs) to describe how packages are to be
|
||||
built and composed.
|
||||
|
||||
A user-land free software distribution for GNU/Linux comes as part of
|
||||
Guix.
|
||||
|
||||
Guix is based on the [[https://nixos.org/nix/][Nix]] package manager.
|
||||
Guix is based on the [[http://nixos.org/nix/][Nix]] package manager.
|
||||
|
||||
|
||||
* Requirements
|
||||
|
||||
GNU Guix currently depends on the following packages:
|
||||
|
||||
- [[https://gnu.org/software/guile/][GNU Guile 2.2.x or 2.0.x]], version 2.0.13 or later
|
||||
- [[https://gnupg.org/][GNU libgcrypt]]
|
||||
- [[https://www.gnu.org/software/make/][GNU Make]]
|
||||
- [[https://www.gnutls.org][GnuTLS]] compiled with guile support enabled
|
||||
- [[https://notabug.org/civodul/guile-sqlite3][Guile-SQLite3]], version 0.1.0 or later
|
||||
- [[https://gitlab.com/guile-git/guile-git][Guile-Git]]
|
||||
- [[http://www.zlib.net/][zlib]]
|
||||
- optionally [[https://savannah.nongnu.org/projects/guile-json/][Guile-JSON]], for the 'guix import pypi' command
|
||||
- [[http://gnu.org/software/guile/][GNU Guile 2.2.x or 2.0.x]], version 2.0.9 or later
|
||||
- [[http://gnupg.org/][GNU libgcrypt]]
|
||||
- [[http://www.gnu.org/software/make/][GNU Make]]
|
||||
- optionally [[http://savannah.nongnu.org/projects/guile-json/][Guile-JSON]], for the 'guix import pypi' command
|
||||
- optionally [[http://www.gnutls.org][GnuTLS]] compiled with guile support enabled, for HTTPS support
|
||||
in the 'guix download' command. Note that 'guix import pypi' requires
|
||||
this functionality.
|
||||
|
||||
Unless `--disable-daemon' was passed, the following packages are needed:
|
||||
|
||||
- [[https://sqlite.org/][SQLite 3]]
|
||||
- [[https://gcc.gnu.org][GCC's g++]]
|
||||
- optionally [[http://www.bzip.org][libbz2]]
|
||||
- [[http://sqlite.org/][SQLite 3]]
|
||||
- [[http://www.bzip.org][libbz2]]
|
||||
- [[http://gcc.gnu.org][GCC's g++]]
|
||||
|
||||
When `--disable-daemon' was passed, you instead need the following:
|
||||
|
||||
- [[https://nixos.org/nix/][Nix]]
|
||||
- [[http://nixos.org/nix/][Nix]]
|
||||
|
||||
* Installation
|
||||
|
||||
@@ -45,7 +44,7 @@ See the manual for the installation instructions, either by running
|
||||
|
||||
info -f doc/guix.info "Installation"
|
||||
|
||||
or by checking the [[https://www.gnu.org/software/guix/manual/guix.html#Installation][web copy of the manual]].
|
||||
or by checking the [[http://www.gnu.org/software/guix/manual/guix.html#Installation][web copy of the manual]].
|
||||
|
||||
For information on installation from a Git checkout, please see the section
|
||||
"Building from Git" in the manual.
|
||||
@@ -110,7 +109,7 @@ Join #guix on irc.freenode.net.
|
||||
|
||||
* Guix & Nix
|
||||
|
||||
GNU Guix is based on [[https://nixos.org/nix/][the Nix package manager]]. It implements the same
|
||||
GNU Guix is based on [[http://nixos.org/nix/][the Nix package manager]]. It implements the same
|
||||
package deployment paradigm, and in fact it reuses some of its code.
|
||||
Yet, different engineering decisions were made for Guix, as described
|
||||
below.
|
||||
@@ -133,7 +132,7 @@ the store. Guix produces such derivations, which are then interpreted
|
||||
by the daemon to perform the build. Thus, Guix derivations can use
|
||||
derivations produced by Nix (and vice versa).
|
||||
|
||||
With Nix and the [[https://nixos.org/nixpkgs][Nixpkgs]] distribution, package composition happens at
|
||||
With Nix and the [[http://nixos.org/nixpkgs][Nixpkgs]] distribution, package composition happens at
|
||||
the Nix language level, but builders are usually written in Bash.
|
||||
Conversely, Guix encourages the use of Scheme for both package
|
||||
composition and builders. Likewise, the core functionality of Nix is
|
||||
@@ -142,13 +141,13 @@ but exposes all the API as Scheme.
|
||||
|
||||
* Related software
|
||||
|
||||
- [[https://nixos.org][Nix, Nixpkgs, and NixOS]], functional package manager and associated
|
||||
- [[http://nixos.org][Nix, Nixpkgs, and NixOS]], functional package manager and associated
|
||||
software distribution, are the inspiration of Guix
|
||||
- [[https://www.gnu.org/software/stow/][GNU Stow]] builds around the idea of one directory per prefix, and a
|
||||
- [[http://www.gnu.org/software/stow/][GNU Stow]] builds around the idea of one directory per prefix, and a
|
||||
symlink tree to create user environments
|
||||
- [[https://www.pvv.ntnu.no/~arnej/store/storedoc_6.html][STORE]] shares the same idea
|
||||
- [[http://www.pvv.ntnu.no/~arnej/store/storedoc_6.html][STORE]] shares the same idea
|
||||
- [[https://live.gnome.org/OSTree/][GNOME's OSTree]] allows bootable system images to be built from a
|
||||
specified set of packages
|
||||
- The [[https://www.gnu.org/s/gsrc/][GNU Source Release Collection]] (GSRC) is a user-land software
|
||||
- The [[http://www.gnu.org/s/gsrc/][GNU Source Release Collection]] (GSRC) is a user-land software
|
||||
distribution; unlike Guix, it relies on core tools available on the
|
||||
host system
|
||||
|
||||
+171
-278
@@ -1,5 +1,5 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2014, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2014, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
@@ -19,14 +19,10 @@
|
||||
(define-module (build-self)
|
||||
#:use-module (gnu)
|
||||
#:use-module (guix)
|
||||
#:use-module (guix ui)
|
||||
#:use-module (guix config)
|
||||
#:use-module (guix modules)
|
||||
#:use-module (srfi srfi-1)
|
||||
#:use-module (srfi srfi-19)
|
||||
#:use-module (rnrs io ports)
|
||||
#:use-module (ice-9 match)
|
||||
#:use-module (ice-9 popen)
|
||||
#:export (build))
|
||||
|
||||
;;; Commentary:
|
||||
@@ -44,308 +40,205 @@
|
||||
;;; Code:
|
||||
|
||||
|
||||
;;;
|
||||
;;; Generating (guix config).
|
||||
;;;
|
||||
;;; This is copied from (guix self) because we cannot assume (guix self) is
|
||||
;;; available at this point.
|
||||
;;;
|
||||
;; The dependencies. Don't refer explicitly to the variables because they
|
||||
;; could be renamed or shuffled around in modules over time. Conversely,
|
||||
;; 'find-best-packages-by-name' is expected to always have the same semantics.
|
||||
|
||||
(define %dependency-variables
|
||||
;; (guix config) variables corresponding to dependencies.
|
||||
'(%libgcrypt %libz %xz %gzip %bzip2))
|
||||
(define libgcrypt
|
||||
(first (find-best-packages-by-name "libgcrypt" #f)))
|
||||
|
||||
(define %persona-variables
|
||||
;; (guix config) variables that define Guix's persona.
|
||||
'(%guix-package-name
|
||||
%guix-version
|
||||
%guix-bug-report-address
|
||||
%guix-home-page-url))
|
||||
(define zlib
|
||||
(first (find-best-packages-by-name "zlib" #f)))
|
||||
|
||||
(define %config-variables
|
||||
;; (guix config) variables corresponding to Guix configuration.
|
||||
(letrec-syntax ((variables (syntax-rules ()
|
||||
((_)
|
||||
'())
|
||||
((_ variable rest ...)
|
||||
(cons `(variable . ,variable)
|
||||
(variables rest ...))))))
|
||||
(variables %localstatedir %storedir %sysconfdir %system)))
|
||||
(define gzip
|
||||
(first (find-best-packages-by-name "gzip" #f)))
|
||||
|
||||
(define* (make-config.scm #:key libgcrypt zlib gzip xz bzip2
|
||||
(package-name "GNU Guix")
|
||||
(package-version "0")
|
||||
(bug-report-address "bug-guix@gnu.org")
|
||||
(home-page-url "https://gnu.org/s/guix"))
|
||||
(define bzip2
|
||||
(first (find-best-packages-by-name "bzip2" #f)))
|
||||
|
||||
;; Hack so that Geiser is not confused.
|
||||
(define defmod 'define-module)
|
||||
(define xz
|
||||
(first (find-best-packages-by-name "xz" #f)))
|
||||
|
||||
(scheme-file "config.scm"
|
||||
#~(begin
|
||||
(#$defmod (guix config)
|
||||
#:export (%guix-package-name
|
||||
%guix-version
|
||||
%guix-bug-report-address
|
||||
%guix-home-page-url
|
||||
%store-directory
|
||||
%state-directory
|
||||
%store-database-directory
|
||||
%config-directory
|
||||
%libgcrypt
|
||||
%libz
|
||||
%gzip
|
||||
%bzip2
|
||||
%xz))
|
||||
(define (false-if-wrong-guile package)
|
||||
"Return #f if PACKAGE depends on the \"wrong\" major version of Guile (e.g.,
|
||||
2.0 instead of 2.2), otherwise return PACKAGE."
|
||||
(let ((guile (any (match-lambda
|
||||
((label (? package? dep) _ ...)
|
||||
(and (string=? (package-name dep) "guile")
|
||||
dep)))
|
||||
(package-direct-inputs package))))
|
||||
(and (or (not guile)
|
||||
(string-prefix? (effective-version)
|
||||
(package-version guile)))
|
||||
package)))
|
||||
|
||||
;; XXX: Work around <http://bugs.gnu.org/15602>.
|
||||
(eval-when (expand load eval)
|
||||
#$@(map (match-lambda
|
||||
((name . value)
|
||||
#~(define-public #$name #$value)))
|
||||
%config-variables)
|
||||
(define (package-for-current-guile . names)
|
||||
"Return the package with one of the given NAMES that depends on the current
|
||||
Guile major version (2.0 or 2.2), or #f if none of the packages matches."
|
||||
(let loop ((names names))
|
||||
(match names
|
||||
(()
|
||||
#f)
|
||||
((name rest ...)
|
||||
(match (find-best-packages-by-name name #f)
|
||||
(()
|
||||
(loop rest))
|
||||
((first _ ...)
|
||||
(or (false-if-wrong-guile first)
|
||||
(loop rest))))))))
|
||||
|
||||
(define %store-directory
|
||||
(or (and=> (getenv "NIX_STORE_DIR") canonicalize-path)
|
||||
%storedir))
|
||||
(define guile-json
|
||||
(package-for-current-guile "guile-json"
|
||||
"guile2.2-json"
|
||||
"guile2.0-json"))
|
||||
|
||||
(define %state-directory
|
||||
;; This must match `NIX_STATE_DIR' as defined in
|
||||
;; `nix/local.mk'.
|
||||
(or (getenv "NIX_STATE_DIR")
|
||||
(string-append %localstatedir "/guix")))
|
||||
(define guile-ssh
|
||||
(package-for-current-guile "guile-ssh"
|
||||
"guile2.2-ssh"
|
||||
"guile2.0-ssh"))
|
||||
|
||||
(define %store-database-directory
|
||||
(or (getenv "NIX_DB_DIR")
|
||||
(string-append %state-directory "/db")))
|
||||
|
||||
(define %config-directory
|
||||
;; This must match `GUIX_CONFIGURATION_DIRECTORY' as
|
||||
;; defined in `nix/local.mk'.
|
||||
(or (getenv "GUIX_CONFIGURATION_DIRECTORY")
|
||||
(string-append %sysconfdir "/guix")))
|
||||
|
||||
(define %guix-package-name #$package-name)
|
||||
(define %guix-version #$package-version)
|
||||
(define %guix-bug-report-address #$bug-report-address)
|
||||
(define %guix-home-page-url #$home-page-url)
|
||||
|
||||
(define %gzip
|
||||
#+(and gzip (file-append gzip "/bin/gzip")))
|
||||
(define %bzip2
|
||||
#+(and bzip2 (file-append bzip2 "/bin/bzip2")))
|
||||
(define %xz
|
||||
#+(and xz (file-append xz "/bin/xz")))
|
||||
|
||||
(define %libgcrypt
|
||||
#+(and libgcrypt
|
||||
(file-append libgcrypt "/lib/libgcrypt")))
|
||||
(define %libz
|
||||
#+(and zlib
|
||||
(file-append zlib "/lib/libz")))))))
|
||||
(define guile-git
|
||||
(package-for-current-guile "guile-git"
|
||||
"guile2.0-git"))
|
||||
|
||||
(define guile-bytestructures
|
||||
(package-for-current-guile "guile-bytestructures"
|
||||
"guile2.0-bytestructures"))
|
||||
|
||||
;;;
|
||||
;;; 'gexp->script'.
|
||||
;;;
|
||||
;;; This is our own variant of 'gexp->script' with an extra #:module-path
|
||||
;;; parameter, which was unavailable in (guix gexp) until commit
|
||||
;;; 1ae16033f34cebe802023922436883867010850f (March 2018.)
|
||||
;;;
|
||||
;; The actual build procedure.
|
||||
|
||||
(define (load-path-expression modules path)
|
||||
"Return as a monadic value a gexp that sets '%load-path' and
|
||||
'%load-compiled-path' to point to MODULES, a list of module names. MODULES
|
||||
are searched for in PATH."
|
||||
(mlet %store-monad ((modules (imported-modules modules
|
||||
#:module-path path))
|
||||
(compiled (compiled-modules modules
|
||||
#:module-path path)))
|
||||
(return (gexp (eval-when (expand load eval)
|
||||
(set! %load-path
|
||||
(cons (ungexp modules) %load-path))
|
||||
(set! %load-compiled-path
|
||||
(cons (ungexp compiled)
|
||||
%load-compiled-path)))))))
|
||||
(define (top-source-directory)
|
||||
"Return the name of the top-level directory of this source tree."
|
||||
(and=> (assoc-ref (current-source-location) 'filename)
|
||||
(lambda (file)
|
||||
(string-append (dirname file) "/.."))))
|
||||
|
||||
(define* (gexp->script name exp
|
||||
#:key (guile (default-guile))
|
||||
(module-path %load-path))
|
||||
"Return an executable script NAME that runs EXP using GUILE, with EXP's
|
||||
imported modules in its search path."
|
||||
(mlet %store-monad ((set-load-path
|
||||
(load-path-expression (gexp-modules exp)
|
||||
module-path)))
|
||||
(gexp->derivation name
|
||||
(gexp
|
||||
(call-with-output-file (ungexp output)
|
||||
(lambda (port)
|
||||
;; Note: that makes a long shebang. When the store
|
||||
;; is /gnu/store, that fits within the 128-byte
|
||||
;; limit imposed by Linux, but that may go beyond
|
||||
;; when running tests.
|
||||
(format port
|
||||
"#!~a/bin/guile --no-auto-compile~%!#~%"
|
||||
(ungexp guile))
|
||||
|
||||
(write '(ungexp set-load-path) port)
|
||||
(write '(ungexp exp) port)
|
||||
(chmod port #o555))))
|
||||
#:module-path module-path)))
|
||||
|
||||
|
||||
(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"))
|
||||
|
||||
(define* (build-program source version
|
||||
#:optional (guile-version (effective-version))
|
||||
#:key (pull-version 0))
|
||||
"Return a program that computes the derivation to build Guix from SOURCE."
|
||||
(define select?
|
||||
;; Select every module but (guix config) and non-Guix modules.
|
||||
(match-lambda
|
||||
(('guix 'config) #f)
|
||||
(('guix _ ...) #t)
|
||||
(('gnu _ ...) #t)
|
||||
(_ #f)))
|
||||
|
||||
(with-imported-modules `(((guix config)
|
||||
=> ,(make-config.scm
|
||||
#:libgcrypt
|
||||
(specification->package "libgcrypt")))
|
||||
,@(source-module-closure `((guix store)
|
||||
(guix self)
|
||||
(guix derivations)
|
||||
(gnu packages bootstrap))
|
||||
(list source)
|
||||
#:select? select?))
|
||||
(gexp->script "compute-guix-derivation"
|
||||
#~(begin
|
||||
(use-modules (ice-9 match))
|
||||
|
||||
(eval-when (expand load eval)
|
||||
;; Don't augment '%load-path'.
|
||||
(unsetenv "GUIX_PACKAGE_PATH")
|
||||
|
||||
;; (gnu packages …) modules are going to be looked up
|
||||
;; under SOURCE. (guix config) is looked up in FRONT.
|
||||
(match (command-line)
|
||||
((_ source _ ...)
|
||||
(match %load-path
|
||||
((front _ ...)
|
||||
(unless (string=? front source) ;already done?
|
||||
(set! %load-path (list source front)))))))
|
||||
|
||||
;; Only load our own modules or those of Guile.
|
||||
(match %load-compiled-path
|
||||
((front _ ... sys1 sys2)
|
||||
(set! %load-compiled-path
|
||||
(list front sys1 sys2)))))
|
||||
|
||||
(use-modules (guix store)
|
||||
(guix self)
|
||||
(guix derivations)
|
||||
(srfi srfi-1))
|
||||
|
||||
(define (spin system)
|
||||
(define spin
|
||||
(circular-list "-" "\\" "|" "/" "-" "\\" "|" "/"))
|
||||
|
||||
(format (current-error-port)
|
||||
"Computing Guix derivation for '~a'... "
|
||||
system)
|
||||
(let loop ((spin spin))
|
||||
(display (string-append "\b" (car spin))
|
||||
(current-error-port))
|
||||
(force-output (current-error-port))
|
||||
(sleep 1)
|
||||
(loop (cdr spin))))
|
||||
|
||||
(match (command-line)
|
||||
((_ source system version protocol-version)
|
||||
;; The current input port normally wraps a file
|
||||
;; descriptor connected to the daemon, or it is
|
||||
;; connected to /dev/null. In the former case, reuse
|
||||
;; the connection such that we inherit build options
|
||||
;; such as substitute URLs and so on; in the latter
|
||||
;; case, attempt to open a new connection.
|
||||
(let* ((proto (string->number protocol-version))
|
||||
(store (if (integer? proto)
|
||||
(port->connection (duplicate-port
|
||||
(current-input-port)
|
||||
"w+0")
|
||||
#:version proto)
|
||||
(open-connection))))
|
||||
(call-with-new-thread
|
||||
(lambda ()
|
||||
(spin system)))
|
||||
|
||||
(display
|
||||
(and=>
|
||||
(run-with-store store
|
||||
(guix-derivation source version
|
||||
#$guile-version
|
||||
#:pull-version
|
||||
#$pull-version)
|
||||
#:system system)
|
||||
derivation-file-name))))))
|
||||
#:module-path (list source))))
|
||||
(define (guile-for-build)
|
||||
"Return a derivation for Guile 2.0 or 2.2, whichever matches the currently
|
||||
running Guile."
|
||||
(package->derivation (cond-expand
|
||||
(guile-2.2
|
||||
(canonical-package
|
||||
(specification->package "guile@2.2")))
|
||||
(else
|
||||
(canonical-package
|
||||
(specification->package "guile@2.0"))))))
|
||||
|
||||
;; The procedure below is our return value.
|
||||
(define* (build source
|
||||
#:key verbose? (version (date-version-string)) system
|
||||
(guile-version (match ((@ (guile) version))
|
||||
("2.2.2" "2.2.2")
|
||||
(_ (effective-version))))
|
||||
(pull-version 0)
|
||||
#:key verbose? (version (date-version-string))
|
||||
#:allow-other-keys
|
||||
#:rest rest)
|
||||
"Return a derivation that unpacks SOURCE into STORE and compiles Scheme
|
||||
files."
|
||||
;; Build the build program and then use it as a trampoline to build from
|
||||
;; SOURCE.
|
||||
(mlet %store-monad ((build (build-program source version guile-version
|
||||
#:pull-version pull-version))
|
||||
(system (if system (return system) (current-system)))
|
||||
(port ((store-lift nix-server-socket)))
|
||||
(major ((store-lift nix-server-major-version)))
|
||||
(minor ((store-lift nix-server-minor-version))))
|
||||
(mbegin %store-monad
|
||||
(show-what-to-build* (list build))
|
||||
(built-derivations (list build))
|
||||
;; 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)))
|
||||
|
||||
;; Use the port beneath the current store as the stdin of BUILD. This
|
||||
;; way, we know 'open-pipe*' will not close it on 'exec'. If PORT is
|
||||
;; not a file port (e.g., it's an SSH channel), then the subprocess's
|
||||
;; stdin will actually be /dev/null.
|
||||
(let* ((pipe (with-input-from-port port
|
||||
(lambda ()
|
||||
(setenv "GUILE_WARN_DEPRECATED" "no") ;be quiet and drive
|
||||
(open-pipe* OPEN_READ
|
||||
(derivation->output-path build)
|
||||
source system version
|
||||
(if (file-port? port)
|
||||
(number->string
|
||||
(logior major minor))
|
||||
"none")))))
|
||||
(str (get-string-all pipe))
|
||||
(status (close-pipe pipe)))
|
||||
(match str
|
||||
((? eof-object?)
|
||||
(error "build program failed" (list build status)))
|
||||
((? derivation-path? drv)
|
||||
(mbegin %store-monad
|
||||
(return (newline (current-output-port)))
|
||||
((store-lift add-temp-root) drv)
|
||||
(return (read-derivation-from-file drv))))
|
||||
("#f"
|
||||
;; Unsupported PULL-VERSION.
|
||||
(return #f))
|
||||
((? string? str)
|
||||
(error "invalid build result" (list build str))))))))
|
||||
(define builder
|
||||
#~(begin
|
||||
(use-modules (guix build pull))
|
||||
|
||||
(letrec-syntax ((maybe-load-path
|
||||
(syntax-rules ()
|
||||
((_ item rest ...)
|
||||
(let ((tail (maybe-load-path rest ...)))
|
||||
(if (string? item)
|
||||
(cons (string-append item
|
||||
"/share/guile/site/"
|
||||
#$(effective-version))
|
||||
tail)
|
||||
tail)))
|
||||
((_)
|
||||
'()))))
|
||||
(set! %load-path
|
||||
(append
|
||||
(maybe-load-path #$guile-json #$guile-ssh
|
||||
#$guile-git #$guile-bytestructures)
|
||||
%load-path)))
|
||||
|
||||
(letrec-syntax ((maybe-load-compiled-path
|
||||
(syntax-rules ()
|
||||
((_ item rest ...)
|
||||
(let ((tail (maybe-load-compiled-path rest ...)))
|
||||
(if (string? item)
|
||||
(cons (string-append item
|
||||
"/lib/guile/"
|
||||
#$(effective-version)
|
||||
"/site-ccache")
|
||||
tail)
|
||||
tail)))
|
||||
((_)
|
||||
'()))))
|
||||
(set! %load-compiled-path
|
||||
(append
|
||||
(maybe-load-compiled-path #$guile-json #$guile-ssh
|
||||
#$guile-git #$guile-bytestructures)
|
||||
%load-compiled-path)))
|
||||
|
||||
;; XXX: The 'guile-ssh' package prior to Guix commit 92b7258 was
|
||||
;; broken: libguile-ssh could not be found. Work around that.
|
||||
;; FIXME: We want Guile-SSH 0.10.2 or later anyway.
|
||||
#$(if (string-prefix? "0.9." (package-version guile-ssh))
|
||||
#~(setenv "LTDL_LIBRARY_PATH" (string-append #$guile-ssh "/lib"))
|
||||
#t)
|
||||
|
||||
(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")))))
|
||||
|
||||
(mlet %store-monad ((guile (guile-for-build)))
|
||||
(gexp->derivation "guix-latest" builder
|
||||
#:modules '((guix build pull)
|
||||
(guix build utils)
|
||||
|
||||
;; Closure of (guix modules).
|
||||
(guix modules)
|
||||
(guix memoization)
|
||||
(guix sets))
|
||||
|
||||
;; Arrange so that our own (guix build …) modules are
|
||||
;; used.
|
||||
#:module-path (list (top-source-directory))
|
||||
|
||||
#:guile-for-build guile)))
|
||||
|
||||
;; This file is loaded by 'guix pull'; return it the build procedure.
|
||||
build
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
@@ -33,23 +33,23 @@
|
||||
(define (final-inputs store system)
|
||||
"Return the list of outputs directories of the final inputs for SYSTEM."
|
||||
(append-map (match-lambda
|
||||
((or (name package) (name package _))
|
||||
(let ((drv (package-derivation store package system)))
|
||||
;; Libc's 'debug' output refers to gcc-cross-boot0, but it's
|
||||
;; hard to avoid, so we tolerate it. This should be the
|
||||
;; only exception. Likewise, 'bash:include' depends on
|
||||
;; bootstrap-binaries via its 'Makefile.inc' (FIXME).
|
||||
(filter-map (match-lambda
|
||||
(("debug" . directory)
|
||||
(if (string=? "glibc" (package-name package))
|
||||
#f
|
||||
directory))
|
||||
(("include" . directory)
|
||||
(if (string=? "bash" (package-name package))
|
||||
#f
|
||||
directory))
|
||||
((_ . directory) directory))
|
||||
(derivation->output-paths drv)))))
|
||||
((name package)
|
||||
(let ((drv (package-derivation store package system)))
|
||||
;; Libc's 'debug' output refers to gcc-cross-boot0, but it's
|
||||
;; hard to avoid, so we tolerate it. This should be the
|
||||
;; only exception. Likewise, 'bash:include' depends on
|
||||
;; bootstrap-binaries via its 'Makefile.inc' (FIXME).
|
||||
(filter-map (match-lambda
|
||||
(("debug" . directory)
|
||||
(if (string=? "glibc" (package-name package))
|
||||
#f
|
||||
directory))
|
||||
(("include" . directory)
|
||||
(if (string=? "bash" (package-name package))
|
||||
#f
|
||||
directory))
|
||||
((_ . directory) directory))
|
||||
(derivation->output-paths drv)))))
|
||||
%final-inputs))
|
||||
|
||||
(define (assert-valid-substitute substitute)
|
||||
|
||||
+78
-48
@@ -17,13 +17,20 @@
|
||||
;;; 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 (ice-9 match)
|
||||
(use-modules (system base target)
|
||||
(system base message)
|
||||
(ice-9 match)
|
||||
(ice-9 threads)
|
||||
(srfi srfi-1)
|
||||
(guix build compile)
|
||||
(guix build utils))
|
||||
|
||||
(define warnings
|
||||
;; FIXME: 'format' is missing because it reports "non-literal format
|
||||
;; strings" due to the fact that we use 'G_' instead of '_'. We'll need
|
||||
;; help from Guile to solve this.
|
||||
'(unsupported-warning unbound-variable arity-mismatch))
|
||||
|
||||
(define host (getenv "host"))
|
||||
|
||||
(define srcdir (getenv "srcdir"))
|
||||
|
||||
(define (relative-file file)
|
||||
@@ -45,38 +52,61 @@
|
||||
(or (not (file-exists? go))
|
||||
(file-mtime<? go file))))
|
||||
|
||||
(define* (parallel-job-count #:optional (flags (getenv "MAKEFLAGS")))
|
||||
"Return the number of parallel jobs as determined by FLAGS, the flags passed
|
||||
to 'make'."
|
||||
(match flags
|
||||
(#f (current-processor-count))
|
||||
(flags
|
||||
(let ((initial-flags (string-tokenize flags)))
|
||||
(let loop ((flags initial-flags))
|
||||
(match flags
|
||||
(()
|
||||
;; Note: GNU make prior to version 4.2 would hide "-j" flags from
|
||||
;; $MAKEFLAGS. Thus, check for a "--jobserver" flag here and
|
||||
;; assume we're using all cores if specified.
|
||||
(if (any (lambda (flag)
|
||||
(string-prefix? "--jobserver" flag))
|
||||
initial-flags)
|
||||
(current-processor-count) ;GNU make < 4.2
|
||||
1)) ;sequential make
|
||||
(("-j" (= string->number count) _ ...)
|
||||
(if (integer? count)
|
||||
count
|
||||
(current-processor-count)))
|
||||
((head tail ...)
|
||||
(if (string-prefix? "-j" head)
|
||||
(match (string-drop head 2)
|
||||
(""
|
||||
(current-processor-count))
|
||||
((= string->number count)
|
||||
(if (integer? count)
|
||||
count
|
||||
(current-processor-count))))
|
||||
(loop tail)))))))))
|
||||
(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)))
|
||||
|
||||
(cond-expand
|
||||
(guile-2.2 (use-modules (language tree-il optimize)
|
||||
(language cps optimize)))
|
||||
(else #f))
|
||||
|
||||
(define %default-optimizations
|
||||
;; Default optimization options (equivalent to -O2 on Guile 2.2).
|
||||
(cond-expand
|
||||
(guile-2.2 (append (tree-il-default-optimization-options)
|
||||
(cps-default-optimization-options)))
|
||||
(else '())))
|
||||
|
||||
(define %lightweight-optimizations
|
||||
;; Lightweight optimizations (like -O0, but with partial evaluation).
|
||||
(let loop ((opts %default-optimizations)
|
||||
(result '()))
|
||||
(match opts
|
||||
(() (reverse result))
|
||||
((#:partial-eval? _ rest ...)
|
||||
(loop rest `(#t #:partial-eval? ,@result)))
|
||||
((kw _ rest ...)
|
||||
(loop rest `(#f ,kw ,@result))))))
|
||||
|
||||
(define (optimization-options file)
|
||||
(if (string-contains file "gnu/packages/")
|
||||
%lightweight-optimizations ;build faster
|
||||
'()))
|
||||
|
||||
(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
|
||||
,@(optimization-options file))))))))
|
||||
|
||||
;; Install a SIGINT handler to give unwind handlers in 'compile-file' an
|
||||
;; opportunity to run upon SIGINT and to remove temporary output files.
|
||||
@@ -86,16 +116,16 @@ to 'make'."
|
||||
|
||||
(match (command-line)
|
||||
((_ . files)
|
||||
(compile-files srcdir (getcwd)
|
||||
(filter file-needs-compilation? files)
|
||||
#:workers (parallel-job-count)
|
||||
#:host host
|
||||
#:report-load (lambda (file total completed)
|
||||
(when file
|
||||
(format #t " LOAD ~a~%" file)
|
||||
(force-output)))
|
||||
#:report-compilation (lambda (file total completed)
|
||||
(when file
|
||||
(format #t " GUILEC ~a~%"
|
||||
(scm->go file))
|
||||
(force-output))))))
|
||||
(let ((files (filter file-needs-compilation? files)))
|
||||
(for-each load-module-file files)
|
||||
(let ((mutex (make-mutex)))
|
||||
;; Make sure compilation related modules are loaded before starting to
|
||||
;; compile files in parallel.
|
||||
(compile #f)
|
||||
(par-for-each (lambda (file)
|
||||
(compile-file* file mutex))
|
||||
files)))))
|
||||
|
||||
;;; Local Variables:
|
||||
;;; eval: (put 'with-target 'scheme-indent-function 1)
|
||||
;;; End:
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2018 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/>.
|
||||
|
||||
;; Build Guix using Guix.
|
||||
|
||||
(use-modules (srfi srfi-26))
|
||||
|
||||
;; Add ~/.config/guix/latest to the search path.
|
||||
(add-to-load-path
|
||||
(and=> (or (getenv "XDG_CONFIG_HOME")
|
||||
(and=> (getenv "HOME")
|
||||
(cut string-append <> "/.config")))
|
||||
(cute string-append <> "/guix/current/share/guile/site/"
|
||||
(effective-version))))
|
||||
|
||||
(use-modules (guix) (guix ui)
|
||||
(guix git-download)
|
||||
(ice-9 match))
|
||||
|
||||
(match (command-line)
|
||||
((program source)
|
||||
(with-error-handling
|
||||
(with-store store
|
||||
(let* ((script (string-append source "/build-aux/build-self.scm"))
|
||||
(build (primitive-load script))
|
||||
(git? (git-predicate source)))
|
||||
(run-with-store store
|
||||
;; TODO: Extract #:version and #:commit using Guile-Git.
|
||||
(mlet* %store-monad ((source (interned-file source "guix-source"
|
||||
#:select? git?
|
||||
#:recursive? #t))
|
||||
(drv (build source #:pull-version 1)))
|
||||
(mbegin %store-monad
|
||||
(show-what-to-build* (list drv))
|
||||
(built-derivations (list drv))
|
||||
(with-monad %store-monad
|
||||
(display (derivation->output-path drv))
|
||||
(newline)
|
||||
(return drv))))))))))
|
||||
@@ -1,25 +0,0 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2017 Jan Nieuwenhuizen <janneke@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 file defines build jobs for the Cuirass continuation integration
|
||||
;;; tool.
|
||||
;;;
|
||||
|
||||
(include "../hydra/gnu-system.scm")
|
||||
(include "hydra-to-cuirass.scm")
|
||||
@@ -1,6 +0,0 @@
|
||||
;;;
|
||||
;;; This file defines Cuirass build jobs to build Guix itself.
|
||||
;;;
|
||||
|
||||
(include "../hydra/guix-modular.scm")
|
||||
(include "hydra-to-cuirass.scm")
|
||||
@@ -1,47 +0,0 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2017 Jan Nieuwenhuizen <janneke@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 file defines the conversion of Hydra build jobs to Cuirass build
|
||||
;;; jobs. It is meant to be included in other files.
|
||||
;;;
|
||||
|
||||
(use-modules ((guix licenses)
|
||||
#:select (license? license-name license-uri license-comment)))
|
||||
|
||||
(define (cuirass-jobs store arguments)
|
||||
"Return Cuirass jobs."
|
||||
(map hydra-job->cuirass-job (hydra-jobs store arguments)))
|
||||
|
||||
(define (hydra-job->cuirass-job hydra-job)
|
||||
(let ((name (car hydra-job))
|
||||
(job ((cdr hydra-job))))
|
||||
(lambda _ (acons #:job-name (symbol->string name)
|
||||
(map symbol-alist-entry->keyword-alist-entry job)))))
|
||||
|
||||
(define (symbol-alist-entry->keyword-alist-entry entry)
|
||||
(cons (symbol->keyword (car entry)) (entry->sexp-entry (cdr entry))))
|
||||
|
||||
(define (entry->sexp-entry o)
|
||||
(match o
|
||||
((? license?) `((name . (license-name o))
|
||||
(uri . ,(license-uri o))
|
||||
(comment . ,(license-comment o))))
|
||||
((lst ...)
|
||||
(map entry->sexp-entry lst))
|
||||
(_ o)))
|
||||
@@ -0,0 +1,73 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2012, 2013, 2017 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
|
||||
;;; Copyright © 2017 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/>.
|
||||
|
||||
;;;
|
||||
;;; Download a binary file from an external source.
|
||||
;;;
|
||||
|
||||
(use-modules (ice-9 match)
|
||||
(web uri)
|
||||
(web client)
|
||||
(rnrs io ports)
|
||||
(srfi srfi-11)
|
||||
(guix base16)
|
||||
(guix hash))
|
||||
|
||||
(define %url-base
|
||||
"http://alpha.gnu.org/gnu/guix/bootstrap"
|
||||
|
||||
;; Alternately:
|
||||
;;"http://www.fdn.fr/~lcourtes/software/guix/packages"
|
||||
)
|
||||
|
||||
(define (file-name->uri file)
|
||||
"Return the URI for FILE."
|
||||
(match (string-tokenize file (char-set-complement (char-set #\/)))
|
||||
((_ ... system basename)
|
||||
(string->uri
|
||||
(string-append %url-base "/" system
|
||||
(match system
|
||||
("aarch64-linux"
|
||||
"/20170217/")
|
||||
("armhf-linux"
|
||||
"/20150101/")
|
||||
(_
|
||||
"/20131110/"))
|
||||
basename)))))
|
||||
|
||||
(match (command-line)
|
||||
((_ file expected-hash)
|
||||
(let ((uri (file-name->uri file)))
|
||||
(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)))
|
||||
((part) (string-append file ".part")))
|
||||
(if (string=? expected-hash hash)
|
||||
(begin
|
||||
(call-with-output-file part
|
||||
(lambda (port)
|
||||
(put-bytevector port data)))
|
||||
(rename-file part file))
|
||||
(begin
|
||||
(format (current-error-port)
|
||||
"file at `~a' has SHA256 ~a; expected ~a~%"
|
||||
(uri->string uri) hash expected-hash)
|
||||
(exit 1)))))))
|
||||
@@ -1,6 +1,5 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2017 Jan Nieuwenhuizen <janneke@gnu.org>
|
||||
;;; Copyright © 2016, 2017 Ludovic Courtès <ludo@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
@@ -27,12 +26,6 @@
|
||||
(ice-9 pretty-print)
|
||||
(ice-9 format))
|
||||
|
||||
(define %top-srcdir
|
||||
(and=> (assq-ref (current-source-location) 'filename)
|
||||
(lambda (file)
|
||||
(canonicalize-path
|
||||
(string-append (dirname file) "/../..")))))
|
||||
|
||||
(define %user-module
|
||||
;; Hydra user module.
|
||||
(let ((m (make-module)))
|
||||
@@ -77,10 +70,9 @@ Otherwise return THING."
|
||||
|
||||
;; Without further ado...
|
||||
(match (command-line)
|
||||
((command file cuirass? ...)
|
||||
((command file)
|
||||
;; Load FILE, a Scheme file that defines Hydra jobs.
|
||||
(let ((port (current-output-port))
|
||||
(real-build-things build-things))
|
||||
(let ((port (current-output-port)))
|
||||
(save-module-excursion
|
||||
(lambda ()
|
||||
(set-current-module %user-module)
|
||||
@@ -94,24 +86,17 @@ Otherwise return THING."
|
||||
|
||||
;; Grafts can trigger early builds. We do not want that to happen
|
||||
;; during evaluation, so use a sledgehammer to catch such problems.
|
||||
;; An exception, though, is the evaluation of Guix itself, which
|
||||
;; requires building a "trampoline" program.
|
||||
(set! build-things
|
||||
(lambda (store . args)
|
||||
(format (current-error-port)
|
||||
"warning: building things during evaluation~%")
|
||||
"error: trying to build things during evaluation!~%")
|
||||
(format (current-error-port)
|
||||
"'build-things' arguments: ~s~%" args)
|
||||
(apply real-build-things store args)))
|
||||
(exit 1)))
|
||||
|
||||
;; Call the entry point of FILE and print the resulting job sexp.
|
||||
(pretty-print
|
||||
(match ((module-ref %user-module
|
||||
(if (equal? cuirass? "cuirass")
|
||||
'cuirass-jobs
|
||||
'hydra-jobs))
|
||||
store `((guix
|
||||
. ((file-name . ,%top-srcdir)))))
|
||||
(match ((module-ref %user-module 'hydra-jobs) store '())
|
||||
(((names . thunks) ...)
|
||||
(map (lambda (job thunk)
|
||||
(format (current-error-port) "evaluating '~a'... " job)
|
||||
@@ -122,8 +107,8 @@ Otherwise return THING."
|
||||
names thunks)))
|
||||
port))))
|
||||
((command _ ...)
|
||||
(format (current-error-port) "Usage: ~a FILE [cuirass]
|
||||
Evaluate the Hydra or Cuirass jobs defined in FILE.~%"
|
||||
(format (current-error-port) "Usage: ~a FILE
|
||||
Evaluate the Hydra jobs defined in FILE.~%"
|
||||
command)
|
||||
(exit 1)))
|
||||
|
||||
|
||||
+38
-117
@@ -1,6 +1,5 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2017 Jan Nieuwenhuizen <janneke@gnu.org>
|
||||
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
@@ -22,29 +21,17 @@
|
||||
;;; tool.
|
||||
;;;
|
||||
|
||||
(use-modules (system base compile))
|
||||
;; Attempt to use our very own Guix modules.
|
||||
(eval-when (compile load eval)
|
||||
|
||||
(eval-when (expand load eval)
|
||||
|
||||
;; Pre-load the compiler so we don't end up auto-compiling it.
|
||||
(compile #t)
|
||||
|
||||
;; Use our very own Guix modules.
|
||||
;; Ignore any available .go, and force recompilation. This is because our
|
||||
;; checkout in the store has mtime set to the epoch, and thus .go files look
|
||||
;; newer, even though they may not correspond.
|
||||
(set! %fresh-auto-compile #t)
|
||||
|
||||
;; Ignore .go files except for Guile's. This is because our checkout in the
|
||||
;; store has mtime set to the epoch, and thus .go files look newer, even
|
||||
;; though they may not correspond. Use 'reverse' so that /gnu/store/…-guile
|
||||
;; comes before /run/current-system/profile.
|
||||
(set! %load-compiled-path
|
||||
(list
|
||||
(dirname (dirname (search-path (reverse %load-compiled-path)
|
||||
"ice-9/boot-9.go")))))
|
||||
|
||||
(and=> (assoc-ref (current-source-location) 'filename)
|
||||
(lambda (file)
|
||||
(let ((dir (canonicalize-path
|
||||
(string-append (dirname file) "/../.."))))
|
||||
(let ((dir (string-append (dirname file) "/../..")))
|
||||
(format (current-error-port) "prepending ~s to the load path~%"
|
||||
dir)
|
||||
(set! %load-path (cons dir %load-path))))))
|
||||
@@ -61,8 +48,6 @@
|
||||
((guix scripts system) #:select (read-operating-system))
|
||||
((guix scripts pack)
|
||||
#:select (lookup-compressor self-contained-tarball))
|
||||
(gnu bootloader)
|
||||
(gnu bootloader u-boot)
|
||||
(gnu packages)
|
||||
(gnu packages gcc)
|
||||
(gnu packages base)
|
||||
@@ -147,10 +132,7 @@ SYSTEM."
|
||||
"i686-w64-mingw32"))
|
||||
|
||||
(define %guixsd-supported-systems
|
||||
'("x86_64-linux" "i686-linux" "armhf-linux"))
|
||||
|
||||
(define %u-boot-systems
|
||||
'("armhf-linux"))
|
||||
'("x86_64-linux" "i686-linux"))
|
||||
|
||||
(define (qemu-jobs store system)
|
||||
"Return a list of jobs that build QEMU images for SYSTEM."
|
||||
@@ -174,32 +156,20 @@ system.")
|
||||
(expt 2 20))
|
||||
|
||||
(if (member system %guixsd-supported-systems)
|
||||
(if (member system %u-boot-systems)
|
||||
(list (->job 'flash-image
|
||||
(run-with-store store
|
||||
(mbegin %store-monad
|
||||
(set-guile-for-build (default-guile))
|
||||
(system-disk-image
|
||||
(operating-system (inherit installation-os)
|
||||
(bootloader (bootloader-configuration
|
||||
(bootloader u-boot-bootloader)
|
||||
(target #f))))
|
||||
#:disk-image-size
|
||||
(* 1024 MiB))))))
|
||||
(list (->job 'usb-image
|
||||
(run-with-store store
|
||||
(mbegin %store-monad
|
||||
(set-guile-for-build (default-guile))
|
||||
(system-disk-image installation-os
|
||||
#:disk-image-size
|
||||
(* 1024 MiB)))))
|
||||
(->job 'iso9660-image
|
||||
(run-with-store store
|
||||
(mbegin %store-monad
|
||||
(set-guile-for-build (default-guile))
|
||||
(system-disk-image installation-os
|
||||
#:file-system-type
|
||||
"iso9660"))))))
|
||||
(list (->job 'usb-image
|
||||
(run-with-store store
|
||||
(mbegin %store-monad
|
||||
(set-guile-for-build (default-guile))
|
||||
(system-disk-image installation-os
|
||||
#:disk-image-size
|
||||
(* 1024 MiB)))))
|
||||
(->job 'iso9660-image
|
||||
(run-with-store store
|
||||
(mbegin %store-monad
|
||||
(set-guile-for-build (default-guile))
|
||||
(system-disk-image installation-os
|
||||
#:file-system-type
|
||||
"iso9660")))))
|
||||
'()))
|
||||
|
||||
(define (system-test-jobs store system)
|
||||
@@ -265,8 +235,7 @@ all its dependencies, and ready to be installed on non-GuixSD distributions.")
|
||||
|
||||
(define job-name
|
||||
;; Return the name of a package's job.
|
||||
(compose string->symbol
|
||||
(cut package-full-name <> "-")))
|
||||
(compose string->symbol package-full-name))
|
||||
|
||||
(define package->job
|
||||
(let ((base-packages
|
||||
@@ -281,8 +250,7 @@ all its dependencies, and ready to be installed on non-GuixSD distributions.")
|
||||
"Return a job for PACKAGE on SYSTEM, or #f if this combination is not
|
||||
valid."
|
||||
(cond ((member package base-packages)
|
||||
(package-job store (symbol-append 'base. (job-name package))
|
||||
package system))
|
||||
#f)
|
||||
((supported-package? package system)
|
||||
(let ((drv (package-derivation store package system
|
||||
#:graft? #f)))
|
||||
@@ -292,25 +260,6 @@ valid."
|
||||
(else
|
||||
#f)))))
|
||||
|
||||
(define (all-packages)
|
||||
"Return the list of packages to build."
|
||||
(define (adjust package result)
|
||||
(cond ((package-replacement package)
|
||||
(cons* package ;build both
|
||||
(package-replacement package)
|
||||
result))
|
||||
((package-superseded package)
|
||||
result) ;don't build it
|
||||
(else
|
||||
(cons package result))))
|
||||
|
||||
(fold-packages adjust
|
||||
(fold adjust '() ;include base packages
|
||||
(match (%final-inputs)
|
||||
(((labels packages _ ...) ...)
|
||||
packages)))
|
||||
#:select? (const #t))) ;include hidden packages
|
||||
|
||||
|
||||
;;;
|
||||
;;; Hydra entry point.
|
||||
@@ -321,16 +270,8 @@ valid."
|
||||
(define subset
|
||||
(match (assoc-ref arguments 'subset)
|
||||
("core" 'core) ; only build core packages
|
||||
("hello" 'hello) ; only build hello
|
||||
(((? string?) (? string?) ...) 'list) ; only build selected list of packages
|
||||
(_ 'all))) ; build everything
|
||||
|
||||
(define systems
|
||||
(match (assoc-ref arguments 'systems)
|
||||
(#f %hydra-supported-systems)
|
||||
((lst ...) lst)
|
||||
((? string? str) (call-with-input-string str read))))
|
||||
|
||||
(define (cross-jobs system)
|
||||
(define (from-32-to-64? target)
|
||||
;; Return true if SYSTEM is 32-bit and TARGET is 64-bit. This hack
|
||||
@@ -351,15 +292,8 @@ valid."
|
||||
|
||||
(define (pointless? target)
|
||||
;; Return #t if it makes no sense to cross-build to TARGET from SYSTEM.
|
||||
(match system
|
||||
((or "x86_64-linux" "i686-linux")
|
||||
(if (string-contains target "mingw")
|
||||
(not (string=? "x86_64-linux" system))
|
||||
#f))
|
||||
(_
|
||||
;; Don't try to cross-compile from non-Intel platforms: this isn't
|
||||
;; very useful and these are often brittle configurations.
|
||||
#t)))
|
||||
(and (string-contains target "mingw")
|
||||
(not (string=? "x86_64-linux" system))))
|
||||
|
||||
(define (either proc1 proc2 proc3)
|
||||
(lambda (x)
|
||||
@@ -377,17 +311,20 @@ valid."
|
||||
(parameterize ((%graft? #f))
|
||||
;; Return one job for each package, except bootstrap packages.
|
||||
(append-map (lambda (system)
|
||||
(format (current-error-port)
|
||||
"evaluating for '~a' (heap size: ~a MiB)...~%"
|
||||
system
|
||||
(round
|
||||
(/ (assoc-ref (gc-stats) 'heap-size)
|
||||
(expt 2. 20))))
|
||||
(invalidate-derivation-caches!)
|
||||
(case subset
|
||||
((all)
|
||||
;; Build everything, including replacements.
|
||||
(let ((all (all-packages))
|
||||
(let ((all (fold-packages
|
||||
(lambda (package result)
|
||||
(cond ((package-replacement package)
|
||||
(cons* package
|
||||
(package-replacement package)
|
||||
result))
|
||||
((package-superseded package)
|
||||
result) ;don't build it
|
||||
(else
|
||||
(cons package result))))
|
||||
'()))
|
||||
(job (lambda (package)
|
||||
(package->job store package
|
||||
system))))
|
||||
@@ -403,22 +340,6 @@ valid."
|
||||
package system))
|
||||
%core-packages)
|
||||
(cross-jobs system)))
|
||||
((hello)
|
||||
;; Build hello package only.
|
||||
(if (string=? system (%current-system))
|
||||
(let ((hello (specification->package "hello")))
|
||||
(list (package-job store (job-name hello) hello system)))
|
||||
'()))
|
||||
((list)
|
||||
;; Build selected list of packages only.
|
||||
(if (string=? system (%current-system))
|
||||
(let* ((names (assoc-ref arguments 'subset))
|
||||
(packages (map specification->package names)))
|
||||
(map (lambda (package)
|
||||
(package-job store (job-name package)
|
||||
package system))
|
||||
packages))
|
||||
'()))
|
||||
(else
|
||||
(error "unknown subset" subset))))
|
||||
systems)))
|
||||
%hydra-supported-systems)))
|
||||
|
||||
@@ -1,83 +0,0 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2017, 2018 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 file defines a continuous integration job to build the same modular
|
||||
;;; Guix as 'guix pull', which is defined in (guix self).
|
||||
;;;
|
||||
|
||||
(use-modules (guix store)
|
||||
(guix config)
|
||||
(guix utils)
|
||||
((guix packages) #:select (%hydra-supported-systems))
|
||||
(guix derivations)
|
||||
(guix monads)
|
||||
((guix licenses) #:prefix license:)
|
||||
(srfi srfi-1)
|
||||
(ice-9 match))
|
||||
|
||||
;; XXX: Debugging hack: since `hydra-eval-guile-jobs' redirects the output
|
||||
;; port to the bit bucket, let us write to the error port instead.
|
||||
(setvbuf (current-error-port) _IOLBF)
|
||||
(set-current-output-port (current-error-port))
|
||||
|
||||
(define* (build-job store source version system)
|
||||
"Return a Hydra job a list building the modular Guix derivation from SOURCE
|
||||
for SYSTEM. Use VERSION as the version identifier."
|
||||
(lambda ()
|
||||
(define build
|
||||
(primitive-load (string-append source "/build-aux/build-self.scm")))
|
||||
|
||||
`((derivation . ,(derivation-file-name
|
||||
(run-with-store store
|
||||
(build source #:version version #:system system
|
||||
#:pull-version 1
|
||||
#:guile-version "2.2")))) ;the latest 2.2.x
|
||||
(description . "Modular Guix")
|
||||
(long-description
|
||||
. "This is the modular Guix package as produced by 'guix pull'.")
|
||||
(license . ,license:gpl3+)
|
||||
(home-page . ,%guix-home-page-url)
|
||||
(maintainers . (,%guix-bug-report-address)))))
|
||||
|
||||
(define (hydra-jobs store arguments)
|
||||
"Return Hydra jobs."
|
||||
(define systems
|
||||
(match (assoc-ref arguments 'systems)
|
||||
(#f %hydra-supported-systems)
|
||||
((lst ...) lst)
|
||||
((? string? str) (call-with-input-string str read))))
|
||||
|
||||
(define guix-checkout
|
||||
(or (assq-ref arguments 'guix) ;Hydra on hydra
|
||||
(assq-ref arguments 'guix-modular))) ;Cuirass on berlin
|
||||
|
||||
(define version
|
||||
(or (assq-ref guix-checkout 'revision)
|
||||
"0.unknown"))
|
||||
|
||||
(let ((file (assq-ref guix-checkout 'file-name)))
|
||||
(format (current-error-port) "using checkout ~s (~s; arguments: ~s)~%"
|
||||
guix-checkout file arguments)
|
||||
|
||||
(map (lambda (system)
|
||||
(let ((name (string->symbol
|
||||
(string-append "guix." system))))
|
||||
`(,name
|
||||
. ,(build-job store file version system))))
|
||||
systems)))
|
||||
+34
-23
@@ -1,5 +1,5 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
@@ -22,7 +22,7 @@
|
||||
;;;
|
||||
|
||||
;; Attempt to use our very own Guix modules.
|
||||
(eval-when (expand load eval)
|
||||
(eval-when (compile load eval)
|
||||
|
||||
;; Ignore any available .go, and force recompilation. This is because our
|
||||
;; checkout in the store has mtime set to the epoch, and thus .go files look
|
||||
@@ -43,10 +43,13 @@
|
||||
(use-modules (guix store)
|
||||
(guix packages)
|
||||
(guix utils)
|
||||
(guix grafts)
|
||||
(guix derivations)
|
||||
(guix build-system gnu)
|
||||
(gnu packages version-control)
|
||||
(gnu packages package-management)
|
||||
(gnu packages imagemagick)
|
||||
(gnu packages graphviz)
|
||||
(gnu packages man)
|
||||
(srfi srfi-1)
|
||||
(srfi srfi-26)
|
||||
(ice-9 match))
|
||||
@@ -60,15 +63,36 @@
|
||||
#:optional (package-derivation package-derivation))
|
||||
"Convert PACKAGE to an alist suitable for Hydra."
|
||||
`((derivation . ,(derivation-file-name
|
||||
(parameterize ((%graft? #f))
|
||||
(package-derivation store package system
|
||||
#:graft? #f))))
|
||||
(package-derivation store package system)))
|
||||
(description . ,(package-synopsis package))
|
||||
(long-description . ,(package-description package))
|
||||
(license . ,(package-license package))
|
||||
(home-page . ,(package-home-page package))
|
||||
(maintainers . ("bug-guix@gnu.org"))))
|
||||
|
||||
(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)))))))))
|
||||
|
||||
(define (hydra-jobs store arguments)
|
||||
"Return Hydra jobs."
|
||||
(define systems
|
||||
@@ -85,22 +109,9 @@
|
||||
(define guix-checkout
|
||||
(assq-ref arguments 'guix))
|
||||
|
||||
(let ((file (assq-ref guix-checkout 'file-name)))
|
||||
(let ((guix (assq-ref guix-checkout 'file-name)))
|
||||
(format (current-error-port) "using checkout ~s (~s)~%"
|
||||
guix-checkout file)
|
||||
|
||||
guix-checkout guix)
|
||||
`((tarball . ,(cute package->alist store
|
||||
(dist-package guix file)
|
||||
(%current-system)))
|
||||
|
||||
,@(map (lambda (system)
|
||||
(let ((name (string->symbol
|
||||
(string-append "guix." system))))
|
||||
`(,name
|
||||
. ,(cute package->alist store
|
||||
(package
|
||||
(inherit guix)
|
||||
(version "latest")
|
||||
(source file))
|
||||
system))))
|
||||
%hydra-supported-systems))))
|
||||
(tarball-package guix)
|
||||
(%current-system))))))
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# GNU Guix --- Functional package management for GNU
|
||||
# Copyright © 2012, 2013, 2014, 2015, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
|
||||
# Copyright © 2017 Eric Bavier <bavier@cray.com>
|
||||
# Copyright © 2012, 2013, 2014, 2015, 2017 Ludovic Courtès <ludo@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Guix.
|
||||
#
|
||||
@@ -51,9 +50,17 @@ NIX_LIBEXEC_DIR="@abs_top_builddir@/nix/scripts" # for 'guix-authenticate'
|
||||
export NIX_ROOT_FINDER NIX_SUBSTITUTERS NIX_LIBEXEC_DIR
|
||||
|
||||
NIX_BUILD_HOOK="$abs_top_builddir/nix/scripts/offload"
|
||||
@BUILD_DAEMON_OFFLOAD_TRUE@export NIX_BUILD_HOOK
|
||||
@BUILD_DAEMON_OFFLOAD_FALSE@# No offloading support.
|
||||
@BUILD_DAEMON_OFFLOAD_FALSE@unset NIX_BUILD_HOOK
|
||||
if [ -x "$NIX_BUILD_HOOK" ]
|
||||
then
|
||||
export NIX_BUILD_HOOK
|
||||
else
|
||||
# No offloading support.
|
||||
unset NIX_BUILD_HOOK
|
||||
fi
|
||||
|
||||
# The 'guix-register' program.
|
||||
GUIX_REGISTER="$abs_top_builddir/guix-register"
|
||||
export GUIX_REGISTER
|
||||
|
||||
# The following variables need only be defined when compiling Guix
|
||||
# modules, but we define them to be on the safe side in case of
|
||||
|
||||
+1
-28
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# GNU Guix --- Functional package management for GNU
|
||||
# Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
|
||||
# Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Guix.
|
||||
#
|
||||
@@ -110,33 +110,6 @@ then
|
||||
|
||||
daemon_pid=$!
|
||||
trap "kill $daemon_pid ; rm -rf $NIX_STATE_DIR" EXIT
|
||||
|
||||
# The test suite expects the 'guile-bootstrap' package to be available.
|
||||
# Normally the Guile bootstrap tarball is downloaded by a fixed-output
|
||||
# derivation but when network access is missing we allow users to drop
|
||||
# the tarball in 'gnu/packages/bootstrap/SYSTEM' and "intern" it here.
|
||||
bootstrap_directory="@abs_top_builddir@/gnu/packages/bootstrap/@guix_system@"
|
||||
if [ -d "$bootstrap_directory" ]
|
||||
then
|
||||
# Make sure 'guix-daemon' is listening before invoking 'guix
|
||||
# download'.
|
||||
"@abs_top_builddir@/pre-inst-env" "@GUILE@" -c \
|
||||
'(use-modules (guix))
|
||||
(let loop ((i 10))
|
||||
(catch #t
|
||||
(lambda () (open-connection))
|
||||
(lambda (key . args)
|
||||
(if (zero? i)
|
||||
(apply throw key args)
|
||||
(begin (usleep 500000) (loop (- i 1)))))))'
|
||||
|
||||
for file in "$bootstrap_directory"/guile-*
|
||||
do
|
||||
[ -f "$file" ] && \
|
||||
"@abs_top_builddir@/pre-inst-env" \
|
||||
guix download "file://$file" > /dev/null
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
# Avoid issues that could stem from l10n, such as language/encoding
|
||||
|
||||
+20
-27
@@ -18,18 +18,11 @@ if test "x$guix_build_daemon" = "xyes"; then
|
||||
dnl Use 64-bit file system calls so that we can support files > 2 GiB.
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
dnl Look for zlib, a required dependency.
|
||||
AC_CHECK_LIB([z], [gzdopen], [true],
|
||||
[AC_MSG_ERROR([Guix requires zlib. See http://www.zlib.net/.])])
|
||||
AC_CHECK_HEADERS([zlib.h], [true],
|
||||
[AC_MSG_ERROR([Guix requires zlib. See http://www.zlib.net/.])])
|
||||
|
||||
dnl Look for libbz2, an optional dependency.
|
||||
AC_CHECK_LIB([bz2], [BZ2_bzWriteOpen], [HAVE_LIBBZ2=yes], [HAVE_LIBBZ2=no])
|
||||
if test "x$HAVE_LIBBZ2" = xyes; then
|
||||
AC_CHECK_HEADERS([bzlib.h])
|
||||
HAVE_LIBBZ2="$ac_cv_header_bzlib_h"
|
||||
fi
|
||||
dnl Look for libbz2, a required dependency.
|
||||
AC_CHECK_LIB([bz2], [BZ2_bzWriteOpen], [true],
|
||||
[AC_MSG_ERROR([Guix requires libbz2, which is part of bzip2. See http://www.bzip.org/.])])
|
||||
AC_CHECK_HEADERS([bzlib.h], [true],
|
||||
[AC_MSG_ERROR([Guix requires libbz2, which is part of bzip2. See http://www.bzip.org/.])])
|
||||
|
||||
dnl Look for SQLite, a required dependency.
|
||||
PKG_CHECK_MODULES([SQLITE3], [sqlite3 >= 3.6.19])
|
||||
@@ -118,29 +111,30 @@ 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 (GnuTLS
|
||||
dnl is required so we can default to 'https'.)
|
||||
case "x$host_cpu" in
|
||||
xaarch64)
|
||||
# Currently only berlin.guixsd.org provides aarch64 binaries.
|
||||
guix_substitute_urls="https://berlin.guixsd.org"
|
||||
;;
|
||||
*)
|
||||
guix_substitute_urls="https://mirror.hydra.gnu.org"
|
||||
;;
|
||||
esac
|
||||
|
||||
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.)
|
||||
GUIX_CHECK_UNBUFFERED_CBIP
|
||||
|
||||
dnl Check for Guile-SSH, which is required by 'guix offload'.
|
||||
GUIX_CHECK_GUILE_SSH
|
||||
|
||||
case "x$guix_cv_have_recent_guile_ssh" in
|
||||
xyes)
|
||||
case "x$ac_cv_guix_cbips_support_setvbuf$guix_cv_have_recent_guile_ssh" in
|
||||
xyesyes)
|
||||
guix_build_daemon_offload="yes"
|
||||
AC_DEFINE([HAVE_DAEMON_OFFLOAD_HOOK], [1],
|
||||
[Define if the daemon's 'offload' build hook is being built (requires Guile-SSH).])
|
||||
@@ -169,7 +163,6 @@ if test "x$guix_build_daemon" = "xyes"; then
|
||||
[chmod +x nix/scripts/offload])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([HAVE_LIBBZ2], [test "x$HAVE_LIBBZ2" = "xyes"])
|
||||
AM_CONDITIONAL([BUILD_DAEMON], [test "x$guix_build_daemon" = "xyes"])
|
||||
AM_CONDITIONAL([BUILD_DAEMON_OFFLOAD], \
|
||||
[test "x$guix_build_daemon" = "xyes" \
|
||||
|
||||
+16
-41
@@ -8,7 +8,7 @@ AC_INIT([GNU Guix],
|
||||
[https://www.gnu.org/software/guix/])
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
|
||||
AM_INIT_AUTOMAKE([1.14 gnu silent-rules subdir-objects \
|
||||
AM_INIT_AUTOMAKE([1.12 gnu silent-rules subdir-objects \
|
||||
color-tests parallel-tests -Woverride -Wno-portability])
|
||||
|
||||
# Enable silent rules by default.
|
||||
@@ -47,26 +47,12 @@ AC_ARG_WITH([zsh-completion-dir],
|
||||
[zshcompletiondir='${datadir}/zsh/site-functions'])
|
||||
AC_SUBST([zshcompletiondir])
|
||||
|
||||
AC_ARG_WITH([fish-completion-dir],
|
||||
AC_HELP_STRING([--with-fish-completion-dir=DIR],
|
||||
[name of the Fish completion directory]),
|
||||
[fishcompletiondir="$withval"],
|
||||
[fishcompletiondir='${datadir}/fish/vendor_completions.d'])
|
||||
AC_SUBST([fishcompletiondir])
|
||||
|
||||
AC_ARG_WITH([selinux-policy-dir],
|
||||
AC_HELP_STRING([--with-selinux-policy-dir=DIR],
|
||||
[name of the SELinux policy directory]),
|
||||
[selinux_policydir="$withval"],
|
||||
[selinux_policydir='${datadir}/selinux/'])
|
||||
AC_SUBST([selinux_policydir])
|
||||
|
||||
dnl Better be verbose.
|
||||
AC_MSG_CHECKING([for the store directory])
|
||||
AC_MSG_RESULT([$storedir])
|
||||
|
||||
AC_ARG_ENABLE([daemon],
|
||||
[AS_HELP_STRING([--disable-daemon], [do not build the Nix daemon (C++)])],
|
||||
[AS_HELP_STRING([--disable-daemon], [build the Nix daemon (C++)])],
|
||||
[guix_build_daemon="$enableval"],
|
||||
[guix_build_daemon="yes"])
|
||||
|
||||
@@ -98,7 +84,7 @@ if test "x$GUILD" = "x"; then
|
||||
fi
|
||||
|
||||
if test "x$GUILE_EFFECTIVE_VERSION" = "x2.0"; then
|
||||
PKG_CHECK_MODULES([GUILE], [guile-2.0 >= 2.0.13])
|
||||
PKG_CHECK_MODULES([GUILE], [guile-2.0 >= 2.0.9])
|
||||
fi
|
||||
|
||||
dnl Installation directories for .scm and .go files.
|
||||
@@ -114,31 +100,17 @@ if test "x$have_gnutls" != "xyes"; then
|
||||
AC_MSG_ERROR([The Guile bindings of GnuTLS are missing; please install them.])
|
||||
fi
|
||||
|
||||
dnl Check for Guile-Git.
|
||||
GUILE_MODULE_AVAILABLE([have_guile_git], [(git)])
|
||||
if test "x$have_guile_git" != "xyes"; then
|
||||
AC_MSG_ERROR([Guile-Git is missing; please install it.])
|
||||
fi
|
||||
|
||||
dnl Guile-JSON is used in various places.
|
||||
GUILE_MODULE_AVAILABLE([have_guile_json], [(json)])
|
||||
AM_CONDITIONAL([HAVE_GUILE_JSON], [test "x$have_guile_json" = "xyes"])
|
||||
|
||||
dnl Guile-Sqlite3 is used by the (guix store ...) modules.
|
||||
GUIX_CHECK_GUILE_SQLITE3
|
||||
if test "x$guix_cv_have_recent_guile_sqlite3" != "xyes"; then
|
||||
AC_MSG_ERROR([A recent Guile-SQLite3 could not be found; please install it.])
|
||||
fi
|
||||
dnl Check for Guile-Git.
|
||||
GUILE_MODULE_AVAILABLE([have_guile_git], [(git)])
|
||||
AM_CONDITIONAL([HAVE_GUILE_GIT], [test "x$have_guile_git" = "xyes"])
|
||||
|
||||
dnl Make sure we have a full-fledged Guile.
|
||||
GUIX_ASSERT_GUILE_FEATURES([regex posix socket net-db threads])
|
||||
|
||||
dnl Make sure we don't suffer from the bug in 'equal?' wrt. syntax objects
|
||||
dnl found in 2.2.1. See <https://bugs.gnu.org/29903>.
|
||||
GUIX_ASSERT_SYNTAX_OBJECT_EQUAL
|
||||
|
||||
AC_PROG_SED
|
||||
|
||||
dnl Decompressors, for use by the substituter and other modules.
|
||||
AC_PATH_PROG([GZIP], [gzip])
|
||||
AC_PATH_PROG([BZIP2], [bzip2])
|
||||
@@ -160,11 +132,18 @@ AC_ARG_WITH([nix-prefix],
|
||||
esac],
|
||||
[])
|
||||
|
||||
AC_PATH_PROG([NIX_INSTANTIATE], [nix-instantiate])
|
||||
AC_PATH_PROG([NIX_HASH], [nix-hash])
|
||||
if test "x$guix_build_daemon$NIX_HASH" = "xno"; then
|
||||
if test "x$guix_build_daemon$NIX_INSTANTIATE$NIX_HASH" = "xno"; then
|
||||
AC_MSG_ERROR([Nix programs not found; please install Nix or use `--with-nix-prefix'.])
|
||||
fi
|
||||
|
||||
if test "x$NIX_INSTANTIATE" = "x"; then
|
||||
# This program is an optional dependency, so we just want it to be
|
||||
# taken from $PATH if it's not available right now.
|
||||
NIX_INSTANTIATE="nix-instantiate"
|
||||
fi
|
||||
|
||||
AC_ARG_WITH([nixpkgs],
|
||||
[AS_HELP_STRING([--with-nixpkgs=DIR],
|
||||
[search for Nixpkgs in DIR (for testing purposes only)])],
|
||||
@@ -262,10 +241,6 @@ AM_MISSING_PROG([DOT], [dot])
|
||||
dnl Manual pages.
|
||||
AM_MISSING_PROG([HELP2MAN], [help2man])
|
||||
|
||||
dnl Documentation translation.
|
||||
AM_MISSING_PROG([PO4A_TRANSLATE], [po4a-translate])
|
||||
AM_MISSING_PROG([PO4A_UPDATEPO], [po4a-updatepo])
|
||||
|
||||
dnl Emacs (optional), for 'etc/indent-package.el'.
|
||||
AC_PATH_PROG([EMACS], [emacs], [/usr/bin/emacs])
|
||||
AC_SUBST([EMACS])
|
||||
@@ -282,9 +257,9 @@ esac
|
||||
AC_CONFIG_FILES([Makefile
|
||||
po/guix/Makefile.in
|
||||
po/packages/Makefile.in
|
||||
etc/guix-daemon.cil
|
||||
guix/config.scm])
|
||||
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])
|
||||
|
||||
@@ -1,514 +0,0 @@
|
||||
@node Contribuer
|
||||
@chapter Contribuer
|
||||
|
||||
Ce projet est un effort coopératif et nous avons besoin de votre aide pour
|
||||
le faire grandir ! Contactez-nous sur @email{guix-devel@@gnu.org} et
|
||||
@code{#guix} sur le réseau IRC Freenode. Nous accueillons les idées, les
|
||||
rapports de bogues, les correctifs et tout ce qui pourrait aider le projet.
|
||||
Nous apprécions particulièrement toute aide sur la création de paquets
|
||||
(@pxref{Consignes d'empaquetage}).
|
||||
|
||||
@cindex code de conduite, des contributeurs
|
||||
@cindex convention de contribution
|
||||
Nous souhaitons fournir un environnement chaleureux, amical et sans
|
||||
harcèlement pour que tout le monde puisse contribuer au mieux de ses
|
||||
capacités. Pour cela notre projet a une « Convention de contribution »
|
||||
adaptée de @url{http://contributor-covenant.org/}. Vous pouvez trouver une
|
||||
version locale dans le fichier @file{CODE-OF-CONDUCT} dans l'arborescence
|
||||
des sources.
|
||||
|
||||
Les contributeurs n'ont pas besoin d'utiliser leur nom légal dans leurs
|
||||
correctifs et leurs communications en ligne ; ils peuvent utiliser n'importe
|
||||
quel nom ou pseudonyme de leur choix.
|
||||
|
||||
@menu
|
||||
* Construire depuis Git:: toujours le plus récent.
|
||||
* Lancer Guix avant qu'il ne soit installé:: Astuces pour les hackers.
|
||||
* La configuration parfaite:: Les bons outils.
|
||||
* Style de code:: Hygiène du contributeur.
|
||||
* Envoyer des correctifs:: Partager votre travail.
|
||||
@end menu
|
||||
|
||||
@node Construire depuis Git
|
||||
@section Construire depuis Git
|
||||
|
||||
Si vous souhaitez travailler sur Guix lui-même, il est recommandé d'utiliser
|
||||
la dernière version du dépôt Git :
|
||||
|
||||
@example
|
||||
git clone https://git.savannah.gnu.org/git/guix.git
|
||||
@end example
|
||||
|
||||
Lors de la construction de Guix depuis un extrait, les paquets suivants sont
|
||||
requis en plus de ceux mentionnés dans les instructions d'installation
|
||||
(@pxref{Prérequis}).
|
||||
|
||||
@itemize
|
||||
@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 (facultatif)}.
|
||||
@end itemize
|
||||
|
||||
La manière la plus simple de configurer un environnement de développement
|
||||
pour Guix est, bien sûr, d'utiliser Guix ! La commande suivante démarre un
|
||||
nouveau shell où toutes les dépendances et les variables d'environnements
|
||||
appropriées sont configurés pour travailler sur Guix :
|
||||
|
||||
@example
|
||||
guix environment guix
|
||||
@end example
|
||||
|
||||
@xref{Invoquer guix environment}, pour plus d'information sur cette
|
||||
commande. On peut ajouter des dépendances supplémentaires avec
|
||||
@option{--ad-hoc} :
|
||||
|
||||
@example
|
||||
guix environment guix --ad-hoc help2man git strace
|
||||
@end example
|
||||
|
||||
Lancez @command{./bootstrap} pour générer l'infrastructure du système de
|
||||
construction avec Autoconf et Automake. Si vous avez une erreur comme :
|
||||
|
||||
@example
|
||||
configure.ac:46: error: possibly undefined macro: PKG_CHECK_MODULES
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
cela signifie probablement qu'Autoconf n'a pas pu trouver @file{pkg.m4} qui
|
||||
est fournit par pkg-config. Assurez-vous que @file{pkg.m4} est disponible.
|
||||
C'est aussi vrai pour l'ensemble de macros de @file{guile.m4} fournies par
|
||||
Guile. Par exemple, si vous avez installé Automake dans @file{/usr/local},
|
||||
il ne cherchera pas les fichiers @file{.m4} dans @file{/usr/share}. Dans ce
|
||||
case vous devez invoquer la commande suivante :
|
||||
|
||||
@example
|
||||
export ACLOCAL_PATH=/usr/share/aclocal
|
||||
@end example
|
||||
|
||||
@xref{Macro Search Path,,, automake, The GNU Automake Manual}, pour plus
|
||||
d'information.
|
||||
|
||||
Ensuite, lancez @command{./configure} comme d'habitude. Assurez-vous de
|
||||
passer @code{--localstatedir=@var{directory}} où @var{directory} est la
|
||||
valeur @code{localstatedir} utilisée par votre installation actuelle
|
||||
(@pxref{Le dépôt} pour plus d'informations à ce propos).
|
||||
|
||||
Finalement, vous devez invoquer @code{make check} pour lancer les tests
|
||||
(@pxref{Lancer la suite de tests}). Si quelque chose échoue, jetez un œil
|
||||
aux instructions d'installation (@pxref{Installation}) ou envoyez un message
|
||||
à la list @email{guix-devel@@gnu.org}.
|
||||
|
||||
|
||||
@node Lancer Guix avant qu'il ne soit installé
|
||||
@section Lancer Guix avant qu'il ne soit installé
|
||||
|
||||
Pour garder un environnement de travail sain, il est utile de tester les
|
||||
changement localement sans les installer pour de vrai. Pour pouvoir
|
||||
distinguer votre rôle « d'utilisateur final » de celui parfois haut en
|
||||
couleur de « développeur ».
|
||||
|
||||
Pour cela, tous les outils en ligne de commande sont utilisables même sans
|
||||
avoir lancé @code{make install}. Vous devez pour cela préfixer chaque
|
||||
commande par @command{./pre-inst-env} (le script @file{pre-inst-env} se
|
||||
trouve dans le répertoire de plus haut niveau de l'arborescence des sources
|
||||
de Guix) comme cela@footnote{L'option @option{-E} de @command{sudo} garantie
|
||||
que @code{GUILE_LOAD_PATH} est bien paramétré pour @command{guix-daemon} et
|
||||
les outils qu'il utilise puissent trouver les modules Guile dont ils ont
|
||||
besoin.} :
|
||||
|
||||
@example
|
||||
$ sudo -E ./pre-inst-env guix-daemon --build-users-group=guixbuild
|
||||
$ ./pre-inst-env guix build hello
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
De même, pour une session Guile qui utilise les modules Guix :
|
||||
|
||||
@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{} et pour un 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
|
||||
|
||||
Le script @command{pre-inst-env} paramètre toutes les variables
|
||||
d'environnement nécessaires, dont @env{PATH} et @env{GUILE_LOAD_PATH}.
|
||||
|
||||
Remarquez que @command{./pre-inst-env guix pull} ne met @emph{pas} à jour
|
||||
l'arborescence des sources locale ; cela met seulement à jour le lien
|
||||
symbolique de @file{~/.config/guix/current} (@pxref{Invoquer guix pull}).
|
||||
Lancez @command{git pull} à la place si vous voulez mettre à jour votre
|
||||
arborescence des source locale.
|
||||
|
||||
|
||||
@node La configuration parfaite
|
||||
@section La configuration parfaite
|
||||
|
||||
La configuration parfaite pour travailler sur Guix est simplement la
|
||||
configuration parfaite pour travailler en Guile (@pxref{Using Guile in
|
||||
Emacs,,, guile, Guile Reference Manual}). Tout d'abord, vous avez besoin de
|
||||
mieux qu'un éditeur de texte, vous avez besoin de
|
||||
@url{http://www.gnu.org/software/emacs, Emacs}, amélioré par le superbe
|
||||
@url{http://nongnu.org/geiser/, Geiser}.
|
||||
|
||||
Geiser permet le développement interactif et incrémental depuis Emacs : la
|
||||
compilation du code et son évaluation depuis les buffers, l'accès à la
|
||||
documentation en ligne (docstrings), la complétion sensible au contexte,
|
||||
@kbd{M-.} pour sauter à la définition d'un objet, un REPL pour tester votre
|
||||
code, et bien plus (@pxref{Introduction,,, geiser, Geiser User Manual}).
|
||||
Pour travailler confortablement sur Guix, assurez-vous de modifier le chemin
|
||||
de chargement de Guile pour qu'il trouve les fichiers source de votre dépôt
|
||||
:
|
||||
|
||||
@lisp
|
||||
;; @r{Si l'extrait est dans ~/src/guix.}
|
||||
(with-eval-after-load 'geiser-guile
|
||||
(add-to-list 'geiser-guile-load-path "~/src/guix"))
|
||||
@end lisp
|
||||
|
||||
Pour effectivement éditer le code, Emacs a déjà un très bon mode Scheme.
|
||||
Mais en plus de ça, vous ne devez pas rater
|
||||
@url{http://www.emacswiki.org/emacs/ParEdit, Paredit}. Il fournit des
|
||||
fonctionnalités pour opérer directement sur l'arbre de syntaxe, comme
|
||||
relever une s-expression ou l'envelopper, absorber ou rejeter la
|
||||
s-expression suivante, etc.
|
||||
|
||||
@cindex extraits de code
|
||||
@cindex modèles
|
||||
@cindex réduire la quantité de code commun
|
||||
Nous fournissons aussi des modèles pour les messages de commit git communs
|
||||
et les définitions de paquets dans le répertoire @file{etc/snippets}. Ces
|
||||
modèles s'utilisent avec @url{http://joaotavora.github.io/yasnippet/,
|
||||
YASnippet} pour développer des chaînes courtes de déclenchement en extraits
|
||||
de texte interactifs. Vous pouvez ajouter le répertoire des modèles dans la
|
||||
variables @var{yas-snippet-dirs} d'Emacs.
|
||||
|
||||
@lisp
|
||||
;; @r{Si l'extrait est dans ~/src/guix.}
|
||||
(with-eval-after-load 'yasnippet
|
||||
(add-to-list 'yas-snippet-dirs "~/src/guix/etc/snippets"))
|
||||
@end lisp
|
||||
|
||||
Les extraits de messages de commit dépendent de @url{https://magit.vc/,
|
||||
Magit} pour afficher les fichiers sélectionnés. Lors de la modification
|
||||
d'un message de commit, tapez @code{add} suivi de @kbd{TAB} pour insérer un
|
||||
modèle de message de commit pour ajouter un paquet ; tapez @code{update}
|
||||
suivi de @kbd{TAB} pour insérer un modèle pour la mise à jour d'un paquet.
|
||||
|
||||
L'extrait principal pour @code{scheme-mode} est lancé en tapant
|
||||
@code{package…} suivi par @kbd{TAB}. Cet extrait insère aussi la chaîne de
|
||||
déclenchement @code{origin…}, qui peut aussi être étendue. L'extrait
|
||||
@code{origin} lui-même peut aussi insérer des chaînes de déclenchement qui
|
||||
finissent sur @code{…}, qui peuvent aussi être étendues.
|
||||
|
||||
|
||||
@node Style de code
|
||||
@section Style de code
|
||||
|
||||
En général notre code suit le Standard de Code GNU (@pxref{Top,,, standards,
|
||||
GNU Coding Standards}). Cependant, il ne parle pas beaucoup de Scheme, donc
|
||||
voici quelques règles supplémentaires.
|
||||
|
||||
@menu
|
||||
* Paradigme de programmation:: Comment composer vos éléments.
|
||||
* Modules:: Où stocker votre code ?
|
||||
* Types de données et reconnaissance de motif:: Implémenter des
|
||||
structures de données.
|
||||
* Formatage du code:: Conventions d'écriture.
|
||||
@end menu
|
||||
|
||||
@node Paradigme de programmation
|
||||
@subsection Paradigme de programmation
|
||||
|
||||
Le code Scheme dans Guix est écrit dans un style purement fonctionnel. Le
|
||||
code qui s'occupe des entrées-sorties est une exception ainsi que les
|
||||
procédures qui implémentent des concepts bas-niveau comme la procédure
|
||||
@code{memoize}.
|
||||
|
||||
@node Modules
|
||||
@subsection Modules
|
||||
|
||||
Les modules Guile qui sont sensés être utilisés du côté de la construction
|
||||
doivent se trouver dans l'espace de nom @code{(guix build @dots{})}. Ils ne
|
||||
doivent pas se référer à d'autres modules Guix ou GNU@. Cependant il est
|
||||
correct pour un module « côté hôte » de dépendre d'un module coté
|
||||
construction.
|
||||
|
||||
Les modules qui s'occupent du système GNU général devraient se trouver dans
|
||||
l'espace de nom @code{(gnu @dots{})} plutôt que @code{(guix @dots{})}.
|
||||
|
||||
@node Types de données et reconnaissance de motif
|
||||
@subsection Types de données et reconnaissance de motif
|
||||
|
||||
La tendance en Lisp classique est d'utiliser des listes pour tout
|
||||
représenter et de naviguer dedans « à la main ( avec @code{car}, @code{cdr},
|
||||
@code{cadr} et compagnie. Il y a plusieurs problèmes avec ce style,
|
||||
notamment le fait qu'il soit dur à lire, source d'erreur et un obstacle aux
|
||||
rapports d'erreur bien typés.
|
||||
|
||||
Le code de Guix devrait définir des types de données appropriées (par
|
||||
exemple, avec @code{define-record-type*}) plutôt que d'abuser des listes.
|
||||
En plus, il devrait utiliser la recherche de motifs, via le module Guile
|
||||
@code{(ice-9 match)}, surtout pour rechercher dans des listes.
|
||||
|
||||
@node Formatage du code
|
||||
@subsection Formatage du code
|
||||
|
||||
@cindex formater le code
|
||||
@cindex style de code
|
||||
Lorsque nous écrivons du code Scheme, nous suivons la sagesse commune aux
|
||||
programmeurs Scheme. En général, nous suivons les
|
||||
@url{http://mumble.net/~campbell/scheme/style.txt, règles de style de
|
||||
Riastradh}. Ce document décrit aussi les conventions utilisées dans le code
|
||||
de Guile. Il est bien pensé et bien écrit, alors n'hésitez pas à le lire.
|
||||
|
||||
Certaines formes spéciales introduites dans Guix comme la macro
|
||||
@code{substitute*} ont des règles d'indentation spécifiques. Elles sont
|
||||
définies dans le fichier @file{.dir-locals.el} qu'Emacs utilise
|
||||
automatiquement. Remarquez aussi qu'Emacs-Guix fournit le mode
|
||||
@code{guix-devel-mode} qui indente et colore le code Guix correctement
|
||||
(@pxref{Development,,, emacs-guix, The Emacs-Guix Reference Manual}).
|
||||
|
||||
@cindex indentation, du code
|
||||
@cindex formatage, du code
|
||||
Si vous n'utilisez pas Emacs, assurez-vous que votre éditeur connaisse ces
|
||||
règles. Pour indenter automatiquement une définition de paquet, vous pouvez
|
||||
aussi lancer :
|
||||
|
||||
@example
|
||||
./etc/indent-code.el gnu/packages/@var{file}.scm @var{package}
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
Cela indente automatiquement la définition de @var{package} dans
|
||||
@file{gnu/packages/@var{file}.scm} en lançant Emacs en mode commande. Pour
|
||||
indenter un fichier complet, n'indiquez pas de second argument :
|
||||
|
||||
@example
|
||||
./etc/indent-code.el gnu/services/@var{file}.scm
|
||||
@end example
|
||||
|
||||
@cindex Vim, édition de code Scheme
|
||||
Si vous éditez du code avec Vim, nous recommandons de lancer @code{:set
|
||||
autoindent} pour que votre code soit automatiquement indenté au moment où
|
||||
vous l'entrez. En plus,
|
||||
@uref{https://www.vim.org/scripts/script.php?script_id=3998,
|
||||
@code{paredit.vim}} peut vous aider à gérer toutes ces parenthèses.
|
||||
|
||||
Nous demandons que toutes les procédure de premier niveau contiennent une
|
||||
chaîne de documentation. Ce pré-requis peut être relâché pour les
|
||||
procédures privées simples dans l'espace de nom @code{(guix build @dots{})}
|
||||
cependant.
|
||||
|
||||
Les procédures ne devraient pas avoir plus de quatre paramètres
|
||||
positionnés. Utilisez des paramètres par mot-clefs pour les procédures qui
|
||||
prennent plus de quatre paramètres.
|
||||
|
||||
|
||||
@node Envoyer des correctifs
|
||||
@section Envoyer des correctifs
|
||||
|
||||
Le développement se fait avec le système de contrôle de version Git. Ainsi,
|
||||
l'accès au dépôt n'est pas strictement nécessaire. Nous accueillons les
|
||||
contributions sous forme de correctifs produits par @code{git format-patch}
|
||||
envoyés sur la liste de diffusion @email{guix-patches@@gnu.org}.
|
||||
|
||||
Cette liste de diffusion est gérée par une instance Debbugs accessible à
|
||||
l'adresse @uref{https://bugs.gnu.org/guix-patches}, qui nous permet de
|
||||
suivre les soumissions. Chaque message envoyé à cette liste se voit
|
||||
attribuer un numéro de suivi ; les gens peuvent ensuite répondre à cette
|
||||
soumission en envoyant un courriel à @code{@var{NNN}@@debbugs.gnu.org}, où
|
||||
@var{NNN} est le numéro de suivi (@pxref{Envoyer une série de correctifs}).
|
||||
|
||||
Veuillez écrire les messages de commit dans le format ChangeLog
|
||||
(@pxref{Change Logs,,, standards, GNU Coding Standards}) ; vous pouvez
|
||||
regarder l'historique des commits pour trouver des exemples.
|
||||
|
||||
Avant de soumettre un correctif qui ajoute ou modifie la définition d'un
|
||||
paquet, veuillez vérifier cette check-list :
|
||||
|
||||
@enumerate
|
||||
@item
|
||||
Si les auteurs du paquet logiciel fournissent une signature cryptographique
|
||||
pour l'archive, faîtes un effort pour vérifier l'authenticité de l'archive.
|
||||
Pour un fichier de signature GPG détaché, cela se fait avec la commande
|
||||
@code{gpg --verify}.
|
||||
|
||||
@item
|
||||
Prenez un peu de temps pour fournir un synopsis et une description adéquats
|
||||
pour le paquet. Voir @xref{Synopsis et descriptions} pour quelques lignes
|
||||
directrices.
|
||||
|
||||
@item
|
||||
Lancez @code{guix lint @var{paquet}}, où @var{paquet} est le nom du nouveau
|
||||
paquet ou du paquet modifié, et corrigez les erreurs qu'il rapporte
|
||||
(@pxref{Invoquer guix lint}).
|
||||
|
||||
@item
|
||||
Assurez-vous que le paquet se construise sur votre plate-forme avec
|
||||
@code{guix build @var{paquet}}.
|
||||
|
||||
@item
|
||||
@cindex construction groupée
|
||||
Assurez-vous que le paquet n'utilise pas de copie groupée d'un logiciel déjà
|
||||
disponible dans un paquet séparé.
|
||||
|
||||
Parfois, les paquets incluent des copie du code source de leurs dépendances
|
||||
pour le confort de leurs utilisateurs. Cependant, en tant que distribution,
|
||||
nous voulons nous assurer que ces paquets utilisent bien les copient que
|
||||
nous avons déjà dans la distribution si elles existent. Cela améliore
|
||||
l'utilisation des ressources (la dépendance n'est construite et stockée
|
||||
qu'une seule fois) et permet à la distribution de faire des changements
|
||||
transversaux comme appliquer des correctifs de sécurité pour un paquet donné
|
||||
depuis un unique emplacement et qu'ils affectent tout le système, ce
|
||||
qu'empêchent les copies groupées.
|
||||
|
||||
@item
|
||||
Regardez le profile rapporté par @command{guix size} (@pxref{Invoquer guix size}). Cela vous permettra de remarquer des références à d'autres paquets
|
||||
qui ont été retenus. Il peut aussi aider à déterminer s'il faut découper le
|
||||
paquet (@pxref{Des paquets avec plusieurs résultats}) et quelle dépendance
|
||||
facultative utiliser.
|
||||
|
||||
@item
|
||||
Pour les changements important, vérifiez que les paquets qui en dépendent
|
||||
(s'ils existent) ne sont pas affectés par le changement ; @code{guix refresh
|
||||
--list-dependant @var{paquet}} vous aidera (@pxref{Invoquer guix refresh}).
|
||||
|
||||
@c ===========================================================================
|
||||
@c
|
||||
@c This file was generated with po4a. Translate the source file.
|
||||
@c
|
||||
@c ===========================================================================
|
||||
@c See <https://lists.gnu.org/archive/html/guix-devel/2016-10/msg00933.html>.
|
||||
@cindex stratégie de branche
|
||||
@cindex stratégie de planification des reconstructions
|
||||
Suivant le nombre de paquets dépendants et donc le nombre de reconstruction
|
||||
induites, les commits vont vers des branches différentes, suivant ces
|
||||
principes :
|
||||
|
||||
@table @asis
|
||||
@item 300 paquets dépendants ou moins
|
||||
branche @code{master} (changements non-disruptifs).
|
||||
|
||||
@item entre 300 et 1 200 paquets dépendants
|
||||
branche @code{staging} (changemets non-disruptifs). Cette branche devrait
|
||||
être fusionnées dans @code{master} tous les 3 semaines. Les changements par
|
||||
thèmes (par exemple une mise à jour de la pile GNOME) peuvent aller dans une
|
||||
branche spécifique (disons, @code{gnome-updates}).
|
||||
|
||||
@item plus de 1 200 paquets dépendants
|
||||
branche @code{core-updates} (peut inclure des changements majeurs et
|
||||
potentiellement disruptifs). Cette branche devrait être fusionnée dans
|
||||
@code{master} tous les 2,5 mois environ.
|
||||
@end table
|
||||
|
||||
Toutes ces branches sont @uref{https://hydra.gnu.org/project/gnu, gérées par
|
||||
notre ferme de construction} et fusionnées dans @code{master} une fois que
|
||||
tout a été construit correctement. Cela nous permet de corriger des
|
||||
problèmes avant qu'ils n'atteignent les utilisateurs et réduit la fenêtre
|
||||
pendant laquelle les binaires pré-construits ne sont pas disponibles.
|
||||
|
||||
@c TODO: It would be good with badges on the website that tracks these
|
||||
@c branches. Or maybe even a status page.
|
||||
Généralement les autres branches que @code{master} sont considérées comme
|
||||
@emph{gelées} s'il y a eu une évaluation récente ou qu'il y a une branche
|
||||
@code{-next} correspondante. Demandez sur la liste de diffusion ou sur IRC
|
||||
si vous n'êtes pas sûr de savoir où pousser votre correctif.
|
||||
|
||||
@item
|
||||
@cindex déterminisme, du processus de construction
|
||||
@cindex construction reproductibles, vérification
|
||||
Vérifiez si le processus de construction du paquet est déterministe. Cela
|
||||
signifie typiquement vérifier qu'une construction indépendante du paquet
|
||||
renvoie exactement le même résultat que vous avez obtenu, bit à bit.
|
||||
|
||||
Une manière simple de le faire est de reconstruire le paquet plusieurs fois
|
||||
à la suite sur votre machine (@pxref{Invoquer guix build}) :
|
||||
|
||||
@example
|
||||
guix build --rounds=2 mon-paquet
|
||||
@end example
|
||||
|
||||
Cela est suffisant pour trouver une classe de non-déterminisme commune,
|
||||
comme l'horodatage ou des sorties générées aléatoirement dans le résultat de
|
||||
la construction.
|
||||
|
||||
Une autre option consiste à utiliser @command{guix challenge}
|
||||
(@pxref{Invoquer guix challenge}). Vous pouvez lancer la commande une fois
|
||||
que les paquets ont été commités et construits par @code{hydra.gnu.org} pour
|
||||
vérifier s'il obtient le même résultat que vous. Mieux encore : trouvez une
|
||||
autre machine qui peut le construire et lancez @command{guix publish}. Puis
|
||||
la machine distante est sûrement différente de la vôtre, cela peut trouver
|
||||
des problèmes de non-déterminisme liés au matériel — par exemple utiliser
|
||||
une extension du jeu d'instruction — ou du noyau du système d'exploitation —
|
||||
par exemple se reposer sur @code{uname} ou les fichiers de @file{/proc}.
|
||||
|
||||
@item
|
||||
Lorsque vous écrivez de la documentation, utilisez une formulation au genre
|
||||
neutre lorsque vous vous référez à des personnes, comme le
|
||||
@uref{https://fr.wikipedia.org/wiki/They_singulier, ``they''@comma{}
|
||||
``their''@comma{} ``them'' singulier} (en anglais).
|
||||
|
||||
@item
|
||||
Vérifiez que votre correctif contienne seulement un ensemble de changements
|
||||
liés. Grouper des changements non liés ensemble rend la revue plus
|
||||
difficile et plus lente.
|
||||
|
||||
Ajouter plusieurs paquet ou une mise à jour d'un paquet avec des corrections
|
||||
dans ce paquet sont des exemples de changements sans rapport.
|
||||
|
||||
@item
|
||||
Suivez nos règles de formatage de code, éventuellement en lançant le script
|
||||
@command{et/indent-code.el} pour le faire automatiquement (@pxref{Formatage
|
||||
du code}).
|
||||
|
||||
@end enumerate
|
||||
|
||||
Lorsque vous envoyez un correctif à la liste de diffusion, utilisez
|
||||
@samp{[PATCH] @dots{}} comme sujet. Vous pouvez utiliser votre client de
|
||||
courriel ou la commande @command{git send-email} (@pxref{Envoyer une série
|
||||
de correctifs}). Nous préférons recevoir des correctifs en texte brut, soit
|
||||
en ligne, soit en pièce-jointe MIME@. Nous vous conseillons de faire
|
||||
attention si votre client de courriel change par exemple les retours à la
|
||||
ligne ou l'indentation, ce qui peut casser les correctifs.
|
||||
|
||||
Lorsqu'un bogue est résolu, veuillez fermer le fil en envoyant un courriel à
|
||||
@email{@var{NNN}-done@@debbugs.gnu.org}.
|
||||
|
||||
@unnumberedsubsec Envoyer une série de correctifs
|
||||
@anchor{Envoyer une série de correctifs}
|
||||
@cindex série de correctifs
|
||||
@cindex @code{git send-email}
|
||||
@cindex @code{git-send-email}
|
||||
|
||||
@c Debbugs bug: https://debbugs.gnu.org/db/15/15361.html
|
||||
Lorsque vous envoyez une série de correctifs (p.@@:: ex.@: avec @code{git
|
||||
send-email}), envoyez d'abord une premier message à
|
||||
@email{guix-patches@@gnu.org} puis envoyez le reste des correctifs à
|
||||
@email{@var{NNN}@@debbugs.gnu.org} pour vous assurer qu'ils seront groupés
|
||||
ensemble. Voyez @uref{https://debbugs.gnu.org/Advanced.html, la
|
||||
documentation de Debbugs} pour plus d'informations.
|
||||
+29
-90
@@ -31,13 +31,7 @@ choice.
|
||||
@section Building from Git
|
||||
|
||||
If you want to hack Guix itself, it is recommended to use the latest
|
||||
version from the Git repository:
|
||||
|
||||
@example
|
||||
git clone https://git.savannah.gnu.org/git/guix.git
|
||||
@end example
|
||||
|
||||
When building Guix from a checkout,
|
||||
version from the Git repository. When building Guix from a checkout,
|
||||
the following packages are required in addition to those mentioned in
|
||||
the installation instructions (@pxref{Requirements}).
|
||||
|
||||
@@ -108,17 +102,12 @@ actually installing them. So that you can distinguish between your
|
||||
``end-user'' hat and your ``motley'' costume.
|
||||
|
||||
To that end, all the command-line tools can be used even if you have not
|
||||
run @code{make install}. To do that, you first need to have an environment
|
||||
with all the dependencies available (@pxref{Building from Git}), and then
|
||||
simply prefix each command with
|
||||
run @code{make install}. To do that, prefix each command with
|
||||
@command{./pre-inst-env} (the @file{pre-inst-env} script lives in the
|
||||
top build tree of Guix), as in@footnote{The @option{-E} flag to
|
||||
@command{sudo} guarantees that @code{GUILE_LOAD_PATH} is correctly set
|
||||
such that @command{guix-daemon} and the tools it uses can find the Guile
|
||||
modules they need.}:
|
||||
top build tree of Guix), as in:
|
||||
|
||||
@example
|
||||
$ sudo -E ./pre-inst-env guix-daemon --build-users-group=guixbuild
|
||||
$ sudo ./pre-inst-env guix-daemon --build-users-group=guixbuild
|
||||
$ ./pre-inst-env guix build hello
|
||||
@end example
|
||||
|
||||
@@ -157,9 +146,15 @@ 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/current}
|
||||
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.
|
||||
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
|
||||
@@ -192,34 +187,6 @@ facilities to directly operate on the syntax tree, such as raising an
|
||||
s-expression or wrapping it, swallowing or rejecting the following
|
||||
s-expression, etc.
|
||||
|
||||
@cindex code snippets
|
||||
@cindex templates
|
||||
@cindex reducing boilerplate
|
||||
We also provide templates for common git commit messages and package
|
||||
definitions in the @file{etc/snippets} directory. These templates can
|
||||
be used with @url{http://joaotavora.github.io/yasnippet/, YASnippet} to
|
||||
expand short trigger strings to interactive text snippets. You may want
|
||||
to add the snippets directory to the @var{yas-snippet-dirs} variable in
|
||||
Emacs.
|
||||
|
||||
@lisp
|
||||
;; @r{Assuming the Guix checkout is in ~/src/guix.}
|
||||
(with-eval-after-load 'yasnippet
|
||||
(add-to-list 'yas-snippet-dirs "~/src/guix/etc/snippets"))
|
||||
@end lisp
|
||||
|
||||
The commit message snippets depend on @url{https://magit.vc/, Magit} to
|
||||
display staged files. When editing a commit message type @code{add}
|
||||
followed by @kbd{TAB} to insert a commit message template for adding a
|
||||
package; type @code{update} followed by @kbd{TAB} to insert a template
|
||||
for updating a package.
|
||||
|
||||
The main snippet for @code{scheme-mode} is triggered by typing
|
||||
@code{package...} followed by @kbd{TAB}. This snippet also inserts the
|
||||
trigger string @code{origin...}, which can be expanded further. The
|
||||
@code{origin} snippet in turn may insert other trigger strings ending on
|
||||
@code{...}, which also can be expanded further.
|
||||
|
||||
|
||||
@node Coding Style
|
||||
@section Coding Style
|
||||
@@ -304,13 +271,6 @@ indent a whole file, omit the second argument:
|
||||
./etc/indent-code.el gnu/services/@var{file}.scm
|
||||
@end example
|
||||
|
||||
@cindex Vim, Scheme code editing
|
||||
If you are editing code with Vim, we recommend that you run @code{:set
|
||||
autoindent} so that your code is automatically indented as you type.
|
||||
Additionally,
|
||||
@uref{https://www.vim.org/scripts/script.php?script_id=3998,
|
||||
@code{paredit.vim}} may help you deal with all these parentheses.
|
||||
|
||||
We require all top-level procedures to carry a docstring. This
|
||||
requirement can be relaxed for simple private procedures in the
|
||||
@code{(guix build @dots{})} name space, though.
|
||||
@@ -332,7 +292,11 @@ This mailing list is backed by a Debbugs instance accessible at
|
||||
of submissions. Each message sent to that mailing list gets a new
|
||||
tracking number assigned; people can then follow up on the submission by
|
||||
sending email to @code{@var{NNN}@@debbugs.gnu.org}, where @var{NNN} is
|
||||
the tracking number (@pxref{Sending a Patch Series}).
|
||||
the tracking number. When sending a patch series, please first send one
|
||||
message to @email{guix-patches@@gnu.org}, and then send subsequent
|
||||
patches to @email{@var{NNN}@@debbugs.gnu.org} to make sure they are kept
|
||||
together. See @uref{https://debbugs.gnu.org/Advanced.html, the Debbugs
|
||||
documentation}, for more information.
|
||||
|
||||
Please write commit logs in the ChangeLog format (@pxref{Change Logs,,,
|
||||
standards, GNU Coding Standards}); you can check the commit history for
|
||||
@@ -342,12 +306,6 @@ Before submitting a patch that adds or modifies a package definition,
|
||||
please run through this check list:
|
||||
|
||||
@enumerate
|
||||
@item
|
||||
If the authors of the packaged software provide a cryptographic
|
||||
signature for the release tarball, make an effort to verify the
|
||||
authenticity of the archive. For a detached GPG signature file this
|
||||
would be done with the @code{gpg --verify} command.
|
||||
|
||||
@item
|
||||
Take some time to provide an adequate synopsis and description for the
|
||||
package. @xref{Synopses and Descriptions}, for some guidelines.
|
||||
@@ -375,6 +333,12 @@ 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
|
||||
If the authors of the packaged software provide a cryptographic
|
||||
signature for the release tarball, make an effort to verify the
|
||||
authenticity of the archive. For a detached GPG signature file this
|
||||
would be done with the @code{gpg --verify} command.
|
||||
|
||||
@item
|
||||
Take a look at the profile reported by @command{guix size}
|
||||
(@pxref{Invoking guix size}). This will allow you to notice references
|
||||
@@ -409,19 +373,12 @@ changes). This branch is intended to be merged in @code{master} every
|
||||
2.5 months or so.
|
||||
@end table
|
||||
|
||||
All these branches are @uref{https://hydra.gnu.org/project/gnu,
|
||||
tracked by our build farm} and merged into @code{master} once
|
||||
All these branches are tracked by our build farm
|
||||
and 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.
|
||||
|
||||
Generally, branches other than @code{master} are considered
|
||||
@emph{frozen} if there has been a recent evaluation, or there is a
|
||||
corresponding @code{-next} branch. Please ask on the mailing list or
|
||||
IRC if unsure where to place a patch.
|
||||
@c TODO: It would be good with badges on the website that tracks these
|
||||
@c branches. Or maybe even a status page.
|
||||
|
||||
@item
|
||||
@cindex determinism, of build processes
|
||||
@cindex reproducible builds, checking
|
||||
@@ -471,25 +428,7 @@ Please follow our code formatting rules, possibly running the
|
||||
|
||||
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 (@pxref{Sending a Patch Series}). 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 potentially break the
|
||||
patches.
|
||||
|
||||
When a bug is resolved, please close the thread by sending an email to
|
||||
@email{@var{NNN}-done@@debbugs.gnu.org}.
|
||||
|
||||
@unnumberedsubsec Sending a Patch Series
|
||||
@anchor{Sending a Patch Series}
|
||||
@cindex patch series
|
||||
@cindex @code{git send-email}
|
||||
@cindex @code{git-send-email}
|
||||
|
||||
When sending a patch series (e.g., using @code{git send-email}), please
|
||||
first send one message to @email{guix-patches@@gnu.org}, and then send
|
||||
subsequent patches to @email{@var{NNN}@@debbugs.gnu.org} to make sure
|
||||
they are kept together. See
|
||||
@uref{https://debbugs.gnu.org/Advanced.html, the Debbugs documentation}
|
||||
for more information.
|
||||
@c Debbugs bug: https://debbugs.gnu.org/db/15/15361.html
|
||||
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 potentially break the patches.
|
||||
|
||||
-22639
File diff suppressed because it is too large
Load Diff
+547
-5515
File diff suppressed because it is too large
Load Diff
+2
-4
@@ -1,7 +1,7 @@
|
||||
# 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=2018-07-05.20; # UTC
|
||||
htmlxrefversion=2016-08-03.13; # UTC
|
||||
|
||||
# Copyright 2010, 2011, 2012, 2013, 2014, 2015 Free Software Foundation, Inc.
|
||||
#
|
||||
@@ -219,7 +219,7 @@ emacs node ${EMACS}/html_node/emacs/
|
||||
easejs mono ${GS}/easejs/manual/easejs.html
|
||||
easejs node ${GS}/easejs/manual/
|
||||
|
||||
EMACS_GUIX = https://emacs-guix.gitlab.io/website/manual/latest
|
||||
EMACS_GUIX = https://alezost.github.io/guix.el/manual/latest
|
||||
emacs-guix mono ${EMACS_GUIX}/emacs-guix.html
|
||||
emacs-guix node ${EMACS_GUIX}/html_node/
|
||||
|
||||
@@ -391,8 +391,6 @@ guile-rpc node ${GS}/guile-rpc/manual/html_node/
|
||||
|
||||
guix mono ${GS}/guix/manual/guix.html
|
||||
guix node ${GS}/guix/manual/html_node/
|
||||
guix.fr mono ${GS}/guix/manual/fr/guix.html
|
||||
guix.fr node ${GS}/guix/manual/fr/html_node/
|
||||
|
||||
gv mono ${GS}/gv/manual/gv.html
|
||||
gv node ${GS}/gv/manual/html_node/
|
||||
|
||||
+8
-55
@@ -1,10 +1,9 @@
|
||||
# GNU Guix --- Functional package management for GNU
|
||||
# Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
|
||||
# Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
|
||||
# Copyright © 2012, 2013, 2014, 2015, 2016, 2017 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, 2018 Mathieu Lirzin <mthl@gnu.org>
|
||||
# Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
|
||||
# Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Guix.
|
||||
#
|
||||
@@ -21,12 +20,7 @@
|
||||
# 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 \
|
||||
%D%/guix.fr.texi
|
||||
|
||||
%C%_guix_TEXINFOS = \
|
||||
%D%/contributing.texi \
|
||||
%D%/fdl-1.3.texi
|
||||
info_TEXINFOS = %D%/guix.texi
|
||||
|
||||
DOT_FILES = \
|
||||
%D%/images/bootstrap-graph.dot \
|
||||
@@ -42,6 +36,8 @@ DOT_VECTOR_GRAPHICS = \
|
||||
|
||||
EXTRA_DIST += \
|
||||
%D%/htmlxref.cnf \
|
||||
%D%/contributing.texi \
|
||||
%D%/fdl-1.3.texi \
|
||||
$(DOT_FILES) \
|
||||
$(DOT_VECTOR_GRAPHICS) \
|
||||
%D%/images/coreutils-size-map.eps \
|
||||
@@ -53,53 +49,10 @@ OS_CONFIG_EXAMPLES_TEXI = \
|
||||
%D%/os-config-desktop.texi \
|
||||
%D%/os-config-lightweight-desktop.texi
|
||||
|
||||
TRANSLATED_INFO = \
|
||||
%D%/guix.fr.texi \
|
||||
%D%/contributing.fr.texi
|
||||
|
||||
# Bundle this file so that makeinfo finds it in out-of-source-tree builds.
|
||||
BUILT_SOURCES += $(OS_CONFIG_EXAMPLES_TEXI) $(TRANSLATED_INFO)
|
||||
EXTRA_DIST += $(OS_CONFIG_EXAMPLES_TEXI) $(TRANSLATED_INFO)
|
||||
MAINTAINERCLEANFILES = $(OS_CONFIG_EXAMPLES_TEXI) $(TRANSLATED_INFO)
|
||||
|
||||
PO4A_PARAMS := -M UTF-8 -L UTF-8 #master and localized encoding
|
||||
PO4A_PARAMS += -k 0 # produce an output even if the translation is not complete
|
||||
PO4A_PARAMS += -f texinfo # texinfo format
|
||||
|
||||
# When a change to guix.texi occurs, it is not translated immediately.
|
||||
# Because @pxref and @xref commands are reference to a section by name, they
|
||||
# should be translated. If a modification adds a reference to a section, this
|
||||
# reference is not translated, which means it references a section that does not
|
||||
# exist.
|
||||
# This command loops through the translated files looking for references. For
|
||||
# each of these references, it tries to find the translation and replaces the
|
||||
# reference name, even in untranslated strings.
|
||||
# The last sed is a multiline sed because some references span multiple lines.
|
||||
define xref_command
|
||||
cat "$@.tmp" | egrep '@p?x?ref' -A1 | sed 'N;s|--\n||g;P;D' | sed 's|^| |g' | \
|
||||
tr -d '\012' | sed 's|\(@p\?x\?ref\)|\n\1|g' | egrep '@p?x?ref' | \
|
||||
sed 's|^.*@p\?x\?ref{\([^,}]*\).*$$|\1|g' | sort | uniq | while read e; do \
|
||||
line=$$(grep -n "^msgid \"$$e\"" "$<" | cut -f1 --delimiter=":") ;\
|
||||
((line++)) ;\
|
||||
if [ "$$line" != "1" ]; then \
|
||||
translation=$$(head -n $$line "$<" | tail -1 | grep msgstr | sed 's|msgstr "\(.*\)"|\1|') ;\
|
||||
if [ "$$translation" != "" ]; then \
|
||||
sed "N;s@\(p\?x\?ref\){$$(echo $$e | sed 's| |[\\n ]|g')\(,\|}\)@\1{$$translation\2@g;P;D" -i "$@.tmp" ;\
|
||||
fi ;\
|
||||
fi ;\
|
||||
done
|
||||
endef
|
||||
|
||||
$(srcdir)/%D%/guix.%.texi: po/doc/guix-manual.%.po $(srcdir)/%D%/contributing.%.texi
|
||||
-$(AM_V_PO4A)$(PO4A_TRANSLATE) $(PO4A_PARAMS) -m "%D%/guix.texi" -p "$<" -l "$@.tmp"
|
||||
-sed -i "s|guix\.info|$$(basename "$@" | sed 's|texi$$|info|')|" "$@.tmp"
|
||||
-$(AM_V_POXREF)$(xref_command)
|
||||
-mv "$@.tmp" "$@"
|
||||
|
||||
$(srcdir)/%D%/contributing.%.texi: po/doc/guix-manual.%.po
|
||||
-$(AM_V_PO4A)$(PO4A_TRANSLATE) $(PO4A_PARAMS) -m "%D%/contributing.texi" -p "$<" -l "$@.tmp"
|
||||
-$(AM_V_POXREF)$(xref_command)
|
||||
-mv "$@.tmp" "$@"
|
||||
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 $@`"; \
|
||||
|
||||
@@ -106,15 +106,6 @@ _guix_is_dash_L ()
|
||||
esac }
|
||||
}
|
||||
|
||||
_guix_is_dash_m ()
|
||||
{
|
||||
[ "${COMP_WORDS[$COMP_CWORD - 1]}" = "-m" ] \
|
||||
|| { case "${COMP_WORDS[$COMP_CWORD]}" in
|
||||
--manifest=*) true;;
|
||||
*) false;;
|
||||
esac }
|
||||
}
|
||||
|
||||
_guix_complete_file ()
|
||||
{
|
||||
# Let Readline complete file names.
|
||||
@@ -158,7 +149,7 @@ _guix_complete ()
|
||||
*)
|
||||
if _guix_is_command "package"
|
||||
then
|
||||
if _guix_is_dash_L || _guix_is_dash_m
|
||||
if _guix_is_dash_L
|
||||
then
|
||||
_guix_complete_file
|
||||
elif _guix_is_removing
|
||||
@@ -167,15 +158,6 @@ _guix_complete ()
|
||||
else
|
||||
_guix_complete_available_package "$word_at_point"
|
||||
fi
|
||||
elif _guix_is_command "build"
|
||||
then
|
||||
if _guix_is_dash_L
|
||||
then
|
||||
_guix_complete_file
|
||||
fi
|
||||
elif _guix_is_command "download"
|
||||
then
|
||||
_guix_complete_file
|
||||
elif _guix_is_command "system"
|
||||
then
|
||||
case $COMP_CWORD in
|
||||
@@ -195,12 +177,6 @@ _guix_complete ()
|
||||
elif _guix_is_command "hash" || _guix_is_command "gc"
|
||||
then
|
||||
_guix_complete_file
|
||||
elif _guix_is_command "weather"
|
||||
then
|
||||
if _guix_is_dash_m
|
||||
then
|
||||
_guix_complete_file
|
||||
fi
|
||||
else
|
||||
_guix_complete_available_package "$word_at_point"
|
||||
fi
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
# GNU Guix --- Functional package management for GNU
|
||||
# Copyright © 2018 Oleg Pykhalov <go.wigust@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/>.
|
||||
|
||||
# Bash completion for guix-daemon command.
|
||||
|
||||
_guix_daemon_complete ()
|
||||
{
|
||||
local options="$(${COMP_WORDS[0]} --help 2> /dev/null \
|
||||
| grep '^ \+-' \
|
||||
| sed -e's/^.*--\([a-zA-Z0-9_-]\+\)\(=\?\).*/--\1\2/g')"
|
||||
compopt -o nospace
|
||||
COMPREPLY=($(compgen -W "$options" -- "${COMP_WORDS[${#COMP_WORDS[*]} - 1]}"))
|
||||
}
|
||||
|
||||
complete -F _guix_daemon_complete guix-daemon
|
||||
@@ -1,548 +0,0 @@
|
||||
#
|
||||
# GNU Guix --- Functional package management for GNU
|
||||
# Copyright © 2017, 2018 Nils Gillmann <ng0@n0.is>
|
||||
#
|
||||
# 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/>.
|
||||
|
||||
# Guix commands covered:
|
||||
# download, pull, system, build, package, size, refresh
|
||||
# publish, lint, import, hash, graph, gc, environment,
|
||||
# edit, copy, container, challenge, archive, pack,
|
||||
# weather
|
||||
|
||||
# Existing commands provided by guix as of 2017-11-30:
|
||||
# archive, challenge, copy, edit, gc, hash, lint, package
|
||||
# pull, size, weather, build, container, download, environment
|
||||
# graph, import, pack, publish, refresh, system
|
||||
|
||||
# TODO: a rewrite similar to rust.fish
|
||||
|
||||
# Use 'command guix' to avoid interactions for aliases.
|
||||
|
||||
## To be used later on:
|
||||
# function __fish_guix_archive
|
||||
# end
|
||||
# function __fish_guix_build_file_ls
|
||||
# end
|
||||
# function __fish_guix_challenge
|
||||
# end
|
||||
# function __fish_guix_container
|
||||
# end
|
||||
# function __fish_guix_copy
|
||||
# end
|
||||
# function __fish_guix_download
|
||||
# end
|
||||
# function __fish_guix_edit
|
||||
# end
|
||||
# function __fish_guix_environment
|
||||
# end
|
||||
# function __fish_guix_gc
|
||||
# end
|
||||
# function __fish_guix_graph
|
||||
# end
|
||||
# function __fish_guix_hash
|
||||
# end
|
||||
# function __fish_guix_import
|
||||
# end
|
||||
# function __fish_guix_lint
|
||||
# end
|
||||
# function __fish_guix_package
|
||||
# end
|
||||
# function __fish_guix_publish
|
||||
# end
|
||||
# function __fish_guix_pull
|
||||
# end
|
||||
# function __fish_guix_refresh
|
||||
# end
|
||||
# function __fish_guix_size
|
||||
# end
|
||||
# function __fish_guix_system
|
||||
# end
|
||||
|
||||
function __fish_guix_needs_command
|
||||
set cmd (commandline -opc)
|
||||
if [ (count $cmd) -eq 1 ]
|
||||
return 0
|
||||
else
|
||||
set -l skip_next 1
|
||||
# Skip first word because it's "guix"
|
||||
for c in $cmd[2..-1]
|
||||
test $skip_next -eq 0
|
||||
and set skip_next 1
|
||||
and continue
|
||||
switch $c
|
||||
# General options that can still take a command
|
||||
case "=*"
|
||||
continue
|
||||
# case --asdf
|
||||
# set skip_next 0
|
||||
# continue
|
||||
# these behave like commands and everything after them is ignored
|
||||
case "--help" "--version"
|
||||
return 1
|
||||
# We assume that any other token that's not an argument to a general option is a command
|
||||
case "*"
|
||||
echo $c
|
||||
return 1
|
||||
end
|
||||
end
|
||||
return 0
|
||||
end
|
||||
return 1
|
||||
end
|
||||
|
||||
function __fish_guix_using_command
|
||||
set -l cmd (__fish_guix_needs_command)
|
||||
test -z "$cmd"
|
||||
and return 1
|
||||
contains -- $cmd $argv
|
||||
and return 0
|
||||
end
|
||||
|
||||
# general options
|
||||
complete -f -c guix -s h -l help -d 'Display the manual of a guix command'
|
||||
complete -f -c guix -s V -l version -d 'Display version information.'
|
||||
|
||||
# shared options
|
||||
#complete -f -c guix -n '__fish_guix_using_command'
|
||||
|
||||
#### download
|
||||
set -l remotecommands format no-check-certificate
|
||||
complete -f -c guix -n '__fish_guix_needs_command' -a download -d 'Download object from source into the gnu store'
|
||||
complete -f -c guix -n '__fish_guix_using_command download' -s f -l format -d'Write the hash in the given format'
|
||||
complete -f -c guix -n '__fish_guix_using_command download' -l no-check-certificate -d 'Do not validate the certificate of HTTPS servers'
|
||||
|
||||
#### pull
|
||||
set -l remotecommands verbose url bootstrap
|
||||
complete -f -c guix -n '__fish_guix_needs_command' -a pull -d 'Download and deploy the latest version of Guix'
|
||||
complete -f -c guix -n '__fish_guix_using_command pull' -l verbose -d 'produce verbose output'
|
||||
complete -f -c guix -n '__fish_guix_using_command pull' -l url -d 'download the Guix tarball from URL'
|
||||
complete -f -c guix -n '__fish_guix_using_command pull' -l bootstrap -d 'use the bootstrap Guile to build the new Guix'
|
||||
|
||||
#### system
|
||||
set -l remotecommands reconfigure roll-back switch-generation list-generations build container vm vm-image disk-image init extension-graph shepherd-graph load-path keep-failed keep-going dry-run fallback no-substitutes substitutes-urls no-grafts no-build-hook max-silent-time timeout verbosity rounds cores max-jobs derivation on-error image-size no-grub share expose full-boot
|
||||
complete -f -c guix -n '__fish_guix_needs_command' -a system -d 'Build the operating system declared in FILE according to ACTION.'
|
||||
complete -f -c guix -n '__fish_guix_using_command system' -l reconfigure -d 'switch to a new operating system configuration'
|
||||
complete -f -c guix -n '__fish_guix_using_command system' -l roll-back -d 'switch to the previous operating system configuration'
|
||||
complete -f -c guix -n '__fish_guix_using_command system' -l switch-generation -d 'switch to an existing operating system configuration'
|
||||
complete -f -c guix -n '__fish_guix_using_command system' -l list-generations -d 'list the system generations'
|
||||
complete -f -c guix -n '__fish_guix_using_command system' -l build -d 'build the operating system without installing anything'
|
||||
complete -f -c guix -n '__fish_guix_using_command system' -l container -d 'build a container that shares the host\'s store'
|
||||
complete -f -c guix -n '__fish_guix_using_command system' -l vm -d 'build a virtual machine image that shares the host\'s store'
|
||||
complete -f -c guix -n '__fish_guix_using_command system' -l vm-image -d 'build a freestanding virtual machine image'
|
||||
complete -f -c guix -n '__fish_guix_using_command system' -l disk-image -d 'build a disk image, suitable for a USB stick'
|
||||
complete -f -c guix -n '__fish_guix_using_command system' -l init -d 'initialize a root file system to run GNU'
|
||||
complete -f -c guix -n '__fish_guix_using_command system' -l extension-graph -d 'emit the service extension graph in Dot format'
|
||||
complete -f -c guix -n '__fish_guix_using_command system' -l shepherd-graph -d 'emit the graph of shepherd services in Dot format'
|
||||
complete -f -c guix -n '__fish_guix_using_command system' -s L -d 'prepend DIR to the package module search path'
|
||||
complete -f -c guix -n '__fish_guix_using_command system' -a "--load-path=" -d 'prepend DIR to the package module search path'
|
||||
complete -f -c guix -n '__fish_guix_using_command system' -s K -l keep-failed -d 'keep build tree of failed builds'
|
||||
complete -f -c guix -n '__fish_guix_using_command system' -s k -l keep-going -d 'keep going when some of the derivations fail'
|
||||
complete -f -c guix -n '__fish_guix_using_command system' -s n -l dry-run -d 'do not build the derivations'
|
||||
complete -f -c guix -n '__fish_guix_using_command system' -l fallback -d 'fall back to building when the substituter fails'
|
||||
complete -f -c guix -n '__fish_guix_using_command system' -l no-substitutes -d 'build instead of resorting to pre-built substitutes'
|
||||
complete -f -c guix -n '__fish_guix_using_command system' -a "--substitute-urls=" -d 'fetch substitute from URLS if they are authorized'
|
||||
complete -f -c guix -n '__fish_guix_using_command system' -l no-grafts -d 'do not graft packages'
|
||||
complete -f -c guix -n '__fish_guix_using_command system' -l no-build-hook -d 'do not attempt to offload builds via the build hook'
|
||||
complete -f -c guix -n '__fish_guix_using_command system' -a "--max-silent-time=" -d 'mark the build as failed after SECONDS of silence'
|
||||
complete -f -c guix -n '__fish_guix_using_command system' -a "--timeout=" -d 'mark the build as failed after SECONDS of activity'
|
||||
complete -f -c guix -n '__fish_guix_using_command system' -a "--verbosity=" -d 'use the given verbosity LEVEL'
|
||||
complete -f -c guix -n '__fish_guix_using_command system' -a --"rounds=" -d 'build N times in a row to detect non-determinism'
|
||||
complete -f -c guix -n '__fish_guix_using_command system' -s c -d 'allow the use of up to N CPU cores for the build'
|
||||
complete -f -c guix -n '__fish_guix_using_command system' -a "--cores=" -d 'allow the use of up to N CPU cores for the build'
|
||||
complete -f -c guix -n '__fish_guix_using_command system' -s M -d 'allow at most N build jobs'
|
||||
complete -f -c guix -n '__fish_guix_using_command system' -a "--max-jobs=" -d 'allow at most N build jobs'
|
||||
complete -f -c guix -n '__fish_guix_using_command system' -s d -l derivation -d 'return the derivation of the given system'
|
||||
complete -f -c guix -n '__fish_guix_using_command system' -a "--on-error=" -d 'apply STRATEGY when an error occurs while reading FILE'
|
||||
complete -f -c guix -n '__fish_guix_using_command system' -a "--image-size=" -d 'for \'vm-image\', produce an image of SIZE'
|
||||
complete -f -c guix -n '__fish_guix_using_command system' -l no-grub -d 'for \'init\', do not install GRUB'
|
||||
complete -f -c guix -n '__fish_guix_using_command system' -a "--share=" -d 'for \'vm\', share host file system according to SPEC'
|
||||
complete -f -c guix -n '__fish_guix_using_command system' -a "--expose=" -d 'for \'vm\', expose host file system according to SPEC'
|
||||
complete -f -c guix -n '__fish_guix_using_command system' -l full-boot -d 'for \'vm\', make a full boot sequence'
|
||||
|
||||
#### build
|
||||
set -l remotecommands expression file source sources system target derivations check repair root quiet log-file load-path keep-failed keep-going dry-run fallback no-substitutes substitute-urls no-grafts no-build-hook max-silent-time timeout verbosity rounds cores max-jobs with-source with-input with-graft
|
||||
complete -f -c guix -n '__fish_guix_needs_command' -a build -d 'Build the given PACKAGE-OR-DERIVATION and return their output paths.'
|
||||
complete -f -c guix -n '__fish_guix_using_command build' -a "--expression=" -d 'build the package or derivation EXPR evaluates to'
|
||||
complete -f -c guix -n '__fish_guix_using_command build' -s f -d 'build the package or derivation that the code within FILE evaluates to' --exclusive --arguments "(ls -ap)"
|
||||
# The command below is broken:
|
||||
complete -f -c guix -n '__fish_guix_using_command build' -a '--file=' -a '(ls -ap)' -d 'build the package or derivation that the code within FILE evaluates to'
|
||||
complete -f -c guix -n '__fish_guix_using_command build' -s S -l source -d 'build the packages\' source derivations'
|
||||
complete -f -c guix -n '__fish_guix_using_command build' -l sources -d 'build source derivations, TYPE may optionally be one of "package", "all" (default), or "transitive"' -a "package all transitive" -a "package all transitive"
|
||||
complete -f -c guix -n '__fish_guix_using_command build' -s s -d 'attempt to build for SYSTEM--e.g., "i686-linux"'
|
||||
complete -f -c guix -n '__fish_guix_using_command build' -a "--system=" -d 'attempt to build for SYSTEM--e.g., "i686-linux"'
|
||||
complete -f -c guix -n '__fish_guix_using_command build' -a "--target=" -d 'cross-build for TRIPLET--e.g., "armel-linux-gnu"'
|
||||
complete -f -c guix -n '__fish_guix_using_command build' -s d -l derivations -d 'return the derivation paths of the given packages'
|
||||
complete -f -c guix -n '__fish_guix_using_command build' -l check -d 'rebuild items to check for non-determinism issues'
|
||||
complete -f -c guix -n '__fish_guix_using_command build' -l repair -d 'repair the specified items'
|
||||
complete -f -c guix -n '__fish_guix_using_command build' -s r -d 'make FILE a symlink to the result, and register it as a garbage collector root'
|
||||
complete -f -c guix -n '__fish_guix_using_command build' -a "--root=" -d 'make FILE a symlink to the result, and register it as a garbage collector root'
|
||||
complete -f -c guix -n '__fish_guix_using_command build' -s q -l quiet -d 'do not show the build log'
|
||||
complete -f -c guix -n '__fish_guix_using_command build' -l log-file -d 'return the log file names for the given derivations'
|
||||
complete -f -c guix -n '__fish_guix_using_command build' -s L -d 'prepend DIR to the package module search path'
|
||||
complete -f -c guix -n '__fish_guix_using_command build' -a "--load-path=" -d 'prepend DIR to the package module search path'
|
||||
complete -f -c guix -n '__fish_guix_using_command build' -s K -l keep-failed -d 'keep build tree of failed builds'
|
||||
complete -f -c guix -n '__fish_guix_using_command build' -s k -l keep-going -d 'keep going when some of the derivations fail'
|
||||
complete -f -c guix -n '__fish_guix_using_command build' -s n -l dry-run -d 'do not build the derivations'
|
||||
complete -f -c guix -n '__fish_guix_using_command build' -l fallback -d 'fall back to building when the substituter fails'
|
||||
complete -f -c guix -n '__fish_guix_using_command build' -l no-substitutes -d 'build instead of resorting to pre-built substitutes'
|
||||
complete -f -c guix -n '__fish_guix_using_command build' -a "--substitute-urls=" -d 'fetch substitute from URLS if they are authorized'
|
||||
complete -f -c guix -n '__fish_guix_using_command build' -l no-grafts -d 'do not graft packages'
|
||||
complete -f -c guix -n '__fish_guix_using_command build' -l no-build-hook -d 'do not attempt to offload builds via the build hook'
|
||||
complete -f -c guix -n '__fish_guix_using_command build' -a "--max-silent-time=" -d 'mark the build as failed after SECONDS of silence'
|
||||
complete -f -c guix -n '__fish_guix_using_command build' -a "--timeout=" -d 'mark the build as failed after SECONDS of activity'
|
||||
complete -f -c guix -n '__fish_guix_using_command build' -a "--verbosity=" -d 'use the given verbosity LEVEL'
|
||||
complete -f -c guix -n '__fish_guix_using_command build' -a "--rounds=" -d 'build N times in a row to detect non-determinism'
|
||||
complete -f -c guix -n '__fish_guix_using_command build' -s c -d 'allow the use of up to N CPU cores for the build'
|
||||
complete -f -c guix -n '__fish_guix_using_command build' -a "--cores=" -d 'allow the use of up to N CPU cores for the build'
|
||||
complete -f -c guix -n '__fish_guix_using_command build' -s M -d 'allow at most N build jobs'
|
||||
complete -f -c guix -n '__fish_guix_using_command build' -a "--max-jobs=" -d 'allow at most N build jobs'
|
||||
complete -f -c guix -n '__fish_guix_using_command build' -a "--with-source=" -d 'use SOURCE when building the corresponding package'
|
||||
complete -f -c guix -n '__fish_guix_using_command build' -a "--with-input=" -d 'PACKAGE=REPLACEMENT .. replace dependency PACKAGE by REPLACEMENT'
|
||||
complete -f -c guix -n '__fish_guix_using_command build' -a "--with-graft=" -d 'PACKAGE=REPLACEMENT .. graft REPLACEMENT on packages that refer to PACKAGE'
|
||||
|
||||
#### package
|
||||
set -l remotecommands install install-from-expression install-from-file remove upgrade manifest do-no-upgrade roll-back search-paths list-generations delete-generations switch-generation profile bootstrap verbose search list-installed list-available show load-path keep-failed keep-going dry-run fallback no.substitutes substitute-urls no-grafts no-build-hook max-silent-time timenout verbosity rounds cores max-jobs with-source with-input with-graft
|
||||
complete -f -c guix -n '__fish_guix_needs_command' -a package -d 'Install, remove, or upgrade packages in a single transaction.'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -s i -l install -d 'install PACKAGEs'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -s e -d 'install the package EXP evaluates to'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -a "--install-from-expression=" -d 'install the package EXP evaluates to'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -s f -d 'install the package that the code within FILE evaluates to'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -a "--install-from-file=" -d 'install the package that the code within FILE evaluates to'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -s r -l remove -d 'remove PACKAGEs'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -s u -l upgrade -d '[=REGEXP] upgrade all the installed packages matching REGEXP'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -s m -d 'create a new profile generation with the manifest from FILE'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -a "--manifest=" -d 'create a new profile generation with the manifest from FILE'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -l do-not-upgrade -d '[=REGEXP] do not upgrade any packages matching REGEXP'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -l roll-back -d 'roll back to the previous generation'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -l search-paths -d '[=KIND] display needed environment variable definitions'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -s l -l list-generations -d '[=PATTERN] list generations matching PATTERN'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -s d -l delete-generations -d '[=PATTERN] delete generations matching PATTERN'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -s S -d 'PATTERN switch to a generation matching PATTERN'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -a "--switch-generation=" -d 'PATTERN switch to a generation matching PATTERN'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -s p -d 'use PROFILE instead of the user\'s default profile'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -a "--profile=" -d 'use PROFILE instead of the user\'s default profile'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -l bootstrap -d 'use the bootstrap Guile to build the profile'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -l verbose -d 'produce verbose output'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -s s -d 'REGEXP search in synopsis and description using REGEXP'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -a "--search=" -d 'REGEXP search in synopsis and description using REGEXP'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -s I -l list-installed -d '[=REGEXP] list installed packages matching REGEXP'
|
||||
#complete -c guix -n '__fish_guix_using_command package' -s I -l list-installed --exclusive --arguments "(guix package --list-installed)" --description 'List installed packages matching REGEXP'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -s A -l list-available -d '[=REGEXP] list available packages matching REGEXP'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -a "--show=" -d 'PACKAGE show details about PACKAGE'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -s L -d 'DIR prepend DIR to the package module search path'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -a "--load-path=" -d 'DIR prepend DIR to the package module search path'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -s K -l keep-failed -d 'keep build tree of failed builds'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -s k -l keep-going -d 'keep going when some of the derivations fail'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -s n -l dry-run -d 'do not build the derivations'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -l fallback -d 'fall back to building when the substituter fails'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -l no-substitutes -d 'build instead of resorting to pre-built substitutes'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -a "--substitute-urls=" -d 'URLS fetch substitute from URLS if they are authorized'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -l no-grafts -d 'do not graft packages'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -l no-build-hook -d 'do not attempt to offload builds via the build hook'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -a "--max-silent-time=" -d 'SECONDS mark the build as failed after SECONDS of silence'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -a "--timeout=" -d 'SECONDS mark the build as failed after SECONDS of activity'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -a "--verbosity=" -d 'LEVEL use the given verbosity LEVEL'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -a "--rounds=" -d 'N build N times in a row to detect non-determinism'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -s c -d 'N allow the use of up to N CPU cores for the build'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -a "--cores=" -d 'N allow the use of up to N CPU cores for the build'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -s M -l max-jobs= -d 'N allow at most N build jobs'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -a "--max-jobs=" -d 'N allow at most N build jobs'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -a "--with-source=" -d 'SOURCE use SOURCE when building the corresponding package'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -a "--with-input=" -d 'PACKAGE=REPLACEMENT replace dependency PACKAGE by REPLACEMENT'
|
||||
complete -f -c guix -n '__fish_guix_using_command package' -a "--with-graft=" -d 'PACKAGE=REPLACEMENT graft REPLACEMENT on packages that refer to PACKAGE'
|
||||
|
||||
#### size
|
||||
set -l remotecommands substitute-urls= system= map-file=
|
||||
complete -f -c guix -n '__fish_guix_needs_command' -a size -d 'Report the size of PACKAGE and its dependencies.'
|
||||
complete -f -c guix -n '__fish_guix_using_command size' -a "--substitute-urls=" -d 'fetch substitute from URLS if they are authorized'
|
||||
complete -f -c guix -n '__fish_guix_using_command size' -a "--system=" -d 'consider packages for SYSTEM--e.g., "i686-linux"'
|
||||
complete -f -c guix -n '__fish_guix_using_command size' -a "--map-file=" -d 'write to FILE a graphical map of disk usage'
|
||||
|
||||
#### refresh
|
||||
set -l remotecommands expression update select type list-updaters list-dependent key-server gpg key-download
|
||||
complete -f -c guix -n '__fish_guix_needs_command' -a refresh -d 'Update package definitions to match the latest upstream version'
|
||||
# FIXME: Too long. When PACKAGE... is given, update only the specified packages. Otherwise update all the packages of the distribution, or the subset thereof specified with `--select`.'
|
||||
complete -f -c guix -n '__fish_guix_using_command refresh' -a "--expression=" -d 'consider the package EXPR evaluates to'
|
||||
complete -f -c guix -n '__fish_guix_using_command refresh' -l update -d 'update source files in place'
|
||||
#complete -f -c guix -n '__fish_guix_using_command refresh' -l select= -d 'select all the packages in SUBSET, one of `core` or `non-core`' --exclusive --arguments "core non-core"
|
||||
complete -f -c guix -n '__fish_guix_using_command refresh' -a "--select=" -d 'select all the packages in SUBSET, one of `core` or `non-core`' --exclusive --arguments "core non-core"
|
||||
complete -f -c guix -n '__fish_guix_using_command refresh' -a "--type=" -d 'restrict to updates from the specified updaters (e.g., \'gnu\')' --exclusive --arguments "gnu gnome kde xorg kernel.org elpa cran bioconductor cpan pypi gem github hackage crate"
|
||||
complete -f -c guix -n '__fish_guix_using_command refresh' -l list-updaters -d 'list available updaters and exit'
|
||||
complete -f -c guix -n '__fish_guix_using_command refresh' -l list-dependent -d 'list top-level dependent packages that would need to be rebuilt as a result of upgrading PACKAGE'
|
||||
complete -f -c guix -n '__fish_guix_using_command refresh' -a "--key-server=" -d 'use HOST as the OpenPGP key server'
|
||||
complete -f -c guix -n '__fish_guix_using_command refresh' -a "--gpg=" -d 'use COMMAND as the GnuPG 2.x command'
|
||||
complete -f -c guix -n '__fish_guix_using_command refresh' -a "--key-download=" -d 'handle missing OpenPGP keys according to POLICY.' --exclusive --arguments "always never interactive"
|
||||
|
||||
#### publish
|
||||
set -l remotecommands port= listen= user= compression ttl= repl
|
||||
complete -f -c guix -n '__fish_guix_needs_command' -a publish -d 'Publish /gnu/store over HTTP.'
|
||||
complete -f -c guix -n '__fish_guix_using_command publish' -a "--port=" -d 'listen on PORT'
|
||||
complete -f -c guix -n '__fish_guix_using_command publish' -a "--listen=" -d 'listen on the network interface for HOST'
|
||||
complete -f -c guix -n '__fish_guix_using_command publish' -a "--user=" -d 'change privileges to USER as soon as possible'
|
||||
complete -f -c guix -n '__fish_guix_using_command publish' -l compression -d '[=LEVEL] compress archives at LEVEL'
|
||||
complete -f -c guix -n '__fish_guix_using_command publish' -a "--ttl=" -d 'announce narinfos can be cached for TTL seconds'
|
||||
complete -f -c guix -n '__fish_guix_using_command publish' -l repl -d '[=PORT] spawn REPL server on PORT'
|
||||
|
||||
#### lint
|
||||
set -l remotecommands checkers list-checkers
|
||||
complete -f -c guix -n '__fish_guix_needs_command' -a lint -d 'Run a set of checkers on the specificied package.'
|
||||
complete -f -c guix -n '__fish_guix_using_command lint' -l list-checkers -d 'Display the list of available lint checkers.'
|
||||
complete -f -c guix -n '__fish_guix_using_command lint' -l checkers -d 'Only run the specified checkers.'
|
||||
complete -f -c guix -n '__fish_guix_using_command lint' -l description -d 'Validate package descriptions.'
|
||||
complete -f -c guix -n '__fish_guix_using_command lint' -l gnu-description -d 'Validate synopsis and descriptions of the GNU packages.'
|
||||
complete -f -c guix -n '__fish_guix_using_command lint' -l inputs-should-be-native -d 'Identify inputs that should be native inputs.'
|
||||
complete -f -c guix -n '__fish_guix_using_command lint' -l inputs-should-not-be-inputs -d 'Identify inputs that should not be inputs at all.'
|
||||
complete -f -c guix -n '__fish_guix_using_command lint' -l patch-file-names -d 'Validate file names anda availability of patches.'
|
||||
complete -f -c guix -n '__fish_guix_using_command lint' -l home-page -d 'Validate home-page URLs'
|
||||
complete -f -c guix -n '__fish_guix_using_command lint' -l license -d 'Make sure the "license" field is a <license > or a list thereof'
|
||||
complete -f -c guix -n '__fish_guix_using_command lint' -l source -d 'Validate source URLs'
|
||||
complete -f -c guix -n '__fish_guix_using_command lint' -l mirror-url -d 'Suggest "mirror://" URLs'
|
||||
complete -f -c guix -n '__fish_guix_using_command lint' -l source-file-name -d 'Validate file names of sources'
|
||||
complete -f -c guix -n '__fish_guix_using_command lint' -l derivation -d 'Report failure to compile a package to a derivation'
|
||||
complete -f -c guix -n '__fish_guix_using_command lint' -l synopsis -d 'Validate package synopses'
|
||||
complete -f -c guix -n '__fish_guix_using_command lint' -l cve -d 'Check the Common Vulnerabilities and Exposures (CVE) database'
|
||||
complete -f -c guix -n '__fish_guix_using_command lint' -l formatting -d 'Look for formatting issues in the source'
|
||||
|
||||
#### import
|
||||
set -l remotecommands import gnu nix pypi cpan hackage elpa gem cran crate texlive json
|
||||
complete -f -c guix -n '__fish_guix_needs_command' -a import -d 'Run IMPORTER with ARGS'
|
||||
##### import gnu
|
||||
complete -f -c guix -n '__fish_guix_using_command import; and not __fish_seen_subcommand_from $remotecommands' -a gnu -d 'Return a package declaration template for PACKAGE, a GNU package.'
|
||||
complete -f -c guix -n '__fish_guix_using_command import; and __fish_seen_subcommand_from gnu' -a "--key-download=" -d 'handle missing OpenPGP keys according to POLICY: "always", "never", and "interactive", which is also used when "key-download" is not specified.'
|
||||
##### import nix
|
||||
complete -f -c guix -n '__fish_guix_using_command import; and not __fish_seen_subcommand_from $remotecommands' -a nix -d 'Import and convert the Nix expression ATTRIBUTE of NIXPKGS.'
|
||||
##### import pypi
|
||||
complete -f -c guix -n '__fish_guix_using_command import; and not __fish_seen_subcommand_from $remotecommands' -a pypi -d 'Import and convert the PyPI package for PACKAGE-NAME.'
|
||||
##### import cpan
|
||||
complete -f -c guix -n '__fish_guix_using_command import; and not __fish_seen_subcommand_from $remotecommands' -a cpan -d 'Import and convert the CPAN package for PACKAGE-NAME.'
|
||||
##### import hackage
|
||||
complete -f -c guix -n '__fish_guix_using_command import; and not __fish_seen_subcommand_from $remotecommands' -a hackage -d 'Import and convert the Hackage package for PACKAGE-NAME. If PACKAGE-NAME includes a suffix constituted by a at-sign followed by a numerical version (as used with Guix packages), then a definition for the specified version of the package will be generated. If no version suffix is pecified, then the generated package definition will correspond to the latest available version.'
|
||||
complete -f -c guix -n '__fish_guix_using_command import; and __fish_seen_subcommand_from hackage' -s e -d 'ALIST specify environment for Cabal evaluation.'
|
||||
complete -f -c guix -n '__fish_guix_using_command import; and __fish_seen_subcommand_from hackage' -a "--cabal-environment=" -d 'ALIST specify environment for Cabal evaluation.'
|
||||
complete -f -c guix -n '__fish_guix_using_command import; and __fish_seen_subcommand_from hackage' -s s -l stdin -d 'Read from standard input.'
|
||||
complete -f -c guix -n '__fish_guix_using_command import; and __fish_seen_subcommand_from hackage' -s t -l no-test-dependencies -d 'don\'t include test-only dependencies.'
|
||||
##### import elpa
|
||||
complete -f -c guix -n '__fish_guix_using_command import; and not __fish_seen_subcommand_from $remotecommands' -a elpa -d 'Import the latest package named PACKAGE-NAME from an ELPA repository.'
|
||||
complete -f -c guix -n '__fish_guix_using_command import; and __fish_seen_subcommand_from elpa' -s a -d 'specify the archive repository' --exclusive --arguments "gnu melpa-stable melpa"
|
||||
complete -f -c guix -n '__fish_guix_using_command import; and __fish_seen_subcommand_from elpa' -a "--archive=" -d 'specify the archive repository' --exclusive --arguments "gnu melpa-stable melpa"
|
||||
##### import gem
|
||||
complete -f -c guix -n '__fish_guix_using_command import; and not __fish_seen_subcommand_from $remotecommands' -a gem -d 'Import and convert the RubyGems package for PACKAGE-NAME.'
|
||||
##### import cran
|
||||
complete -f -c guix -n '__fish_guix_using_command import; and not __fish_seen_subcommand_from $remotecommands' -a cran -d 'Import and convert the CRAN package for PACKAGE-NAME.'
|
||||
complete -f -c guix -n '__fish_guix_using_command import; and __fish_seen_subcommand_from cran' -s a -d 'specify the archive repository' --exclusive --arguments "bioconductor cran"
|
||||
complete -f -c guix -n '__fish_guix_using_command import; and __fish_seen_subcommand_from cran' -a "--archive=" -d 'specify the archive repository' --exclusive --arguments "bioconductor cran"
|
||||
complete -f -c guix -n '__fish_guix_using_command import; and __fish_seen_subcommand_from cran' -l recursive -d 'traverse the dependency graph of the given package recursively and generate package definitions for all those packages that are not yet in Guix'
|
||||
##### import crate
|
||||
complete -f -c guix -n '__fish_guix_using_command import; and not __fish_seen_subcommand_from $remotecommands' -a crate -d 'Import and convert the crate.io package for PACKAGE-NAME.'
|
||||
##### import json
|
||||
complete -f -c guix -n '__fish_guix_using_command import; and not __fish_seen_subcommand_from $remotecommands' -a json -d 'Import and convert the JSON package definition in PACKAGE-FILE.'
|
||||
##### import texlive
|
||||
complete -f -c guix -n '__fish_guix_using_command import; and not __fish_seen_subcommand_from $remotecommands' -a texlive -d 'Import and convert the Texlive package for PACKAGE-NAME.'
|
||||
complete -f -c guix -n '__fish_guix_using_command import; and __fish_seen_subcommand_from texlive' -s a -l "--archive=" -d 'specify the archive repository'
|
||||
|
||||
#### hash
|
||||
set -l remotecommands exclude-vcs format= recursive
|
||||
complete -f -c guix -n '__fish_guix_needs_command' -a hash -d 'Return the cryptographic hash of a FILE.'
|
||||
complete -f -c guix -n '__fish_guix_using_command hash' -s x -l exclude-vcs -d 'Exclude version control directories.'
|
||||
complete -f -c guix -n '__fish_guix_using_command hash' -s f -d 'Write the hash in the given format.' --exclusive --arguments "nix-base32 base32 base16 hex hexadecimal"
|
||||
complete -f -c guix -n '__fish_guix_using_command hash' -a "--format=" -d 'Write the hash in the given format.' --exclusive --arguments "nix-base32 base32 base16 hex hexadecimal"
|
||||
complete -f -c guix -n '__fish_guix_using_command hash' -s r -l recursive -d 'Compute the hash on FILE recursively.'
|
||||
|
||||
#### graph
|
||||
set -l remotecommands backend list-backends type list-types expression
|
||||
complete -f -c guix -n '__fish_guix_needs_command' -a graph -d 'Emit a Graphviz (dot) representation of the dependencies of a PACKAGE.'
|
||||
complete -f -c guix -n '__fish_guix_using_command graph' -l backend -d 'Produce a graph with the given backend TYPE'
|
||||
complete -f -c guix -n '__fish_guix_using_command graph' -l list-backends -d 'list the available graph backends'
|
||||
complete -f -c guix -n '__fish_guix_using_command graph' -l type -d 'represent nodes of the given TYPE'
|
||||
complete -f -c guix -n '__fish_guix_using_command graph' -l list-types -d 'list the available graph types'
|
||||
complete -f -c guix -n '__fish_guix_using_command graph' -l expression -d 'consider the package EXPR evaluates to'
|
||||
|
||||
#### gc
|
||||
set -l remotecommands collect-garbage free-space delete optimize list-dead list-live references requisites referrers verify list-failures clear-failures
|
||||
complete -f -c guix -n '__fish_guix_needs_command' -a gc -d 'Invoke the garbage collector.'
|
||||
complete -f -c guix -n '__fish_guix_using_command gc' -s C -d 'collect at least MIN bytes of garbage'
|
||||
complete -f -c guix -n '__fish_guix_using_command gc' -a "--collect-garbage=" -d 'collect at least MIN bytes of garbage'
|
||||
complete -f -c guix -n '__fish_guix_using_command gc' -s F -d 'attempt to reach FREE available space in the store'
|
||||
complete -f -c guix -n '__fish_guix_using_command gc' -a "--free-space=" -d 'attempt to reach FREE available space in the store'
|
||||
complete -f -c guix -n '__fish_guix_using_command gc' -s d -l delete -d 'attempt to delete PATHS'
|
||||
complete -f -c guix -n '__fish_guix_using_command gc' -l optimize -d 'optimize the store by deduplicating identical files'
|
||||
complete -f -c guix -n '__fish_guix_using_command gc' -l list-dead -d 'list dead paths'
|
||||
complete -f -c guix -n '__fish_guix_using_command gc' -l list-live -d 'list live paths'
|
||||
complete -f -c guix -n '__fish_guix_using_command gc' -l references -d 'list the references of PATHS'
|
||||
complete -f -c guix -n '__fish_guix_using_command gc' -s R -l requisites -d 'list the requisites of PATHS'
|
||||
complete -f -c guix -n '__fish_guix_using_command gc' -l referrers -d 'list the referrers of PATHS'
|
||||
complete -f -c guix -n '__fish_guix_using_command gc' -l verify -d 'verify the integrity of the store
|
||||
OPTS is a comma-separated combination of \'repair\' and \'contents\''
|
||||
complete -f -c guix -n '__fish_guix_using_command gc' -l list-failures -d 'list cached build failures'
|
||||
complete -f -c guix -n '__fish_guix_using_command gc' -l clear-failures -d 'remove PATHS from the set of cached failures'
|
||||
|
||||
#### environment
|
||||
set -l remotecommands expression load ad-hoc pure search-paths system root container network share expose bootstrap load-path keep-failed keep-going dry-run fallback no-substitutes substitute-urls no-grafts no-build-hook max-silent-time timeout verbosity rounds cores max-jobs
|
||||
complete -f -c guix -n '__fish_guix_needs_command' -a environment -d 'Build an environment that includes the dependencies of PACKAGE and execute COMMAND or an interactive shell in that environment.'
|
||||
complete -f -c guix -n '__fish_guix_using_command environment' -s e -d 'Create environment for the package that EXPR evaluates to'
|
||||
complete -f -c guix -n '__fish_guix_using_command environment' -a "--expression=" -d 'Create environment for the package that EXPR evaluates to'
|
||||
complete -f -c guix -n '__fish_guix_using_command environment' -s l -d 'create environment for the package that the code within FILE evaluates to.'
|
||||
complete -f -c guix -n '__fish_guix_using_command environment' -a "--load=" -d 'create environment for the package that the code within FILE evaluates to.'
|
||||
complete -f -c guix -n '__fish_guix_using_command environment' -l ad-hoc -d 'include all specified packages in the environment instead of only their inputs'
|
||||
complete -f -c guix -n '__fish_guix_using_command environment' -l pure -d 'unset existing environment variables'
|
||||
complete -f -c guix -n '__fish_guix_using_command environment' -l search-paths -d 'display needed environment variable definitions'
|
||||
complete -f -c guix -n '__fish_guix_using_command environment' -s s -d 'attempt to build for SYSTEM--e.g., "i686-linux"'
|
||||
complete -f -c guix -n '__fish_guix_using_command environment' -a "--system=" -d 'attempt to build for SYSTEM--e.g., "i686-linux"'
|
||||
complete -f -c guix -n '__fish_guix_using_command environment' -s r -d 'make FILE a symlink to the result, and register it as a garbage collector root'
|
||||
complete -f -c guix -n '__fish_guix_using_command environment' -a "--root=" -d 'make FILE a symlink to the result, and register it as a garbage collector root'
|
||||
complete -f -c guix -n '__fish_guix_using_command environment' -s C -l container -d 'run command within an isolated container'
|
||||
complete -f -c guix -n '__fish_guix_using_command environment' -s N -l network -d 'allow containers to access the network'
|
||||
complete -f -c guix -n '__fish_guix_using_command environment' -a "--share=" -d 'for containers, share writable host file system according to SPEC'
|
||||
complete -f -c guix -n '__fish_guix_using_command environment' -a "--expose=" -d 'for containers, expose read-only host file system according to SPEC'
|
||||
complete -f -c guix -n '__fish_guix_using_command environment' -l bootstrap -d 'use bootstrap binaries to build the environment'
|
||||
complete -f -c guix -n '__fish_guix_using_command environment' -s L -d 'prepend DIR to the package module search path'
|
||||
complete -f -c guix -n '__fish_guix_using_command environment' -a "--load-path=" -d 'prepend DIR to the package module search path'
|
||||
complete -f -c guix -n '__fish_guix_using_command environment' -s K -l keep-failed -d 'keep build tree of failed builds'
|
||||
complete -f -c guix -n '__fish_guix_using_command environment' -s k -l keep-going -d 'keep going when some of the derivations fail'
|
||||
complete -f -c guix -n '__fish_guix_using_command environment' -s n -l dry-run -d 'do not build the derivations'
|
||||
complete -f -c guix -n '__fish_guix_using_command environment' -l fallback -d 'fall back to building when the substituter fails'
|
||||
complete -f -c guix -n '__fish_guix_using_command environment' -l no-substitutes -d 'build instead of resorting to pre-built substitutes'
|
||||
complete -f -c guix -n '__fish_guix_using_command environment' -a "--substitute-urls=" -d 'fetch substitute from URLS if they are authorized'
|
||||
complete -f -c guix -n '__fish_guix_using_command environment' -l no-grafts -d 'do not graft packages'
|
||||
complete -f -c guix -n '__fish_guix_using_command environment' -l no-build-hook -d 'do not attempt to offload builds via the build hook'
|
||||
complete -f -c guix -n '__fish_guix_using_command environment' -a "--max-silent-time=" -d 'mark the build as failed after SECONDS of silence'
|
||||
complete -f -c guix -n '__fish_guix_using_command environment' -a "--timeout=" -d 'mark the build as failed after SECONDS of activity'
|
||||
complete -f -c guix -n '__fish_guix_using_command environment' -a "--verbosity=" -d 'use the given verbosity LEVEL'
|
||||
complete -f -c guix -n '__fish_guix_using_command environment' -a "--rounds=" -d 'build N times in a row to detect non-determinism'
|
||||
complete -f -c guix -n '__fish_guix_using_command environment' -s c -d 'allow the use of up to N CPU cores for the build'
|
||||
complete -f -c guix -n '__fish_guix_using_command environment' -a "--cores=" -d 'allow the use of up to N CPU cores for the build'
|
||||
complete -f -c guix -n '__fish_guix_using_command environment' -s M -d 'allow at most N build jobs'
|
||||
complete -f -c guix -n '__fish_guix_using_command environment' -a "--max-jobs=" -d 'allow at most N build jobs'
|
||||
|
||||
#### edit
|
||||
complete -f -c guix -n '__fish_guix_needs_command' -a edit -d 'Start $VISUAL or $EDITOR to edit the definitions of PACKAGE.'
|
||||
|
||||
#### copy
|
||||
set -l remotecommands to= from= load-path= keep-failed keep-going dry-run fallback no-substitutes substitute-urls= no-grafts no-build-hook max-silent-time= timeout= verbosity= rounds= cores= max-jobs=
|
||||
complete -f -c guix -n '__fish_guix_needs_command' -a copy -d 'Copy ITEMS to or from the specified host over SSH.'
|
||||
complete -f -c guix -n '__fish_guix_using_command copy' -a "--to=" -d 'send ITEMS to HOST'
|
||||
complete -f -c guix -n '__fish_guix_using_command copy' -a "--from=" -d 'receive ITEMS from HOST'
|
||||
complete -f -c guix -n '__fish_guix_using_command copy' -s L -d 'prepend DIR to the package module search path'
|
||||
complete -f -c guix -n '__fish_guix_using_command copy' -a "--load-path=" -d 'prepend DIR to the package module search path'
|
||||
complete -f -c guix -n '__fish_guix_using_command copy' -s K -l keep-failed -d 'keep build tree of failed builds'
|
||||
complete -f -c guix -n '__fish_guix_using_command copy' -s k -l keep-going -d 'keep going when some of the derivations fail'
|
||||
complete -f -c guix -n '__fish_guix_using_command copy' -s n -l dry-run -d 'do not build the derivations'
|
||||
complete -f -c guix -n '__fish_guix_using_command copy' -l fallback -d 'fall back to building when the substituter fails'
|
||||
complete -f -c guix -n '__fish_guix_using_command copy' -l no-substitutes -d 'build instead of resorting to pre-built substitutes'
|
||||
complete -f -c guix -n '__fish_guix_using_command copy' -a "--substitute-urls=" -d 'fetch substitute from URLS if they are authorized'
|
||||
complete -f -c guix -n '__fish_guix_using_command copy' -l no-grafts -d 'do not graft packages'
|
||||
complete -f -c guix -n '__fish_guix_using_command copy' -l no-build-hook -d 'do not attempt to offload builds via the build hook'
|
||||
complete -f -c guix -n '__fish_guix_using_command copy' -a "--max-silent-time=" -d 'mark the build as failed after SECONDS of silence'
|
||||
complete -f -c guix -n '__fish_guix_using_command copy' -a "--timeout=" -d 'mark the build as failed after SECONDS of activity'
|
||||
complete -f -c guix -n '__fish_guix_using_command copy' -a "--verbosity=" -d 'use the given verbosity LEVEL'
|
||||
complete -f -c guix -n '__fish_guix_using_command copy' -a "--rounds=" -d 'build N times in a row to detect non-determinism'
|
||||
complete -f -c guix -n '__fish_guix_using_command copy' -s c -d 'allow the use of up to N CPU cores for the build'
|
||||
complete -f -c guix -n '__fish_guix_using_command copy' -a "--cores=" -d 'allow the use of up to N CPU cores for the build'
|
||||
complete -f -c guix -n '__fish_guix_using_command copy' -s M -d 'allow at most N build jobs'
|
||||
complete -f -c guix -n '__fish_guix_using_command copy' -a "--max-jobs=" -d 'allow at most N build jobs'
|
||||
|
||||
#### container
|
||||
set -l remotecommands exec
|
||||
complete -f -c guix -n '__fish_guix_needs_command' -a container -d 'Build and manipulate Linux containers.'
|
||||
complete -f -c guix -n '__fish_guix_using_command container' -l exec -d 'Execute a command inside of an existing container.'
|
||||
|
||||
#### challenge
|
||||
set -l remotecommands substitute-urls verbose
|
||||
complete -f -c guix -n '__fish_guix_needs_command' -a challenge -d 'Challenge the substitutes for PACKAGE provided by one or more servers.'
|
||||
complete -f -c guix -n '__fish_guix_using_command challenge' -a "--substitute-urls=" -d 'compare build results with those at URLS'
|
||||
complete -f -c guix -n '__fish_guix_using_command challenge' -s v -l verbose -d 'show details about successful comparisons'
|
||||
|
||||
#### archive
|
||||
set -l remotecommands export format= recursive import missing extract= generate-key authorize expression= source system= target= load-path= keep-failed keep-going dry-run fallback no-substitutes substitute-urls= no-grafts no-build-hook max-silent-time= timeout= verbosity= rounds= cores= max-jobs=
|
||||
complete -f -c guix -n '__fish_guix_needs_command' -a archive -d 'Export/import one or more packages from/to the store.'
|
||||
complete -f -c guix -n '__fish_guix_using_command archive' -l export -d 'export the specified files/packages to stdout'
|
||||
complete -f -c guix -n '__fish_guix_using_command archive' -a "--format=" -d 'export files/packages in the specified format FMT'
|
||||
complete -f -c guix -n '__fish_guix_using_command archive' -l recursive -d 'combined with \'--export\', include dependencies'
|
||||
complete -f -c guix -n '__fish_guix_using_command archive' -l import -d 'import from the archive passed on stdin'
|
||||
complete -f -c guix -n '__fish_guix_using_command archive' -l missing -d 'print the files from stdin that are missing'
|
||||
complete -f -c guix -n '__fish_guix_using_command archive' -a "--extract=" -d 'extract the archive on stdin to DIR'
|
||||
complete -f -c guix -n '__fish_guix_using_command archive' -l generate-key -d 'generate a key pair with the given parameters'
|
||||
complete -f -c guix -n '__fish_guix_using_command archive' -l authorize -d 'authorize imports signed by the public key on stdin'
|
||||
complete -f -c guix -n '__fish_guix_using_command archive' -a "--expression=" -d 'build the package or derivation EXPR evaluates to'
|
||||
complete -f -c guix -n '__fish_guix_using_command archive' -l source -d 'build the packages\' source derivations'
|
||||
complete -f -c guix -n '__fish_guix_using_command archive' -a "--system=" -d 'attempt to build for SYSTEM--e.g., "i686-linux"'
|
||||
complete -f -c guix -n '__fish_guix_using_command archive' -a "--target=" -d 'cross-build for TRIPLET--e.g., "armel-linux-gnu"'
|
||||
complete -f -c guix -n '__fish_guix_using_command archive' -a "--load-path=" -d 'prepend DIR to the package module search path'
|
||||
complete -f -c guix -n '__fish_guix_using_command archive' -l keep-failed -d 'keep build tree of failed builds'
|
||||
complete -f -c guix -n '__fish_guix_using_command archive' -l keep-going -d 'keep going when some of the derivations fail'
|
||||
complete -f -c guix -n '__fish_guix_using_command archive' -l dry-run -d 'do not build the derivations'
|
||||
complete -f -c guix -n '__fish_guix_using_command archive' -l fallback -d 'fall back to building when the substituter fails'
|
||||
complete -f -c guix -n '__fish_guix_using_command archive' -l no-substitutes -d 'build instead of resorting to pre-built substitutes'
|
||||
complete -f -c guix -n '__fish_guix_using_command archive' -a "--substitute-urls=" -d 'fetch substitute from URLS if they are authorized'
|
||||
complete -f -c guix -n '__fish_guix_using_command archive' -l no-grafts -d 'do not graft packages'
|
||||
complete -f -c guix -n '__fish_guix_using_command archive' -l no-build-hook -d 'do not attempt to offload builds via the build hook'
|
||||
complete -f -c guix -n '__fish_guix_using_command archive' -a "--max-silent-time=" -d 'mark the build as failed after SECONDS of silence'
|
||||
complete -f -c guix -n '__fish_guix_using_command archive' -a "--timeout=" -f -d 'mark the build as failed after SECONDS of activity'
|
||||
complete -f -c guix -n '__fish_guix_using_command archive' -a "--verbosity=" -d 'use the given verbosity LEVEL'
|
||||
complete -f -c guix -n '__fish_guix_using_command archive' -a "--rounds=" -d 'build N times in a row to detect non-determinism'
|
||||
complete -f -c guix -n '__fish_guix_using_command archive' -a "--cores=" -d 'allow the use of up to N CPU cores for the build'
|
||||
complete -f -c guix -n '__fish_guix_using_command archive' -a "--max-jobs=" -d 'allow at most N build jobs'
|
||||
|
||||
#### pack
|
||||
set -l remotecommands --load-path= --keep-failed --keep-going --dry-run --fallback --no-substitutes --substitute-urls= --no-grafts --no-build-hook --max-silent-time= --timeout= --verbosity= --rounds= --cores= --max-jobs= --with-source= --with-input= --with-graft= --format= --expression= --system= --target= --compression= --symlink= --localstatedir --help --version
|
||||
complete -f -c guix -n '__fish_guix_needs_command' -a pack -d 'Create a bundle of PACKAGE.'
|
||||
complete -f -c guix -n '__fish_guix_using_command pack' -a "--load-path=" -d 'prepend DIR to the package module search path'
|
||||
complete -f -c guix -n '__fish_guix_using_command pack' -s L -d 'prepend DIR to the package module search path'
|
||||
complete -f -c guix -n '__fish_guix_using_command pack' -a "--keep-failed" -d 'keep build tree of failed builds'
|
||||
complete -f -c guix -n '__fish_guix_using_command pack' -s K -d 'keep build tree of failed builds'
|
||||
complete -f -c guix -n '__fish_guix_using_command pack' -a "--keep-going" -d 'keep going when some of the derivations fail'
|
||||
complete -f -c guix -n '__fish_guix_using_command pack' -s k -d 'keep going when some of the derivations fail'
|
||||
complete -f -c guix -n '__fish_guix_using_command pack' -a "--dry-run" -d 'do not build the derivations'
|
||||
complete -f -c guix -n '__fish_guix_using_command pack' -s n -d 'do not build the derivations'
|
||||
complete -f -c guix -n '__fish_guix_using_command pack' -a "--fallback" -d 'fall back to building when the substituter fails'
|
||||
complete -f -c guix -n '__fish_guix_using_command pack' -a "--no-substitutes" -d 'build instead of resorting to pre-built substitutes'
|
||||
complete -f -c guix -n '__fish_guix_using_command pack' -a "--substitute-urls=" -d 'fetch substitute from URLS if they are authorized'
|
||||
complete -f -c guix -n '__fish_guix_using_command pack' -a "--no-grafts" -d 'do not graft packages'
|
||||
complete -f -c guix -n '__fish_guix_using_command pack' -a "--no-build-hook" -d 'do not attempt to offload builds via the build hook'
|
||||
complete -f -c guix -n '__fish_guix_using_command pack' -a "--max-silent-time=" -d 'mark the build as failed after SECONDS of silence'
|
||||
complete -f -c guix -n '__fish_guix_using_command pack' -a "--timeout=" -d 'mark the build as failed after SECONDS of activity'
|
||||
complete -f -c guix -n '__fish_guix_using_command pack' -a "--verbosity=" -d 'use the given verbosity LEVEL'
|
||||
complete -f -c guix -n '__fish_guix_using_command pack' -a "--rounds=" -d 'build N times in a row to detect non-determinism'
|
||||
complete -f -c guix -n '__fish_guix_using_command pack' -s c -d 'allow the use of up to N CPU cores for the build'
|
||||
complete -f -c guix -n '__fish_guix_using_command pack' -a "--cores=" -d 'allow the use of up to N CPU cores for the build'
|
||||
complete -f -c guix -n '__fish_guix_using_command pack' -a "--max-jobs=" -d 'allow at most N build jobs'
|
||||
complete -f -c guix -n '__fish_guix_using_command pack' -s M -d 'allow at most N build jobs'
|
||||
complete -f -c guix -n '__fish_guix_using_command pack' -a "--with-source=" -d 'use SOURCE when building the corresponding package'
|
||||
complete -f -c guix -n '__fish_guix_using_command pack' -a "--with-input=PACKAGE=REPLACEMENT" -d 'replace dependency PACKAGE by REPLACEMENT'
|
||||
complete -f -c guix -n '__fish_guix_using_command pack' -a "--with-graft=PACKAGE=REPLACEMENT" -d 'graft REPLACEMENT on packages that refer to PACKAGE'
|
||||
complete -f -c guix -n '__fish_guix_using_command pack' -a "--format=" -d 'build a pack in the given FORMAT'
|
||||
complete -f -c guix -n '__fish_guix_using_command pack' -s f -d 'build a pack in the given FORMAT'
|
||||
complete -f -c guix -n '__fish_guix_using_command pack' -a "--expression=" -d 'consider the package EXPR evaluates to'
|
||||
complete -f -c guix -n '__fish_guix_using_command pack' -s e -d 'consider the package EXPR evaluates to'
|
||||
complete -f -c guix -n '__fish_guix_using_command pack' -a "--system=" -d 'attempt to build for SYSTEM--e.g., "i686-linux"'
|
||||
complete -f -c guix -n '__fish_guix_using_command pack' -s s -d 'attempt to build for SYSTEM--eg., "i686-linux"'
|
||||
complete -f -c guix -n '__fish_guix_using_command pack' -a "--target=" -d 'cross-build for TRIPLET--e.g., "armel-linux-gnu"'
|
||||
complete -f -c guix -n '__fish_guix_using_command pack' -a "--compression=" -d 'compress using TOOL--e.g., "lzip"'
|
||||
complete -f -c guix -n '__fish_guix_using_command pack' -s C -d 'compress using TOOL--e.g., "lzip"'
|
||||
complete -f -c guix -n '__fish_guix_using_command pack' -a "--symlink=" -d 'create symlinks to the profile according to SPEC'
|
||||
complete -f -c guix -n '__fish_guix_using_command pack' -s S -d 'create symlinks to the profile according to SPEC'
|
||||
complete -f -c guix -n '__fish_guix_using_command pack' -a "--localstatedir" -d 'include /var/guix in the resulting pack'
|
||||
|
||||
|
||||
## weather
|
||||
set -l remotecommands substitute-urls manifest system
|
||||
complete -f -c guix -n '__fish_guix_needs_command' -a weather -d 'Report the availability of substitutes-'
|
||||
complete -f -c guix -n '__fish_guix_using_command weather' -a "--substitute-urls=" -d 'check for available substitutes at URLS'
|
||||
complete -f -c guix -n '__fish_guix_using_command weather' -s m -d 'look up substitutes for packages specified in MANIFEST'
|
||||
complete -f -c guix -n '__fish_guix_using_command weather' -a "--manifest=" -d 'look up substitutes for packages specified in MANIFEST'
|
||||
complete -f -c guix -n '__fish_guix_using_command weather' -s s -d 'consider substitutes for SYSTEM--e.g., "i686-linux"'
|
||||
complete -f -c guix -n '__fish_guix_using_command weather' -a "--system=" -d 'consider substitutes for SYSTEM--e.g., "i686-linux"'
|
||||
@@ -1,285 +0,0 @@
|
||||
; -*- lisp -*-
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2018 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/>.
|
||||
|
||||
;; This is a specification for SELinux 2.7 written in the SELinux Common
|
||||
;; Intermediate Language (CIL). It refers to types that must be defined in
|
||||
;; the system's base policy.
|
||||
|
||||
(block guix_daemon
|
||||
;; Require existing types
|
||||
(typeattributeset cil_gen_require init_t)
|
||||
(typeattributeset cil_gen_require tmp_t)
|
||||
(typeattributeset cil_gen_require nscd_var_run_t)
|
||||
(typeattributeset cil_gen_require var_log_t)
|
||||
(typeattributeset cil_gen_require domain)
|
||||
|
||||
;; Declare own types
|
||||
(type guix_daemon_t)
|
||||
(roletype object_r guix_daemon_t)
|
||||
(type guix_daemon_conf_t)
|
||||
(roletype object_r guix_daemon_conf_t)
|
||||
(type guix_daemon_exec_t)
|
||||
(roletype object_r guix_daemon_exec_t)
|
||||
(type guix_daemon_socket_t)
|
||||
(roletype object_r guix_daemon_socket_t)
|
||||
(type guix_store_content_t)
|
||||
(roletype object_r guix_store_content_t)
|
||||
(type guix_profiles_t)
|
||||
(roletype object_r guix_profiles_t)
|
||||
|
||||
;; These types are domains, thereby allowing process rules
|
||||
(typeattributeset domain (guix_daemon_t guix_daemon_exec_t))
|
||||
|
||||
(level low (s0))
|
||||
|
||||
;; When a process in init_t or guix_store_content_t spawns a
|
||||
;; guix_daemon_exec_t process, let it run in the guix_daemon_t context
|
||||
(typetransition init_t guix_daemon_exec_t
|
||||
process guix_daemon_t)
|
||||
(typetransition guix_store_content_t guix_daemon_exec_t
|
||||
process guix_daemon_t)
|
||||
|
||||
;; Permit communication with NSCD
|
||||
(allow guix_daemon_t
|
||||
nscd_var_run_t
|
||||
(file (map read)))
|
||||
(allow guix_daemon_t
|
||||
nscd_var_run_t
|
||||
(dir (search)))
|
||||
(allow guix_daemon_t
|
||||
nscd_var_run_t
|
||||
(sock_file (write)))
|
||||
(allow guix_daemon_t
|
||||
nscd_t
|
||||
(fd (use)))
|
||||
(allow guix_daemon_t
|
||||
nscd_t
|
||||
(unix_stream_socket (connectto)))
|
||||
|
||||
;; Permit logging and temp file access
|
||||
(allow guix_daemon_t
|
||||
tmp_t
|
||||
(lnk_file (setattr unlink)))
|
||||
(allow guix_daemon_t
|
||||
tmp_t
|
||||
(dir (create
|
||||
rmdir
|
||||
add_name remove_name
|
||||
open read write
|
||||
getattr setattr
|
||||
search)))
|
||||
(allow guix_daemon_t
|
||||
var_log_t
|
||||
(file (create getattr open write)))
|
||||
(allow guix_daemon_t
|
||||
var_log_t
|
||||
(dir (getattr write add_name)))
|
||||
(allow guix_daemon_t
|
||||
var_run_t
|
||||
(lnk_file (read)))
|
||||
(allow guix_daemon_t
|
||||
var_run_t
|
||||
(dir (search)))
|
||||
|
||||
;; Spawning processes, execute helpers
|
||||
(allow guix_daemon_t
|
||||
self
|
||||
(process (fork)))
|
||||
(allow guix_daemon_t
|
||||
guix_daemon_exec_t
|
||||
(file (execute execute_no_trans read open)))
|
||||
|
||||
;; TODO: unknown
|
||||
(allow guix_daemon_t
|
||||
root_t
|
||||
(dir (mounton)))
|
||||
(allow guix_daemon_t
|
||||
fs_t
|
||||
(filesystem (getattr)))
|
||||
(allow guix_daemon_conf_t
|
||||
fs_t
|
||||
(filesystem (associate)))
|
||||
|
||||
;; Build isolation
|
||||
(allow guix_daemon_t
|
||||
guix_store_content_t
|
||||
(file (mounton)))
|
||||
(allow guix_store_content_t
|
||||
fs_t
|
||||
(filesystem (associate)))
|
||||
(allow guix_daemon_t
|
||||
guix_store_content_t
|
||||
(dir (mounton)))
|
||||
(allow guix_daemon_t
|
||||
guix_daemon_t
|
||||
(capability (net_admin
|
||||
fsetid fowner
|
||||
chown setuid setgid
|
||||
dac_override dac_read_search
|
||||
sys_chroot)))
|
||||
(allow guix_daemon_t
|
||||
fs_t
|
||||
(filesystem (unmount)))
|
||||
(allow guix_daemon_t
|
||||
devpts_t
|
||||
(filesystem (mount)))
|
||||
(allow guix_daemon_t
|
||||
devpts_t
|
||||
(chr_file (setattr getattr)))
|
||||
(allow guix_daemon_t
|
||||
tmpfs_t
|
||||
(filesystem (mount)))
|
||||
(allow guix_daemon_t
|
||||
tmpfs_t
|
||||
(dir (getattr)))
|
||||
(allow guix_daemon_t
|
||||
proc_t
|
||||
(filesystem (mount)))
|
||||
(allow guix_daemon_t
|
||||
null_device_t
|
||||
(chr_file (getattr open read write)))
|
||||
(allow guix_daemon_t
|
||||
kvm_device_t
|
||||
(chr_file (getattr)))
|
||||
(allow guix_daemon_t
|
||||
zero_device_t
|
||||
(chr_file (getattr)))
|
||||
(allow guix_daemon_t
|
||||
urandom_device_t
|
||||
(chr_file (getattr)))
|
||||
(allow guix_daemon_t
|
||||
random_device_t
|
||||
(chr_file (getattr)))
|
||||
(allow guix_daemon_t
|
||||
devtty_t
|
||||
(chr_file (getattr)))
|
||||
|
||||
;; Access to store items
|
||||
(allow guix_daemon_t
|
||||
guix_store_content_t
|
||||
(dir (reparent
|
||||
create
|
||||
getattr setattr
|
||||
search rename
|
||||
add_name remove_name
|
||||
open write
|
||||
rmdir)))
|
||||
(allow guix_daemon_t
|
||||
guix_store_content_t
|
||||
(file (create
|
||||
lock
|
||||
setattr getattr
|
||||
execute execute_no_trans
|
||||
link unlink
|
||||
map
|
||||
rename
|
||||
open read write)))
|
||||
(allow guix_daemon_t
|
||||
guix_store_content_t
|
||||
(lnk_file (create
|
||||
getattr setattr
|
||||
link unlink
|
||||
read
|
||||
rename)))
|
||||
|
||||
;; Access to configuration files and directories
|
||||
(allow guix_daemon_t
|
||||
guix_daemon_conf_t
|
||||
(dir (search
|
||||
setattr getattr
|
||||
add_name remove_name
|
||||
open read write)))
|
||||
(allow guix_daemon_t
|
||||
guix_daemon_conf_t
|
||||
(file (create
|
||||
lock
|
||||
map
|
||||
getattr setattr
|
||||
unlink
|
||||
open read write)))
|
||||
(allow guix_daemon_t
|
||||
guix_daemon_conf_t
|
||||
(lnk_file (create getattr rename unlink)))
|
||||
|
||||
;; Access to profiles
|
||||
(allow guix_daemon_t
|
||||
guix_profiles_t
|
||||
(dir (getattr setattr read open)))
|
||||
(allow guix_daemon_t
|
||||
guix_profiles_t
|
||||
(lnk_file (read getattr)))
|
||||
|
||||
;; Access to profile links in the home directory
|
||||
;; TODO: allow access to profile links *anywhere* on the filesystem
|
||||
(allow guix_daemon_t
|
||||
user_home_t
|
||||
(lnk_file (read getattr)))
|
||||
(allow guix_daemon_t
|
||||
user_home_t
|
||||
(dir (search)))
|
||||
|
||||
;; Socket operations
|
||||
(allow guix_daemon_t
|
||||
init_t
|
||||
(fd (use)))
|
||||
(allow guix_daemon_t
|
||||
init_t
|
||||
(unix_stream_socket (write)))
|
||||
(allow guix_daemon_t
|
||||
guix_daemon_conf_t
|
||||
(unix_stream_socket (listen)))
|
||||
(allow guix_daemon_t
|
||||
guix_daemon_conf_t
|
||||
(sock_file (create unlink)))
|
||||
(allow guix_daemon_t
|
||||
self
|
||||
(unix_stream_socket (create
|
||||
read write
|
||||
connect bind accept
|
||||
getopt setopt)))
|
||||
(allow guix_daemon_t
|
||||
self
|
||||
(fifo_file (write read)))
|
||||
(allow guix_daemon_t
|
||||
self
|
||||
(udp_socket (ioctl create)))
|
||||
|
||||
;; Label file system
|
||||
(filecon "@guix_sysconfdir@/guix(/.*)?"
|
||||
any (system_u object_r guix_daemon_conf_t (low low)))
|
||||
(filecon "@guix_localstatedir@/guix(/.*)?"
|
||||
any (system_u object_r guix_daemon_conf_t (low low)))
|
||||
(filecon "@guix_localstatedir@/guix/profiles(/.*)?"
|
||||
any (system_u object_r guix_profiles_t (low low)))
|
||||
(filecon "/gnu"
|
||||
dir (unconfined_u object_r guix_store_content_t (low low)))
|
||||
(filecon "@storedir@(/.+)?"
|
||||
any (unconfined_u object_r guix_store_content_t (low low)))
|
||||
(filecon "@storedir@/[^/]+/.+"
|
||||
any (unconfined_u object_r guix_store_content_t (low low)))
|
||||
(filecon "@prefix@/bin/guix-daemon"
|
||||
file (system_u object_r guix_daemon_exec_t (low low)))
|
||||
(filecon "@storedir@/.+-(guix-.+|profile)/bin/guix-daemon"
|
||||
file (system_u object_r guix_daemon_exec_t (low low)))
|
||||
(filecon "@storedir@/.+-(guix-.+|profile)/libexec/guix-authenticate"
|
||||
file (system_u object_r guix_daemon_exec_t (low low)))
|
||||
(filecon "@storedir@/.+-(guix-.+|profile)/libexec/guix/(.*)?"
|
||||
any (system_u object_r guix_daemon_exec_t (low low)))
|
||||
(filecon "@guix_localstatedir@/guix/daemon-socket/socket"
|
||||
any (system_u object_r guix_daemon_socket_t (low low))))
|
||||
@@ -7,4 +7,6 @@ start on runlevel [2345]
|
||||
|
||||
stop on runlevel [016]
|
||||
|
||||
task
|
||||
|
||||
exec @localstatedir@/guix/profiles/per-user/root/guix-profile/bin/guix-daemon --build-users-group=guixbuild
|
||||
|
||||
@@ -1,432 +0,0 @@
|
||||
#!/bin/bash
|
||||
# GNU Guix --- Functional package management for GNU
|
||||
# Copyright © 2017 sharlatan <sharlatanus@gmail.com>
|
||||
# Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
|
||||
# Copyright © 2018 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/>.
|
||||
|
||||
set -e
|
||||
|
||||
[ "$UID" -eq 0 ] || { echo "This script must be run as root."; exit 1; }
|
||||
|
||||
REQUIRE=(
|
||||
"dirname"
|
||||
"readlink"
|
||||
"wget"
|
||||
"gpg"
|
||||
"grep"
|
||||
"which"
|
||||
"sed"
|
||||
"sort"
|
||||
"getent"
|
||||
"mktemp"
|
||||
"rm"
|
||||
"chmod"
|
||||
"uname"
|
||||
"groupadd"
|
||||
"tail"
|
||||
"tr"
|
||||
)
|
||||
|
||||
PAS=$'[ \033[32;1mPASS\033[0m ] '
|
||||
ERR=$'[ \033[31;1mFAIL\033[0m ] '
|
||||
INF="[ INFO ] "
|
||||
|
||||
DEBUG=0
|
||||
GNU_URL="https://alpha.gnu.org/gnu/guix/"
|
||||
OPENPGP_SIGNING_KEY_ID="3CE464558A84FDC69DB40CFB090B11993D9AEBB5"
|
||||
|
||||
# This script needs to know where root's home directory is. However, we
|
||||
# cannot simply use the HOME environment variable, since there is no guarantee
|
||||
# that it points to root's home directory.
|
||||
ROOT_HOME="$(echo ~root)"
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
#+UTILITIES
|
||||
|
||||
_err()
|
||||
{ # All errors go to stderr.
|
||||
printf "[%s]: %s\n" "$(date +%s.%3N)" "$1"
|
||||
}
|
||||
|
||||
_msg()
|
||||
{ # Default message to stdout.
|
||||
printf "[%s]: %s\n" "$(date +%s.%3N)" "$1"
|
||||
}
|
||||
|
||||
_debug()
|
||||
{
|
||||
if [ "${DEBUG}" = '1' ]; then
|
||||
printf "[%s]: %s\n" "$(date +%s.%3N)" "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
chk_require()
|
||||
{ # Check that every required command is available.
|
||||
declare -a cmds
|
||||
declare -a warn
|
||||
|
||||
cmds=(${1})
|
||||
|
||||
_debug "--- [ $FUNCNAME ] ---"
|
||||
|
||||
for c in ${cmds[@]}; do
|
||||
command -v "$c" &>/dev/null || warn+=("$c")
|
||||
done
|
||||
|
||||
[ "${#warn}" -ne 0 ] &&
|
||||
{ _err "${ERR}Missing commands: ${warn[*]}.";
|
||||
return 1; }
|
||||
|
||||
_msg "${PAS}verification of required commands completed"
|
||||
|
||||
gpg --list-keys ${OPENPGP_SIGNING_KEY_ID} >/dev/null 2>&1 || (
|
||||
_err "${ERR}Missing OpenPGP public key. Fetch it with this command:"
|
||||
echo " gpg --keyserver pgp.mit.edu --recv-keys ${OPENPGP_SIGNING_KEY_ID}"
|
||||
exit 1
|
||||
)
|
||||
}
|
||||
|
||||
chk_term()
|
||||
{ # Check for ANSI terminal for color printing.
|
||||
local ansi_term
|
||||
|
||||
if [ -t 2 ]; then
|
||||
if [ "${TERM+set}" = 'set' ]; then
|
||||
case "$TERM" in
|
||||
xterm*|rxvt*|urxvt*|linux*|vt*|eterm*|screen*)
|
||||
ansi_term=true
|
||||
;;
|
||||
*)
|
||||
ansi_term=false
|
||||
ERR="[ FAIL ] "
|
||||
PAS="[ PASS ] "
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
chk_init_sys()
|
||||
{ # Return init system type name.
|
||||
if [[ $(/sbin/init --version 2>/dev/null) =~ upstart ]]; then
|
||||
_msg "${INF}init system is: upstart"
|
||||
INIT_SYS="upstart"
|
||||
return 0
|
||||
elif [[ $(systemctl) =~ -\.mount ]]; then
|
||||
_msg "${INF}init system is: systemd"
|
||||
INIT_SYS="systemd"
|
||||
return 0
|
||||
elif [[ -f /etc/init.d/cron && ! -h /etc/init.d/cron ]]; then
|
||||
_msg "${INF}init system is: sysv-init"
|
||||
INIT_SYS="sysv-init"
|
||||
return 0
|
||||
else
|
||||
INIT_SYS="NA"
|
||||
_err "${ERR}Init system could not be detected."
|
||||
fi
|
||||
}
|
||||
|
||||
chk_sys_arch()
|
||||
{ # Check for operating system and architecture type.
|
||||
local os
|
||||
local arch
|
||||
|
||||
os="$(uname -s)"
|
||||
arch="$(uname -m)"
|
||||
|
||||
case "$arch" in
|
||||
i386 | i486 | i686 | i786 | x86)
|
||||
local arch=i686
|
||||
;;
|
||||
x86_64 | x86-64 | x64 | amd64)
|
||||
local arch=x86_64
|
||||
;;
|
||||
aarch64)
|
||||
local arch=aarch64
|
||||
;;
|
||||
*)
|
||||
_err "${ERR}Unsupported CPU type: ${arch}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
case "$os" in
|
||||
Linux | linux)
|
||||
local os=linux
|
||||
;;
|
||||
*)
|
||||
_err "${ERR}Your operation system (${os}) is not supported."
|
||||
exit 1
|
||||
esac
|
||||
|
||||
ARCH_OS="${arch}-${os}"
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
#+MAIN
|
||||
|
||||
guix_get_bin_list()
|
||||
{ # Scan GNU archive and save list of binaries
|
||||
local gnu_url="$1"
|
||||
local -a bin_ver_ls
|
||||
local latest_ver
|
||||
local default_ver
|
||||
|
||||
_debug "--- [ $FUNCNAME ] ---"
|
||||
|
||||
# Filter only version and architecture
|
||||
bin_ver_ls=("$(wget -qO- "$gnu_url" \
|
||||
| sed -n -e 's/.*guix-binary-\([0-9.]*\)\..*.tar.xz.*/\1/p' \
|
||||
| sort -Vu)")
|
||||
|
||||
latest_ver="$(echo "$bin_ver_ls" \
|
||||
| grep -oP "([0-9]{1,2}\.){2}[0-9]{1,2}" \
|
||||
| tail -n1)"
|
||||
|
||||
default_ver="guix-binary-${latest_ver}.${ARCH_OS}"
|
||||
|
||||
if [[ "${#bin_ver_ls}" -ne "0" ]]; then
|
||||
_msg "${PAS}Release for your system: ${default_ver}"
|
||||
else
|
||||
_err "${ERR}Could not obtain list of Guix releases."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Use default to download according to the list and local ARCH_OS.
|
||||
BIN_VER="$default_ver"
|
||||
}
|
||||
|
||||
guix_get_bin()
|
||||
{ # Download and verify binary package.
|
||||
local url="$1"
|
||||
local bin_ver="$2"
|
||||
local dl_path="$3"
|
||||
|
||||
_debug "--- [ $FUNCNAME ] ---"
|
||||
|
||||
_msg "${INF}Downloading Guix release archive"
|
||||
|
||||
wget --help | grep -q '\--show-progress' && \
|
||||
_PROGRESS_OPT="-q --show-progress" || _PROGRESS_OPT=""
|
||||
wget $_PROGRESS_OPT -P "$dl_path" "${url}/${bin_ver}.tar.xz" "${url}/${bin_ver}.tar.xz.sig"
|
||||
|
||||
if [[ "$?" -eq 0 ]]; then
|
||||
_msg "${PAS}download completed."
|
||||
else
|
||||
_err "${ERR}could not download ${url}/${bin_ver}.tar.xz."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
pushd $dl_path >/dev/null
|
||||
gpg --verify "${bin_ver}.tar.xz.sig" >/dev/null 2>&1
|
||||
if [[ "$?" -eq 0 ]]; then
|
||||
_msg "${PAS}Signature is valid."
|
||||
popd >/dev/null
|
||||
else
|
||||
_err "${ERR}could not verify the signature."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
sys_create_store()
|
||||
{ # Unpack and install /gnu/store and /var/guix
|
||||
local pkg="$1"
|
||||
local tmp_path="$2"
|
||||
|
||||
_debug "--- [ $FUNCNAME ] ---"
|
||||
|
||||
cd "$tmp_path"
|
||||
tar --warning=no-timestamp \
|
||||
--extract \
|
||||
--file "$pkg" &&
|
||||
_msg "${PAS}unpacked archive"
|
||||
|
||||
if [[ -e "/var/guix" || -e "/gnu" ]]; then
|
||||
_err "${ERR}A previous Guix installation was found. Refusing to overwrite."
|
||||
exit 1
|
||||
else
|
||||
_msg "${INF}Installing /var/guix and /gnu..."
|
||||
mv "${tmp_path}/var/guix" /var/
|
||||
mv "${tmp_path}/gnu" /
|
||||
fi
|
||||
|
||||
_msg "${INF}Linking the root user's profile"
|
||||
ln -sf /var/guix/profiles/per-user/root/guix-profile \
|
||||
"${ROOT_HOME}/.guix-profile"
|
||||
|
||||
GUIX_PROFILE="${ROOT_HOME}/.guix-profile"
|
||||
source "${GUIX_PROFILE}/etc/profile"
|
||||
_msg "${PAS}activated root profile at /root/.guix-profile"
|
||||
}
|
||||
|
||||
sys_create_build_user()
|
||||
{ # Create the group and user accounts for build users.
|
||||
|
||||
_debug "--- [ $FUNCNAME ] ---"
|
||||
|
||||
if [ $(getent group guixbuild) ]; then
|
||||
_msg "${INF}group guixbuild exists"
|
||||
else
|
||||
groupadd --system guixbuild
|
||||
_msg "${PAS}group <guixbuild> created"
|
||||
fi
|
||||
|
||||
for i in $(seq -w 1 10); do
|
||||
if id "guixbuilder${i}" &>/dev/null; then
|
||||
_msg "${INF}user is already in the system, reset"
|
||||
usermod -g guixbuild -G guixbuild \
|
||||
-d /var/empty -s "$(which nologin)" \
|
||||
-c "Guix build user $i" \
|
||||
"guixbuilder${i}";
|
||||
else
|
||||
useradd -g guixbuild -G guixbuild \
|
||||
-d /var/empty -s "$(which nologin)" \
|
||||
-c "Guix build user $i" --system \
|
||||
"guixbuilder${i}";
|
||||
_msg "${PAS}user added <guixbuilder${i}>"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
sys_enable_guix_daemon()
|
||||
{ # Run the daemon, and set it to automatically start on boot.
|
||||
|
||||
local info_path
|
||||
local local_bin
|
||||
local var_guix
|
||||
|
||||
_debug "--- [ $FUNCNAME ] ---"
|
||||
|
||||
info_path="/usr/local/share/info"
|
||||
local_bin="/usr/local/bin"
|
||||
var_guix="/var/guix/profiles/per-user/root/guix-profile"
|
||||
|
||||
case "$INIT_SYS" in
|
||||
upstart)
|
||||
{ initctl reload-configuration;
|
||||
cp "${ROOT_HOME}/.guix-profile/lib/upstart/system/guix-daemon.conf" \
|
||||
/etc/init/ &&
|
||||
start guix-daemon; } &&
|
||||
_msg "${PAS}enabled Guix daemon via upstart"
|
||||
;;
|
||||
systemd)
|
||||
{ cp "${ROOT_HOME}/.guix-profile/lib/systemd/system/guix-daemon.service" \
|
||||
/etc/systemd/system/;
|
||||
chmod 664 /etc/systemd/system/guix-daemon.service;
|
||||
systemctl daemon-reload &&
|
||||
systemctl start guix-daemon &&
|
||||
systemctl enable guix-daemon; } &&
|
||||
_msg "${PAS}enabled Guix daemon via systemd"
|
||||
;;
|
||||
NA|*)
|
||||
_msg "${ERR}unsupported init system; run the daemon manually:"
|
||||
echo " ${ROOT_HOME}/.guix-profile/bin/guix-daemon --build-users-group=guixbuild"
|
||||
;;
|
||||
esac
|
||||
|
||||
_msg "${INF}making the guix command available to other users"
|
||||
|
||||
[ -e "$local_bin" ] || mkdir -p "$local_bin"
|
||||
ln -sf "${var_guix}/bin/guix" "$local_bin"
|
||||
|
||||
[ -e "$info_path" ] || mkdir -p "$info_path"
|
||||
for i in ${var_guix}/share/info/*; do
|
||||
ln -sf "$i" "$info_path"
|
||||
done
|
||||
}
|
||||
|
||||
sys_authorize_build_farms()
|
||||
{ # authorize the public keys of the two build farms
|
||||
while true; do
|
||||
read -p "Permit downloading pre-built package binaries from the project's build farms? (yes/no) " yn
|
||||
case $yn in
|
||||
[Yy]*) guix archive --authorize < "${ROOT_HOME}/.guix-profile/share/guix/hydra.gnu.org.pub" &&
|
||||
_msg "${PAS}Authorized public key for hydra.gnu.org";
|
||||
guix archive --authorize < "${ROOT_HOME}/.guix-profile/share/guix/berlin.guixsd.org.pub" &&
|
||||
_msg "${PAS}Authorized public key for berlin.guixsd.org";
|
||||
break;;
|
||||
[Nn]*) _msg "${INF}Skipped authorizing build farm public keys"
|
||||
break;;
|
||||
*) _msg "Please answer yes or no.";
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
welcome()
|
||||
{
|
||||
cat<<"EOF"
|
||||
░░░ ░░░
|
||||
░░▒▒░░░░░░░░░ ░░░░░░░░░▒▒░░
|
||||
░░▒▒▒▒▒░░░░░░░ ░░░░░░░▒▒▒▒▒░
|
||||
░▒▒▒░░▒▒▒▒▒ ░░░░░░░▒▒░
|
||||
░▒▒▒▒░ ░░░░░░
|
||||
▒▒▒▒▒ ░░░░░░
|
||||
▒▒▒▒▒ ░░░░░
|
||||
░▒▒▒▒▒ ░░░░░
|
||||
▒▒▒▒▒ ░░░░░
|
||||
▒▒▒▒▒ ░░░░░
|
||||
░▒▒▒▒▒░░░░░
|
||||
▒▒▒▒▒▒░░░
|
||||
▒▒▒▒▒▒░
|
||||
_____ _ _ _ _ _____ _
|
||||
/ ____| \ | | | | | / ____| (_)
|
||||
| | __| \| | | | | | | __ _ _ ___ __
|
||||
| | |_ | . ' | | | | | | |_ | | | | \ \/ /
|
||||
| |__| | |\ | |__| | | |__| | |_| | |> <
|
||||
\_____|_| \_|\____/ \_____|\__,_|_/_/\_\
|
||||
|
||||
This script installs GNU Guix on your system
|
||||
|
||||
https://www.gnu.org/software/guix/
|
||||
EOF
|
||||
echo -n "Press return to continue..."
|
||||
read -r ANSWER
|
||||
}
|
||||
|
||||
main()
|
||||
{
|
||||
local tmp_path
|
||||
welcome
|
||||
|
||||
_msg "Starting installation ($(date))"
|
||||
|
||||
chk_term
|
||||
chk_require "${REQUIRE[*]}"
|
||||
chk_init_sys
|
||||
chk_sys_arch
|
||||
|
||||
_msg "${INF}system is ${ARCH_OS}"
|
||||
|
||||
tmp_path="$(mktemp -t -d guix.XXX)"
|
||||
|
||||
guix_get_bin_list "${GNU_URL}"
|
||||
guix_get_bin "${GNU_URL}" "${BIN_VER}" "$tmp_path"
|
||||
|
||||
sys_create_store "${BIN_VER}.tar.xz" "${tmp_path}"
|
||||
sys_create_build_user
|
||||
sys_enable_guix_daemon
|
||||
sys_authorize_build_farms
|
||||
|
||||
_msg "${INF}cleaning up ${tmp_path}"
|
||||
rm -r "${tmp_path}"
|
||||
|
||||
_msg "${PAS}Guix has successfully been installed!"
|
||||
_msg "${INF}Run 'info guix' to read the manual."
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,8 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: guix-cvs-reference
|
||||
# key: cvs-reference...
|
||||
# --
|
||||
(cvs-reference
|
||||
(root-directory "${1:root-directory}")
|
||||
(module "${2:module}")
|
||||
(revision "${3:revision}"))
|
||||
@@ -1,7 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: guix-git-reference
|
||||
# key: git-reference...
|
||||
# --
|
||||
(git-reference
|
||||
(url "$1")
|
||||
(commit ${2:commit}))
|
||||
@@ -1,7 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: guix-hg-reference
|
||||
# key: hg-reference...
|
||||
# --
|
||||
(hg-reference
|
||||
(url "$1")
|
||||
(changeset ${2:changeset}))
|
||||
@@ -1,23 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: guix-origin
|
||||
# key: origin...
|
||||
# --
|
||||
(origin
|
||||
(method ${1:$$(yas-choose-value "url-fetch"
|
||||
"url-fetch/tarbomb"
|
||||
"url-fetch/zipbomb"
|
||||
"cvs-fetch"
|
||||
"git-fetch"
|
||||
"hg-fetch"
|
||||
"svn-fetch")})
|
||||
(uri ${1:$(cond ((equal yas-text "git-fetch") "git-reference...")
|
||||
((equal yas-text "svn-fetch") "svn-reference...")
|
||||
((equal yas-text "hg-fetch") "hg-reference...")
|
||||
((equal yas-text "cvs-fetch") "cvs-reference...")
|
||||
(t "(string-append \\"https://\\" version \\".tar.gz\\")"))}$0)
|
||||
${1:$(cond ((member yas-text '("git-fetch" "svn-fetch" "hg-fetch" "cvs-fetch"))
|
||||
"(file-name (string-append name \\"-\\" version \\"-checkout\\"))")
|
||||
(t ""))}
|
||||
(sha256
|
||||
(base32
|
||||
"$2")))
|
||||
@@ -1,34 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: guix-package
|
||||
# key: package...
|
||||
# --
|
||||
(define-public $1
|
||||
(package
|
||||
(name "$1")
|
||||
(version "$2")
|
||||
(source origin...$0)
|
||||
(build-system ${3:$$(yas-choose-value "ant-build-system"
|
||||
"asdf-build-system"
|
||||
"cargo-build-system"
|
||||
"cmake-build-system"
|
||||
"dub-build-system"
|
||||
"emacs-build-system"
|
||||
"font-build-system"
|
||||
"glib-or-gtk-build-system"
|
||||
"gnu-build-system"
|
||||
"go-build-system"
|
||||
"haskell-build-system"
|
||||
"meson-build-system"
|
||||
"minify-build-system"
|
||||
"ocaml-build-system"
|
||||
"perl-build-system"
|
||||
"python-build-system"
|
||||
"r-build-system"
|
||||
"ruby-build-system"
|
||||
"texlive-build-system"
|
||||
"trivial-build-system"
|
||||
"waf-build-system")})
|
||||
(home-page "$4")
|
||||
(synopsis "$5")
|
||||
(description "$6")
|
||||
(license $7)))
|
||||
@@ -1,7 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: guix-svn-reference
|
||||
# key: svn-reference...
|
||||
# --
|
||||
(svn-reference
|
||||
(url "$1")
|
||||
(revision ${2:svn-revision}))
|
||||
@@ -1,8 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: guix-commit-message-add-package
|
||||
# key: add
|
||||
# condition: git-commit-mode
|
||||
# --
|
||||
gnu: Add $1.
|
||||
|
||||
* `(car (magit-staged-files))` ($1): New variable.
|
||||
@@ -1,9 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: guix-commit-message-update-package
|
||||
# key: update
|
||||
# condition: git-commit-mode
|
||||
# --
|
||||
gnu: $1: Update to $2.
|
||||
|
||||
* `(car (magit-staged-files))` ($1): Update to $2.$0
|
||||
`(mapconcat (lambda (file) (concat "* " file)) (cdr (magit-staged-files)) "\n")`
|
||||
@@ -1,5 +1,5 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2015 Joshua S. Grant <jgrant@parenthetical.io>
|
||||
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
|
||||
;;;
|
||||
@@ -19,14 +19,6 @@
|
||||
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
(define-module (gnu)
|
||||
#:use-module (guix i18n)
|
||||
#:use-module (guix utils)
|
||||
#:use-module (srfi srfi-34)
|
||||
#:use-module (srfi srfi-35)
|
||||
#:use-module (ice-9 match)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (gnu packages)
|
||||
#:use-module (gnu services)
|
||||
#:export (use-package-modules
|
||||
use-service-modules
|
||||
use-system-modules))
|
||||
@@ -60,97 +52,13 @@
|
||||
(module-use! i (resolve-interface m))))
|
||||
%public-modules)))
|
||||
|
||||
(define (%try-use-modules modules location make-hint)
|
||||
"Attempt to load all of MODULES. Report errors as coming from LOCATION, a
|
||||
<location> record, and use MAKE-HINT to produce a fix hint."
|
||||
(define (location->string loc)
|
||||
(match loc
|
||||
(#f "")
|
||||
(($ <location> file line column)
|
||||
(format #f "~a:~a:~a: " file line column))))
|
||||
|
||||
(for-each (lambda (module)
|
||||
(catch 'misc-error
|
||||
(lambda ()
|
||||
(process-use-modules `((,module))))
|
||||
(lambda _
|
||||
(raise
|
||||
(apply
|
||||
make-compound-condition
|
||||
(condition
|
||||
(&message
|
||||
(message (format #f (G_ "module ~a not found")
|
||||
module))))
|
||||
(condition
|
||||
(&error-location (location location)))
|
||||
(or (and=> (make-hint module) list)
|
||||
'()))))))
|
||||
modules))
|
||||
|
||||
(define (package-module-hint module)
|
||||
(define last-name
|
||||
(match module
|
||||
((_ ... last)
|
||||
(symbol->string last))))
|
||||
|
||||
(match (find-packages-by-name last-name)
|
||||
(()
|
||||
(condition
|
||||
(&fix-hint
|
||||
(hint (G_ "\
|
||||
You may use @command{guix package --show=foo | grep location} to search
|
||||
for the location of package @code{foo}.
|
||||
If you get the line @code{location: gnu/packages/bar.scm:174:2},
|
||||
add @code{bar} to the @code{use-package-modules} form.")))))
|
||||
((package _ ...)
|
||||
(condition
|
||||
(&fix-hint
|
||||
(hint (format #f (G_ "\
|
||||
Try adding @code{(use-package-modules ~a)}.")
|
||||
(basename (location-file (package-location package))
|
||||
".scm"))))))))
|
||||
|
||||
(define (service-module-hint module)
|
||||
(define last-name
|
||||
(match module
|
||||
((_ ... last)
|
||||
last)))
|
||||
|
||||
(match (lookup-service-types last-name)
|
||||
(()
|
||||
(condition
|
||||
(&fix-hint
|
||||
(hint (format #f (G_ "\
|
||||
You may use @command{guix system search ~a} to search for a service
|
||||
matching @code{~a}.
|
||||
If you get the line @code{location: gnu/services/foo.scm:188:2},
|
||||
add @code{foo} to the @code{use-service-modules} form.")
|
||||
last-name last-name)))))
|
||||
((package _ ...)
|
||||
(condition
|
||||
(&fix-hint
|
||||
(hint (format #f (G_ "\
|
||||
Try adding @code{(use-service-modules ~a)}.")
|
||||
(basename (location-file (service-type-location package))
|
||||
".scm"))))))))
|
||||
|
||||
(define-syntax-rule (try-use-modules hint modules ...)
|
||||
(eval-when (expand load eval)
|
||||
(%try-use-modules '(modules ...)
|
||||
(source-properties->location
|
||||
(current-source-location))
|
||||
hint)))
|
||||
|
||||
(define-syntax-rule (use-package-modules module ...)
|
||||
(try-use-modules package-module-hint
|
||||
(gnu packages module) ...))
|
||||
(use-modules (gnu packages module) ...))
|
||||
|
||||
(define-syntax-rule (use-service-modules module ...)
|
||||
(try-use-modules service-module-hint
|
||||
(gnu services module) ...))
|
||||
(use-modules (gnu services module) ...))
|
||||
|
||||
(define-syntax-rule (use-system-modules module ...)
|
||||
(try-use-modules (const #f) ;no hint
|
||||
(gnu system module) ...))
|
||||
(use-modules (gnu system module) ...))
|
||||
|
||||
;;; gnu.scm ends here
|
||||
|
||||
+2
-17
@@ -30,7 +30,6 @@
|
||||
menu-entry-linux
|
||||
menu-entry-linux-arguments
|
||||
menu-entry-initrd
|
||||
menu-entry-device-mount-point
|
||||
|
||||
bootloader
|
||||
bootloader?
|
||||
@@ -43,7 +42,7 @@
|
||||
bootloader-configuration
|
||||
bootloader-configuration?
|
||||
bootloader-configuration-bootloader
|
||||
bootloader-configuration-target
|
||||
bootloader-configuration-device
|
||||
bootloader-configuration-menu-entries
|
||||
bootloader-configuration-default-entry
|
||||
bootloader-configuration-timeout
|
||||
@@ -68,8 +67,6 @@
|
||||
(label menu-entry-label)
|
||||
(device menu-entry-device ; file system uuid, label, or #f
|
||||
(default #f))
|
||||
(device-mount-point menu-entry-device-mount-point
|
||||
(default #f))
|
||||
(linux menu-entry-linux)
|
||||
(linux-arguments menu-entry-linux-arguments
|
||||
(default '())) ; list of string-valued gexps
|
||||
@@ -107,8 +104,6 @@
|
||||
(bootloader bootloader-configuration-bootloader) ; <bootloader>
|
||||
(device bootloader-configuration-device ; string
|
||||
(default #f))
|
||||
(target %bootloader-configuration-target ; string
|
||||
(default #f))
|
||||
(menu-entries bootloader-configuration-menu-entries ; list of <boot-parameters>
|
||||
(default '()))
|
||||
(default-entry bootloader-configuration-default-entry ; integer
|
||||
@@ -128,15 +123,6 @@
|
||||
(additional-configuration bootloader-configuration-additional-configuration ; record
|
||||
(default #f)))
|
||||
|
||||
(define (bootloader-configuration-target config)
|
||||
(or (%bootloader-configuration-target config)
|
||||
(let ((device (bootloader-configuration-device config)))
|
||||
(when device
|
||||
(warning
|
||||
(G_ "The 'device' field of bootloader configurations is deprecated.~%"))
|
||||
(warning (G_ "Use 'target' instead.~%")))
|
||||
device)))
|
||||
|
||||
|
||||
;;;
|
||||
;;; Bootloaders.
|
||||
@@ -146,8 +132,7 @@
|
||||
"Return the list of bootloader modules."
|
||||
(all-modules (map (lambda (entry)
|
||||
`(,entry . "gnu/bootloader"))
|
||||
%load-path)
|
||||
#:warn warn-about-load-error))
|
||||
%load-path)))
|
||||
|
||||
(define %bootloaders
|
||||
;; The list of publically-known bootloaders.
|
||||
|
||||
+21
-15
@@ -20,7 +20,6 @@
|
||||
(define-module (gnu bootloader extlinux)
|
||||
#:use-module (gnu bootloader)
|
||||
#:use-module (gnu system)
|
||||
#:use-module (gnu build bootloader)
|
||||
#:use-module (gnu packages bootloaders)
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (guix monads)
|
||||
@@ -39,13 +38,14 @@
|
||||
corresponding to old generations of the system."
|
||||
|
||||
(define all-entries
|
||||
(append entries (bootloader-configuration-menu-entries config)))
|
||||
(append entries (map menu-entry->boot-parameters
|
||||
(bootloader-configuration-menu-entries config))))
|
||||
|
||||
(define (menu-entry->gexp entry)
|
||||
(let ((label (menu-entry-label entry))
|
||||
(kernel (menu-entry-linux entry))
|
||||
(kernel-arguments (menu-entry-linux-arguments entry))
|
||||
(initrd (menu-entry-initrd entry)))
|
||||
(define (boot-parameters->gexp params)
|
||||
(let ((label (boot-parameters-label params))
|
||||
(kernel (boot-parameters-kernel params))
|
||||
(kernel-arguments (boot-parameters-kernel-arguments params))
|
||||
(initrd (boot-parameters-initrd params)))
|
||||
#~(format port "LABEL ~a
|
||||
MENU LABEL ~a
|
||||
KERNEL ~a
|
||||
@@ -54,7 +54,7 @@ corresponding to old generations of the system."
|
||||
APPEND ~a
|
||||
~%"
|
||||
#$label #$label
|
||||
#$kernel (dirname #$kernel) #$initrd
|
||||
#$kernel #$kernel #$initrd
|
||||
(string-join (list #$@kernel-arguments)))))
|
||||
|
||||
(define builder
|
||||
@@ -64,17 +64,16 @@ corresponding to old generations of the system."
|
||||
(format port "# This file was generated from your GuixSD configuration. Any changes
|
||||
# will be lost upon reconfiguration.
|
||||
UI menu.c32
|
||||
MENU TITLE GuixSD Boot Options
|
||||
PROMPT ~a
|
||||
TIMEOUT ~a~%"
|
||||
(if (> timeout 0) 1 0)
|
||||
;; timeout is expressed in 1/10s of seconds.
|
||||
(* 10 timeout))
|
||||
#$@(map menu-entry->gexp all-entries)
|
||||
#$@(map boot-parameters->gexp all-entries)
|
||||
|
||||
#$@(if (pair? old-entries)
|
||||
#~((format port "~%")
|
||||
#$@(map menu-entry->gexp old-entries)
|
||||
#$@(map boot-parameters->gexp old-entries)
|
||||
(format port "~%"))
|
||||
#~())))))
|
||||
|
||||
@@ -87,6 +86,14 @@ TIMEOUT ~a~%"
|
||||
;;; Install procedures.
|
||||
;;;
|
||||
|
||||
(define dd
|
||||
#~(lambda (bs count if of)
|
||||
(zero? (system* "dd"
|
||||
(string-append "bs=" (number->string bs))
|
||||
(string-append "count=" (number->string count))
|
||||
(string-append "if=" if)
|
||||
(string-append "of=" of)))))
|
||||
|
||||
(define (install-extlinux mbr)
|
||||
#~(lambda (bootloader device mount-point)
|
||||
(let ((extlinux (string-append bootloader "/sbin/extlinux"))
|
||||
@@ -95,10 +102,9 @@ TIMEOUT ~a~%"
|
||||
(for-each (lambda (file)
|
||||
(install-file file install-dir))
|
||||
(find-files syslinux-dir "\\.c32$"))
|
||||
(unless
|
||||
(and (zero? (system* extlinux "--install" install-dir))
|
||||
(write-file-on-device
|
||||
(string-append syslinux-dir "/" #$mbr) 440 device 0))
|
||||
|
||||
(unless (and (zero? (system* extlinux "--install" install-dir))
|
||||
(#$dd 440 1 (string-append syslinux-dir "/" #$mbr) device))
|
||||
(error "failed to install SYSLINUX")))))
|
||||
|
||||
(define install-extlinux-mbr
|
||||
|
||||
+37
-51
@@ -1,5 +1,5 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
|
||||
;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
|
||||
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
|
||||
@@ -30,7 +30,6 @@
|
||||
#:use-module (gnu artwork)
|
||||
#:use-module (gnu system)
|
||||
#:use-module (gnu bootloader)
|
||||
#:use-module (gnu system uuid)
|
||||
#:use-module (gnu system file-systems)
|
||||
#:autoload (gnu packages bootloaders) (grub)
|
||||
#:autoload (gnu packages compression) (gzip)
|
||||
@@ -56,7 +55,6 @@
|
||||
|
||||
grub-bootloader
|
||||
grub-efi-bootloader
|
||||
grub-mkrescue-bootloader
|
||||
|
||||
grub-configuration))
|
||||
|
||||
@@ -121,14 +119,25 @@ otherwise."
|
||||
|
||||
(define* (svg->png svg #:key width height)
|
||||
"Build a PNG of HEIGHT x WIDTH from SVG."
|
||||
(gexp->derivation "grub-image.png"
|
||||
(with-imported-modules '((gnu build svg))
|
||||
(with-extensions (list guile-rsvg guile-cairo)
|
||||
;; Note: Guile-RSVG & co. are now built for Guile 2.2, so we use 2.2 here.
|
||||
;; TODO: Remove #:guile-for-build when 2.2 has become the default.
|
||||
(mlet %store-monad ((guile (package->derivation guile-2.2 #:graft? #f)))
|
||||
(gexp->derivation "grub-image.png"
|
||||
(with-imported-modules '((gnu build svg))
|
||||
#~(begin
|
||||
;; We need these two libraries.
|
||||
(add-to-load-path (string-append #+guile-rsvg
|
||||
"/share/guile/site/"
|
||||
(effective-version)))
|
||||
(add-to-load-path (string-append #+guile-cairo
|
||||
"/share/guile/site/"
|
||||
(effective-version)))
|
||||
|
||||
(use-modules (gnu build svg))
|
||||
(svg->png #+svg #$output
|
||||
#:width #$width
|
||||
#:height #$height))))))
|
||||
#:height #$height)))
|
||||
#:guile-for-build guile)))
|
||||
|
||||
(define* (grub-background-image config #:key (width 1024) (height 768))
|
||||
"Return the GRUB background image defined in CONFIG with a ratio of
|
||||
@@ -290,13 +299,12 @@ code."
|
||||
(match device
|
||||
;; Preferably refer to DEVICE by its UUID or label. This is more
|
||||
;; efficient and less ambiguous, see <http://bugs.gnu.org/22281>.
|
||||
((? uuid? uuid)
|
||||
((? bytevector? uuid)
|
||||
(format #f "search --fs-uuid --set ~a"
|
||||
(uuid->string device)))
|
||||
((? file-system-label? label)
|
||||
(format #f "search --label --set ~a"
|
||||
(file-system-label->string label)))
|
||||
((or #f (? string?))
|
||||
((? string? label)
|
||||
(format #f "search --label --set ~a" label))
|
||||
(#f
|
||||
#~(format #f "search --file --set ~a" #$file)))))
|
||||
|
||||
(define* (grub-configuration-file config entries
|
||||
@@ -308,14 +316,16 @@ code."
|
||||
STORE-FS, a <file-system> object. OLD-ENTRIES is taken to be a list of menu
|
||||
entries corresponding to old generations of the system."
|
||||
(define all-entries
|
||||
(append entries (bootloader-configuration-menu-entries config)))
|
||||
(define (menu-entry->gexp entry)
|
||||
(let ((device (menu-entry-device entry))
|
||||
(device-mount-point (menu-entry-device-mount-point entry))
|
||||
(label (menu-entry-label entry))
|
||||
(kernel (menu-entry-linux entry))
|
||||
(arguments (menu-entry-linux-arguments entry))
|
||||
(initrd (menu-entry-initrd entry)))
|
||||
(append entries (map menu-entry->boot-parameters
|
||||
(bootloader-configuration-menu-entries config))))
|
||||
|
||||
(define (boot-parameters->gexp params)
|
||||
(let ((device (boot-parameters-store-device params))
|
||||
(device-mount-point (boot-parameters-store-mount-point params))
|
||||
(label (boot-parameters-label params))
|
||||
(kernel (boot-parameters-kernel params))
|
||||
(arguments (boot-parameters-kernel-arguments params))
|
||||
(initrd (boot-parameters-initrd params)))
|
||||
;; Here DEVICE is the store and DEVICE-MOUNT-POINT is its mount point.
|
||||
;; Use the right file names for KERNEL and INITRD in case
|
||||
;; DEVICE-MOUNT-POINT is not "/", meaning that the store is on a
|
||||
@@ -331,10 +341,11 @@ entries corresponding to old generations of the system."
|
||||
#$(grub-root-search device kernel)
|
||||
#$kernel (string-join (list #$@arguments))
|
||||
#$initrd))))
|
||||
|
||||
(mlet %store-monad ((sugar (eye-candy config
|
||||
(menu-entry-device
|
||||
(boot-parameters-store-device
|
||||
(first all-entries))
|
||||
(menu-entry-device-mount-point
|
||||
(boot-parameters-store-mount-point
|
||||
(first all-entries))
|
||||
#:system system
|
||||
#:port #~port)))
|
||||
@@ -351,12 +362,12 @@ set default=~a
|
||||
set timeout=~a~%"
|
||||
#$(bootloader-configuration-default-entry config)
|
||||
#$(bootloader-configuration-timeout config))
|
||||
#$@(map menu-entry->gexp all-entries)
|
||||
#$@(map boot-parameters->gexp all-entries)
|
||||
|
||||
#$@(if (pair? old-entries)
|
||||
#~((format port "
|
||||
submenu \"GNU system, old configurations...\" {~%")
|
||||
#$@(map menu-entry->gexp old-entries)
|
||||
#$@(map boot-parameters->gexp old-entries)
|
||||
(format port "}~%"))
|
||||
#~()))))
|
||||
|
||||
@@ -377,29 +388,10 @@ submenu \"GNU system, old configurations...\" {~%")
|
||||
;; root partition.
|
||||
(setenv "GRUB_ENABLE_CRYPTODISK" "y")
|
||||
|
||||
(unless (zero? (system* grub "--no-floppy" "--target=i386-pc"
|
||||
(unless (zero? (system* grub "--no-floppy"
|
||||
"--boot-directory" install-dir
|
||||
device))
|
||||
(error "failed to install GRUB (BIOS)")))))
|
||||
|
||||
(define install-grub-efi
|
||||
#~(lambda (bootloader efi-dir mount-point)
|
||||
;; Install GRUB onto the EFI partition mounted at EFI-DIR, for the
|
||||
;; system whose root is mounted at MOUNT-POINT.
|
||||
(let ((grub-install (string-append bootloader "/sbin/grub-install"))
|
||||
(install-dir (string-append mount-point "/boot"))
|
||||
;; When installing GuixSD, it's common to mount EFI-DIR below
|
||||
;; MOUNT-POINT rather than /boot/efi on the live image.
|
||||
(target-esp (if (file-exists? (string-append mount-point efi-dir))
|
||||
(string-append mount-point efi-dir)
|
||||
efi-dir)))
|
||||
;; Tell 'grub-install' that there might be a LUKS-encrypted /boot or
|
||||
;; root partition.
|
||||
(setenv "GRUB_ENABLE_CRYPTODISK" "y")
|
||||
(unless (zero? (system* grub-install "--boot-directory" install-dir
|
||||
"--bootloader-id=GuixSD"
|
||||
"--efi-directory" target-esp))
|
||||
(error "failed to install GRUB (EFI)")))))
|
||||
(error "failed to install GRUB")))))
|
||||
|
||||
|
||||
|
||||
@@ -418,15 +410,9 @@ submenu \"GNU system, old configurations...\" {~%")
|
||||
(define* grub-efi-bootloader
|
||||
(bootloader
|
||||
(inherit grub-bootloader)
|
||||
(installer install-grub-efi)
|
||||
(name 'grub-efi)
|
||||
(package grub-efi)))
|
||||
|
||||
(define* grub-mkrescue-bootloader
|
||||
(bootloader
|
||||
(inherit grub-efi-bootloader)
|
||||
(package grub-hybrid)))
|
||||
|
||||
|
||||
;;;
|
||||
;;; Compatibility macros.
|
||||
|
||||
@@ -1,180 +0,0 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2017 David Craven <david@craven.ch>
|
||||
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@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 bootloader u-boot)
|
||||
#:use-module (gnu bootloader extlinux)
|
||||
#:use-module (gnu bootloader)
|
||||
#:use-module (gnu system)
|
||||
#:use-module (gnu build bootloader)
|
||||
#:use-module (gnu packages bootloaders)
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (guix monads)
|
||||
#:use-module (guix records)
|
||||
#:use-module (guix utils)
|
||||
#:export (u-boot-bootloader
|
||||
u-boot-a20-olinuxino-lime-bootloader
|
||||
u-boot-a20-olinuxino-lime2-bootloader
|
||||
u-boot-a20-olinuxino-micro-bootloader
|
||||
u-boot-banana-pi-m2-ultra-bootloader
|
||||
u-boot-beaglebone-black-bootloader
|
||||
u-boot-mx6cuboxi-bootloader
|
||||
u-boot-nintendo-nes-classic-edition-bootloader
|
||||
u-boot-novena-bootloader
|
||||
u-boot-pine64-plus-bootloader
|
||||
u-boot-puma-rk3399-bootloader
|
||||
u-boot-wandboard-bootloader))
|
||||
|
||||
(define install-u-boot
|
||||
#~(lambda (bootloader device mount-point)
|
||||
(if bootloader
|
||||
(error "Failed to install U-Boot"))))
|
||||
|
||||
(define install-beaglebone-black-u-boot
|
||||
;; http://wiki.beyondlogic.org/index.php?title=BeagleBoneBlack_Upgrading_uBoot
|
||||
;; This first stage bootloader called MLO (U-Boot SPL) is expected at
|
||||
;; 0x20000 by BBB ROM code. The second stage bootloader will be loaded by
|
||||
;; the MLO and is expected at 0x60000. Write both first stage ("MLO") and
|
||||
;; second stage ("u-boot.img") images, read in BOOTLOADER directory, to the
|
||||
;; specified DEVICE.
|
||||
#~(lambda (bootloader device mount-point)
|
||||
(let ((mlo (string-append bootloader "/libexec/MLO"))
|
||||
(u-boot (string-append bootloader "/libexec/u-boot.img")))
|
||||
(write-file-on-device mlo (* 256 512)
|
||||
device (* 256 512))
|
||||
(write-file-on-device u-boot (* 1024 512)
|
||||
device (* 768 512)))))
|
||||
|
||||
(define install-allwinner-u-boot
|
||||
#~(lambda (bootloader device mount-point)
|
||||
(let ((u-boot (string-append bootloader
|
||||
"/libexec/u-boot-sunxi-with-spl.bin")))
|
||||
(write-file-on-device u-boot (stat:size (stat u-boot))
|
||||
device (* 8 1024)))))
|
||||
|
||||
(define install-allwinner64-u-boot
|
||||
#~(lambda (bootloader device mount-point)
|
||||
(let ((spl (string-append bootloader "/libexec/spl/sunxi-spl.bin"))
|
||||
(u-boot (string-append bootloader "/libexec/u-boot.itb")))
|
||||
(write-file-on-device spl (stat:size (stat spl))
|
||||
device (* 8 1024))
|
||||
(write-file-on-device u-boot (stat:size (stat u-boot))
|
||||
device (* 40 1024)))))
|
||||
|
||||
(define install-imx-u-boot
|
||||
#~(lambda (bootloader device mount-point)
|
||||
(let ((spl (string-append bootloader "/libexec/SPL"))
|
||||
(u-boot (string-append bootloader "/libexec/u-boot.img")))
|
||||
(write-file-on-device spl (stat:size (stat spl))
|
||||
device (* 1 1024))
|
||||
(write-file-on-device u-boot (stat:size (stat u-boot))
|
||||
device (* 69 1024)))))
|
||||
|
||||
(define install-puma-rk3399-u-boot
|
||||
#~(lambda (bootloader device mount-point)
|
||||
(let ((spl (string-append bootloader "/libexec/u-boot-spl.rksd"))
|
||||
(u-boot (string-append bootloader "/libexec/u-boot.itb")))
|
||||
(write-file-on-device spl (stat:size (stat spl))
|
||||
device (* 64 512))
|
||||
(write-file-on-device u-boot (stat:size (stat u-boot))
|
||||
device (* 512 512)))))
|
||||
|
||||
|
||||
|
||||
;;;
|
||||
;;; Bootloader definitions.
|
||||
;;;
|
||||
|
||||
(define u-boot-bootloader
|
||||
(bootloader
|
||||
(inherit extlinux-bootloader)
|
||||
(name 'u-boot)
|
||||
(package #f)
|
||||
(installer install-u-boot)))
|
||||
|
||||
(define u-boot-beaglebone-black-bootloader
|
||||
(bootloader
|
||||
(inherit u-boot-bootloader)
|
||||
(package u-boot-beagle-bone-black)
|
||||
(installer install-beaglebone-black-u-boot)))
|
||||
|
||||
(define u-boot-allwinner-bootloader
|
||||
(bootloader
|
||||
(inherit u-boot-bootloader)
|
||||
(installer install-allwinner-u-boot)))
|
||||
|
||||
(define u-boot-allwinner64-bootloader
|
||||
(bootloader
|
||||
(inherit u-boot-bootloader)
|
||||
(installer install-allwinner64-u-boot)))
|
||||
|
||||
(define u-boot-imx-bootloader
|
||||
(bootloader
|
||||
(inherit u-boot-bootloader)
|
||||
(installer install-imx-u-boot)))
|
||||
|
||||
(define u-boot-nintendo-nes-classic-edition-bootloader
|
||||
(bootloader
|
||||
(inherit u-boot-allwinner-bootloader)
|
||||
(package u-boot-nintendo-nes-classic-edition)))
|
||||
|
||||
(define u-boot-a20-olinuxino-lime-bootloader
|
||||
(bootloader
|
||||
(inherit u-boot-allwinner-bootloader)
|
||||
(package u-boot-a20-olinuxino-lime)))
|
||||
|
||||
(define u-boot-a20-olinuxino-lime2-bootloader
|
||||
(bootloader
|
||||
(inherit u-boot-allwinner-bootloader)
|
||||
(package u-boot-a20-olinuxino-lime2)))
|
||||
|
||||
(define u-boot-a20-olinuxino-micro-bootloader
|
||||
(bootloader
|
||||
(inherit u-boot-allwinner-bootloader)
|
||||
(package u-boot-a20-olinuxino-micro)))
|
||||
|
||||
(define u-boot-banana-pi-m2-ultra-bootloader
|
||||
(bootloader
|
||||
(inherit u-boot-allwinner-bootloader)
|
||||
(package u-boot-banana-pi-m2-ultra)))
|
||||
|
||||
(define u-boot-mx6cuboxi-bootloader
|
||||
(bootloader
|
||||
(inherit u-boot-imx-bootloader)
|
||||
(package u-boot-mx6cuboxi)))
|
||||
|
||||
(define u-boot-wandboard-bootloader
|
||||
(bootloader
|
||||
(inherit u-boot-imx-bootloader)
|
||||
(package u-boot-wandboard)))
|
||||
|
||||
(define u-boot-novena-bootloader
|
||||
(bootloader
|
||||
(inherit u-boot-imx-bootloader)
|
||||
(package u-boot-novena)))
|
||||
|
||||
(define u-boot-pine64-plus-bootloader
|
||||
(bootloader
|
||||
(inherit u-boot-allwinner64-bootloader)
|
||||
(package u-boot-pine64-plus)))
|
||||
|
||||
(define u-boot-puma-rk3399-bootloader
|
||||
(bootloader
|
||||
(inherit u-boot-bootloader)
|
||||
(package u-boot-puma-rk3399)
|
||||
(installer install-puma-rk3399-u-boot)))
|
||||
@@ -1,5 +1,5 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
@@ -179,8 +179,7 @@ properties. Return #t on success."
|
||||
`("-G" ,(string-join supplementary-groups ","))
|
||||
'())
|
||||
,@(if comment `("-c" ,comment) '())
|
||||
;; Don't use '--move-home'.
|
||||
,@(if home `("-d" ,home) '())
|
||||
;; Don't use '--move-home', so ignore HOME.
|
||||
,@(if shell `("-s" ,shell) '())
|
||||
,name)))
|
||||
(zero? (apply system* "usermod" args))))
|
||||
@@ -314,7 +313,6 @@ they already exist."
|
||||
(false-if-exception (delete-file file)))
|
||||
|
||||
(format #t "populating /etc from ~a...~%" etc)
|
||||
(mkdir-p "/etc")
|
||||
|
||||
;; Create the /etc/ssl -> /run/current-system/profile/etc/ssl symlink. This
|
||||
;; symlink, to a target outside of the store, probably doesn't belong in the
|
||||
@@ -354,13 +352,24 @@ they already exist."
|
||||
;; Place where setuid programs are stored.
|
||||
"/run/setuid-programs")
|
||||
|
||||
(define (link-or-copy source target)
|
||||
"Attempt to make TARGET a hard link to SOURCE; if it fails, fall back to
|
||||
copy SOURCE to TARGET."
|
||||
(catch 'system-error
|
||||
(lambda ()
|
||||
(link source target))
|
||||
(lambda args
|
||||
;; Perhaps SOURCE and TARGET live in a different file system, so copy
|
||||
;; SOURCE.
|
||||
(copy-file source target))))
|
||||
|
||||
(define (activate-setuid-programs programs)
|
||||
"Turn PROGRAMS, a list of file names, into setuid programs stored under
|
||||
%SETUID-DIRECTORY."
|
||||
(define (make-setuid-program prog)
|
||||
(let ((target (string-append %setuid-directory
|
||||
"/" (basename prog))))
|
||||
(copy-file prog target)
|
||||
(link-or-copy prog target)
|
||||
(chown target 0 0)
|
||||
(chmod target #o6555)))
|
||||
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@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 build bootloader)
|
||||
#:use-module (ice-9 binary-ports)
|
||||
#:export (write-file-on-device))
|
||||
|
||||
|
||||
;;;
|
||||
;;; Writing utils.
|
||||
;;;
|
||||
|
||||
(define (write-file-on-device file size device offset)
|
||||
"Write SIZE bytes from FILE to DEVICE starting at OFFSET."
|
||||
(call-with-input-file file
|
||||
(lambda (input)
|
||||
(let ((bv (get-bytevector-n input size)))
|
||||
(call-with-output-file device
|
||||
(lambda (output)
|
||||
(seek output offset SEEK_SET)
|
||||
(put-bytevector output bv))
|
||||
#:binary #t)))))
|
||||
@@ -1,6 +1,6 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
|
||||
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
|
||||
;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
|
||||
;;; Copyright © 2016 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
|
||||
;;;
|
||||
@@ -119,7 +119,7 @@ C_*INCLUDE_PATH."
|
||||
;; libc is false, so we are building xgcc-sans-libc.
|
||||
;; Add essential headers from mingw-w64.
|
||||
(let ((mingw-source (assoc-ref inputs "mingw-source")))
|
||||
(invoke "tar" "xvf" mingw-source)
|
||||
(system* "tar" "xvf" mingw-source)
|
||||
(let ((mingw-headers (unpacked-mingw-dir)))
|
||||
;; We need _mingw.h which will gets built from _mingw.h.in by
|
||||
;; mingw-w64's configure. We cannot configure mingw-w64 until we
|
||||
@@ -160,7 +160,7 @@ C_*INCLUDE_PATH."
|
||||
"Install a stripped GCC."
|
||||
;; Unlike our 'strip' phase, this will do the right thing for
|
||||
;; cross-compilers.
|
||||
(invoke "make" "install-strip"))
|
||||
(zero? (system* "make" "install-strip")))
|
||||
|
||||
(define* (cross-gcc-build-phases target
|
||||
#:optional (phases %standard-phases))
|
||||
|
||||
+216
-96
@@ -1,5 +1,5 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2016, 2017 David Craven <david@craven.ch>
|
||||
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
|
||||
;;;
|
||||
@@ -19,16 +19,15 @@
|
||||
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
(define-module (gnu build file-systems)
|
||||
#:use-module (gnu system uuid)
|
||||
#:use-module (gnu system file-systems)
|
||||
#:use-module (guix build utils)
|
||||
#:use-module (guix build bournish)
|
||||
#:use-module ((guix build syscalls)
|
||||
#:hide (file-system-type))
|
||||
#:use-module (guix build syscalls)
|
||||
#: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)
|
||||
@@ -42,6 +41,15 @@
|
||||
find-partition-by-luks-uuid
|
||||
canonicalize-device-spec
|
||||
|
||||
uuid->string
|
||||
string->uuid
|
||||
string->iso9660-uuid
|
||||
string->ext2-uuid
|
||||
string->ext3-uuid
|
||||
string->ext4-uuid
|
||||
string->btrfs-uuid
|
||||
iso9660-uuid->string
|
||||
|
||||
bind-mount
|
||||
|
||||
mount-flags->bit-mask
|
||||
@@ -87,6 +95,20 @@ takes a bytevector and returns #t when it's a valid superblock."
|
||||
(and (magic? block)
|
||||
block)))))))))
|
||||
|
||||
(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 (latin1->string bv terminator)
|
||||
"Return a string of BV, a latin1 bytevector, or #f. TERMINATOR is a predicate
|
||||
that takes a number and returns #t when a termination character is found."
|
||||
(let ((bytes (take-while (negate terminator) (bytevector->u8-list bv))))
|
||||
(if (null? bytes)
|
||||
#f
|
||||
(list->string (map integer->char bytes)))))
|
||||
|
||||
(define null-terminated-latin1->string
|
||||
(cut latin1->string <> zero?))
|
||||
|
||||
@@ -174,6 +196,10 @@ if DEVICE does not contain a btrfs file system."
|
||||
|
||||
;; <http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-107.pdf>.
|
||||
|
||||
(define-syntax %fat32-endianness
|
||||
;; Endianness of fat file systems.
|
||||
(identifier-syntax (endianness little)))
|
||||
|
||||
(define (fat32-superblock? sblock)
|
||||
"Return #t when SBLOCK is a fat32 superblock."
|
||||
(bytevector=? (sub-bytevector sblock 82 8)
|
||||
@@ -188,13 +214,19 @@ if DEVICE does not contain a btrfs file system."
|
||||
"Return the Volume ID of a fat superblock SBLOCK as a 4-byte bytevector."
|
||||
(sub-bytevector sblock 67 4))
|
||||
|
||||
(define (fat32-uuid->string uuid)
|
||||
"Convert fat32 UUID, a 4-byte bytevector, to its string representation."
|
||||
(let ((high (bytevector-uint-ref uuid 0 %fat32-endianness 2))
|
||||
(low (bytevector-uint-ref uuid 2 %fat32-endianness 2)))
|
||||
(format #f "~:@(~x-~x~)" low high)))
|
||||
|
||||
(define (fat32-superblock-volume-name sblock)
|
||||
"Return the volume name of SBLOCK as a string of at most 11 characters, or
|
||||
#f if SBLOCK has no volume name. The volume name is a latin1 string.
|
||||
Trailing spaces are trimmed."
|
||||
(string-trim-right (latin1->string (sub-bytevector sblock 71 11) (lambda (c) #f)) #\space))
|
||||
|
||||
(define (check-fat-file-system device)
|
||||
(define (check-fat32-file-system device)
|
||||
"Return the health of a fat file system on DEVICE."
|
||||
(match (status:exit-val
|
||||
(system* "fsck.vfat" "-v" "-a" device))
|
||||
@@ -202,33 +234,6 @@ Trailing spaces are trimmed."
|
||||
(1 'errors-corrected)
|
||||
(_ 'fatal-error)))
|
||||
|
||||
|
||||
;;;
|
||||
;;; FAT16 file systems.
|
||||
;;;
|
||||
|
||||
(define (fat16-superblock? sblock)
|
||||
"Return #t when SBLOCK is a fat16 boot record."
|
||||
(bytevector=? (sub-bytevector sblock 54 8)
|
||||
(string->utf8 "FAT16 ")))
|
||||
|
||||
(define (read-fat16-superblock device)
|
||||
"Return the raw contents of DEVICE's fat16 superblock as a bytevector, or
|
||||
#f if DEVICE does not contain a fat16 file system."
|
||||
(read-superblock device 0 62 fat16-superblock?))
|
||||
|
||||
(define (fat16-superblock-uuid sblock)
|
||||
"Return the Volume ID of a fat superblock SBLOCK as a 4-byte bytevector."
|
||||
(sub-bytevector sblock 39 4))
|
||||
|
||||
(define (fat16-superblock-volume-name sblock)
|
||||
"Return the volume name of SBLOCK as a string of at most 11 characters, or
|
||||
#f if SBLOCK has no volume name. The volume name is a latin1 string.
|
||||
Trailing spaces are trimmed."
|
||||
(string-trim-right (latin1->string (sub-bytevector sblock 43 11)
|
||||
(lambda (c) #f))
|
||||
#\space))
|
||||
|
||||
|
||||
;;;
|
||||
;;; ISO9660 file systems.
|
||||
@@ -236,6 +241,27 @@ Trailing spaces are trimmed."
|
||||
|
||||
;; <http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-119.pdf>.
|
||||
|
||||
(define %iso9660-uuid-rx
|
||||
;; Y m d H M S ss
|
||||
(make-regexp "^([[:digit:]]{4})-([[:digit:]]{2})-([[:digit:]]{2})-([[:digit:]]{2})-([[:digit:]]{2})-([[:digit:]]{2})-([[:digit:]]{2})$"))
|
||||
|
||||
(define (string->iso9660-uuid str)
|
||||
"Parse STR as a ISO9660 UUID (which is really a timestamp - see /dev/disk/by-uuid).
|
||||
Return its contents as a 16-byte bytevector. Return #f if STR is not a valid
|
||||
ISO9660 UUID representation."
|
||||
(and=> (regexp-exec %iso9660-uuid-rx str)
|
||||
(lambda (match)
|
||||
(letrec-syntax ((match-numerals
|
||||
(syntax-rules ()
|
||||
((_ index (name rest ...) body)
|
||||
(let ((name (match:substring match index)))
|
||||
(match-numerals (+ 1 index) (rest ...) body)))
|
||||
((_ index () body)
|
||||
body))))
|
||||
(match-numerals 1 (year month day hour minute second hundredths)
|
||||
(string->utf8 (string-append year month day
|
||||
hour minute second hundredths)))))))
|
||||
|
||||
(define (iso9660-superblock? sblock)
|
||||
"Return #t when SBLOCK is an iso9660 volume descriptor."
|
||||
(bytevector=? (sub-bytevector sblock 1 6)
|
||||
@@ -261,11 +287,11 @@ volume descriptor from ~s"
|
||||
"Return the raw contents of DEVICE's iso9660 primary volume descriptor
|
||||
as a bytevector, or #f if DEVICE does not contain an iso9660 file system."
|
||||
;; Start reading at sector 16.
|
||||
;; Since we are not sure that the device contains an ISO9660 file system,
|
||||
;; Since we are not sure that the device contains an ISO9660 filesystem,
|
||||
;; we have to find that out first.
|
||||
(if (read-superblock device (* 2048 16) 2048 iso9660-superblock?)
|
||||
(read-iso9660-primary-volume-descriptor device (* 2048 16))
|
||||
#f)) ; Device does not contain an iso9660 file system.
|
||||
#f)) ; Device does not contain an iso9660 filesystem.
|
||||
|
||||
(define (iso9660-superblock-uuid sblock)
|
||||
"Return the modification time of an iso9660 primary volume descriptor
|
||||
@@ -282,6 +308,20 @@ SBLOCK as a bytevector. If that's not set, returns the creation time."
|
||||
modification-time)))
|
||||
(sub-bytevector time 0 16))) ; strips GMT offset.
|
||||
|
||||
(define (iso9660-uuid->string uuid)
|
||||
"Given an UUID bytevector, return its timestamp string."
|
||||
(define (digits->string bytes)
|
||||
(latin1->string bytes (lambda (c) #f)))
|
||||
(let* ((year (sub-bytevector uuid 0 4))
|
||||
(month (sub-bytevector uuid 4 2))
|
||||
(day (sub-bytevector uuid 6 2))
|
||||
(hour (sub-bytevector uuid 8 2))
|
||||
(minute (sub-bytevector uuid 10 2))
|
||||
(second (sub-bytevector uuid 12 2))
|
||||
(hundredths (sub-bytevector uuid 14 2))
|
||||
(parts (list year month day hour minute second hundredths)))
|
||||
(string-append (string-join (map digits->string parts) "-"))))
|
||||
|
||||
(define (iso9660-superblock-volume-name sblock)
|
||||
"Return the volume name of SBLOCK as a string. The volume name is an ASCII
|
||||
string. Trailing spaces are trimmed."
|
||||
@@ -333,16 +373,15 @@ not valid header was found."
|
||||
|
||||
(define (disk-partitions)
|
||||
"Return the list of device names corresponding to valid disk partitions."
|
||||
(define (last-character str)
|
||||
(string-ref str (- (string-length str) 1)))
|
||||
|
||||
(define (partition? name major minor)
|
||||
;; grub-mkrescue does some funny things for EFI support which
|
||||
;; makes it a lot more difficult than one would expect to support
|
||||
;; booting an ISO-9660 image from an USB flash drive.
|
||||
;; For example there's a buggy (too small) hidden partition in it
|
||||
;; which Linux mounts and then proceeds to fail while trying to
|
||||
;; fall off the edge.
|
||||
;; In any case, partition tables are supposed to be optional so
|
||||
;; here we allow checking entire disks for file systems, too.
|
||||
(> major 2)) ;ignore RAM disks and floppy disks
|
||||
;; Select device names that end in a digit, like libblkid's 'probe_all'
|
||||
;; function does. Checking for "/sys/dev/block/MAJOR:MINOR/partition"
|
||||
;; doesn't work for partitions coming from mapped devices.
|
||||
(and (char-set-contains? char-set:digit (last-character name))
|
||||
(> major 2))) ;ignore RAM disks and floppy disks
|
||||
|
||||
(call-with-input-file "/proc/partitions"
|
||||
(lambda (port)
|
||||
@@ -413,9 +452,7 @@ partition field reader that returned a value."
|
||||
(partition-field-reader read-btrfs-superblock
|
||||
btrfs-superblock-volume-name)
|
||||
(partition-field-reader read-fat32-superblock
|
||||
fat32-superblock-volume-name)
|
||||
(partition-field-reader read-fat16-superblock
|
||||
fat16-superblock-volume-name)))
|
||||
fat32-superblock-volume-name)))
|
||||
|
||||
(define %partition-uuid-readers
|
||||
(list (partition-field-reader read-iso9660-superblock
|
||||
@@ -425,9 +462,7 @@ partition field reader that returned a value."
|
||||
(partition-field-reader read-btrfs-superblock
|
||||
btrfs-superblock-uuid)
|
||||
(partition-field-reader read-fat32-superblock
|
||||
fat32-superblock-uuid)
|
||||
(partition-field-reader read-fat16-superblock
|
||||
fat16-superblock-uuid)))
|
||||
fat32-superblock-uuid)))
|
||||
|
||||
(define read-partition-label
|
||||
(cut read-partition-field <> %partition-label-readers))
|
||||
@@ -448,12 +483,12 @@ was READ is = to the given value."
|
||||
(partition-predicate read-partition-label string=?))
|
||||
|
||||
(define partition-uuid-predicate
|
||||
(partition-predicate read-partition-uuid uuid=?))
|
||||
(partition-predicate read-partition-uuid bytevector=?))
|
||||
|
||||
(define luks-partition-uuid-predicate
|
||||
(partition-predicate
|
||||
(partition-field-reader read-luks-header luks-header-uuid)
|
||||
uuid=?))
|
||||
bytevector=?))
|
||||
|
||||
(define (find-partition predicate)
|
||||
"Return the first partition found that matches PREDICATE, or #f if none
|
||||
@@ -473,9 +508,77 @@ were found."
|
||||
(find-partition luks-partition-uuid-predicate))
|
||||
|
||||
|
||||
(define (canonicalize-device-spec spec)
|
||||
"Return the device name corresponding to SPEC, which can be a <uuid>, a
|
||||
<file-system-label>, or a string (typically a /dev file name)."
|
||||
;;;
|
||||
;;; UUIDs.
|
||||
;;;
|
||||
|
||||
(define-syntax %network-byte-order
|
||||
(identifier-syntax (endianness big)))
|
||||
|
||||
(define (uuid->string uuid)
|
||||
"Convert UUID, a 16-byte bytevector, to its string representation, something
|
||||
like \"6b700d61-5550-48a1-874c-a3d86998990e\"."
|
||||
;; See <https://tools.ietf.org/html/rfc4122>.
|
||||
(let ((time-low (bytevector-uint-ref uuid 0 %network-byte-order 4))
|
||||
(time-mid (bytevector-uint-ref uuid 4 %network-byte-order 2))
|
||||
(time-hi (bytevector-uint-ref uuid 6 %network-byte-order 2))
|
||||
(clock-seq (bytevector-uint-ref uuid 8 %network-byte-order 2))
|
||||
(node (bytevector-uint-ref uuid 10 %network-byte-order 6)))
|
||||
(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 string->ext2-uuid string->uuid)
|
||||
(define string->ext3-uuid string->uuid)
|
||||
(define string->ext4-uuid string->uuid)
|
||||
(define string->btrfs-uuid string->uuid)
|
||||
|
||||
|
||||
(define* (canonicalize-device-spec spec #:optional (title 'any))
|
||||
"Return the device name corresponding to SPEC. TITLE is a symbol, one of
|
||||
the following:
|
||||
|
||||
• 'device', in which case SPEC is known to designate a device node--e.g.,
|
||||
\"/dev/sda1\";
|
||||
• 'label', in which case SPEC is known to designate a partition label--e.g.,
|
||||
\"my-root-part\";
|
||||
• 'uuid', in which case SPEC must be a UUID (a 16-byte bytevector)
|
||||
designating a partition;
|
||||
• 'any', in which case SPEC can be anything.
|
||||
"
|
||||
(define max-trials
|
||||
;; Number of times we retry partition label resolution, 1 second per
|
||||
;; trial. Note: somebody reported a delay of 16 seconds (!) before their
|
||||
@@ -483,6 +586,19 @@ were found."
|
||||
;; this long.
|
||||
20)
|
||||
|
||||
(define canonical-title
|
||||
;; 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))
|
||||
'uuid)
|
||||
title))
|
||||
|
||||
(define (resolve find-partition spec fmt)
|
||||
(let loop ((count 0))
|
||||
(let ((device (find-partition spec)))
|
||||
@@ -497,19 +613,21 @@ were found."
|
||||
(sleep 1)
|
||||
(loop (+ 1 count))))))))
|
||||
|
||||
(match spec
|
||||
((? string?)
|
||||
;; Nothing to do, but wait until SPEC shows up.
|
||||
(resolve identity spec identity))
|
||||
((? file-system-label?)
|
||||
(case canonical-title
|
||||
((device)
|
||||
;; Nothing to do.
|
||||
spec)
|
||||
((label)
|
||||
;; Resolve the label.
|
||||
(resolve find-partition-by-label
|
||||
(file-system-label->string spec)
|
||||
identity))
|
||||
((? uuid?)
|
||||
(resolve find-partition-by-label spec identity))
|
||||
((uuid)
|
||||
(resolve find-partition-by-uuid
|
||||
(uuid-bytevector spec)
|
||||
uuid->string))))
|
||||
(if (string? spec)
|
||||
(string->uuid spec)
|
||||
spec)
|
||||
uuid->string))
|
||||
(else
|
||||
(error "unknown device title" title))))
|
||||
|
||||
(define (check-file-system device type)
|
||||
"Run a file system check of TYPE on DEVICE."
|
||||
@@ -517,7 +635,7 @@ were found."
|
||||
(cond
|
||||
((string-prefix? "ext" type) check-ext2-file-system)
|
||||
((string-prefix? "btrfs" type) check-btrfs-file-system)
|
||||
((string-suffix? "fat" type) check-fat-file-system)
|
||||
((string-suffix? "fat" type) check-fat32-file-system)
|
||||
(else #f)))
|
||||
|
||||
(if check-procedure
|
||||
@@ -561,8 +679,11 @@ corresponds to the symbols listed in FLAGS."
|
||||
(()
|
||||
0))))
|
||||
|
||||
(define* (mount-file-system fs #:key (root "/root"))
|
||||
"Mount the file system described by FS, a <file-system> object, under ROOT.
|
||||
(define* (mount-file-system spec #:key (root "/root"))
|
||||
"Mount the file system described by SPEC under ROOT. SPEC must have the
|
||||
form:
|
||||
|
||||
(DEVICE TITLE MOUNT-POINT TYPE (FLAGS ...) OPTIONS CHECK?)
|
||||
|
||||
DEVICE, MOUNT-POINT, and TYPE must be strings; OPTIONS can be a string or #f;
|
||||
FLAGS must be a list of symbols. CHECK? is a Boolean indicating whether to
|
||||
@@ -588,35 +709,34 @@ run a file system check."
|
||||
(if options
|
||||
(string-append "," options)
|
||||
"")))))
|
||||
(let ((type (file-system-type fs))
|
||||
(options (file-system-options fs))
|
||||
(source (canonicalize-device-spec (file-system-device fs)))
|
||||
(mount-point (string-append root "/"
|
||||
(file-system-mount-point fs)))
|
||||
(flags (mount-flags->bit-mask (file-system-flags fs))))
|
||||
(when (file-system-check? fs)
|
||||
(check-file-system source type))
|
||||
(match spec
|
||||
((source title mount-point type (flags ...) options check?)
|
||||
(let ((source (canonicalize-device-spec source title))
|
||||
(mount-point (string-append root "/" mount-point))
|
||||
(flags (mount-flags->bit-mask flags)))
|
||||
(when check?
|
||||
(check-file-system source type))
|
||||
|
||||
;; Create the mount point. Most of the time this is a directory, but
|
||||
;; in the case of a bind mount, a regular file or socket may be needed.
|
||||
(if (and (= MS_BIND (logand flags MS_BIND))
|
||||
(not (file-is-directory? source)))
|
||||
(unless (file-exists? mount-point)
|
||||
(mkdir-p (dirname mount-point))
|
||||
(call-with-output-file mount-point (const #t)))
|
||||
(mkdir-p mount-point))
|
||||
;; Create the mount point. Most of the time this is a directory, but
|
||||
;; in the case of a bind mount, a regular file or socket may be needed.
|
||||
(if (and (= MS_BIND (logand flags MS_BIND))
|
||||
(not (file-is-directory? source)))
|
||||
(unless (file-exists? mount-point)
|
||||
(mkdir-p (dirname mount-point))
|
||||
(call-with-output-file mount-point (const #t)))
|
||||
(mkdir-p mount-point))
|
||||
|
||||
(cond
|
||||
((string-prefix? "nfs" type)
|
||||
(mount-nfs source mount-point type flags options))
|
||||
(else
|
||||
(mount source mount-point type flags options)))
|
||||
(cond
|
||||
((string-prefix? "nfs" type)
|
||||
(mount-nfs source mount-point type flags options))
|
||||
(else
|
||||
(mount source mount-point type flags options)))
|
||||
|
||||
;; For read-only bind mounts, an extra remount is needed, as per
|
||||
;; <http://lwn.net/Articles/281157/>, which still applies to Linux 4.0.
|
||||
(when (and (= MS_BIND (logand flags MS_BIND))
|
||||
(= MS_RDONLY (logand flags MS_RDONLY)))
|
||||
(let ((flags (logior MS_BIND MS_REMOUNT MS_RDONLY)))
|
||||
(mount source mount-point type flags #f)))))
|
||||
;; For read-only bind mounts, an extra remount is needed, as per
|
||||
;; <http://lwn.net/Articles/281157/>, which still applies to Linux 4.0.
|
||||
(when (and (= MS_BIND (logand flags MS_BIND))
|
||||
(= MS_RDONLY (logand flags MS_RDONLY)))
|
||||
(let ((flags (logior MS_BIND MS_REMOUNT MS_RDONLY)))
|
||||
(mount source mount-point type flags #f)))))))
|
||||
|
||||
;;; file-systems.scm ends here
|
||||
|
||||
+36
-23
@@ -1,5 +1,5 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
@@ -18,7 +18,6 @@
|
||||
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
(define-module (gnu build install)
|
||||
#:use-module (guix store database)
|
||||
#:use-module (guix build utils)
|
||||
#:use-module (guix build store-copy)
|
||||
#:use-module (srfi srfi-26)
|
||||
@@ -26,6 +25,7 @@
|
||||
#:export (install-boot-config
|
||||
evaluate-populate-directive
|
||||
populate-root-file-system
|
||||
reset-timestamps
|
||||
register-closure
|
||||
populate-single-profile-directory))
|
||||
|
||||
@@ -110,6 +110,9 @@ STORE."
|
||||
|
||||
("/var/guix/gcroots/booted-system" -> "/run/booted-system")
|
||||
("/var/guix/gcroots/current-system" -> "/run/current-system")
|
||||
|
||||
;; XXX: 'guix-register' creates this symlink with a wrong target, so
|
||||
;; create it upfront to be sure.
|
||||
("/var/guix/gcroots/profiles" -> "/var/guix/profiles")
|
||||
|
||||
(directory "/bin")
|
||||
@@ -141,27 +144,37 @@ includes /etc, /var, /run, /bin/sh, etc., and all the symlinks to SYSTEM."
|
||||
(try))
|
||||
(apply throw args)))))))
|
||||
|
||||
(define* (register-closure prefix closure
|
||||
#:key
|
||||
(deduplicate? #t) (reset-timestamps? #t)
|
||||
(schema (sql-schema)))
|
||||
"Register CLOSURE in PREFIX, where PREFIX is the directory name of the
|
||||
target store and CLOSURE is the name of a file containing a reference graph as
|
||||
produced by #:references-graphs.. As a side effect, if RESET-TIMESTAMPS? is
|
||||
true, reset timestamps on store files and, if DEDUPLICATE? is true,
|
||||
deduplicates files common to CLOSURE and the rest of PREFIX."
|
||||
(let ((items (call-with-input-file closure read-reference-graph)))
|
||||
(register-items items
|
||||
#:prefix prefix
|
||||
#:deduplicate? deduplicate?
|
||||
#:reset-timestamps? reset-timestamps?
|
||||
#:registration-time %epoch
|
||||
#:schema schema)))
|
||||
(define (reset-timestamps directory)
|
||||
"Reset the timestamps of all the files under DIRECTORY, so that they appear
|
||||
as created and modified at the Epoch."
|
||||
(display "clearing file timestamps...\n")
|
||||
(for-each (lambda (file)
|
||||
(let ((s (lstat file)))
|
||||
;; XXX: Guile uses libc's 'utime' function (not 'futime'), so
|
||||
;; the timestamp of symlinks cannot be changed, and there are
|
||||
;; symlinks here pointing to /gnu/store, which is the host,
|
||||
;; read-only store.
|
||||
(unless (eq? (stat:type s) 'symlink)
|
||||
(utime file 0 0 0 0))))
|
||||
(find-files directory #:directories? #t)))
|
||||
|
||||
(define* (register-closure store closure
|
||||
#:key (deduplicate? #t))
|
||||
"Register CLOSURE in STORE, where STORE is the directory name of the target
|
||||
store and CLOSURE is the name of a file containing a reference graph as used
|
||||
by 'guix-register'. As a side effect, this resets timestamps on store files
|
||||
and, if DEDUPLICATE? is true, deduplicates files common to CLOSURE and the
|
||||
rest of STORE."
|
||||
(let ((status (apply system* "guix-register" "--prefix" store
|
||||
(append (if deduplicate? '() '("--no-deduplication"))
|
||||
(list closure)))))
|
||||
(unless (zero? status)
|
||||
(error "failed to register store items" closure))))
|
||||
|
||||
(define* (populate-single-profile-directory directory
|
||||
#:key profile closure
|
||||
deduplicate?
|
||||
register? schema)
|
||||
register?)
|
||||
"Populate DIRECTORY with a store containing PROFILE, whose closure is given
|
||||
in the file called CLOSURE (as generated by #:references-graphs.) DIRECTORY
|
||||
is initialized to contain a single profile under /root pointing to PROFILE.
|
||||
@@ -187,11 +200,11 @@ This is used to create the self-contained tarballs with 'guix pack'."
|
||||
|
||||
(when register?
|
||||
(register-closure (canonicalize-path directory) closure
|
||||
#:deduplicate? deduplicate?
|
||||
#:schema schema)
|
||||
#:deduplicate? deduplicate?)
|
||||
|
||||
(mkdir-p* "/var/guix/profiles")
|
||||
(mkdir-p* "/var/guix/gcroots")
|
||||
;; XXX: 'guix-register' registers profiles as GC roots but the symlink
|
||||
;; target uses $TMPDIR. Fix that.
|
||||
(delete-file (scope "/var/guix/gcroots/profiles"))
|
||||
(symlink* "/var/guix/profiles"
|
||||
"/var/guix/gcroots/profiles"))
|
||||
|
||||
|
||||
+47
-158
@@ -1,5 +1,5 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
@@ -21,27 +21,22 @@
|
||||
#:use-module (rnrs io ports)
|
||||
#:use-module (system repl error-handling)
|
||||
#:autoload (system repl repl) (start-repl)
|
||||
#:autoload (system base compile) (compile-file)
|
||||
#:use-module (srfi srfi-1)
|
||||
#:use-module (srfi srfi-9)
|
||||
#:use-module (srfi srfi-26)
|
||||
#:use-module (ice-9 match)
|
||||
#:use-module (ice-9 rdelim)
|
||||
#:use-module (ice-9 regex)
|
||||
#:use-module (ice-9 ftw)
|
||||
#:use-module (guix build utils)
|
||||
#:use-module ((guix build syscalls)
|
||||
#:hide (file-system-type))
|
||||
#:use-module (guix build syscalls)
|
||||
#:use-module (gnu build linux-modules)
|
||||
#:use-module (gnu build file-systems)
|
||||
#:use-module (gnu system file-systems)
|
||||
#:export (mount-essential-file-systems
|
||||
linux-command-line
|
||||
find-long-option
|
||||
find-long-options
|
||||
make-essential-device-nodes
|
||||
make-static-device-nodes
|
||||
configure-qemu-networking
|
||||
|
||||
bind-mount
|
||||
device-number
|
||||
boot-system))
|
||||
|
||||
@@ -99,16 +94,6 @@ Return the value associated with OPTION, or #f on failure."
|
||||
(lambda (arg)
|
||||
(substring arg (+ 1 (string-index arg #\=)))))))
|
||||
|
||||
(define (find-long-options option arguments)
|
||||
"Find OPTIONs among ARGUMENTS, where OPTION is something like \"console\".
|
||||
Return the values associated with OPTIONs as a list, or the empty list if
|
||||
OPTION doesn't appear in ARGUMENTS."
|
||||
(let ((opt (string-append option "=")))
|
||||
(filter-map (lambda (arg)
|
||||
(and (string-prefix? opt arg)
|
||||
(substring arg (+ 1 (string-index arg #\=)))))
|
||||
arguments)))
|
||||
|
||||
(define* (make-disk-device-nodes base major #:optional (minor 0))
|
||||
"Make the block device nodes around BASE (something like \"/root/dev/sda\")
|
||||
with the given MAJOR number, starting with MINOR."
|
||||
@@ -119,109 +104,6 @@ with the given MAJOR number, starting with MINOR."
|
||||
'block-special #o644 (device-number major (+ minor i)))
|
||||
(loop (+ i 1)))))
|
||||
|
||||
;; Representation of a /dev node.
|
||||
(define-record-type <device-node>
|
||||
(device-node name type major minor module)
|
||||
device-node?
|
||||
(name device-node-name)
|
||||
(type device-node-type)
|
||||
(major device-node-major)
|
||||
(minor device-node-minor)
|
||||
(module device-node-module))
|
||||
|
||||
(define (read-static-device-nodes port)
|
||||
"Read from PORT a list of <device-node> written in the format used by
|
||||
/lib/modules/*/*.devname files."
|
||||
(let loop ((line (read-line port)))
|
||||
(if (eof-object? line)
|
||||
'()
|
||||
(match (string-split line #\space)
|
||||
(((? (cut string-prefix? "#" <>)) _ ...)
|
||||
(loop (read-line port)))
|
||||
((module-name device-name device-spec)
|
||||
(let* ((device-parts
|
||||
(string-match "([bc])([0-9][0-9]*):([0-9][0-9]*)"
|
||||
device-spec))
|
||||
(type-string (match:substring device-parts 1))
|
||||
(type (match type-string
|
||||
("c" 'char-special)
|
||||
("b" 'block-special)))
|
||||
(major-string (match:substring device-parts 2))
|
||||
(major (string->number major-string 10))
|
||||
(minor-string (match:substring device-parts 3))
|
||||
(minor (string->number minor-string 10)))
|
||||
(cons (device-node device-name type major minor module-name)
|
||||
(loop (read-line port)))))
|
||||
(_
|
||||
(begin
|
||||
(format (current-error-port)
|
||||
"read-static-device-nodes: ignored devname line '~a'~%" line)
|
||||
(loop (read-line port))))))))
|
||||
|
||||
(define* (mkdir-p* dir #:optional (mode #o755))
|
||||
"This is a variant of 'mkdir-p' that works around
|
||||
<http://bugs.gnu.org/24659> by passing MODE explicitly in each 'mkdir' call."
|
||||
(define absolute?
|
||||
(string-prefix? "/" dir))
|
||||
|
||||
(define not-slash
|
||||
(char-set-complement (char-set #\/)))
|
||||
|
||||
(let loop ((components (string-tokenize dir not-slash))
|
||||
(root (if absolute?
|
||||
""
|
||||
".")))
|
||||
(match components
|
||||
((head tail ...)
|
||||
(let ((path (string-append root "/" head)))
|
||||
(catch 'system-error
|
||||
(lambda ()
|
||||
(mkdir path mode)
|
||||
(loop tail path))
|
||||
(lambda args
|
||||
(if (= EEXIST (system-error-errno args))
|
||||
(loop tail path)
|
||||
(apply throw args))))))
|
||||
(() #t))))
|
||||
|
||||
(define (report-system-error name . args)
|
||||
"Report a system error for the file NAME."
|
||||
(let ((errno (system-error-errno args)))
|
||||
(format (current-error-port) "could not create '~a': ~a~%" name
|
||||
(strerror errno))))
|
||||
|
||||
;; Catch a system-error, log it and don't die from it.
|
||||
(define-syntax-rule (catch-system-error name exp)
|
||||
(catch 'system-error
|
||||
(lambda ()
|
||||
exp)
|
||||
(lambda args
|
||||
(apply report-system-error name args))))
|
||||
|
||||
;; Create a device node like the <device-node> passed here on the file system.
|
||||
(define create-device-node
|
||||
(match-lambda
|
||||
(($ <device-node> xname type major minor module)
|
||||
(let ((name (string-append "/dev/" xname)))
|
||||
(mkdir-p* (dirname name))
|
||||
(catch-system-error name
|
||||
(mknod name type #o600 (device-number major minor)))))))
|
||||
|
||||
(define* (make-static-device-nodes linux-release-module-directory)
|
||||
"Create static device nodes required by the given Linux release.
|
||||
This is required in order to solve a chicken-or-egg problem:
|
||||
The Linux kernel has a feature to autoload modules when a device is first
|
||||
accessed.
|
||||
And udev has a feature to set the permissions of static nodes correctly
|
||||
when it is starting up and also to automatically create nodes when hardware
|
||||
is hotplugged. That leaves universal device files which are not linked to
|
||||
one specific hardware device. These we have to create."
|
||||
(let ((devname-name (string-append linux-release-module-directory "/"
|
||||
"modules.devname")))
|
||||
(for-each create-device-node
|
||||
(call-with-input-file devname-name
|
||||
read-static-device-nodes))))
|
||||
|
||||
(define* (make-essential-device-nodes #:key (root "/"))
|
||||
"Make essential device nodes under ROOT/dev."
|
||||
;; The hand-made devtmpfs/udev!
|
||||
@@ -357,10 +239,20 @@ the last argument of `mknod'."
|
||||
(filter-map string->number (scandir "/proc")))))
|
||||
|
||||
(define* (mount-root-file-system root type
|
||||
#:key volatile-root?)
|
||||
#:key volatile-root? (unionfs "unionfs"))
|
||||
"Mount the root file system of type TYPE at device ROOT. If VOLATILE-ROOT?
|
||||
is true, mount ROOT read-only and make it a overlay with a writable tmpfs
|
||||
using the kernel build-in overlayfs."
|
||||
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")))
|
||||
(chmod port #o600)
|
||||
(write pid port)
|
||||
(newline port)
|
||||
(close-port port)))
|
||||
|
||||
(if volatile-root?
|
||||
(begin
|
||||
(mkdir-p "/real-root")
|
||||
@@ -368,17 +260,24 @@ using the kernel build-in overlayfs."
|
||||
(mkdir-p "/rw-root")
|
||||
(mount "none" "/rw-root" "tmpfs")
|
||||
|
||||
;; Create the upperdir and the workdir of the overlayfs
|
||||
(mkdir-p "/rw-root/upper")
|
||||
(mkdir-p "/rw-root/work")
|
||||
|
||||
;; We want read-write /dev nodes.
|
||||
(mkdir-p "/rw-root/upper/dev")
|
||||
(mount "none" "/rw-root/upper/dev" "devtmpfs")
|
||||
(mkdir-p "/rw-root/dev")
|
||||
(mount "none" "/rw-root/dev" "devtmpfs")
|
||||
|
||||
;; Make /root an overlay of the tmpfs and the actual root.
|
||||
(mount "none" "/root" "overlay" 0
|
||||
"lowerdir=/real-root,upperdir=/rw-root/upper,workdir=/rw-root/work"))
|
||||
;; Make /root a union of the tmpfs and the actual root. Use
|
||||
;; 'max_files' to set a high RLIMIT_NOFILE for the unionfs process
|
||||
;; itself. Failing to do that, we quickly run out of file
|
||||
;; descriptors; see <http://bugs.gnu.org/17827>.
|
||||
(unless (zero? (system* unionfs "-o"
|
||||
"cow,allow_other,use_ino,suid,dev,max_files=65536"
|
||||
"/rw-root=RW:/real-root=RO"
|
||||
"/root"))
|
||||
(error "unionfs failed"))
|
||||
|
||||
;; Make sure unionfs remains alive till the end. Because
|
||||
;; 'fuse_daemonize' doesn't tell the PID of the forked daemon, we
|
||||
;; have to resort to 'pidof' here.
|
||||
(mark-as-not-killable (pidof unionfs)))
|
||||
(begin
|
||||
(check-file-system root type)
|
||||
(mount root "/root" type)))
|
||||
@@ -386,7 +285,6 @@ using the kernel build-in overlayfs."
|
||||
;; Make sure /root/etc/mtab is a symlink to /proc/self/mounts.
|
||||
(false-if-exception
|
||||
(delete-file "/root/etc/mtab"))
|
||||
(mkdir-p "/root/etc")
|
||||
(symlink "/proc/self/mounts" "/root/etc/mtab"))
|
||||
|
||||
(define (switch-root root)
|
||||
@@ -440,8 +338,7 @@ bailing out.~%root contents: ~s~%" (scandir "/"))
|
||||
qemu-guest-networking?
|
||||
volatile-root?
|
||||
pre-mount
|
||||
(mounts '())
|
||||
(on-error 'debug))
|
||||
(mounts '()))
|
||||
"This procedure is meant to be called from an initrd. Boot a system by
|
||||
first loading LINUX-MODULES (a list of module names) from
|
||||
LINUX-MODULE-DIRECTORY, then setting up QEMU guest networking if
|
||||
@@ -452,20 +349,19 @@ supports kernel command-line options '--load', '--root', and '--repl'.
|
||||
Mount the root file system, specified by the '--root' command-line argument,
|
||||
if any.
|
||||
|
||||
MOUNTS must be a list of <file-system> objects.
|
||||
MOUNTS must be a list suitable for 'mount-file-system'.
|
||||
|
||||
When VOLATILE-ROOT? is true, the root file system is writable but any changes
|
||||
to it are lost.
|
||||
|
||||
ON-ERROR is passed to 'call-with-error-handling'; it determines what happens
|
||||
upon error."
|
||||
(define (root-mount-point? fs)
|
||||
(string=? (file-system-mount-point fs) "/"))
|
||||
to it are lost."
|
||||
(define root-mount-point?
|
||||
(match-lambda
|
||||
((device _ "/" _ ...) #t)
|
||||
(_ #f)))
|
||||
|
||||
(define root-fs-type
|
||||
(or (any (lambda (fs)
|
||||
(and (root-mount-point? fs)
|
||||
(file-system-type fs)))
|
||||
(or (any (match-lambda
|
||||
((device _ "/" type _ ...) type)
|
||||
(_ #f))
|
||||
mounts)
|
||||
"ext4"))
|
||||
|
||||
@@ -507,15 +403,9 @@ upon error."
|
||||
(error "pre-mount actions failed")))
|
||||
|
||||
(if root
|
||||
;; 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.
|
||||
(let ((root (cond ((string-prefix? "/" root) root)
|
||||
((uuid root) => identity)
|
||||
(else (file-system-label root)))))
|
||||
(mount-root-file-system (canonicalize-device-spec root)
|
||||
root-fs-type
|
||||
#:volatile-root? volatile-root?))
|
||||
(mount-root-file-system (canonicalize-device-spec root)
|
||||
root-fs-type
|
||||
#:volatile-root? volatile-root?)
|
||||
(mount "none" "/root" "tmpfs"))
|
||||
|
||||
;; Mount the specified file systems.
|
||||
@@ -537,7 +427,6 @@ upon error."
|
||||
(begin
|
||||
(display "no boot file passed via '--load'\n")
|
||||
(display "entering a warm and cozy REPL\n")
|
||||
(start-repl)))))
|
||||
#:on-error on-error))
|
||||
(start-repl)))))))
|
||||
|
||||
;;; linux-initrd.scm ends here
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2015 David Thompson <davet@gnu.org>
|
||||
;;; Copyright © 2017, 2018 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2017 Ludovic Courtès <ludo@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
@@ -61,14 +61,9 @@ exists."
|
||||
(const #t)
|
||||
(lambda ()
|
||||
(thunk)
|
||||
|
||||
;; XXX: Somehow we sometimes get EBADF from write(2) or close(2) upon
|
||||
;; exit (coming from fd finalizers) when used by the Shepherd. To work
|
||||
;; around that, exit forcefully so fd finalizers don't have a chance to
|
||||
;; run and fail.
|
||||
(primitive-_exit 0))
|
||||
(primitive-exit 0))
|
||||
(lambda ()
|
||||
(primitive-_exit 1))))
|
||||
(primitive-exit 1))))
|
||||
|
||||
(define (purify-environment)
|
||||
"Unset all environment variables."
|
||||
@@ -157,7 +152,8 @@ for the process."
|
||||
|
||||
;; Mount user-specified file systems.
|
||||
(for-each (lambda (file-system)
|
||||
(mount-file-system file-system #:root root))
|
||||
(mount-file-system (file-system->spec file-system)
|
||||
#:root root))
|
||||
mounts)
|
||||
|
||||
;; Jail the process inside the container's root file system.
|
||||
@@ -340,8 +336,7 @@ return the exit status."
|
||||
(match (container-excursion pid
|
||||
(lambda ()
|
||||
(close-port in)
|
||||
(write (thunk) out)
|
||||
(close-port out)))
|
||||
(write (thunk) out)))
|
||||
(0
|
||||
(close-port out)
|
||||
(let ((result (read in)))
|
||||
|
||||
+9
-182
@@ -1,5 +1,5 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2014, 2016, 2018 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2014, 2016 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
@@ -19,7 +19,6 @@
|
||||
|
||||
(define-module (gnu build linux-modules)
|
||||
#:use-module (guix elf)
|
||||
#:use-module (guix glob)
|
||||
#:use-module (guix build syscalls)
|
||||
#:use-module (rnrs io ports)
|
||||
#:use-module (rnrs bytevectors)
|
||||
@@ -27,22 +26,15 @@
|
||||
#:use-module (srfi srfi-26)
|
||||
#:use-module (ice-9 vlist)
|
||||
#:use-module (ice-9 match)
|
||||
#:use-module (ice-9 rdelim)
|
||||
#:export (dot-ko
|
||||
ensure-dot-ko
|
||||
module-aliases
|
||||
module-dependencies
|
||||
normalize-module-name
|
||||
recursive-module-dependencies
|
||||
modules-loaded
|
||||
module-loaded?
|
||||
load-linux-module*
|
||||
|
||||
current-module-debugging-port
|
||||
|
||||
device-module-aliases
|
||||
known-module-aliases
|
||||
matching-modules))
|
||||
current-module-debugging-port))
|
||||
|
||||
;;; Commentary:
|
||||
;;;
|
||||
@@ -97,15 +89,6 @@ contains module names, not actual file names."
|
||||
(('depends . what)
|
||||
(string-tokenize what %not-comma)))))
|
||||
|
||||
(define (module-aliases file)
|
||||
"Return the list of aliases of module FILE."
|
||||
(let ((info (modinfo-section-contents file)))
|
||||
(filter-map (match-lambda
|
||||
(('alias . value)
|
||||
value)
|
||||
(_ #f))
|
||||
(modinfo-section-contents file))))
|
||||
|
||||
(define dot-ko
|
||||
(cut string-append <> ".ko"))
|
||||
|
||||
@@ -197,6 +180,10 @@ 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."
|
||||
(define (slurp module)
|
||||
;; TODO: Use 'finit_module' to reduce memory usage.
|
||||
(call-with-input-file file get-bytevector-all))
|
||||
|
||||
(define (black-listed? module)
|
||||
(let ((result (member module black-list)))
|
||||
(when result
|
||||
@@ -207,183 +194,23 @@ appears in BLACK-LIST are not loaded."
|
||||
|
||||
(define (load-dependencies file)
|
||||
(let ((dependencies (module-dependencies file)))
|
||||
(every (cut load-linux-module* <>
|
||||
#:lookup-module lookup-module
|
||||
#:black-list black-list)
|
||||
(every (cut load-linux-module* <> #:lookup-module lookup-module)
|
||||
(map lookup-module dependencies))))
|
||||
|
||||
(and (not (black-listed? (file-name->module-name file)))
|
||||
(or (not recursive?)
|
||||
(load-dependencies file))
|
||||
(let ((fd #f))
|
||||
(begin
|
||||
(format (current-module-debugging-port)
|
||||
"loading Linux module from '~a'...~%" file)
|
||||
|
||||
(catch 'system-error
|
||||
(lambda ()
|
||||
(set! fd (open-fdes file O_RDONLY))
|
||||
(load-linux-module/fd fd)
|
||||
(close-fdes fd)
|
||||
#t)
|
||||
(load-linux-module (slurp file)))
|
||||
(lambda args
|
||||
;; If this module was already loaded and we're in modprobe style, ignore
|
||||
;; the error.
|
||||
(when fd (close-fdes fd))
|
||||
(or (and recursive? (= EEXIST (system-error-errno args)))
|
||||
(apply throw args)))))))
|
||||
|
||||
|
||||
;;;
|
||||
;;; Device modules.
|
||||
;;;
|
||||
|
||||
;; Copied from (guix utils). FIXME: Factorize.
|
||||
(define (readlink* file)
|
||||
"Call 'readlink' until the result is not a symlink."
|
||||
(define %max-symlink-depth 50)
|
||||
|
||||
(let loop ((file file)
|
||||
(depth 0))
|
||||
(define (absolute target)
|
||||
(if (absolute-file-name? target)
|
||||
target
|
||||
(string-append (dirname file) "/" target)))
|
||||
|
||||
(if (>= depth %max-symlink-depth)
|
||||
file
|
||||
(call-with-values
|
||||
(lambda ()
|
||||
(catch 'system-error
|
||||
(lambda ()
|
||||
(values #t (readlink file)))
|
||||
(lambda args
|
||||
(let ((errno (system-error-errno args)))
|
||||
(if (or (= errno EINVAL))
|
||||
(values #f file)
|
||||
(apply throw args))))))
|
||||
(lambda (success? target)
|
||||
(if success?
|
||||
(loop (absolute target) (+ depth 1))
|
||||
file))))))
|
||||
|
||||
;; See 'major' and 'minor' in <sys/sysmacros.h>.
|
||||
|
||||
(define (stat->device-major st)
|
||||
(ash (logand #xfff00 (stat:rdev st)) -8))
|
||||
|
||||
(define (stat->device-minor st)
|
||||
(logand #xff (stat:rdev st)))
|
||||
|
||||
(define %not-slash
|
||||
(char-set-complement (char-set #\/)))
|
||||
|
||||
(define (read-uevent port)
|
||||
"Read a /sys 'uevent' file from PORT and return an alist where each car is a
|
||||
key such as 'MAJOR or 'DEVTYPE and each cdr is the corresponding value."
|
||||
(let loop ((result '()))
|
||||
(match (read-line port)
|
||||
((? eof-object?)
|
||||
(reverse result))
|
||||
(line
|
||||
(loop (cons (key=value->pair line) result))))))
|
||||
|
||||
(define (device-module-aliases device)
|
||||
"Return the list of module aliases required by DEVICE, a /dev file name, as
|
||||
in this example:
|
||||
|
||||
(device-module-aliases \"/dev/sda\")
|
||||
=> (\"scsi:t-0x00\" \"pci:v00008086d00009D03sv0000103Csd000080FAbc01sc06i01\")
|
||||
|
||||
The modules corresponding to these aliases can then be found using
|
||||
'matching-modules'."
|
||||
;; The approach is adapted from
|
||||
;; <https://unix.stackexchange.com/questions/97676/how-to-find-the-driver-module-associated-with-a-device-on-linux>.
|
||||
(let* ((st (stat device))
|
||||
(type (stat:type st))
|
||||
(major (stat->device-major st))
|
||||
(minor (stat->device-minor st))
|
||||
(sys-name (string-append "/sys/dev/"
|
||||
(case type
|
||||
((block-special) "block")
|
||||
((char-special) "char")
|
||||
(else (symbol->string type)))
|
||||
"/" (number->string major) ":"
|
||||
(number->string minor)))
|
||||
(directory (canonicalize-path (readlink* sys-name))))
|
||||
(let loop ((components (string-tokenize directory %not-slash))
|
||||
(aliases '()))
|
||||
(match components
|
||||
(("sys" "devices" _)
|
||||
(reverse aliases))
|
||||
((head ... _)
|
||||
(let ((uevent (string-append (string-join components "/" 'prefix)
|
||||
"/uevent")))
|
||||
(if (file-exists? uevent)
|
||||
(let ((props (call-with-input-file uevent read-uevent)))
|
||||
(match (assq-ref props 'MODALIAS)
|
||||
(#f (loop head aliases))
|
||||
(alias (loop head (cons alias aliases)))))
|
||||
(loop head aliases))))))))
|
||||
|
||||
(define (read-module-aliases port)
|
||||
"Read from PORT data in the Linux 'modules.alias' file format. Return a
|
||||
list of alias/module pairs where each alias is a glob pattern as like the
|
||||
result of:
|
||||
|
||||
(string->compiled-sglob \"scsi:t-0x01*\")
|
||||
|
||||
and each module is a module name like \"snd_hda_intel\"."
|
||||
(define (comment? str)
|
||||
(string-prefix? "#" str))
|
||||
|
||||
(define (tokenize str)
|
||||
;; Lines have the form "alias ALIAS MODULE", where ALIAS can contain
|
||||
;; whitespace. This is why we don't use 'string-tokenize'.
|
||||
(let* ((str (string-trim-both str))
|
||||
(left (string-index str #\space))
|
||||
(right (string-rindex str #\space)))
|
||||
(list (string-take str left)
|
||||
(string-trim-both (substring str left right))
|
||||
(string-trim-both (string-drop str right)))))
|
||||
|
||||
(let loop ((aliases '()))
|
||||
(match (read-line port)
|
||||
((? eof-object?)
|
||||
(reverse aliases))
|
||||
((? comment?)
|
||||
(loop aliases))
|
||||
(line
|
||||
(match (tokenize line)
|
||||
(("alias" alias module)
|
||||
(loop (alist-cons (string->compiled-sglob alias) module
|
||||
aliases)))
|
||||
(() ;empty line
|
||||
(loop aliases)))))))
|
||||
|
||||
(define (current-kernel-directory)
|
||||
"Return the directory of the currently running Linux kernel."
|
||||
(string-append (or (getenv "LINUX_MODULE_DIRECTORY")
|
||||
"/run/booted-system/kernel/lib/modules")
|
||||
"/" (utsname:release (uname))))
|
||||
|
||||
(define (current-alias-file)
|
||||
"Return the absolute file name of the default 'modules.alias' file."
|
||||
(string-append (current-kernel-directory) "/modules.alias"))
|
||||
|
||||
(define* (known-module-aliases #:optional (alias-file (current-alias-file)))
|
||||
"Return the list of alias/module pairs read from ALIAS-FILE. Each alias is
|
||||
actually a pattern."
|
||||
(call-with-input-file alias-file read-module-aliases))
|
||||
|
||||
(define* (matching-modules alias
|
||||
#:optional (known-aliases (known-module-aliases)))
|
||||
"Return the list of modules that match ALIAS according to KNOWN-ALIASES.
|
||||
ALIAS is a string like \"scsi:t-0x00\" as returned by
|
||||
'device-module-aliases'."
|
||||
(filter-map (match-lambda
|
||||
((pattern . module)
|
||||
(and (glob-match? pattern alias)
|
||||
module)))
|
||||
known-aliases))
|
||||
|
||||
;;; linux-modules.scm ends here
|
||||
|
||||
+17
-63
@@ -1,5 +1,5 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2016, 2017 Ludovic Courtès <ludo@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
@@ -26,7 +26,6 @@
|
||||
make-marionette
|
||||
marionette-eval
|
||||
wait-for-file
|
||||
wait-for-tcp-port
|
||||
marionette-control
|
||||
marionette-screen-text
|
||||
wait-for-screen-text
|
||||
@@ -98,11 +97,8 @@ QEMU monitor and to the guest's backdoor REPL."
|
||||
"-monitor" (string-append "unix:" socket-directory "/monitor")
|
||||
"-chardev" (string-append "socket,id=repl,path=" socket-directory
|
||||
"/repl")
|
||||
|
||||
;; See
|
||||
;; <http://www.linux-kvm.org/page/VMchannel_Requirements#Invocation>.
|
||||
"-device" "virtio-serial"
|
||||
"-device" "virtserialport,chardev=repl,name=org.gnu.guix.port.0"))
|
||||
"-device" "virtconsole,chardev=repl"))
|
||||
|
||||
(define (accept* port)
|
||||
(match (select (list port) '() (list port) timeout)
|
||||
@@ -169,50 +165,19 @@ QEMU monitor and to the guest's backdoor REPL."
|
||||
(newline repl)
|
||||
(read repl))))
|
||||
|
||||
(define* (wait-for-file file marionette
|
||||
#:key (timeout 10) (read 'read))
|
||||
"Wait until FILE exists in MARIONETTE; READ its content and return it. If
|
||||
(define* (wait-for-file file marionette #:key (timeout 10))
|
||||
"Wait until FILE exists in MARIONETTE; 'read' its content and return it. If
|
||||
FILE has not shown up after TIMEOUT seconds, raise an error."
|
||||
(match (marionette-eval
|
||||
`(let loop ((i ,timeout))
|
||||
(cond ((file-exists? ,file)
|
||||
(cons 'success (call-with-input-file ,file ,read)))
|
||||
((> i 0)
|
||||
(sleep 1)
|
||||
(loop (- i 1)))
|
||||
(else
|
||||
'failure)))
|
||||
marionette)
|
||||
(('success . result)
|
||||
result)
|
||||
('failure
|
||||
(error "file didn't show up" file))))
|
||||
|
||||
(define* (wait-for-tcp-port port marionette
|
||||
#:key (timeout 20))
|
||||
"Wait for up to TIMEOUT seconds for PORT to accept connections in
|
||||
MARIONETTE. Raise an error on failure."
|
||||
;; Note: The 'connect' loop has to run within the guest because, when we
|
||||
;; forward ports to the host, connecting to the host never raises
|
||||
;; ECONNREFUSED.
|
||||
(match (marionette-eval
|
||||
`(begin
|
||||
(let ((sock (socket PF_INET SOCK_STREAM 0)))
|
||||
(let loop ((i 0))
|
||||
(catch 'system-error
|
||||
(lambda ()
|
||||
(connect sock AF_INET INADDR_LOOPBACK ,port)
|
||||
'success)
|
||||
(lambda args
|
||||
(if (< i ,timeout)
|
||||
(begin
|
||||
(sleep 1)
|
||||
(loop (+ 1 i)))
|
||||
'failure))))))
|
||||
marionette)
|
||||
('success #t)
|
||||
('failure
|
||||
(error "nobody's listening on port" port))))
|
||||
(marionette-eval
|
||||
`(let loop ((i ,timeout))
|
||||
(cond ((file-exists? ,file)
|
||||
(call-with-input-file ,file read))
|
||||
((> i 0)
|
||||
(sleep 1)
|
||||
(loop (- i 1)))
|
||||
(else
|
||||
(error "file didn't show up" ,file))))
|
||||
marionette))
|
||||
|
||||
(define (marionette-control command marionette)
|
||||
"Run COMMAND in the QEMU monitor of MARIONETTE. COMMAND is a string such as
|
||||
@@ -292,20 +257,9 @@ PREDICATE, whichever comes first. Raise an error when TIMEOUT is exceeded."
|
||||
(#\. . "dot")
|
||||
(#\, . "comma")
|
||||
(#\; . "semicolon")
|
||||
(#\' . "apostrophe")
|
||||
(#\" . "shift-apostrophe")
|
||||
(#\` . "grave_accent")
|
||||
(#\bs . "backspace")
|
||||
(#\tab . "tab")))
|
||||
|
||||
(define (character->keystroke chr keystrokes)
|
||||
"Return the keystroke for CHR according to the keyboard layout defined by
|
||||
KEYSTROKES."
|
||||
(if (char-set-contains? char-set:upper-case chr)
|
||||
(string-append "shift-" (string (char-downcase chr)))
|
||||
(or (assoc-ref keystrokes chr)
|
||||
(string chr))))
|
||||
|
||||
(define* (string->keystroke-commands str
|
||||
#:optional
|
||||
(keystrokes
|
||||
@@ -314,9 +268,9 @@ KEYSTROKES."
|
||||
to STR. KEYSTROKES is an alist specifying a mapping from characters to
|
||||
keystrokes."
|
||||
(string-fold-right (lambda (chr result)
|
||||
(cons (string-append
|
||||
"sendkey "
|
||||
(character->keystroke chr keystrokes))
|
||||
(cons (string-append "sendkey "
|
||||
(or (assoc-ref keystrokes chr)
|
||||
(string chr)))
|
||||
result))
|
||||
'()
|
||||
str))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2017, 2018 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2017 Ludovic Courtès <ludo@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
@@ -55,17 +55,16 @@
|
||||
(define (tmpfs directory)
|
||||
(file-system
|
||||
(device "none")
|
||||
(title 'device)
|
||||
(mount-point directory)
|
||||
(type "tmpfs")
|
||||
(check? #f)))
|
||||
|
||||
(define accounts
|
||||
(define passwd
|
||||
;; This is for processes in the default user namespace but living in a
|
||||
;; different mount namespace, so that they can lookup users.
|
||||
(list (file-system-mapping
|
||||
(source "/etc/passwd") (target source))
|
||||
(file-system-mapping
|
||||
(source "/etc/group") (target source))))
|
||||
(file-system-mapping
|
||||
(source "/etc/passwd") (target source)))
|
||||
|
||||
(define nscd-socket
|
||||
(file-system-mapping
|
||||
@@ -79,7 +78,7 @@
|
||||
%network-file-mappings))
|
||||
,@(if (and (memq 'mnt namespaces)
|
||||
(not (memq 'user namespaces)))
|
||||
accounts
|
||||
(list passwd)
|
||||
'())
|
||||
,%store-mapping))) ;XXX: coarse-grain
|
||||
(map file-system-mapping->bind-mount
|
||||
|
||||
+8
-3
@@ -1,5 +1,5 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2016, 2017 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2015 Andy Wingo <wingo@igalia.com>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
@@ -18,11 +18,16 @@
|
||||
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
(define-module (gnu build svg)
|
||||
#:use-module (rsvg)
|
||||
#:use-module (cairo)
|
||||
#:use-module (srfi srfi-11)
|
||||
#:export (svg->png))
|
||||
|
||||
;; We need Guile-RSVG and Guile-Cairo. Load them lazily, at run time, to
|
||||
;; allow compilation to proceed. See also <http://bugs.gnu.org/12202>.
|
||||
(module-autoload! (current-module)
|
||||
'(rsvg) '(rsvg-handle-new-from-file))
|
||||
(module-autoload! (current-module)
|
||||
'(cairo) '(cairo-image-surface-create))
|
||||
|
||||
(define* (downscaled-surface surface
|
||||
#:key
|
||||
source-width source-height
|
||||
|
||||
+99
-202
@@ -1,10 +1,9 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
|
||||
;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
|
||||
;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
|
||||
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
|
||||
;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
|
||||
;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
@@ -25,16 +24,14 @@
|
||||
#:use-module (guix build utils)
|
||||
#:use-module (guix build store-copy)
|
||||
#:use-module (guix build syscalls)
|
||||
#:use-module ((guix store database) #:select (reset-timestamps))
|
||||
#:use-module (gnu build linux-boot)
|
||||
#:use-module (gnu build install)
|
||||
#:use-module (gnu system uuid)
|
||||
#:use-module (gnu build file-systems)
|
||||
#:use-module (guix records)
|
||||
#:use-module ((guix combinators) #:select (fold2))
|
||||
#:use-module (ice-9 format)
|
||||
#:use-module (ice-9 match)
|
||||
#:use-module (ice-9 regex)
|
||||
#:use-module (ice-9 popen)
|
||||
#:use-module (srfi srfi-1)
|
||||
#:use-module (srfi srfi-9)
|
||||
#:use-module (srfi srfi-26)
|
||||
@@ -79,15 +76,11 @@
|
||||
(qemu (qemu-command)) (memory-size 512)
|
||||
linux initrd
|
||||
make-disk-image?
|
||||
single-file-output?
|
||||
target-arm32?
|
||||
(disk-image-size (* 100 (expt 2 20)))
|
||||
(disk-image-format "qcow2")
|
||||
(references-graphs '()))
|
||||
"Run BUILDER, a Scheme file, into a VM running LINUX with INITRD, and copy
|
||||
the result to OUTPUT. If SINGLE-FILE-OUTPUT? is true, copy a single file from
|
||||
/xchg to OUTPUT. Otherwise, copy the contents of /xchg to a new directory
|
||||
OUTPUT.
|
||||
the result to OUTPUT.
|
||||
|
||||
When MAKE-DISK-IMAGE? is true, OUTPUT will contain a VM image of
|
||||
DISK-IMAGE-SIZE bytes resulting from the execution of BUILDER, which may
|
||||
@@ -95,51 +88,16 @@ access it via /dev/hda.
|
||||
|
||||
REFERENCES-GRAPHS can specify a list of reference-graph files as produced by
|
||||
the #:references-graphs parameter of 'derivation'."
|
||||
|
||||
(define arch-specific-flags
|
||||
`(;; On ARM, a machine has to be specified. Use "virt" machine to avoid
|
||||
;; hardware limits imposed by other machines.
|
||||
,@(if target-arm32? '("-M" "virt") '())
|
||||
|
||||
;; Only enable kvm if we see /dev/kvm exists. This allows users without
|
||||
;; hardware virtualization to still use these commands. KVM support is
|
||||
;; still buggy on some ARM32 boards. Do not use it even if available.
|
||||
,@(if (and (file-exists? "/dev/kvm")
|
||||
(not target-arm32?)
|
||||
|
||||
;; XXX: 32-bit 'qemu-system-i386 -enable-kvm' segfaults on
|
||||
;; x86_64 hosts running Linux-libre 4.17:
|
||||
;; <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31380#18> and
|
||||
;; <https://lists.gnu.org/archive/html/qemu-devel/2018-07/msg01166.html>.
|
||||
(not (string-suffix? "-i386" qemu)))
|
||||
'("-enable-kvm")
|
||||
'())
|
||||
|
||||
;; Pass "panic=1" so that the guest dies upon error.
|
||||
"-append"
|
||||
,(string-append "panic=1 --load=" builder
|
||||
|
||||
;; The serial port name differs between emulated
|
||||
;; architectures/machines.
|
||||
" console="
|
||||
(if target-arm32? "ttyAMA0" "ttyS0"))
|
||||
|
||||
;; NIC is not supported on ARM "virt" machine, so use a user mode
|
||||
;; network stack instead.
|
||||
,@(if target-arm32?
|
||||
'("-device" "virtio-net-pci,netdev=mynet"
|
||||
"-netdev" "user,id=mynet")
|
||||
'("-net" "nic,model=virtio"))))
|
||||
|
||||
(when make-disk-image?
|
||||
(format #t "creating ~a image of ~,2f MiB...~%"
|
||||
disk-image-format (/ disk-image-size (expt 2 20)))
|
||||
(force-output)
|
||||
(invoke "qemu-img" "create" "-f" disk-image-format output
|
||||
(number->string disk-image-size)))
|
||||
(unless (zero? (system* "qemu-img" "create" "-f" disk-image-format
|
||||
output
|
||||
(number->string disk-image-size)))
|
||||
(error "qemu-img failed")))
|
||||
|
||||
(mkdir "xchg")
|
||||
(mkdir "tmp")
|
||||
|
||||
(match references-graphs
|
||||
((graph-files ...)
|
||||
@@ -149,47 +107,38 @@ the #:references-graphs parameter of 'derivation'."
|
||||
graph-files))
|
||||
(_ #f))
|
||||
|
||||
(apply invoke qemu "-nographic" "-no-reboot"
|
||||
"-m" (number->string memory-size)
|
||||
"-object" "rng-random,filename=/dev/urandom,id=guixsd-vm-rng"
|
||||
"-device" "virtio-rng-pci,rng=guixsd-vm-rng"
|
||||
"-virtfs"
|
||||
(string-append "local,id=store_dev,path="
|
||||
(%store-directory)
|
||||
",security_model=none,mount_tag=store")
|
||||
"-virtfs"
|
||||
(string-append "local,id=xchg_dev,path=xchg"
|
||||
",security_model=none,mount_tag=xchg")
|
||||
"-virtfs"
|
||||
;; Some programs require more space in /tmp than is normally
|
||||
;; available in the guest. Accommodate such programs by sharing a
|
||||
;; temporary directory.
|
||||
(string-append "local,id=tmp_dev,path=tmp"
|
||||
",security_model=none,mount_tag=tmp")
|
||||
"-kernel" linux
|
||||
"-initrd" initrd
|
||||
(append
|
||||
(if make-disk-image?
|
||||
`("-device" "virtio-blk,drive=myhd"
|
||||
"-drive" ,(string-append "if=none,file=" output
|
||||
",format=" disk-image-format
|
||||
",id=myhd"))
|
||||
'())
|
||||
arch-specific-flags))
|
||||
(unless (zero?
|
||||
(apply system* qemu "-nographic" "-no-reboot"
|
||||
"-m" (number->string memory-size)
|
||||
"-net" "nic,model=virtio"
|
||||
"-virtfs"
|
||||
(string-append "local,id=store_dev,path="
|
||||
(%store-directory)
|
||||
",security_model=none,mount_tag=store")
|
||||
"-virtfs"
|
||||
(string-append "local,id=xchg_dev,path=xchg"
|
||||
",security_model=none,mount_tag=xchg")
|
||||
"-kernel" linux
|
||||
"-initrd" initrd
|
||||
"-append" (string-append "console=ttyS0 --load="
|
||||
builder)
|
||||
(append
|
||||
(if make-disk-image?
|
||||
`("-drive" ,(string-append "file=" output
|
||||
",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")
|
||||
'()))))
|
||||
(error "qemu failed" qemu))
|
||||
|
||||
;; When MAKE-DISK-IMAGE? is true, the image is in OUTPUT already.
|
||||
(unless make-disk-image?
|
||||
(if single-file-output?
|
||||
(let ((graph? (lambda (name stat)
|
||||
(member (basename name) references-graphs))))
|
||||
(match (find-files "xchg" (negate graph?))
|
||||
((result)
|
||||
(copy-file result output))
|
||||
(x
|
||||
(error "did not find a single result file" x))))
|
||||
(begin
|
||||
(mkdir output)
|
||||
(copy-recursively "xchg" output)))))
|
||||
(mkdir output)
|
||||
(copy-recursively "xchg" output)))
|
||||
|
||||
|
||||
;;;
|
||||
@@ -202,15 +151,14 @@ the #:references-graphs parameter of 'derivation'."
|
||||
(size partition-size)
|
||||
(file-system partition-file-system (default "ext4"))
|
||||
(label partition-label (default #f))
|
||||
(uuid partition-uuid (default #f))
|
||||
(flags partition-flags (default '()))
|
||||
(initializer partition-initializer (default (const #t))))
|
||||
|
||||
(define (estimated-partition-size graphs)
|
||||
"Return the estimated size of a partition that can store the store items
|
||||
given by GRAPHS, a list of file names produced by #:references-graphs."
|
||||
;; Simply add a 25% overhead.
|
||||
(round (* 1.25 (closure-size graphs))))
|
||||
;; Simply add a 20% overhead.
|
||||
(round (* 1.2 (closure-size graphs))))
|
||||
|
||||
(define* (initialize-partition-table device partitions
|
||||
#:key
|
||||
@@ -255,9 +203,10 @@ actual /dev name based on DEVICE."
|
||||
partition-size)
|
||||
partitions)
|
||||
", "))
|
||||
(apply invoke "parted" "--script"
|
||||
device "mklabel" label-type
|
||||
(options partitions offset))
|
||||
(unless (zero? (apply system* "parted" "--script"
|
||||
device "mklabel" label-type
|
||||
(options partitions offset)))
|
||||
(error "failed to create partition table"))
|
||||
|
||||
;; Set the 'device' field of each partition.
|
||||
(reverse
|
||||
@@ -275,38 +224,37 @@ actual /dev name based on DEVICE."
|
||||
(define MS_BIND 4096) ; <sys/mounts.h> again!
|
||||
|
||||
(define* (create-ext-file-system partition type
|
||||
#:key label uuid)
|
||||
"Create an ext-family file system of TYPE on PARTITION. If LABEL is true,
|
||||
use that as the volume name. If UUID is true, use it as the partition UUID."
|
||||
(format #t "creating ~a partition... ~@[label: ~s~] ~@[uuid: ~s~]\n"
|
||||
type label (and uuid (uuid->string uuid)))
|
||||
(apply invoke (string-append "mkfs." type)
|
||||
"-F" partition
|
||||
`(,@(if label
|
||||
`("-L" ,label)
|
||||
'())
|
||||
,@(if uuid
|
||||
`("-U" ,(uuid->string uuid))
|
||||
'()))))
|
||||
#:key label)
|
||||
"Create an ext-family filesystem of TYPE on PARTITION. If LABEL is true,
|
||||
use that as the volume name."
|
||||
(format #t "creating ~a partition...\n" type)
|
||||
(unless (zero? (apply system* (string-append "mkfs." type)
|
||||
"-F" partition
|
||||
(if label
|
||||
`("-L" ,label)
|
||||
'())))
|
||||
(error "failed to create partition")))
|
||||
|
||||
(define* (create-fat-file-system partition
|
||||
#:key label uuid)
|
||||
"Create a FAT file system on PARTITION. The number of File Allocation Tables
|
||||
will be determined based on file system size. If LABEL is true, use that as the
|
||||
#:key label)
|
||||
"Create a FAT filesystem on PARTITION. The number of File Allocation Tables
|
||||
will be determined based on filesystem size. If LABEL is true, use that as the
|
||||
volume name."
|
||||
;; FIXME: UUID is ignored!
|
||||
(format #t "creating FAT partition...\n")
|
||||
(apply invoke "mkfs.fat" partition
|
||||
(if label `("-n" ,label) '())))
|
||||
(unless (zero? (apply system* "mkfs.fat" partition
|
||||
(if label
|
||||
`("-n" ,label)
|
||||
'())))
|
||||
(error "failed to create FAT partition")))
|
||||
|
||||
(define* (format-partition partition type
|
||||
#:key label uuid)
|
||||
#:key label)
|
||||
"Create a file system TYPE on PARTITION. If LABEL is true, use that as the
|
||||
volume name."
|
||||
(cond ((string-prefix? "ext" type)
|
||||
(create-ext-file-system partition type #:label label #:uuid uuid))
|
||||
(create-ext-file-system partition type #:label label))
|
||||
((or (string-prefix? "fat" type) (string= "vfat" type))
|
||||
(create-fat-file-system partition #:label label #:uuid uuid))
|
||||
(create-fat-file-system partition #:label label))
|
||||
(else (error "Unsupported file system."))))
|
||||
|
||||
(define (initialize-partition partition)
|
||||
@@ -315,8 +263,7 @@ it, run its initializer, and unmount it."
|
||||
(let ((target "/fs"))
|
||||
(format-partition (partition-device partition)
|
||||
(partition-file-system partition)
|
||||
#:label (partition-label partition)
|
||||
#:uuid (partition-uuid partition))
|
||||
#:label (partition-label partition))
|
||||
(mkdir-p target)
|
||||
(mount (partition-device partition) target
|
||||
(partition-file-system partition))
|
||||
@@ -329,14 +276,11 @@ it, run its initializer, and unmount it."
|
||||
(define* (root-partition-initializer #:key (closures '())
|
||||
copy-closures?
|
||||
(register-closures? #t)
|
||||
system-directory
|
||||
(deduplicate? #t))
|
||||
system-directory)
|
||||
"Return a procedure to initialize a root partition.
|
||||
|
||||
If REGISTER-CLOSURES? is true, register all of CLOSURES in the partition's
|
||||
store. If DEDUPLICATE? is true, then also deduplicate files common to
|
||||
CLOSURES and the rest of the store when registering the closures. If
|
||||
COPY-CLOSURES? is true, copy all of CLOSURES to the partition.
|
||||
If REGISTER-CLOSURES? is true, register all of CLOSURES is the partition's
|
||||
store. If COPY-CLOSURES? is true, copy all of CLOSURES to the partition.
|
||||
SYSTEM-DIRECTORY is the name of the directory of the 'system' derivation."
|
||||
(lambda (target)
|
||||
(define target-store
|
||||
@@ -353,7 +297,7 @@ SYSTEM-DIRECTORY is the name of the directory of the 'system' derivation."
|
||||
;; Optionally, register the inputs in the image's store.
|
||||
(when register-closures?
|
||||
(unless copy-closures?
|
||||
;; XXX: 'register-closure' wants to palpate the things it registers, so
|
||||
;; XXX: 'guix-register' wants to palpate the things it registers, so
|
||||
;; bind-mount the store on the target.
|
||||
(mkdir-p target-store)
|
||||
(mount (%store-directory) target-store "" MS_BIND))
|
||||
@@ -361,9 +305,7 @@ SYSTEM-DIRECTORY is the name of the directory of the 'system' derivation."
|
||||
(display "registering closures...\n")
|
||||
(for-each (lambda (closure)
|
||||
(register-closure target
|
||||
(string-append "/xchg/" closure)
|
||||
#:reset-timestamps? copy-closures?
|
||||
#:deduplicate? deduplicate?))
|
||||
(string-append "/xchg/" closure)))
|
||||
closures)
|
||||
(unless copy-closures?
|
||||
(umount target-store)))
|
||||
@@ -372,7 +314,7 @@ SYSTEM-DIRECTORY is the name of the directory of the 'system' derivation."
|
||||
(display "populating...\n")
|
||||
(populate-root-file-system system-directory target)
|
||||
|
||||
;; 'register-closure' resets timestamps and everything, so no need to do it
|
||||
;; 'guix-register' resets timestamps and everything, so no need to do it
|
||||
;; once more in that case.
|
||||
(unless register-closures?
|
||||
(reset-timestamps target))))
|
||||
@@ -404,78 +346,36 @@ SYSTEM-DIRECTORY is the name of the directory of the 'system' derivation."
|
||||
(setenv "TMPDIR" esp)
|
||||
|
||||
(mkdir-p efi-directory)
|
||||
(invoke grub-mkstandalone "-O" (car efi-targets)
|
||||
"-o" (string-append efi-directory "/"
|
||||
(cdr efi-targets))
|
||||
;; Graft the configuration file onto the image.
|
||||
(string-append "boot/grub/grub.cfg=" config-file))))
|
||||
(unless (zero? (system* grub-mkstandalone "-O" (car efi-targets)
|
||||
"-o" (string-append efi-directory "/"
|
||||
(cdr efi-targets))
|
||||
;; Graft the configuration file onto the image.
|
||||
(string-append "boot/grub/grub.cfg=" config-file)))
|
||||
(error "failed to create GRUB EFI image"))))
|
||||
|
||||
(define* (make-iso9660-image grub config-file os-drv target
|
||||
#:key (volume-id "GuixSD_image") (volume-uuid #f)
|
||||
register-closures? (closures '()))
|
||||
#:key (volume-id "GuixSD") (volume-uuid #f))
|
||||
"Given a GRUB package, creates an iso image as TARGET, using CONFIG-FILE as
|
||||
GRUB configuration and OS-DRV as the stuff in it."
|
||||
(define grub-mkrescue
|
||||
(string-append grub "/bin/grub-mkrescue"))
|
||||
|
||||
(define target-store
|
||||
(string-append "/tmp/root" (%store-directory)))
|
||||
|
||||
(define items
|
||||
;; The store items to add to the image.
|
||||
(delete-duplicates
|
||||
(append-map (lambda (closure)
|
||||
(map store-info-item
|
||||
(call-with-input-file (string-append "/xchg/" closure)
|
||||
read-reference-graph)))
|
||||
closures)))
|
||||
|
||||
(populate-root-file-system os-drv "/tmp/root")
|
||||
(mount (%store-directory) target-store "" MS_BIND)
|
||||
|
||||
(when register-closures?
|
||||
(display "registering closures...\n")
|
||||
(for-each (lambda (closure)
|
||||
(register-closure
|
||||
"/tmp/root"
|
||||
(string-append "/xchg/" closure)
|
||||
|
||||
;; TARGET-STORE is a read-only bind-mount so we shouldn't try
|
||||
;; to modify it.
|
||||
#:deduplicate? #f
|
||||
#:reset-timestamps? #f))
|
||||
closures)
|
||||
(register-bootcfg-root "/tmp/root" config-file))
|
||||
|
||||
(let ((pipe
|
||||
(apply open-pipe* OPEN_WRITE
|
||||
grub-mkrescue "-o" target
|
||||
(string-append "boot/grub/grub.cfg=" config-file)
|
||||
"etc=/tmp/root/etc"
|
||||
"var=/tmp/root/var"
|
||||
"run=/tmp/root/run"
|
||||
;; /mnt is used as part of the installation
|
||||
;; process, as the mount point for the target
|
||||
;; file system, so create it.
|
||||
"mnt=/tmp/root/mnt"
|
||||
"-path-list" "-"
|
||||
"--"
|
||||
"-volid" (string-upcase volume-id)
|
||||
(if volume-uuid
|
||||
`("-volume_date" "uuid"
|
||||
,(string-filter (lambda (value)
|
||||
(not (char=? #\- value)))
|
||||
(iso9660-uuid->string
|
||||
volume-uuid)))
|
||||
`()))))
|
||||
;; Pass lines like 'gnu/store/…-x=/gnu/store/…-x' corresponding to the
|
||||
;; '-path-list -' option.
|
||||
(for-each (lambda (item)
|
||||
(format pipe "~a=~a~%"
|
||||
(string-drop item 1) item))
|
||||
items)
|
||||
(unless (zero? (close-pipe pipe))
|
||||
(error "oh, my! grub-mkrescue failed" grub-mkrescue))))
|
||||
Grub configuration and OS-DRV as the stuff in it."
|
||||
(let ((grub-mkrescue (string-append grub "/bin/grub-mkrescue")))
|
||||
(mkdir-p "/tmp/root/var/run")
|
||||
(mkdir-p "/tmp/root/run")
|
||||
(unless (zero? (apply system*
|
||||
`(,grub-mkrescue "-o" ,target
|
||||
,(string-append "boot/grub/grub.cfg=" config-file)
|
||||
,(string-append "gnu/store=" os-drv "/..")
|
||||
"var=/tmp/root/var"
|
||||
"run=/tmp/root/run"
|
||||
"--"
|
||||
"-volid" ,(string-upcase volume-id)
|
||||
,@(if volume-uuid
|
||||
`("-volume_date" "uuid"
|
||||
,(string-filter (lambda (value)
|
||||
(not (char=? #\- value)))
|
||||
(iso9660-uuid->string
|
||||
volume-uuid)))
|
||||
`()))))
|
||||
(error "failed to create ISO9660 image"))))
|
||||
|
||||
(define* (initialize-hard-disk device
|
||||
#:key
|
||||
@@ -527,14 +427,11 @@ passing it a directory name where it is mounted."
|
||||
|
||||
;; Create a tiny configuration file telling the embedded grub
|
||||
;; where to load the real thing.
|
||||
;; XXX This is quite fragile, and can prevent the image from booting
|
||||
;; when there's more than one volume with this label present.
|
||||
;; Reproducible almost-UUIDs could reduce the risk (not eliminate it).
|
||||
(call-with-output-file grub-config
|
||||
(lambda (port)
|
||||
(format port
|
||||
"insmod part_msdos~@
|
||||
search --set=root --label GuixSD_image~@
|
||||
search --set=root --label gnu-disk-image~@
|
||||
configfile /boot/grub/grub.cfg~%")))
|
||||
|
||||
(display "creating EFI firmware image...")
|
||||
|
||||
+204
-293
File diff suppressed because it is too large
Load Diff
+11
-32
@@ -1,5 +1,5 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2013 Mark H Weaver <mhw@netris.org>
|
||||
;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
|
||||
;;; Copyright © 2016, 2017 Alex Kost <alezost@gmail.com>
|
||||
@@ -110,25 +110,8 @@ for system '~a'")
|
||||
file-name system)))))))
|
||||
|
||||
(define %distro-root-directory
|
||||
;; Absolute file name of the module hierarchy. Since (gnu packages …) might
|
||||
;; live in a directory different from (guix), try to get the best match.
|
||||
(letrec-syntax ((dirname* (syntax-rules ()
|
||||
((_ file)
|
||||
(dirname file))
|
||||
((_ file head tail ...)
|
||||
(dirname (dirname* file tail ...)))))
|
||||
(try (syntax-rules ()
|
||||
((_ (file things ...) rest ...)
|
||||
(match (search-path %load-path file)
|
||||
(#f
|
||||
(try rest ...))
|
||||
(absolute
|
||||
(dirname* absolute things ...))))
|
||||
((_)
|
||||
#f))))
|
||||
(try ("gnu/packages/base.scm" gnu/ packages/)
|
||||
("gnu/packages.scm" gnu/)
|
||||
("guix.scm"))))
|
||||
;; Absolute file name of the module hierarchy.
|
||||
(dirname (search-path %load-path "guix.scm")))
|
||||
|
||||
(define %package-module-path
|
||||
;; Search path for package modules. Each item must be either a directory
|
||||
@@ -157,21 +140,17 @@ for system '~a'")
|
||||
directory))
|
||||
%load-path)))
|
||||
|
||||
(define* (fold-packages proc init
|
||||
#:optional
|
||||
(modules (all-modules (%package-module-path)
|
||||
#:warn
|
||||
warn-about-load-error))
|
||||
#:key (select? (negate hidden-package?)))
|
||||
"Call (PROC PACKAGE RESULT) for each available package defined in one of
|
||||
MODULES that matches SELECT?, using INIT as the initial value of RESULT. It
|
||||
is guaranteed to never traverse the same package twice."
|
||||
(define (fold-packages proc init)
|
||||
"Call (PROC PACKAGE RESULT) for each available package, using INIT as
|
||||
the initial value of RESULT. It is guaranteed to never traverse the
|
||||
same package twice."
|
||||
(fold-module-public-variables (lambda (object result)
|
||||
(if (and (package? object) (select? object))
|
||||
(if (and (package? object)
|
||||
(not (hidden-package? object)))
|
||||
(proc object result)
|
||||
result))
|
||||
init
|
||||
modules))
|
||||
(all-modules (%package-module-path))))
|
||||
|
||||
(define find-packages-by-name
|
||||
(let ((packages (delay
|
||||
@@ -188,7 +167,7 @@ decreasing version order."
|
||||
version>?)))
|
||||
(if version
|
||||
(filter (lambda (package)
|
||||
(version-prefix? version (package-version package)))
|
||||
(string-prefix? version (package-version package)))
|
||||
matching)
|
||||
matching)))))
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
;; the tests to pass.
|
||||
#:tests? #f
|
||||
#:make-flags
|
||||
(list "CXXFLAGS=-std=c++11" "gtk_update_icon_cache=true")))
|
||||
(list "CXXFLAGS=-std=c++11")))
|
||||
(inputs
|
||||
`(("boost" ,boost)
|
||||
("enchant" ,enchant)
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2017 Nils Gillmann <ng0@n0.is>
|
||||
;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at>
|
||||
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||
;;; Copyright © 2017 ng0 <ng0@no-reply.pragmatique.xyz>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
@@ -22,8 +20,6 @@
|
||||
#:use-module ((guix licenses) #:prefix license:)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (guix download)
|
||||
#:use-module (guix git-download)
|
||||
#:use-module (guix build-system gnu)
|
||||
#:use-module (guix build-system glib-or-gtk)
|
||||
#:use-module (gnu packages)
|
||||
#:use-module (gnu packages xml)
|
||||
@@ -33,8 +29,7 @@
|
||||
#:use-module (gnu packages xorg)
|
||||
#:use-module (gnu packages gettext)
|
||||
#:use-module (gnu packages glib)
|
||||
#:use-module (gnu packages pkg-config)
|
||||
#:use-module (gnu packages libusb))
|
||||
#:use-module (gnu packages pkg-config))
|
||||
|
||||
(define-public florence
|
||||
(package
|
||||
@@ -81,44 +76,3 @@ available to help to click.")
|
||||
;; The documentation is under FDL1.2, but we do not install the
|
||||
;; documentation.
|
||||
(license license:gpl2+)))
|
||||
|
||||
(define-public footswitch
|
||||
(let ((commit "ca43d53fc2002520cc825d119702afc124303e73")
|
||||
(revision "2"))
|
||||
(package
|
||||
(name "footswitch")
|
||||
(version (git-version "0.1" revision commit))
|
||||
(source (origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/rgerganov/footswitch")
|
||||
(commit commit)))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32
|
||||
"14pyzc4ws1mj859xs9n4x83wzxxvd3bh5bdxzr6nv267xwx1mq68"))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs
|
||||
`(("pkg-config" ,pkg-config)))
|
||||
(inputs
|
||||
`(("hidapi" ,hidapi)))
|
||||
(arguments
|
||||
`(#:tests? #f ; no tests
|
||||
#:make-flags (list "CC=gcc")
|
||||
#:phases (modify-phases %standard-phases
|
||||
(delete 'configure)
|
||||
;; Install target in the Makefile does not work for Guix
|
||||
(replace 'install
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let ((bin (string-append (assoc-ref outputs "out")
|
||||
"/bin")))
|
||||
(install-file "footswitch" bin)
|
||||
(install-file "scythe" bin)
|
||||
#t))))))
|
||||
(home-page "https://github.com/rgerganov/footswitch")
|
||||
(synopsis "Command line utility for PCsensor foot switch")
|
||||
(description
|
||||
"Command line utility for programming foot switches sold by PCsensor.
|
||||
It works for both single pedal devices and three pedal devices. All supported
|
||||
devices have vendorId:productId = 0c45:7403 or 0c45:7404.")
|
||||
(license license:expat))))
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
(define-public acct
|
||||
(package
|
||||
(name "acct")
|
||||
(version "6.6.4")
|
||||
(version "6.6.3")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
@@ -33,7 +33,7 @@
|
||||
version ".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"0gv6m8giazshvgpvwbng98chpas09myyfw1zr2y7hqxib0mvy5ac"))))
|
||||
"14x0zklwlg7cc7amlyzffqr8az3fqj1h9dyj0hvl1kpi7cr7kbjy"))))
|
||||
(build-system gnu-build-system)
|
||||
(home-page "https://gnu.org/software/acct/")
|
||||
(synopsis "Standard login and process accounting utilities")
|
||||
|
||||
+15
-40
@@ -1,9 +1,7 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
|
||||
;;; Copyright © 2014, 2018 Mark H Weaver <mhw@netris.org>
|
||||
;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
|
||||
;;; Copyright © 2014 Andreas Enge <andreas@enge.fr>
|
||||
;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
|
||||
;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
@@ -43,50 +41,27 @@
|
||||
(sha256
|
||||
(base32
|
||||
"08qd9s3wfhv0ajswsylnfwr5h0d7j9d4rgip855nrh400nxp940p"))
|
||||
(patches (search-patches "acl-fix-perl-regex.patch"
|
||||
"acl-hurd-path-max.patch"))))
|
||||
(patches (search-patches "acl-hurd-path-max.patch"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
`(#:test-target "tests"
|
||||
#:modules ((ice-9 ftw)
|
||||
,@%gnu-build-system-modules)
|
||||
`(#:tests? #f ; FIXME: Investigate test suite failures
|
||||
#:test-target "tests"
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
;; XXX After repacking the sources the timestamps are reset to the
|
||||
;; epoch, which leads to a failure in gzipping the CHANGES file.
|
||||
(add-after 'unpack 'ensure-no-mtimes-pre-1980
|
||||
(lambda _
|
||||
(let ((early-1980 315619200)) ; 1980-01-02 UTC
|
||||
(ftw "." (lambda (file stat flag)
|
||||
(unless (<= early-1980 (stat:mtime stat))
|
||||
(utime file early-1980 early-1980))
|
||||
#t))
|
||||
#t)))
|
||||
(add-after 'build 'patch-exec-bin-sh
|
||||
(lambda _
|
||||
(substitute* "test/run"
|
||||
(("/bin/sh") (which "sh")))
|
||||
#t))
|
||||
(add-before 'check 'patch-tests
|
||||
(lambda _
|
||||
;; The coreutils do not have an ACL bit to remove from their
|
||||
;; output, so the sed expression that removes the bit is disabled.
|
||||
(substitute* "test/sbits-restore.test"
|
||||
(("\\| sed.*'") ""))
|
||||
;; These tests require the existence of a user named "bin", but
|
||||
;; this user does not exist within Guix's build environment.
|
||||
(for-each (lambda (file)
|
||||
(delete-file (string-append "test/" file)))
|
||||
'("setfacl-X.test" "cp.test" "misc.test"))
|
||||
#t))
|
||||
(replace 'install
|
||||
(lambda _
|
||||
(invoke "make" "install" "install-lib" "install-dev"))))))
|
||||
(alist-cons-after
|
||||
'build 'patch-exec-bin-sh
|
||||
(lambda _
|
||||
(substitute* "test/run"
|
||||
(("/bin/sh") (which "sh"))))
|
||||
(alist-replace
|
||||
'install
|
||||
(lambda _
|
||||
(zero? (system* "make" "install" "install-lib" "install-dev")))
|
||||
%standard-phases))))
|
||||
(inputs `(("attr" ,attr)))
|
||||
(native-inputs
|
||||
`(("gettext" ,gettext-minimal)
|
||||
("perl" ,perl)))
|
||||
(home-page "https://savannah.nongnu.org/projects/acl")
|
||||
(home-page "http://savannah.nongnu.org/projects/acl")
|
||||
(synopsis
|
||||
"Library and tools for manipulating access control lists")
|
||||
(description
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2018 Danny Milosavljevic <dannym@scratchpost.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 ada)
|
||||
#:use-module ((guix licenses) #:prefix license:)
|
||||
#:use-module (guix build-system gnu)
|
||||
#:use-module (guix build-system python)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (guix download)
|
||||
#:use-module (guix git-download)
|
||||
#:use-module (gnu packages)
|
||||
#:use-module (gnu packages check)
|
||||
#:use-module (gnu packages compression)
|
||||
#:use-module (gnu packages python))
|
||||
|
||||
(define-public python2-langkit
|
||||
(let ((commit "fe0bc8bf60dbd2937759810df76ac420d99fc15f")
|
||||
(revision "0"))
|
||||
(package
|
||||
(name "python2-langkit")
|
||||
(version (git-version "0.0.0" revision commit))
|
||||
(source (origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/AdaCore/langkit.git")
|
||||
(commit commit)))
|
||||
(sha256
|
||||
(base32
|
||||
"1abqgw2p8pb1pm54my5kkbbixfhc6l0bwajdv1xlzyrh31xki3wx"))
|
||||
(file-name (string-append name "-" version "-checkout"))))
|
||||
(build-system python-build-system)
|
||||
(propagated-inputs
|
||||
`(("python2-docutils" ,python2-docutils)
|
||||
("python2-enum34" ,python2-enum34)
|
||||
("python2-funcy" ,python2-funcy)
|
||||
("python2-mako" ,python2-mako)))
|
||||
(arguments
|
||||
`(#:python ,python-2
|
||||
#:tests? #f)) ; Tests would requite gprbuild (Ada).
|
||||
(synopsis "Semantic analysis tool generator in Python")
|
||||
(description "@code{Langkit} is a tool whose purpose is to make it easy
|
||||
to create syntactic and semantic analysis engines. Write a language
|
||||
specification in our Python DSL and Langkit will generate for you an
|
||||
Ada library with bindings for the C and Python programming languages.")
|
||||
(home-page "https://github.com/AdaCore/langkit/")
|
||||
(license license:gpl3+)))) ; and gcc runtime library exception
|
||||
|
||||
(define-public python2-libadalang
|
||||
(let ((commit "9b205e9bacdd50a68117727332e16fbef5f6ac49")
|
||||
(revision "0"))
|
||||
(package
|
||||
(name "python2-libadalang")
|
||||
(version (git-version "0.0.0" revision commit))
|
||||
(source (origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/AdaCore/libadalang.git")
|
||||
(commit commit)))
|
||||
(sha256
|
||||
(base32
|
||||
"06hsnzj2syqpq2yhg1bb0zil7ydbyqkdmkjbf8j9b5sdgkyh5xrp"))
|
||||
(file-name (string-append name "-" version "-checkout"))))
|
||||
(build-system python-build-system)
|
||||
(native-inputs
|
||||
`(("python2-langkit" ,python2-langkit)
|
||||
("python2-quex" ,python2-quex-0.67.3)))
|
||||
(arguments
|
||||
`(#:python ,python-2
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(replace 'build
|
||||
(lambda _
|
||||
(invoke "python2" "ada/manage.py" "generate")
|
||||
(invoke "python2" "ada/manage.py" "build")))
|
||||
(replace 'check
|
||||
(lambda _
|
||||
(invoke "python2" "ada/manage.py" "test")))
|
||||
(replace 'install
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out")))
|
||||
(invoke "python2" "ada/manage.py" "install" out)))))))
|
||||
(synopsis "Semantic Analysis for Ada in Python")
|
||||
(description "@code{libadalang} provides a high-performance semantic
|
||||
engine for the Ada programming language.")
|
||||
(home-page "https://github.com/AdaCore/libadalang")
|
||||
(license license:gpl3)))) ; and gcc runtime gcc lib exception
|
||||
+400
-867
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2015, 2016, 2018 Efraim Flashner <efraim@flashner.co.il>
|
||||
;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
@@ -59,7 +59,7 @@ scripts.")
|
||||
(define-public c-ares
|
||||
(package
|
||||
(name "c-ares")
|
||||
(version "1.14.0")
|
||||
(version "1.13.0")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append
|
||||
@@ -67,7 +67,7 @@ scripts.")
|
||||
".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"0vnwmbvymw677k780kpb6sb8i3szdp89rzy8mz1fwg1657yw3ls5"))))
|
||||
"19qxhv9aiw903fr808y77r6l9js0fq9m3gcaqckan9jan7qhixq3"))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs
|
||||
`(("pkg-config" ,pkg-config)))
|
||||
@@ -79,4 +79,4 @@ 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 "https://c-ares.haxx.se/license.html"))))
|
||||
(license (x11-style "http://c-ares.haxx.se/license.html"))))
|
||||
|
||||
@@ -1,86 +0,0 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2018 Alex ter Weele <alex.ter.weele@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 agda)
|
||||
#:use-module (gnu packages haskell)
|
||||
#:use-module (gnu packages haskell-check)
|
||||
#:use-module (gnu packages haskell-web)
|
||||
#:use-module (guix build-system haskell)
|
||||
#:use-module (guix build-system trivial)
|
||||
#:use-module (guix download)
|
||||
#:use-module ((guix licenses) #:prefix license:)
|
||||
#:use-module (guix packages))
|
||||
|
||||
(define-public agda
|
||||
(package
|
||||
(name "agda")
|
||||
(version "2.5.3")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (string-append
|
||||
"https://hackage.haskell.org/package/Agda/Agda-"
|
||||
version ".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"0r80vw7vnvbgq47y50v050malv7zvv2p2kg6f47i04r0b2ix855a"))))
|
||||
(build-system haskell-build-system)
|
||||
(inputs
|
||||
`(("cpphs" ,cpphs)
|
||||
("ghc-alex" ,ghc-alex)
|
||||
("ghc-async" ,ghc-async)
|
||||
("ghc-blaze-html" ,ghc-blaze-html)
|
||||
("ghc-boxes" ,ghc-boxes)
|
||||
("ghc-data-hash" ,ghc-data-hash)
|
||||
("ghc-edisoncore" ,ghc-edisoncore)
|
||||
("ghc-edit-distance" ,ghc-edit-distance)
|
||||
("ghc-equivalence" ,ghc-equivalence)
|
||||
("ghc-geniplate-mirror" ,ghc-geniplate-mirror)
|
||||
("ghc-gitrev" ,ghc-gitrev)
|
||||
("ghc-happy" ,ghc-happy)
|
||||
("ghc-hashable" ,ghc-hashable)
|
||||
("ghc-hashtables" ,ghc-hashtables)
|
||||
("ghc-ieee754" ,ghc-ieee754)
|
||||
("ghc-monadplus" ,ghc-monadplus)
|
||||
("ghc-mtl" ,ghc-mtl)
|
||||
("ghc-murmur-hash" ,ghc-murmur-hash)
|
||||
("ghc-uri-encode" ,ghc-uri-encode)
|
||||
("ghc-parallel" ,ghc-parallel)
|
||||
("ghc-regex-tdfa" ,ghc-regex-tdfa)
|
||||
("ghc-stm" ,ghc-stm)
|
||||
("ghc-strict" ,ghc-strict)
|
||||
("ghc-text" ,ghc-text)
|
||||
("ghc-unordered-containers" ,ghc-unordered-containers)
|
||||
("ghc-zlib" ,ghc-zlib)))
|
||||
(home-page "http://wiki.portal.chalmers.se/agda/")
|
||||
(synopsis
|
||||
"Dependently typed functional programming language and proof assistant")
|
||||
(description
|
||||
"Agda is a dependently typed functional programming language: it has
|
||||
inductive families, which are similar to Haskell's GADTs, but they can be
|
||||
indexed by values and not just types. It also has parameterised modules,
|
||||
mixfix operators, Unicode characters, and an interactive Emacs interface (the
|
||||
type checker can assist in the development of your code). Agda is also a
|
||||
proof assistant: it is an interactive system for writing and checking proofs.
|
||||
Agda is based on intuitionistic type theory, a foundational system for
|
||||
constructive mathematics developed by the Swedish logician Per Martin-Löf. It
|
||||
has many similarities with other proof assistants based on dependent types,
|
||||
such as Coq, Epigram and NuPRL.")
|
||||
;; Agda is distributed under the MIT license, and a couple of
|
||||
;; source files are BSD-3. See LICENSE for details.
|
||||
(license (list license:expat license:bsd-3))))
|
||||
+3
-27
@@ -1,8 +1,6 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2014 John Darringon <jmd@gnu.org>
|
||||
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
|
||||
;;; Copyright © 2017 Hartmut Goebel <h.goebel@crazy-compilers.com>
|
||||
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
@@ -52,15 +50,15 @@ formats.")
|
||||
(define-public qrencode
|
||||
(package
|
||||
(name "qrencode")
|
||||
(version "4.0.2")
|
||||
(version "3.4.4")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append
|
||||
"https://fukuchi.org/works/qrencode/qrencode-" version
|
||||
".tar.bz2"))
|
||||
".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"1d2q5d3v8g3hsi3h5jq4n177bjhf3kawms09immw7p187f6jgjy9"))))
|
||||
"0wiagx7i8p9zal53smf5abrnh9lr31mv0p36wg017401jrmf5577"))))
|
||||
(build-system gnu-build-system)
|
||||
(inputs `(("libpng" ,libpng)))
|
||||
(native-inputs `(("pkg-config" ,pkg-config)))
|
||||
@@ -71,25 +69,3 @@ 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")))
|
||||
|
||||
(define-public libdmtx
|
||||
(package
|
||||
(name "libdmtx")
|
||||
(version "0.7.4")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (string-append
|
||||
"mirror://sourceforge/libdmtx/" name "/" version "/"
|
||||
name "-" version ".tar.bz2"))
|
||||
(sha256
|
||||
(base32 "0xnxx075ycy58n92yfda2z9zgd41h3d4ik5d9l197lzsqim5hb5n"))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs
|
||||
`(("pkg-config" ,pkg-config)))
|
||||
(home-page "http://libdmtx.sourceforge.net/")
|
||||
(synopsis "Library for reading and writing Data Matrix 2D barcodes")
|
||||
(description "libdmtx is software for reading and writing Data Matrix 2D
|
||||
barcodes on Linux and Unix. At its core libdmtx is a shared library, allowing
|
||||
C/C++ programs to use its capabilities without restrictions or overhead.")
|
||||
(license license:bsd-3)))
|
||||
|
||||
+76
-233
@@ -1,13 +1,11 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Andreas Enge <andreas@enge.fr>
|
||||
;;; Copyright © 2013, 2015, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2016, 2017, 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
|
||||
;;; Copyright © 2014, 2018 Mark H Weaver <mhw@netris.org>
|
||||
;;; Copyright © 2016, 2018 Ricardo Wurmus <rekado@elephly.net>
|
||||
;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
|
||||
;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||
;;; Copyright © 2013, 2015, 2017 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2016, 2017 Nicolas Goaziou <mail@nicolasgoaziou.fr>
|
||||
;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
|
||||
;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
|
||||
;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||
;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
|
||||
;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
@@ -27,9 +25,7 @@
|
||||
(define-module (gnu packages algebra)
|
||||
#:use-module (gnu packages)
|
||||
#:use-module (gnu packages autotools)
|
||||
#:use-module (gnu packages check)
|
||||
#:use-module (gnu packages compression)
|
||||
#:use-module (gnu packages cpp)
|
||||
#:use-module (gnu packages documentation)
|
||||
#:use-module (gnu packages ed)
|
||||
#:use-module (gnu packages flex)
|
||||
@@ -37,7 +33,6 @@
|
||||
#:use-module (gnu packages gl)
|
||||
#:use-module (gnu packages graphviz)
|
||||
#:use-module (gnu packages image)
|
||||
#:use-module (gnu packages java)
|
||||
#:use-module (gnu packages maths)
|
||||
#:use-module (gnu packages mpi)
|
||||
#:use-module (gnu packages multiprecision)
|
||||
@@ -49,11 +44,9 @@
|
||||
#:use-module (gnu packages texinfo)
|
||||
#:use-module (gnu packages xiph)
|
||||
#:use-module (gnu packages xorg)
|
||||
#:use-module (guix build-system ant)
|
||||
#:use-module (guix build-system gnu)
|
||||
#:use-module (guix build-system cmake)
|
||||
#:use-module (guix download)
|
||||
#:use-module (guix git-download)
|
||||
#:use-module ((guix licenses) #:prefix license:)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (guix utils))
|
||||
@@ -62,15 +55,15 @@
|
||||
(define-public mpfrcx
|
||||
(package
|
||||
(name "mpfrcx")
|
||||
(version "0.5")
|
||||
(version "0.4.2")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append
|
||||
"http://www.multiprecision.org/downloads/mpfrcx-"
|
||||
"http://www.multiprecision.org/mpfrcx/download/mpfrcx-"
|
||||
version ".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"1s968480ymv6w0rnvfp9mxvx98hvi29fkvw8nk4ggzc6azxgwybs"))))
|
||||
"0grw66b255r574lvll1bqccm5myj2m8ajzsjaygcyq9zjnnbnhhy"))))
|
||||
(build-system gnu-build-system)
|
||||
(propagated-inputs
|
||||
`(("gmp" ,gmp)
|
||||
@@ -84,7 +77,7 @@ on the rounding. For the time being, only the few functions needed to
|
||||
implement the floating point approach to complex multiplication are
|
||||
implemented. On the other hand, these comprise asymptotically fast
|
||||
multiplication routines such as Toom–Cook and the FFT.")
|
||||
(license license:lgpl3+)
|
||||
(license license:lgpl2.1+)
|
||||
(home-page "http://mpfrcx.multiprecision.org/")))
|
||||
|
||||
(define-public cm
|
||||
@@ -139,15 +132,15 @@ solve the shortest vector problem.")
|
||||
(define-public pari-gp
|
||||
(package
|
||||
(name "pari-gp")
|
||||
(version "2.9.4")
|
||||
(version "2.9.2")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append
|
||||
"https://pari.math.u-bordeaux.fr/pub/pari/unix/pari-"
|
||||
"http://pari.math.u-bordeaux.fr/pub/pari/unix/pari-"
|
||||
version ".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"0ir6m3a8r46md5x6zk4xf159qra7aqparby9zk03k81hjrrxr72g"))))
|
||||
"0zi08qz9nk17wwdna4xb2vp3i3mh5sgv1y8wqbf0j2sfryxlr8ls"))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs `(("texlive" ,texlive-tiny)))
|
||||
(inputs `(("gmp" ,gmp)
|
||||
@@ -174,7 +167,7 @@ polynomials, power series, algebraic numbers, etc., and a lot of
|
||||
transcendental functions.
|
||||
PARI is also available as a C library to allow for faster computations.")
|
||||
(license license:gpl2+)
|
||||
(home-page "https://pari.math.u-bordeaux.fr/")))
|
||||
(home-page "http://pari.math.u-bordeaux.fr/")))
|
||||
|
||||
(define-public gp2c
|
||||
(package
|
||||
@@ -183,7 +176,7 @@ PARI is also available as a C library to allow for faster computations.")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append
|
||||
"https://pari.math.u-bordeaux.fr/pub/pari/GP2C/gp2c-"
|
||||
"http://pari.math.u-bordeaux.fr/pub/pari/GP2C/gp2c-"
|
||||
version ".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
@@ -208,12 +201,12 @@ PARI is also available as a C library to allow for faster computations.
|
||||
|
||||
GP2C, the GP to C compiler, translates GP scripts to PARI programs.")
|
||||
(license license:gpl2)
|
||||
(home-page "https://pari.math.u-bordeaux.fr/")))
|
||||
(home-page "http://pari.math.u-bordeaux.fr/")))
|
||||
|
||||
(define-public giac-xcas
|
||||
(package
|
||||
(name "giac-xcas")
|
||||
(version "1.4.9-59")
|
||||
(version "1.2.3-51")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
;; "~parisse/giac" is not used because the maintainer regularly
|
||||
@@ -225,7 +218,7 @@ GP2C, the GP to C compiler, translates GP scripts to PARI programs.")
|
||||
"source/giac_" version ".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"0dv5p5y6gkrsmz3xa7fw87rjyabwdwk09mqb09kb7gai9n9dgayk"))))
|
||||
"1w7d4sdjbvqiibnfkhrqy9np3smsysilfba9pry3q1qn5g5y6nrp"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
`(#:phases
|
||||
@@ -235,6 +228,13 @@ GP2C, the GP to C compiler, translates GP scripts to PARI programs.")
|
||||
;; 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)
|
||||
@@ -315,7 +315,7 @@ fast arithmetic.")
|
||||
(define-public arb
|
||||
(package
|
||||
(name "arb")
|
||||
(version "2.12.0")
|
||||
(version "2.10.0")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append
|
||||
@@ -324,7 +324,7 @@ fast arithmetic.")
|
||||
(file-name (string-append name "-" version ".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"0j37xkxbqpra4sf0a96x4sqbl5fkal8d7c94bi9wdsqqj6kgcsil"))))
|
||||
"0jwcv9ssvi8axb1y7m2h4ykgyl015cl6g28gfl92l4dgnag585ak"))))
|
||||
(build-system gnu-build-system)
|
||||
(propagated-inputs
|
||||
`(("flint" ,flint))) ; flint.h is included by arf.h
|
||||
@@ -333,21 +333,22 @@ fast arithmetic.")
|
||||
("mpfr" ,mpfr)))
|
||||
(arguments
|
||||
`(#:phases
|
||||
(modify-phases %standard-phases
|
||||
(replace 'configure
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
(let ((out (assoc-ref outputs "out"))
|
||||
(flint (assoc-ref inputs "flint"))
|
||||
(gmp (assoc-ref inputs "gmp"))
|
||||
(mpfr (assoc-ref inputs "mpfr")))
|
||||
;; do not pass "--enable-fast-install", which makes the
|
||||
;; homebrew configure process fail
|
||||
(zero? (system*
|
||||
"./configure"
|
||||
(string-append "--prefix=" out)
|
||||
(string-append "--with-flint=" flint)
|
||||
(string-append "--with-gmp=" gmp)
|
||||
(string-append "--with-mpfr=" mpfr)))))))))
|
||||
(alist-replace
|
||||
'configure
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
(let ((out (assoc-ref outputs "out"))
|
||||
(flint (assoc-ref inputs "flint"))
|
||||
(gmp (assoc-ref inputs "gmp"))
|
||||
(mpfr (assoc-ref inputs "mpfr")))
|
||||
;; do not pass "--enable-fast-install", which makes the
|
||||
;; homebrew configure process fail
|
||||
(zero? (system*
|
||||
"./configure"
|
||||
(string-append "--prefix=" out)
|
||||
(string-append "--with-flint=" flint)
|
||||
(string-append "--with-gmp=" gmp)
|
||||
(string-append "--with-mpfr=" mpfr)))))
|
||||
%standard-phases)))
|
||||
(synopsis "Arbitrary precision floating-point ball arithmetic")
|
||||
(description
|
||||
"Arb is a C library for arbitrary-precision floating-point ball
|
||||
@@ -440,14 +441,14 @@ geometry and singularity theory.")
|
||||
(define-public gmp-ecm
|
||||
(package
|
||||
(name "gmp-ecm")
|
||||
(version "7.0.4")
|
||||
(version "7.0")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
;; Use the ‘Latest version’ link for a stable URI across releases.
|
||||
(uri (string-append "https://gforge.inria.fr/frs/download.php/"
|
||||
"latestfile/160/ecm-" version ".tar.gz"))
|
||||
(sha256 (base32
|
||||
"0hxs24c2m3mh0nq1zz63z3sb7dhy1rilg2s1igwwcb26x3pb7xqc"))))
|
||||
(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)))
|
||||
@@ -478,6 +479,7 @@ binary.")
|
||||
(base32
|
||||
"0amh9ik44jfg66csyvf4zz1l878c4755kjndq9j0270akflgrbb2"))))
|
||||
(build-system gnu-build-system)
|
||||
(inputs `(("readline" ,readline)))
|
||||
(native-inputs
|
||||
`(("ed" ,ed)
|
||||
("flex" ,flex)
|
||||
@@ -523,38 +525,28 @@ a C program.")
|
||||
(define-public fftw
|
||||
(package
|
||||
(name "fftw")
|
||||
(version "3.3.7")
|
||||
(version "3.3.5")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "ftp://ftp.fftw.org/pub/fftw/fftw-"
|
||||
version".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"0wsms8narnbhfsa8chdflv2j9hzspvflblnqdn7hw8x5xdzrnq1v"))))
|
||||
"1kwbx92ps0r7s2mqy7lxbxanslxdzj7dp7r7gmdkzv1j8yqf3kwf"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
`(#:configure-flags
|
||||
'("--enable-shared" "--enable-openmp" "--enable-threads"
|
||||
,@(let ((system (or (%current-target-system) (%current-system))))
|
||||
;; Enable SIMD extensions for codelets. See details at:
|
||||
;; <http://fftw.org/fftw3_doc/Installation-on-Unix.html>.
|
||||
(cond
|
||||
((string-prefix? "x86_64" system)
|
||||
'("--enable-sse2" "--enable-avx" "--enable-avx2"
|
||||
"--enable-avx512" "--enable-avx-128-fma"))
|
||||
((string-prefix? "i686" system)
|
||||
'("--enable-sse2"))
|
||||
((string-prefix? "aarch64" system)
|
||||
;; Note that fftw supports NEON on 32-bit ARM only when
|
||||
;; compiled for single-precision.
|
||||
'("--enable-neon"))
|
||||
(else
|
||||
'())))
|
||||
;; By default '-mtune=native' is used. However, that may cause the
|
||||
;; use of ISA extensions (e.g. AVX) that are not necessarily
|
||||
;; available on the user's machine when that package is built on a
|
||||
;; different machine.
|
||||
"ax_cv_c_flags__mtune_native=no")))
|
||||
'(#:configure-flags
|
||||
'("--enable-shared" "--enable-openmp" "--enable-threads")
|
||||
#:phases (alist-cons-before
|
||||
'build 'no-native
|
||||
(lambda _
|
||||
;; By default '-mtune=native' is used. However, that may
|
||||
;; cause the use of ISA extensions (SSE2, etc.) that are
|
||||
;; not necessarily available on the user's machine when
|
||||
;; that package is built on a different machine.
|
||||
(substitute* (find-files "." "Makefile$")
|
||||
(("-mtune=native") "")))
|
||||
%standard-phases)))
|
||||
(native-inputs `(("perl" ,perl)))
|
||||
(home-page "http://fftw.org")
|
||||
(synopsis "Computing the discrete Fourier transform")
|
||||
@@ -570,15 +562,8 @@ cosine/ sine transforms or DCT/DST).")
|
||||
(name "fftwf")
|
||||
(arguments
|
||||
(substitute-keyword-arguments (package-arguments fftw)
|
||||
((#:configure-flags fftw-configure-flags)
|
||||
`(cons* "--enable-single"
|
||||
,@(if (string-prefix? "arm" (or (%current-target-system)
|
||||
(%current-system)))
|
||||
;; fftw supports NEON on 32-bit ARM only when compiled
|
||||
;; for single-precision, so add it here.
|
||||
'("--enable-neon")
|
||||
'())
|
||||
,fftw-configure-flags))))
|
||||
((#:configure-flags cf)
|
||||
`(cons "--enable-float" ,cf))))
|
||||
(description
|
||||
(string-append (package-description fftw)
|
||||
" Single-precision version."))))
|
||||
@@ -597,137 +582,30 @@ cosine/ sine transforms or DCT/DST).")
|
||||
(string-append (package-description fftw)
|
||||
" With OpenMPI parallelism support."))))
|
||||
|
||||
(define-public java-la4j
|
||||
(package
|
||||
(name "java-la4j")
|
||||
(version "0.6.0")
|
||||
(source (origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/vkostyukov/la4j.git")
|
||||
(commit version)))
|
||||
(file-name (string-append name "-" version "-checkout"))
|
||||
(sha256
|
||||
(base32
|
||||
"1qir8dr978cfvz9k12m2kbdwpyf6cqdf1d0ilb7lnkhbgq5i53w3"))))
|
||||
(build-system ant-build-system)
|
||||
(arguments
|
||||
`(#:jar-name "la4j.jar"
|
||||
#:jdk ,icedtea-8
|
||||
#:test-exclude (list "**/Abstract*.java"
|
||||
"**/MatrixTest.java"
|
||||
"**/DenseMatrixTest.java"
|
||||
"**/SparseMatrixTest.java"
|
||||
"**/VectorTest.java"
|
||||
"**/SparseVectorTest.java"
|
||||
"**/DenseVectorTest.java")))
|
||||
(native-inputs
|
||||
`(("java-junit" ,java-junit)
|
||||
("java-hamcrest-core" ,java-hamcrest-core)))
|
||||
(home-page "http://la4j.org/")
|
||||
(synopsis "Java library that provides Linear Algebra primitives and algorithms")
|
||||
(description "The la4j library is a Java library that provides Linear
|
||||
Algebra primitives (matrices and vectors) and algorithms. The key features of
|
||||
the la4j library are:
|
||||
|
||||
@itemize
|
||||
@item No dependencies and tiny size
|
||||
@item Fluent object-oriented/functional API
|
||||
@item Sparse (CRS, CCS) and dense (1D/2D arrays) matrices
|
||||
@item Linear systems solving (Gaussian, Jacobi, Zeidel, Square Root, Sweep and other)
|
||||
@item Matrices decomposition (Eigenvalues/Eigenvectors, SVD, QR, LU, Cholesky and other)
|
||||
@item MatrixMarket/CSV IO formats support for matrices and vectors
|
||||
@end itemize\n")
|
||||
(license license:asl2.0)))
|
||||
|
||||
(define-public java-jlargearrays
|
||||
(package
|
||||
(name "java-jlargearrays")
|
||||
(version "1.6")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "http://search.maven.org/remotecontent?"
|
||||
"filepath=pl/edu/icm/JLargeArrays/"
|
||||
version "/JLargeArrays-" version
|
||||
"-sources.jar"))
|
||||
(file-name (string-append name "-" version ".jar"))
|
||||
(sha256
|
||||
(base32
|
||||
"0v05iphpxbjnd7f4jf1rlqq3m8hslhcm0imdbsgxr20pi3xkaf2a"))))
|
||||
(build-system ant-build-system)
|
||||
(arguments
|
||||
`(#:jar-name "jlargearrays.jar"
|
||||
#:tests? #f ; tests are not included in the release archive
|
||||
#:jdk ,icedtea-8))
|
||||
(propagated-inputs
|
||||
`(("java-commons-math3" ,java-commons-math3)))
|
||||
(home-page "https://gitlab.com/ICM-VisLab/JLargeArrays")
|
||||
(synopsis "Library of one-dimensional arrays that can store up to 263 elements")
|
||||
(description "JLargeArrays is a Java library of one-dimensional arrays
|
||||
that can store up to 263 elements.")
|
||||
(license license:bsd-2)))
|
||||
|
||||
(define-public java-jtransforms
|
||||
(package
|
||||
(name "java-jtransforms")
|
||||
(version "3.1")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "http://search.maven.org/remotecontent?"
|
||||
"filepath=com/github/wendykierp/JTransforms/"
|
||||
version "/JTransforms-" version "-sources.jar"))
|
||||
(sha256
|
||||
(base32
|
||||
"1haw5m8shv5srgcpwkl853dz8bv6h90bzlhcps6mdpb4cixjirsg"))))
|
||||
(build-system ant-build-system)
|
||||
(arguments
|
||||
`(#:jar-name "jtransforms.jar"
|
||||
#:tests? #f ; tests are not included in the release archive
|
||||
#:jdk ,icedtea-8))
|
||||
(propagated-inputs
|
||||
`(("java-commons-math3" ,java-commons-math3)
|
||||
("java-jlargearrays" ,java-jlargearrays)))
|
||||
(home-page "https://github.com/wendykierp/JTransforms")
|
||||
(synopsis "Multithreaded FFT library written in pure Java")
|
||||
(description "JTransforms is a multithreaded FFT library written in pure
|
||||
Java. Currently, four types of transforms are available: @dfn{Discrete
|
||||
Fourier Transform} (DFT), @dfn{Discrete Cosine Transform} (DCT), @dfn{Discrete
|
||||
Sine Transform} (DST) and @dfn{Discrete Hartley Transform} (DHT).")
|
||||
(license license:bsd-2)))
|
||||
|
||||
(define-public eigen
|
||||
(package
|
||||
(name "eigen")
|
||||
(version "3.3.4")
|
||||
(version "3.2.9")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "https://bitbucket.org/eigen/eigen/get/"
|
||||
version ".tar.bz2"))
|
||||
(sha256
|
||||
(base32
|
||||
"19m4406jvqnwh7kpcvx1lfx2vdc5zwia5q9ayv89bimg1gmln9fx"))
|
||||
"1zs5b210mq7nyanky07li6456rrd0xv2nxf6sl2lhkzdq5p067jd"))
|
||||
(file-name (string-append name "-" version ".tar.bz2"))
|
||||
(patches (search-patches "eigen-arm-neon-fixes.patch"))
|
||||
(modules '((guix build utils)))
|
||||
(snippet
|
||||
;; There are 3 test failures in the "unsupported" directory,
|
||||
;; but maintainers say it's a known issue and it's unsupported
|
||||
;; anyway, so just skip them.
|
||||
'(begin
|
||||
(substitute* "unsupported/CMakeLists.txt"
|
||||
(("add_subdirectory\\(test.*")
|
||||
"# Do not build the tests for unsupported features.\n"))
|
||||
(substitute* "CMakeLists.txt"
|
||||
;; Work around
|
||||
;; <http://eigen.tuxfamily.org/bz/show_bug.cgi?id=1114>.
|
||||
(("\"include/eigen3\"")
|
||||
"\"${CMAKE_INSTALL_PREFIX}/include/eigen3\""))
|
||||
(substitute* "test/bdcsvd.cpp"
|
||||
;; See
|
||||
;; https://bitbucket.org/eigen/eigen/commits/ea8c22ce6920e982d15245ee41d0531a46a28e5d
|
||||
((".*svd_preallocate[^\n]*" &)
|
||||
(string-append "//" & " // Not supported by BDCSVD")))
|
||||
#t))))
|
||||
'(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\"")))))
|
||||
(build-system cmake-build-system)
|
||||
(arguments
|
||||
'(;; Turn off debugging symbols to save space.
|
||||
@@ -738,7 +616,6 @@ Sine Transform} (DST) and @dfn{Discrete Hartley Transform} (DHT).")
|
||||
(lambda _
|
||||
(let* ((cores (parallel-job-count))
|
||||
(dash-j (format #f "-j~a" cores)))
|
||||
(setenv "EIGEN_SEED" "1") ;for reproducibility
|
||||
;; First build the tests, in parallel. See
|
||||
;; <http://eigen.tuxfamily.org/index.php?title=Tests>.
|
||||
(and (zero? (system* "make" "buildtests" dash-j))
|
||||
@@ -746,7 +623,7 @@ Sine Transform} (DST) and @dfn{Discrete Hartley Transform} (DHT).")
|
||||
;; Then run 'CTest' with -V so we get more
|
||||
;; details upon failure.
|
||||
(zero? (system* "ctest" "-V" dash-j)))))))))
|
||||
(home-page "https://eigen.tuxfamily.org")
|
||||
(home-page "http://eigen.tuxfamily.org")
|
||||
(synopsis "C++ template library for linear algebra")
|
||||
(description
|
||||
"Eigen is a C++ template library for linear algebra: matrices, vectors,
|
||||
@@ -758,37 +635,3 @@ features, and more.")
|
||||
;; Most of the code is MPLv2, with a few files under LGPLv2.1+ or BSD-3.
|
||||
;; See 'COPYING.README' for details.
|
||||
(license license:mpl2.0)))
|
||||
|
||||
(define-public xtensor
|
||||
(package
|
||||
(name "xtensor")
|
||||
(version "0.15.9")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append
|
||||
"https://github.com/QuantStack/xtensor/archive/"
|
||||
version ".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"0mlsw4p1w5mh7pscddfdamz27zq3wml5qla3vbzgvif34vsqc8ra"))
|
||||
(file-name (string-append name "-" version ".tar.gz"))))
|
||||
(build-system cmake-build-system)
|
||||
(native-inputs
|
||||
`(("googletest" ,googletest)
|
||||
("xtl" ,xtl)))
|
||||
(arguments
|
||||
`(#:configure-flags
|
||||
'("-DBUILD_TESTS=ON")
|
||||
#:test-target "xtest"))
|
||||
(home-page "http://quantstack.net/xtensor")
|
||||
(synopsis "C++ tensors with broadcasting and lazy computing")
|
||||
(description "xtensor is a C++ library meant for numerical analysis with
|
||||
multi-dimensional array expressions.
|
||||
|
||||
xtensor provides:
|
||||
@itemize
|
||||
@item an extensible expression system enabling lazy broadcasting.
|
||||
@item an API following the idioms of the C++ standard library.
|
||||
@item tools to manipulate array expressions and build upon xtensor.
|
||||
@end itemize")
|
||||
(license license:bsd-3)))
|
||||
|
||||
+156
-564
@@ -4,8 +4,6 @@
|
||||
;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
|
||||
;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
|
||||
;;; Copyright © 2017 Hartmut Goebel <h.goebel@crazy-compilers.com>
|
||||
;;; Copyright © 2017 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
||||
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
@@ -24,75 +22,16 @@
|
||||
|
||||
(define-module (gnu packages android)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (guix download)
|
||||
#:use-module (guix git-download)
|
||||
#:use-module (guix build-system gnu)
|
||||
#:use-module (guix build-system android-ndk)
|
||||
#:use-module (guix build-system python)
|
||||
#:use-module (guix build-system trivial)
|
||||
#:use-module ((guix licenses) #:prefix license:)
|
||||
#:use-module (gnu packages)
|
||||
#:use-module (gnu packages check)
|
||||
#:use-module (gnu packages compression)
|
||||
#:use-module (gnu packages gnupg)
|
||||
#:use-module (gnu packages pcre)
|
||||
#:use-module (gnu packages python)
|
||||
#:use-module (gnu packages selinux)
|
||||
#:use-module (gnu packages ssh)
|
||||
#:use-module (gnu packages version-control)
|
||||
#:use-module (gnu packages tls)
|
||||
#:use-module (gnu packages linux))
|
||||
|
||||
(define-public android-make-stub
|
||||
(package
|
||||
(name "android-make-stub")
|
||||
(version "0.6.0")
|
||||
(source
|
||||
(origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/daym/android-make-stub.git")
|
||||
(commit (string-append "v" version))))
|
||||
(file-name (string-append "android-make-stub-"
|
||||
version "-checkout"))
|
||||
(sha256
|
||||
(base32
|
||||
"0y1b2x96d37n6f1bp6dcx08bn08zac0cylmbfsx6mf2nahc02fhc"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
`(#:tests? #f ; None exist.
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(delete 'configure)
|
||||
(delete 'build)
|
||||
(replace 'install
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out")))
|
||||
(invoke "make" (string-append "prefix=" out) "install")
|
||||
#t))))))
|
||||
(home-page "https://github.com/daym/android-make-stub")
|
||||
(synopsis "Stubs for the @command{make} system of the Android platform")
|
||||
(description "@code{android-make-stub} provides stubs for the
|
||||
@command{make} system of the Android platform. This allows us to
|
||||
use their packages mostly unmodified in our Android NDK build system.")
|
||||
(license license:asl2.0)))
|
||||
|
||||
(define-public android-googletest
|
||||
(package (inherit googletest)
|
||||
(name "android-googletest")
|
||||
(arguments
|
||||
`(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'install 'install-host-libraries
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(lib (string-append out "/lib")))
|
||||
(symlink "libgtest.so"
|
||||
(string-append lib "/libgtest_host.so"))
|
||||
(symlink "libgmock.so"
|
||||
(string-append lib "/libgmock_host.so"))
|
||||
#t))))))))
|
||||
#:use-module (gnu packages tls))
|
||||
|
||||
;; The Makefiles that we add are largely based on the Debian
|
||||
;; packages. They are licensed under GPL-2 and have copyright:
|
||||
@@ -113,69 +52,52 @@ use their packages mostly unmodified in our Android NDK build system.")
|
||||
version "-checkout"))
|
||||
(sha256
|
||||
(base32
|
||||
"0xc2n7jxrf1iw9cc278pijdfjix2fkiig5ws27f6rwp40zg5mrgg"))
|
||||
(patches
|
||||
(search-patches "libbase-use-own-logging.patch"
|
||||
"libbase-fix-includes.patch"
|
||||
"libutils-remove-damaging-includes.patch"
|
||||
"libutils-add-includes.patch"
|
||||
"adb-add-libraries.patch"
|
||||
"libziparchive-add-includes.patch"))))
|
||||
"0xc2n7jxrf1iw9cc278pijdfjix2fkiig5ws27f6rwp40zg5mrgg"))))
|
||||
|
||||
(define (android-platform-system-extras version)
|
||||
(origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://android.googlesource.com/platform/system/extras")
|
||||
(commit (string-append "android-" version))))
|
||||
(file-name (string-append "android-platform-system-extras-"
|
||||
version "-checkout"))
|
||||
(sha256
|
||||
(base32
|
||||
"18130c23ybqcpgjc5v6f8kdbv2xn39hyiaj17dzldjb9rlwzcyy9"))))
|
||||
|
||||
(define (android-platform-bionic version)
|
||||
(origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://android.googlesource.com/platform/bionic")
|
||||
(commit (string-append "android-" version))))
|
||||
(file-name (string-append "android-platform-bionic-"
|
||||
version "-checkout"))
|
||||
(sha256
|
||||
(base32
|
||||
"0n9wkz3ynqw39if1ss9n32m66iga14nndf29hpm7g1aqn4wvvgzk"))))
|
||||
|
||||
(define (android-platform-external version subdirectory checksum)
|
||||
(origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url
|
||||
(string-append "https://android.googlesource.com/platform/external/"
|
||||
subdirectory))
|
||||
(commit (string-append "android-" version))))
|
||||
(file-name (string-append "android-platform-system-external-" subdirectory "-"
|
||||
version "-checkout"))
|
||||
(sha256
|
||||
(base32
|
||||
checksum))))
|
||||
|
||||
(define android-liblog
|
||||
(define liblog
|
||||
(package
|
||||
(name "android-liblog")
|
||||
(name "liblog")
|
||||
(version (android-platform-version))
|
||||
(source (android-platform-system-core version))
|
||||
(build-system android-ndk-build-system)
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
`(#:make-flags '("LDLIBS=-lpthread")
|
||||
`(#:tests? #f ; TODO.
|
||||
#:make-flags '("CC=gcc")
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'unpack 'enter-source
|
||||
(lambda _ (chdir "liblog") #t))
|
||||
(add-after 'install 'ldconfig
|
||||
(add-after 'enter-source 'create-Makefile
|
||||
(lambda _
|
||||
;; No useful makefile is shipped, so we create one.
|
||||
(with-output-to-file "Makefile"
|
||||
(lambda _
|
||||
(display
|
||||
(string-append
|
||||
"NAME = liblog\n"
|
||||
"SOURCES = log_event_list.c log_event_write.c"
|
||||
" logger_write.c config_write.c logger_name.c"
|
||||
" logger_lock.c fake_log_device.c fake_writer.c"
|
||||
" event_tag_map.c\n"
|
||||
|
||||
"CFLAGS += -fvisibility=hidden -fPIC\n"
|
||||
"CPPFLAGS += -I../include -DFAKE_LOG_DEVICE=1"
|
||||
;; Keep these two in sync with "liblog/Android.bp".
|
||||
" -DLIBLOG_LOG_TAG=1005"
|
||||
" -DSNET_EVENT_LOG_TAG=1397638484\n"
|
||||
"LDFLAGS += -shared -Wl,-soname,$(NAME).so.0 -lpthread\n"
|
||||
|
||||
"build: $(SOURCES)\n"
|
||||
" $(CC) $^ -o $(NAME).so.0 $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)\n"))
|
||||
#t))))
|
||||
(delete 'configure)
|
||||
(replace 'install
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let ((out (assoc-ref outputs "out")))
|
||||
(symlink "liblog.so.0" (string-append out "/lib/liblog.so"))
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(lib (string-append out "/lib")))
|
||||
(install-file "liblog.so.0" lib)
|
||||
(with-directory-excursion lib
|
||||
(symlink "liblog.so.0" "liblog.so"))
|
||||
#t))))))
|
||||
(home-page "https://developer.android.com/")
|
||||
(synopsis "Logging library from the Android platform.")
|
||||
@@ -185,29 +107,62 @@ interfaces for either writing or reading logs. The log buffers are divided up
|
||||
in Main, System, Radio and Events sub-logs.")
|
||||
(license license:asl2.0)))
|
||||
|
||||
(define android-libbase
|
||||
(define libbase
|
||||
(package
|
||||
(name "android-libbase")
|
||||
(name "libbase")
|
||||
(version (android-platform-version))
|
||||
(source (android-platform-system-core version))
|
||||
(build-system android-ndk-build-system)
|
||||
(source (origin
|
||||
(inherit (android-platform-system-core version))
|
||||
(patches
|
||||
(search-patches "libbase-use-own-logging.patch"
|
||||
"libbase-fix-includes.patch"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
`(#:tests? #f ; Test failure: logging.UNIMPLEMENTED
|
||||
#:make-flags '("CXXFLAGS=-std=gnu++11")
|
||||
`(#:tests? #f ; TODO.
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'unpack 'enter-source
|
||||
(lambda _ (chdir "base") #t)))))
|
||||
(inputs `(("android-liblog" ,android-liblog)))
|
||||
(lambda _ (chdir "base") #t))
|
||||
(add-after 'enter-source 'create-Makefile
|
||||
(lambda _
|
||||
;; No useful makefile is shipped, so we create one.
|
||||
(with-output-to-file "Makefile"
|
||||
(lambda _
|
||||
(display
|
||||
(string-append
|
||||
"NAME = libbase\n"
|
||||
"SOURCES = file.cpp logging.cpp parsenetaddress.cpp"
|
||||
" stringprintf.cpp strings.cpp errors_unix.cpp\n"
|
||||
|
||||
"CXXFLAGS += -std=gnu++11 -fPIC\n"
|
||||
"CPPFLAGS += -Iinclude -I../include\n"
|
||||
"LDFLAGS += -shared -Wl,-soname,$(NAME).so.0"
|
||||
" -L.. -llog\n"
|
||||
|
||||
"build: $(SOURCES)\n"
|
||||
" $(CXX) $^ -o $(NAME).so.0 $(CXXFLAGS) $(CPPFLAGS)"
|
||||
" $(LDFLAGS)\n"))
|
||||
#t))))
|
||||
(delete 'configure)
|
||||
(replace 'install
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(lib (string-append out "/lib")))
|
||||
(install-file "libbase.so.0" lib)
|
||||
(with-directory-excursion lib
|
||||
(symlink "libbase.so.0" "libbase.so"))
|
||||
(copy-recursively "include" out)
|
||||
#t))))))
|
||||
(inputs `(("liblog" ,liblog)))
|
||||
(home-page "https://developer.android.com/")
|
||||
(synopsis "Android platform base library")
|
||||
(description "@code{libbase} is a library in common use by the
|
||||
various Android core host applications.")
|
||||
(license license:asl2.0)))
|
||||
|
||||
(define android-libcutils
|
||||
(define libcutils
|
||||
(package
|
||||
(name "android-libcutils")
|
||||
(name "libcutils")
|
||||
(version (android-platform-version))
|
||||
(source (android-platform-system-core version))
|
||||
(build-system gnu-build-system)
|
||||
@@ -245,13 +200,10 @@ various Android core host applications.")
|
||||
(replace 'install
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(lib (string-append out "/lib"))
|
||||
(include (string-append out "/include")))
|
||||
(lib (string-append out "/lib")))
|
||||
(install-file "libcutils.so.0" lib)
|
||||
(with-directory-excursion lib
|
||||
(symlink "libcutils.so.0" "libcutils.so"))
|
||||
(copy-recursively "../include/cutils"
|
||||
(string-append include "/cutils"))
|
||||
#t))))))
|
||||
(home-page "https://developer.android.com/")
|
||||
(synopsis "Android platform c utils library")
|
||||
@@ -259,92 +211,90 @@ various Android core host applications.")
|
||||
various Android core host applications.")
|
||||
(license license:asl2.0)))
|
||||
|
||||
(define-public android-libsparse
|
||||
(package
|
||||
(name "android-libsparse")
|
||||
(version (android-platform-version))
|
||||
(source (android-platform-system-core version))
|
||||
(build-system android-ndk-build-system)
|
||||
(arguments
|
||||
`(#:make-flags '("CFLAGS=-Wno-error"
|
||||
"CXXFLAGS=-fpermissive -Wno-error")
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'unpack 'enter-source
|
||||
(lambda _ (chdir "libsparse") #t)))))
|
||||
(inputs
|
||||
`(("zlib" ,zlib)))
|
||||
(home-page "https://developer.android.com/")
|
||||
(synopsis "Android platform sparse library")
|
||||
(description "@code{android-libsparse} is a library in common use by the
|
||||
various Android core host applications.")
|
||||
(license license:asl2.0)))
|
||||
|
||||
(define-public android-libziparchive
|
||||
(package
|
||||
(name "android-libziparchive")
|
||||
(version (android-platform-version))
|
||||
(source (android-platform-system-core version))
|
||||
(build-system android-ndk-build-system)
|
||||
(arguments
|
||||
`(#:make-flags '("CFLAGS=-Wno-error"
|
||||
"CXXFLAGS=-fpermissive -Wno-error -std=gnu++11")
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'unpack 'enter-source
|
||||
(lambda _ (chdir "libziparchive") #t))
|
||||
(add-before 'check 'setenv
|
||||
(lambda _
|
||||
(setenv "ziparchive_tests_host_PARAMS" "--test_data_dir=testdata")
|
||||
#t))
|
||||
(add-after 'install 'install-headers
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
(let ((out (assoc-ref outputs "out")))
|
||||
(copy-recursively "../include/ziparchive"
|
||||
(string-append out "/include/ziparchive"))
|
||||
#t))))))
|
||||
(inputs
|
||||
`(("zlib" ,zlib)))
|
||||
(native-inputs
|
||||
`(("android-libbase" ,android-libbase)
|
||||
("android-libutils" ,android-libutils)
|
||||
("android-liblog" ,android-liblog)))
|
||||
(home-page "https://developer.android.com/")
|
||||
(synopsis "Android platform ZIP library")
|
||||
(description "@code{android-libziparchive} is a library in common use by the
|
||||
various Android core host applications.")
|
||||
(license license:asl2.0)))
|
||||
|
||||
(define-public adb
|
||||
(package
|
||||
(name "adb")
|
||||
(version (android-platform-version))
|
||||
(source (android-platform-system-core version))
|
||||
(build-system android-ndk-build-system)
|
||||
(source (origin
|
||||
(inherit (android-platform-system-core version))
|
||||
(patches
|
||||
(search-patches "libbase-use-own-logging.patch"
|
||||
"libbase-fix-includes.patch"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
`(#:tests? #f ; Test failure: sysdeps_poll.fd_count
|
||||
#:make-flags
|
||||
(list "CFLAGS=-Wno-error"
|
||||
"CXXFLAGS=-fpermissive -Wno-error -std=gnu++14 -D_Nonnull= -D_Nullable= -I ."
|
||||
(string-append "LDFLAGS=-Wl,-rpath=" (assoc-ref %outputs "out") "/lib "
|
||||
"-Wl,-rpath=" (assoc-ref %build-inputs "openssl") "/lib -L ."))
|
||||
#:phases
|
||||
`(#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'unpack 'enter-source
|
||||
(lambda _ (chdir "adb") #t))
|
||||
(add-after 'enter-source 'make-libs-available
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
(substitute* "Android.mk"
|
||||
(("libcrypto_static") "libcrypto"))
|
||||
(add-before 'build 'fix-clang
|
||||
(lambda _
|
||||
;; adb_client.h contains _Nonnull and _Nullable attributes, that
|
||||
;; are not understood by gcc.
|
||||
(substitute* "adb_client.h"
|
||||
(("_Nonnull") "")
|
||||
(("_Nullable") ""))
|
||||
#t))
|
||||
(add-after 'install 'install-headers
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
(install-file "diagnose_usb.h" (string-append (assoc-ref outputs "out") "/include"))
|
||||
#t)))))
|
||||
(add-before 'build 'fix-main
|
||||
(lambda _
|
||||
;; main.cpp used to be adb_main.cpp in the current directory
|
||||
;; rather than in its own subdirectory, but it was not fixed.
|
||||
;; This leads to some header files not being found anymore.
|
||||
(copy-file "client/main.cpp" "adb_main.cpp")
|
||||
#t))
|
||||
(add-after 'enter-source 'create-Makefile
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
;; No useful makefile is shipped, so we create one.
|
||||
(with-output-to-file "Makefile"
|
||||
(lambda _
|
||||
(display
|
||||
(string-append
|
||||
;; Common for all components.
|
||||
"CXXFLAGS += -std=gnu++14 -fpermissive\n"
|
||||
"CPPFLAGS += -I../include -I../base/include -I. -DADB_HOST=1 "
|
||||
"-DADB_REVISION='\"" ,version "\"' -fPIC\n"
|
||||
"LDFLAGS += -lcrypto -lpthread -lbase -lcutils -L. -ladb\n"
|
||||
|
||||
;; Libadb specifics.
|
||||
"LIBADB_SOURCES = adb.cpp adb_auth.cpp adb_io.cpp "
|
||||
"adb_listeners.cpp adb_trace.cpp adb_utils.cpp fdevent.cpp "
|
||||
"sockets.cpp transport.cpp transport_local.cpp transport_usb.cpp "
|
||||
"get_my_path_linux.cpp sysdeps_unix.cpp usb_linux.cpp "
|
||||
"adb_auth_host.cpp diagnose_usb.cpp services.cpp "
|
||||
"shell_service_protocol.cpp bugreport.cpp line_printer.cpp\n"
|
||||
|
||||
"LIBADB_LDFLAGS += -shared -Wl,-soname,libadb.so.0 "
|
||||
"-lcrypto -lpthread -lbase\n"
|
||||
|
||||
;; Adb specifics.
|
||||
"ADB_SOURCES = adb_main.cpp console.cpp commandline.cpp "
|
||||
"adb_client.cpp file_sync_client.cpp\n"
|
||||
"ADB_LDFLAGS += -Wl,-rpath=" (assoc-ref outputs "out") "/lib\n"
|
||||
|
||||
"build: libadb $(ADB_SOURCES)\n"
|
||||
" $(CXX) $(ADB_SOURCES) -o adb $(CXXFLAGS) $(CPPFLAGS) "
|
||||
"$(ADB_LDFLAGS) $(LDFLAGS)\n"
|
||||
|
||||
"libadb: $(LIBADB_SOURCES)\n"
|
||||
" $(CXX) $^ -o libadb.so.0 $(CXXFLAGS) $(CPPFLAGS) "
|
||||
"$(LIBADB_LDFLAGS)\n"
|
||||
" ln -sv libadb.so.0 libadb.so\n"))
|
||||
#t))))
|
||||
(delete 'configure)
|
||||
(replace 'install
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(lib (string-append out "/lib"))
|
||||
(bin (string-append out "/bin")))
|
||||
(install-file "libadb.so.0" lib)
|
||||
(install-file "adb" bin)
|
||||
(with-directory-excursion lib
|
||||
(symlink "libadb.so.0" "libadb.so"))
|
||||
#t))))
|
||||
;; Test suite must be run with attached devices
|
||||
#:tests? #f))
|
||||
(inputs
|
||||
`(("android-libbase" ,android-libbase)
|
||||
("android-libcutils" ,android-libcutils)
|
||||
("android-liblog" ,android-liblog)
|
||||
`(("libbase" ,libbase)
|
||||
("libcutils" ,libcutils)
|
||||
("openssl" ,openssl)))
|
||||
(home-page "https://developer.android.com/studio/command-line/adb.html")
|
||||
(synopsis "Android Debug Bridge")
|
||||
@@ -355,329 +305,6 @@ of device actions, such as installing and debugging apps, and it provides access
|
||||
to a Unix shell that can run commands on the connected device or emulator.")
|
||||
(license license:asl2.0)))
|
||||
|
||||
(define-public mkbootimg
|
||||
(package
|
||||
(name "mkbootimg")
|
||||
(version (android-platform-version))
|
||||
(source (origin
|
||||
(inherit (android-platform-system-core version))))
|
||||
(build-system python-build-system)
|
||||
(arguments
|
||||
`(#:tests? #f
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'unpack 'enter-source
|
||||
(lambda _ (chdir "mkbootimg") #t))
|
||||
(delete 'configure)
|
||||
(delete 'build)
|
||||
(replace 'install
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(bin (string-append out "/bin"))
|
||||
(include (string-append out "/include")))
|
||||
(install-file "mkbootimg" bin)
|
||||
(install-file "bootimg.h" include)
|
||||
#t))))))
|
||||
(home-page "https://developer.android.com/studio/command-line/adb.html")
|
||||
(synopsis "Tool to create Android boot images")
|
||||
(description "This package provides a tool to create Android Boot
|
||||
Images.")
|
||||
(license license:asl2.0)))
|
||||
|
||||
(define-public android-safe-iop
|
||||
(package
|
||||
(name "android-safe-iop")
|
||||
(version (android-platform-version))
|
||||
(source (android-platform-external version "safe-iop"
|
||||
"1nyyrs463advjhlq8xx1lm37m4g5afv7gy0csxrj7biwwl0v13qw"))
|
||||
(build-system android-ndk-build-system)
|
||||
(arguments
|
||||
`(#:make-flags '("CXXFLAGS=-fpermissive -Wno-error")
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-before 'build 'patch-host
|
||||
(lambda _
|
||||
;; TODO: Cross-compile.
|
||||
(substitute* "Android.mk"
|
||||
(("BUILD_STATIC_LIBRARY") "BUILD_HOST_STATIC_LIBRARY"))
|
||||
#t)))))
|
||||
(home-page "https://developer.android.com/")
|
||||
(synopsis "Safe integers in C")
|
||||
(description "@code{android-safe-iop} provides a set of functions for
|
||||
performing and checking safe integer operations. Ensure that integer
|
||||
operations do not result in silent overflow.")
|
||||
(license license:bsd-2)))
|
||||
|
||||
(define-public android-bionic-uapi
|
||||
(package
|
||||
(name "android-bionic-uapi")
|
||||
(version (android-platform-version))
|
||||
(source (android-platform-bionic version))
|
||||
(build-system android-ndk-build-system)
|
||||
(arguments
|
||||
`(#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'unpack 'enter-source
|
||||
(lambda _ (chdir "libc") #t))
|
||||
(replace 'check
|
||||
(const #t))
|
||||
(replace 'build
|
||||
(const #t))
|
||||
(replace 'install
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(out-sys (string-append out "/include/sys")))
|
||||
(mkdir-p out-sys)
|
||||
(install-file "include/sys/system_properties.h" out-sys)
|
||||
(install-file "include/sys/_system_properties.h" out-sys)
|
||||
(copy-recursively "kernel/uapi" (string-append out "/include"))
|
||||
#t))))))
|
||||
(home-page "https://developer.android.com/")
|
||||
(synopsis "Android Linux API that is safe for user space")
|
||||
(description "@code{android-bionic-uapi} provides the part of the Linux API
|
||||
that is safe to use for user space. It also includes
|
||||
@code{system_properties.h} and @code{_system_properties.h}.")
|
||||
(license license:asl2.0)))
|
||||
|
||||
(define-public android-libselinux
|
||||
(package
|
||||
(name "android-libselinux")
|
||||
(version (android-platform-version))
|
||||
(source
|
||||
(android-platform-external version "libselinux"
|
||||
"13m2q32gzdcs5d0zj1nwasjy1j8vsxsgbjg7m5sa9lfcjaj7nkm7"))
|
||||
(build-system android-ndk-build-system)
|
||||
(arguments
|
||||
;; See logd/Android.mk for the *_LOG_TAG values.
|
||||
`(#:make-flags (list (string-append "CFLAGS=-Wno-error "
|
||||
"-I core/include "
|
||||
"-I core/libpackagelistparser/include "
|
||||
"-DAUDITD_LOG_TAG=1003 "
|
||||
"-DLOGD_LOG_TAG=1004 -D_GNU_SOURCE")
|
||||
"LDFLAGS=-L . -lpcre")
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'unpack-core 'patch-HOST
|
||||
(lambda _
|
||||
;; gettid duplicates otherwise.
|
||||
(substitute* "src/procattr.c"
|
||||
(("#ifdef HOST") "#ifdef XXX"))
|
||||
#t)))))
|
||||
(inputs
|
||||
`(("openssl" ,openssl)))
|
||||
(native-inputs
|
||||
`(("android-bionic-uapi" ,android-bionic-uapi)
|
||||
;; pcre is inlined by our package.
|
||||
("pcre" ,pcre)))
|
||||
(home-page "https://developer.android.com/")
|
||||
(synopsis (package-synopsis libselinux))
|
||||
(description (package-description libselinux))
|
||||
(license (package-license libselinux))))
|
||||
|
||||
(define-public android-ext4-utils
|
||||
(package
|
||||
(name "android-ext4-utils")
|
||||
(version (android-platform-version))
|
||||
(source (android-platform-system-extras version))
|
||||
(build-system android-ndk-build-system)
|
||||
(arguments
|
||||
`(#:make-flags
|
||||
(list (string-append "CPPFLAGS="
|
||||
;"-Wno-error "
|
||||
"-I "
|
||||
(assoc-ref %build-inputs "android-libselinux")
|
||||
"/include "
|
||||
"-I " (assoc-ref %build-inputs "android-libsparse")
|
||||
"/include "
|
||||
"-I " (assoc-ref %build-inputs "android-libcutils")
|
||||
"/include "
|
||||
"-I " (assoc-ref %build-inputs "android-liblog") "/include "
|
||||
"-I ../core/include")
|
||||
"CFLAGS=-Wno-error"
|
||||
"install-libext4_utils_host.a"
|
||||
(string-append "prefix=" (assoc-ref %outputs "out")))
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'unpack 'unpack-core
|
||||
(lambda* (#:key inputs #:allow-other-keys)
|
||||
(mkdir-p "core")
|
||||
(with-directory-excursion "core"
|
||||
(invoke "tar" "axf" (assoc-ref inputs "android-core")
|
||||
"--strip-components=1"))
|
||||
#t))
|
||||
(add-after 'unpack-core 'enter-source
|
||||
(lambda _ (chdir "ext4_utils") #t))
|
||||
(replace 'install
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
(let ((out (assoc-ref outputs "out")))
|
||||
(copy-recursively "." (string-append out "/include")))
|
||||
#t)))))
|
||||
(inputs
|
||||
`(("android-libcutils" ,android-libcutils)
|
||||
("android-liblog" ,android-liblog)
|
||||
("android-libselinux" ,android-libselinux)
|
||||
("android-libsparse" ,android-libsparse)
|
||||
("zlib" ,zlib)))
|
||||
(native-inputs
|
||||
`(("android-core" ,(android-platform-system-core version))))
|
||||
(home-page "https://developer.android.com/")
|
||||
(synopsis "Android ext4 filesystem utils")
|
||||
(description "@code{android-ext4-utils} is a library in common use by the
|
||||
Android core.")
|
||||
(license license:asl2.0)))
|
||||
|
||||
(define-public android-f2fs-utils
|
||||
(package
|
||||
(name "android-f2fs-utils")
|
||||
(version (android-platform-version))
|
||||
(source (android-platform-system-extras version))
|
||||
(build-system android-ndk-build-system)
|
||||
(arguments
|
||||
`(#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'unpack 'enter-source
|
||||
(lambda _ (chdir "f2fs_utils") #t))
|
||||
(add-after 'install 'install-headers
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
(copy-recursively "." (string-append (assoc-ref outputs "out")
|
||||
"/include"))
|
||||
#t))
|
||||
(add-after 'install 'install-shell-scripts
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(bin (string-append out "/bin")))
|
||||
(patch-shebang "mkf2fsuserimg.sh")
|
||||
(substitute* "mkf2fsuserimg.sh"
|
||||
(("make_f2fs") (string-append bin "/make_f2fs")))
|
||||
(install-file "mkf2fsuserimg.sh" bin)
|
||||
#t))))))
|
||||
(inputs
|
||||
`(("f2fs-tools" ,f2fs-tools-1.7)
|
||||
("android-libselinux" ,android-libselinux)
|
||||
("android-libsparse" ,android-libsparse)
|
||||
("android-libcutils" ,android-libcutils)
|
||||
("zlib" ,zlib)))
|
||||
(home-page "https://developer.android.com/")
|
||||
(synopsis "Android f2fs utils")
|
||||
(description "@code{android-f2fs-utils} is a library in common use by the
|
||||
Android core. It allows the user to create images for the @code{f2fs} Flash
|
||||
file system.")
|
||||
(license license:asl2.0)))
|
||||
|
||||
(define-public android-libutils
|
||||
(package
|
||||
(name "android-libutils")
|
||||
(version (android-platform-version))
|
||||
(source (android-platform-system-core version))
|
||||
(build-system android-ndk-build-system)
|
||||
(arguments
|
||||
`(#:tests? #f ; TODO
|
||||
#:make-flags '("CXXFLAGS=-std=gnu++11 -Wno-error")
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'unpack 'enter-source
|
||||
(lambda _ (chdir "libutils") #t))
|
||||
|
||||
(add-after 'install 'install-headers
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
(copy-recursively "../include/utils" (string-append (assoc-ref outputs "out") "/include/utils")))))))
|
||||
(inputs
|
||||
`(("android-safe-iop" ,android-safe-iop)
|
||||
("android-libcutils" ,android-libcutils)))
|
||||
(native-inputs
|
||||
`(("android-bionic-uapi" ,android-bionic-uapi)
|
||||
("android-liblog" ,android-liblog)))
|
||||
(home-page "https://developer.android.com/")
|
||||
(synopsis "Android utility library")
|
||||
(description "@code{android-libutils} provides utilities for Android NDK developers.")
|
||||
(license license:asl2.0)))
|
||||
|
||||
(define-public fastboot
|
||||
(package
|
||||
(name "fastboot")
|
||||
(version (android-platform-version))
|
||||
(source (android-platform-system-core version))
|
||||
(build-system android-ndk-build-system)
|
||||
(arguments
|
||||
`(#:make-flags (list "CXXFLAGS=-std=gnu++11")
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'unpack 'enter-source
|
||||
(lambda _
|
||||
(chdir "fastboot")
|
||||
#t))
|
||||
(add-after 'enter-source 'patch-source
|
||||
(lambda _
|
||||
(substitute* "Android.mk"
|
||||
(("libext4_utils_host") "libext4_utils_host libselinux libpcre"))
|
||||
#t))
|
||||
(replace 'install
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(lib (string-append out "/lib"))
|
||||
(bin (string-append out "/bin")))
|
||||
(install-file "fastboot" bin)
|
||||
#t))))))
|
||||
(inputs
|
||||
`(("adb" ,adb)
|
||||
("android-safe-iop" ,android-safe-iop)
|
||||
("android-ext4-utils" ,android-ext4-utils)
|
||||
("android-f2fs-utils" ,android-f2fs-utils)
|
||||
("android-libbase" ,android-libbase)
|
||||
("android-libcutils" ,android-libcutils)
|
||||
("android-liblog" ,android-liblog)
|
||||
("android-libutils" ,android-libutils)
|
||||
("android-libsparse" ,android-libsparse)
|
||||
("android-libziparchive" ,android-libziparchive)
|
||||
("android-libselinux" ,android-libselinux)
|
||||
("pcre" ,pcre)
|
||||
("mkbootimg" ,mkbootimg)
|
||||
("zlib" ,zlib)))
|
||||
(native-inputs
|
||||
`(("xz" ,xz)))
|
||||
(home-page "https://developer.android.com/studio/command-line/")
|
||||
(synopsis "Android image flasher")
|
||||
(description
|
||||
"This package provides @command{fastboot}, a tool to upload file system images to Android devices.")
|
||||
(license license:asl2.0)))
|
||||
|
||||
(define-public android-udev-rules
|
||||
(package
|
||||
(name "android-udev-rules")
|
||||
(version "20180112")
|
||||
(source
|
||||
(origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/M0Rf30/android-udev-rules")
|
||||
(commit version)))
|
||||
(file-name (string-append name "-" version "-checkout"))
|
||||
(sha256
|
||||
(base32 "13gj79nnd04szqlrrzzkdr6wi1fky08pi7x8xfbg0jj3d3v0giah"))))
|
||||
(build-system trivial-build-system)
|
||||
(native-inputs `(("source" ,source)))
|
||||
(arguments
|
||||
'(#:modules ((guix build utils))
|
||||
#:builder
|
||||
(begin
|
||||
(use-modules (guix build utils))
|
||||
(let ((source (assoc-ref %build-inputs "source")))
|
||||
(install-file (string-append source "/51-android.rules")
|
||||
(string-append %output "/lib/udev/rules.d"))
|
||||
#t))))
|
||||
(home-page "https://github.com/M0Rf30/android-udev-rules")
|
||||
(synopsis "udev rules for Android devices")
|
||||
(description "Provides a set of udev rules to allow using Android devices
|
||||
with tools such as @command{adb} and @command{fastboot} without root
|
||||
privileges. This package is intended to be added as a rule to the
|
||||
@code{udev-service-type} in your @code{operating-system} configuration.
|
||||
Additionally, an @code{adbusers} group must be defined and your user added to
|
||||
it.
|
||||
|
||||
@emph{Simply installing this package will not have any effect.} It is meant
|
||||
to be passed to the @code{udev} service.")
|
||||
(license license:gpl3+)))
|
||||
|
||||
(define-public git-repo
|
||||
(package
|
||||
(name "git-repo")
|
||||
@@ -761,7 +388,7 @@ def _FindRepo():
|
||||
;; TODO: Add git-remote-persistent-https once it is available in guix
|
||||
`(("git" ,git)
|
||||
("gnupg" ,gnupg)
|
||||
("ssh" ,openssh)))
|
||||
("ssh", openssh)))
|
||||
(native-inputs
|
||||
`(("nose" ,python2-nose)))
|
||||
(home-page "https://code.google.com/p/git-repo/")
|
||||
@@ -772,38 +399,3 @@ parts of the development workflow. Repo is not meant to replace Git, only to
|
||||
make it easier to work with Git. The repo command is an executable Python
|
||||
script that you can put anywhere in your path.")
|
||||
(license license:asl2.0)))
|
||||
|
||||
(define-public abootimg
|
||||
(package
|
||||
(name "abootimg")
|
||||
(version "0.6")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "http://http.debian.net/debian/pool/main/a/abootimg/"
|
||||
"abootimg_" version ".orig.tar.gz"))
|
||||
(sha256
|
||||
(base32 "0sfc2k011l1ymv97821w89391gnqdh8pp0haz4sdcm5hx0axv2ba"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
`(#:tests? #f
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(replace 'configure
|
||||
(lambda _
|
||||
(setenv "CC" "gcc")
|
||||
#t))
|
||||
(replace 'install
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(bin (string-append out "/bin")))
|
||||
(install-file "abootimg" bin)
|
||||
#t))))))
|
||||
(inputs
|
||||
`(("libblkid" ,util-linux)))
|
||||
(home-page "https://ac100.grandou.net/abootimg")
|
||||
(synopsis "Tool for manipulating Android Boot Images")
|
||||
(description "This package provides a tool for manipulating old Android
|
||||
Boot Images. @code{abootimg} can work directly on block devices, or, the
|
||||
safest way, on a file image.")
|
||||
(license license:gpl2+)))
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2015, 2017 Ricardo Wurmus <rekado@elephly.net>
|
||||
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
@@ -20,7 +19,6 @@
|
||||
(define-module (gnu packages animation)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (guix download)
|
||||
#:use-module (guix git-download)
|
||||
#:use-module (guix utils)
|
||||
#:use-module ((guix licenses) #:prefix license:)
|
||||
#:use-module (guix build-system gnu)
|
||||
@@ -36,8 +34,6 @@
|
||||
#:use-module (gnu packages image)
|
||||
#:use-module (gnu packages imagemagick)
|
||||
#:use-module (gnu packages pkg-config)
|
||||
#:use-module (gnu packages pulseaudio)
|
||||
#:use-module (gnu packages qt)
|
||||
#:use-module (gnu packages video))
|
||||
|
||||
(define-public etl
|
||||
@@ -53,7 +49,7 @@
|
||||
(base32
|
||||
"0ii73nsd3xzkhz6w1rnxwphl637j9w82xiy6apa9vin2isdynnmc"))))
|
||||
(build-system gnu-build-system)
|
||||
(home-page "https://www.synfig.org")
|
||||
(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
|
||||
@@ -82,16 +78,6 @@ C++ @dfn{Standard Template Library} (STL).")
|
||||
"/lib"))
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'unpack 'fix-boost-build-error
|
||||
;; A chain of Boost headers leads to this error: "make_array" is
|
||||
;; not a member of "boost::serialization". This can be avoided by
|
||||
;; loading the "array_wrapper" header first.
|
||||
(lambda _
|
||||
(substitute* "src/synfig/valuenodes/valuenode_dynamic.cpp"
|
||||
(("#include <boost/numeric/odeint/integrate/integrate.hpp>" match)
|
||||
(string-append
|
||||
"#include <boost/serialization/array_wrapper.hpp>\n" match)))
|
||||
#t))
|
||||
(add-after 'unpack 'adapt-to-libxml++-changes
|
||||
(lambda _
|
||||
(substitute* "configure"
|
||||
@@ -131,7 +117,7 @@ C++ @dfn{Standard Template Library} (STL).")
|
||||
("pango" ,pango)))
|
||||
(native-inputs
|
||||
`(("pkg-config" ,pkg-config)))
|
||||
(home-page "https://www.synfig.org")
|
||||
(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
|
||||
@@ -181,7 +167,7 @@ for tweening, preventing the need to hand-draw each frame.")
|
||||
(native-inputs
|
||||
`(("pkg-config" ,pkg-config)
|
||||
("intltool" ,intltool)))
|
||||
(home-page "https://www.synfig.org")
|
||||
(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
|
||||
@@ -189,72 +175,3 @@ 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+)))
|
||||
|
||||
(define-public papagayo
|
||||
(let ((commit "e143684b30e59fe4a554f965cb655d23cbe93ee7")
|
||||
(revision "1"))
|
||||
(package
|
||||
(name "papagayo")
|
||||
(version (string-append "2.0b1-" revision "." (string-take commit 9)))
|
||||
(source (origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/LostMoho/Papagayo.git")
|
||||
(commit commit)))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32
|
||||
"1p9gffjhbph34jhrvgpg93yha75bf88vkvlnk06x1r9601ph5321"))
|
||||
(modules '((guix build utils)))
|
||||
;; Delete bundled libsndfile sources.
|
||||
(snippet
|
||||
'(begin
|
||||
(delete-file-recursively "libsndfile_1.0.19")
|
||||
(delete-file-recursively "libsndfile_1.0.25")
|
||||
#t))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
`(#:phases
|
||||
(modify-phases %standard-phases
|
||||
(replace 'configure
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
(let ((libsndfile (assoc-ref inputs "libsndfile")))
|
||||
;; Do not use bundled libsndfile sources
|
||||
(substitute* "Papagayo.pro"
|
||||
(("else \\{")
|
||||
(string-append "\nINCLUDEPATH += " libsndfile
|
||||
"/include"
|
||||
"\nLIBS +=" libsndfile
|
||||
"/lib/libsndfile.so\n"
|
||||
"win32 {"))))
|
||||
(invoke "qmake"
|
||||
(string-append "DESTDIR="
|
||||
(assoc-ref outputs "out")
|
||||
"/bin"))))
|
||||
;; Ensure that all required Qt plugins are found at runtime.
|
||||
(add-after 'install 'wrap-executable
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(qt '("qt" "qtmultimedia")))
|
||||
(wrap-program (string-append out "/bin/Papagayo")
|
||||
`("QT_PLUGIN_PATH" ":" prefix
|
||||
,(map (lambda (label)
|
||||
(string-append (assoc-ref inputs label)
|
||||
"/lib/qt5/plugins/"))
|
||||
qt)))
|
||||
#t))))))
|
||||
(inputs
|
||||
`(("qt" ,qtbase)
|
||||
("qtmultimedia" ,qtmultimedia)
|
||||
("libsndfile" ,libsndfile)))
|
||||
(native-inputs
|
||||
`(("qttools" ,qttools)))
|
||||
(home-page "https://www.lostmarble.com/papagayo/")
|
||||
(synopsis "Lip-syncing for animations")
|
||||
(description
|
||||
"Papagayo is a lip-syncing program designed to help you line up
|
||||
phonemes with the actual recorded sound of actors speaking. Papagayo makes it
|
||||
easy to lip sync animated characters by making the process very simple – just
|
||||
type in the words being spoken, then drag the words on top of the sound’s
|
||||
waveform until they line up with the proper sounds.")
|
||||
(license license:gpl3+))))
|
||||
|
||||
+18
-16
@@ -1,6 +1,6 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
|
||||
;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
|
||||
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
@@ -30,14 +30,14 @@
|
||||
(define-public apr
|
||||
(package
|
||||
(name "apr")
|
||||
(version "1.6.3")
|
||||
(version "1.5.2")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "mirror://apache/apr/apr-"
|
||||
version ".tar.bz2"))
|
||||
(sha256
|
||||
(base32
|
||||
"0wiik6amxn6lkc55fv9yz5i3kbxnqbp36alrzabx1avsdp8hc7qk"))
|
||||
"0ypn51xblix5ys9xy7da3ngdydip0qqh9rdq8nz54w9aq8lys0vx"))
|
||||
(patches
|
||||
(search-patches "apr-skip-getservbyname-test.patch"))
|
||||
(patch-flags '("-p0"))))
|
||||
@@ -65,14 +65,14 @@ around or take advantage of platform-specific deficiencies or features.")
|
||||
(define-public apr-util
|
||||
(package
|
||||
(name "apr-util")
|
||||
(version "1.6.1")
|
||||
(version "1.5.4")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "mirror://apache/apr/apr-util-"
|
||||
version ".tar.bz2"))
|
||||
(sha256
|
||||
(base32
|
||||
"0nq3s1yn13vplgl6qfm09f7n0wm08malff9s59bqf9nid9xjzqfk"))))
|
||||
"0bn81pfscy9yjvbmyx442svf43s6dhrdfcsnkpxz43fai5qk5kx6"))))
|
||||
(build-system gnu-build-system)
|
||||
(inputs
|
||||
`(("apr" ,apr)))
|
||||
@@ -80,17 +80,19 @@ around or take advantage of platform-specific deficiencies or features.")
|
||||
`(("expat" ,expat)))
|
||||
(arguments
|
||||
'(#:phases
|
||||
(modify-phases %standard-phases
|
||||
(replace 'configure
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
(let ((out (assoc-ref outputs "out"))
|
||||
(apr (assoc-ref inputs "apr"))
|
||||
(expat (assoc-ref inputs "expat")))
|
||||
(setenv "CONFIG_SHELL" (which "bash"))
|
||||
(invoke "./configure"
|
||||
(string-append "--prefix=" out)
|
||||
(string-append "--with-apr=" apr)
|
||||
(string-append "--with-expat=" expat))))))
|
||||
(alist-replace
|
||||
'configure
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
(let ((out (assoc-ref outputs "out"))
|
||||
(apr (assoc-ref inputs "apr"))
|
||||
(expat (assoc-ref inputs "expat")))
|
||||
(setenv "CONFIG_SHELL" (which "bash"))
|
||||
(zero?
|
||||
(system* "./configure"
|
||||
(string-append "--prefix=" out)
|
||||
(string-append "--with-apr=" apr)
|
||||
(string-append "--with-expat=" expat)))))
|
||||
%standard-phases)
|
||||
|
||||
;; There are race conditions during 'make check'. Typically, the
|
||||
;; 'testall' executable is not built yet by the time 'make check' tries
|
||||
|
||||
+37
-160
@@ -1,11 +1,10 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2013, 2014, 2015, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2013, 2014, 2015, 2017 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com>
|
||||
;;; Copyright © 2016 John Darrington <jmd@gnu.org>
|
||||
;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
|
||||
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
|
||||
;;; Copyright © 2016 Christopher Andersson <christopher@8bits.nu>
|
||||
;;; Copyright © 2016 Theodoros Foradis <theodoros@foradis.org>
|
||||
;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||
;;; Copyright © 2016 Theodoros Foradis <theodoros.for@openmailbox.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
@@ -28,9 +27,8 @@
|
||||
#:use-module (guix build-system gnu)
|
||||
#:use-module (guix licenses)
|
||||
#:use-module (gnu packages)
|
||||
#:use-module (gnu packages base)
|
||||
#:use-module (gnu packages compression)
|
||||
#:use-module (gnu packages perl))
|
||||
#:use-module (gnu packages perl)
|
||||
#:use-module (gnu packages base))
|
||||
|
||||
(define-public aspell
|
||||
(package
|
||||
@@ -55,8 +53,7 @@
|
||||
"/bin/aspell")))
|
||||
(wrap-program bin/aspell
|
||||
'("ASPELL_CONF" "" =
|
||||
("${ASPELL_CONF:-\"dict-dir ${GUIX_PROFILE:-$HOME/.guix-profile}/lib/aspell\"}")))
|
||||
#t))))))
|
||||
("${ASPELL_CONF:-\"dict-dir ${GUIX_PROFILE:-$HOME/.guix-profile}/lib/aspell\"}")))))))))
|
||||
(inputs `(("perl" ,perl)))
|
||||
|
||||
(native-search-paths
|
||||
@@ -102,7 +99,7 @@ dictionaries, including personal ones.")
|
||||
(replace 'configure
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let ((out (assoc-ref outputs "out")))
|
||||
(invoke "./configure")))))
|
||||
(zero? (system* "./configure"))))))
|
||||
#:make-flags
|
||||
(let ((out (assoc-ref %outputs "out")))
|
||||
(list (string-append "dictdir=" out "/lib/aspell")
|
||||
@@ -117,13 +114,6 @@ dictionaries, including personal ones.")
|
||||
(home-page "http://aspell.net/")))
|
||||
|
||||
|
||||
(define-public aspell-dict-ca
|
||||
(aspell-dictionary "ca" "Catalan"
|
||||
#:version "2.1.5-1"
|
||||
#:sha256
|
||||
(base32
|
||||
"1fb5y5kgvk25nlsfvc8cai978hg66x3pbp9py56pldc7vxzf9npb")))
|
||||
|
||||
(define-public aspell-dict-de
|
||||
(aspell-dictionary "de" "German"
|
||||
#:version "20030222-1"
|
||||
@@ -131,20 +121,12 @@ dictionaries, including personal ones.")
|
||||
(base32
|
||||
"01p92qj66cqb346gk7hjfynaap5sbcn85xz07kjfdq623ghr8v5s")))
|
||||
|
||||
(define-public aspell-dict-el
|
||||
(aspell-dictionary "el" "Greek"
|
||||
#:version "0.08-0"
|
||||
#:prefix "aspell6-"
|
||||
#:sha256
|
||||
(base32
|
||||
"1ljcc30zg2v2h3w5h5jr5im41mw8jbsgvvhdd2cii2yzi8d0zxja")))
|
||||
|
||||
(define-public aspell-dict-en
|
||||
(aspell-dictionary "en" "English"
|
||||
#:version "2017.08.24-0"
|
||||
#:version "2016.11.20-0"
|
||||
#:sha256
|
||||
(base32
|
||||
"0z2vvm1by485cm0sna21cmw6zb771c2l2lnn676zmrwm46q65d89")))
|
||||
"1496jnhh2jvhkzcj0p4vy89bcs4g5wz6a76m33vw4dhchn5xm9jw")))
|
||||
|
||||
(define-public aspell-dict-eo
|
||||
(aspell-dictionary "eo" "Esperanto"
|
||||
@@ -168,19 +150,12 @@ dictionaries, including personal ones.")
|
||||
(base32
|
||||
"14ffy9mn5jqqpp437kannc3559bfdrpk7r36ljkzjalxa53i0hpr")))
|
||||
|
||||
(define-public aspell-dict-grc
|
||||
(aspell-dictionary "grc" "Ancient Greek"
|
||||
#:version "0.02-0"
|
||||
(define-public aspell-dict-ru
|
||||
(aspell-dictionary "ru" "Russian"
|
||||
#:version "0.99f7-1"
|
||||
#:sha256
|
||||
(base32
|
||||
"1zxr8958v37v260fkqd4pg37ns5h5kyqm54hn1hg70wq5cz8h512")))
|
||||
|
||||
(define-public aspell-dict-he
|
||||
(aspell-dictionary "he" "Hebrew"
|
||||
#:version "1.0-0"
|
||||
#:sha256
|
||||
(base32
|
||||
"13bhbghx5b8g0119g3wxd4n8mlf707y41vlf59irxjj0kynankfn")))
|
||||
"0ip6nq43hcr7vvzbv4lwwmlwgfa60hrhsldh9xy3zg2prv6bcaaw")))
|
||||
|
||||
(define-public aspell-dict-it
|
||||
(aspell-dictionary "it" "Italian"
|
||||
@@ -197,20 +172,12 @@ dictionaries, including personal ones.")
|
||||
(base32
|
||||
"0ffb87yjsh211hllpc4b9khqqrblial4pzi1h9r3v465z1yhn3j4")))
|
||||
|
||||
(define-public aspell-dict-pt-br
|
||||
(aspell-dictionary "pt-br" "Brazilian Portuguese"
|
||||
#:version "20090702-0"
|
||||
#:prefix "aspell6-"
|
||||
(define-public aspell-dict-he
|
||||
(aspell-dictionary "he" "Hebrew"
|
||||
#:version "1.0-0"
|
||||
#:sha256
|
||||
(base32
|
||||
"1y09lx9zf2rnp55r16b2vgj953l3538z1vaqgflg9mdvm555bz3p")))
|
||||
|
||||
(define-public aspell-dict-ru
|
||||
(aspell-dictionary "ru" "Russian"
|
||||
#:version "0.99f7-1"
|
||||
#:sha256
|
||||
(base32
|
||||
"0ip6nq43hcr7vvzbv4lwwmlwgfa60hrhsldh9xy3zg2prv6bcaaw")))
|
||||
"13bhbghx5b8g0119g3wxd4n8mlf707y41vlf59irxjj0kynankfn")))
|
||||
|
||||
(define-public aspell-dict-sv
|
||||
(aspell-dictionary "sv" "Swedish"
|
||||
@@ -220,115 +187,25 @@ dictionaries, including personal ones.")
|
||||
(base32
|
||||
"02jwkjhr32kvyibnyzgx3smbnm576jwdzg3avdf6zxwckhy5fw4v")))
|
||||
|
||||
|
||||
;;;
|
||||
;;; Hunspell packages made from the Aspell word lists.
|
||||
;;;
|
||||
(define-public aspell-dict-el
|
||||
(aspell-dictionary "el" "Greek"
|
||||
#:version "0.08-0"
|
||||
#:prefix "aspell6-"
|
||||
#:sha256
|
||||
(base32
|
||||
"1ljcc30zg2v2h3w5h5jr5im41mw8jbsgvvhdd2cii2yzi8d0zxja")))
|
||||
|
||||
(define* (aspell-word-list language synopsis
|
||||
#:optional
|
||||
(nick (string-map (lambda (chr)
|
||||
(if (char=? #\_ chr)
|
||||
#\-
|
||||
chr))
|
||||
(string-downcase language))))
|
||||
(package
|
||||
(name (string-append "hunspell-dict-" nick))
|
||||
(version "2017.08.24")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append
|
||||
"http://downloads.sourceforge.net/wordlist/scowl-"
|
||||
version ".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"1kdhydzg5z5x20ad2j1x5hbdhvy08ljkfdi2v3gbyvghbagxm15s"))))
|
||||
(native-inputs
|
||||
`(("tar" ,tar)
|
||||
("gzip" ,gzip)
|
||||
("perl" ,perl)
|
||||
("aspell" ,aspell)))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
`(#:phases
|
||||
(modify-phases %standard-phases
|
||||
(delete 'configure)
|
||||
(delete 'check)
|
||||
(replace 'build
|
||||
(lambda _
|
||||
(substitute* "speller/make-hunspell-dict"
|
||||
(("zip -9 .*$")
|
||||
"return\n"))
|
||||
(mkdir "speller/hunspell")
|
||||
(define-public aspell-dict-grc
|
||||
(aspell-dictionary "grc" "Ancient Greek"
|
||||
#:version "0.02-0"
|
||||
#:sha256
|
||||
(base32
|
||||
"1zxr8958v37v260fkqd4pg37ns5h5kyqm54hn1hg70wq5cz8h512")))
|
||||
|
||||
;; XXX: This actually builds all the dictionary variants.
|
||||
(zero? (system* "make" "-C" "speller" "hunspell"))))
|
||||
(replace 'install
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref %outputs "out"))
|
||||
(hunspell (string-append out "/share/hunspell"))
|
||||
(myspell (string-append out "/share/myspell"))
|
||||
(doc (string-append out "/share/doc/"
|
||||
,name))
|
||||
(dot-dic ,(string-append "speller/" language ".dic")))
|
||||
(mkdir-p myspell)
|
||||
|
||||
;; Usually there's only a 'LANGUAGE.dic' file, but for the "en"
|
||||
;; dictionary, there no 'en.dic'. Instead, there's a set of
|
||||
;; 'en*.dic' files, hence the 'find-files' call below.
|
||||
(if (file-exists? dot-dic)
|
||||
(install-file dot-dic hunspell)
|
||||
(for-each (lambda (dic)
|
||||
(install-file dic hunspell))
|
||||
(find-files "speller"
|
||||
,(string-append language ".*\\.dic$"))))
|
||||
|
||||
(install-file ,(string-append "speller/" language ".aff")
|
||||
hunspell)
|
||||
(symlink hunspell (string-append myspell "/dicts"))
|
||||
(for-each (lambda (file)
|
||||
(install-file file doc))
|
||||
(find-files "."
|
||||
"^(Copyright|.*\\.(txt|org|md))$"))
|
||||
#t))))))
|
||||
(synopsis synopsis)
|
||||
(description
|
||||
"This package provides a dictionary for the Hunspell spell-checking
|
||||
library.")
|
||||
(home-page "http://wordlist.aspell.net/")
|
||||
(license (non-copyleft "file://Copyright"
|
||||
"Word lists come from several sources, all
|
||||
under permissive licensing terms. See the 'Copyright' file."))))
|
||||
|
||||
(define-syntax define-word-list-dictionary
|
||||
(syntax-rules (synopsis)
|
||||
((_ name language (synopsis text))
|
||||
(define-public name
|
||||
(aspell-word-list language text)))
|
||||
((_ name language nick (synopsis text))
|
||||
(define-public name
|
||||
(aspell-word-list language text nick)))))
|
||||
|
||||
(define-word-list-dictionary hunspell-dict-en
|
||||
"en"
|
||||
(synopsis "Hunspell dictionary for English"))
|
||||
|
||||
(define-word-list-dictionary hunspell-dict-en-au
|
||||
"en_AU"
|
||||
(synopsis "Hunspell dictionary for Australian English"))
|
||||
|
||||
(define-word-list-dictionary hunspell-dict-en-ca
|
||||
"en_CA"
|
||||
(synopsis "Hunspell dictionary for Canadian English"))
|
||||
|
||||
(define-word-list-dictionary hunspell-dict-en-gb
|
||||
"en_GB-ise" "en-gb"
|
||||
(synopsis "Hunspell dictionary for British English, with -ise endings"))
|
||||
|
||||
(define-word-list-dictionary hunspell-dict-en-gb-ize
|
||||
"en_GB-ize"
|
||||
(synopsis "Hunspell dictionary for British English, with -ize endings"))
|
||||
|
||||
(define-word-list-dictionary hunspell-dict-en-us
|
||||
"en_US"
|
||||
(synopsis "Hunspell dictionary for United States English"))
|
||||
(define-public aspell-dict-pt-br
|
||||
(aspell-dictionary "pt-br" "Brazilian Portuguese"
|
||||
#:version "20090702-0"
|
||||
#:prefix "aspell6-"
|
||||
#:sha256
|
||||
(base32
|
||||
"1y09lx9zf2rnp55r16b2vgj953l3538z1vaqgflg9mdvm555bz3p")))
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
;;; Copyright © 2013, 2015 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
|
||||
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
|
||||
;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
@@ -35,14 +34,14 @@
|
||||
(define-public nasm
|
||||
(package
|
||||
(name "nasm")
|
||||
(version "2.13.03")
|
||||
(version "2.13.01")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "http://www.nasm.us/pub/nasm/releasebuilds/"
|
||||
version "/" name "-" version ".tar.xz"))
|
||||
(sha256
|
||||
(base32
|
||||
"0wr58pb2wnyihcl6635hlx98fnscx5yirxm8m84x8nxwvjqcybl1"))))
|
||||
"0plsvcwxc7q3llr3bz10prwq1gn4ll38aqmv0yzfqcq4iw0160ma"))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs `(("perl" ,perl) ;for doc and test target
|
||||
("texinfo" ,texinfo)))
|
||||
@@ -60,7 +59,7 @@
|
||||
#t))
|
||||
(add-after 'install 'install-info
|
||||
(lambda _
|
||||
(invoke "make" "install_doc"))))))
|
||||
(zero? (system* "make" "install_doc")))))))
|
||||
(home-page "http://www.nasm.us/")
|
||||
(synopsis "80x86 and x86-64 assembler")
|
||||
(description
|
||||
@@ -104,14 +103,14 @@ debugging information in STABS, DWARF 2, and CodeView 8 formats.")
|
||||
(define-public lightning
|
||||
(package
|
||||
(name "lightning")
|
||||
(version "2.1.2")
|
||||
(version "2.1.0")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "mirror://gnu/lightning/lightning-"
|
||||
version ".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"0sbs2lm8b9in2m8d52zf0x9gpp40x6r7sl6sha92yq3pr78rwa4v"))))
|
||||
"19j9nwl88k660045s40cbz5zrl1wpd2mcxnnc8qqnnaj311a58qz"))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs `(("zlib" ,zlib)))
|
||||
(synopsis "Library for generating assembly code at runtime")
|
||||
|
||||
+45
-54
@@ -1,6 +1,5 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2016 John Darrington <jmd@gnu.org>
|
||||
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
@@ -21,7 +20,6 @@
|
||||
#:use-module (guix packages)
|
||||
#:use-module ((guix licenses) #:prefix license:)
|
||||
#:use-module (guix download)
|
||||
#:use-module (guix utils)
|
||||
#:use-module (gnu packages image)
|
||||
#:use-module (gnu packages compression)
|
||||
#:use-module (gnu packages gettext)
|
||||
@@ -35,18 +33,16 @@
|
||||
(define-public cfitsio
|
||||
(package
|
||||
(name "cfitsio")
|
||||
(version "3.450")
|
||||
(version "3390")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (string-append
|
||||
"http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/"
|
||||
name (string-replace-substring version "." "") ".tar.gz"))
|
||||
"http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/" name version
|
||||
".tar.gz"))
|
||||
(sha256
|
||||
(base32 "0bmrkw6w65zb0k3mszaaqy1f4zjm2hl7njww74nb5v38wvdi4q5z"))))
|
||||
(base32 "02gllydm63irwbqqisa3mrskw1fphm5rlplglz3mq9whi3rxilv2"))))
|
||||
(build-system gnu-build-system)
|
||||
;; XXX Building with curl currently breaks wcslib. It doesn't use
|
||||
;; pkg-config and hence won't link with -lcurl.
|
||||
(arguments
|
||||
`(#:tests? #f ; no tests
|
||||
#:phases
|
||||
@@ -55,10 +51,10 @@
|
||||
(lambda _
|
||||
(substitute* "Makefile.in" (("/bin/") ""))
|
||||
#t)))))
|
||||
(home-page "https://heasarc.gsfc.nasa.gov/fitsio/fitsio.html")
|
||||
(home-page "http://heasarc.gsfc.nasa.gov/fitsio/fitsio.html")
|
||||
(synopsis "Library for reading and writing FITS files")
|
||||
(description "CFITSIO provides simple high-level routines for reading and
|
||||
writing @dfn{FITS} (Flexible Image Transport System) files that insulate the
|
||||
writing FITS (Flexible Image Transport System) files that insulate the
|
||||
programmer from the internal complexities of the FITS format. CFITSIO also
|
||||
provides many advanced features for manipulating and filtering the information
|
||||
in FITS files.")
|
||||
@@ -68,7 +64,7 @@ in FITS files.")
|
||||
(define-public wcslib
|
||||
(package
|
||||
(name "wcslib")
|
||||
(version "5.18")
|
||||
(version "5.16")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
@@ -76,34 +72,28 @@ in FITS files.")
|
||||
"ftp://ftp.atnf.csiro.au/pub/software/wcslib/" name "-" version
|
||||
".tar.bz2"))
|
||||
(sha256
|
||||
(base32 "16jh568k99c9p0y3qzcgps2rii933x9wlay7q1xm0lr59zqzp4xn"))))
|
||||
(base32 "1vwrzkznpig2q40m11j12hsfqvsjz8z44l66pz5fkh6fy461w0zd"))))
|
||||
(inputs
|
||||
`(("cfitsio" ,cfitsio)))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
`(#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-before 'configure 'patch-/bin/sh
|
||||
(lambda _
|
||||
(substitute* "makedefs.in"
|
||||
(("/bin/sh") "sh"))
|
||||
#t))
|
||||
(delete 'install-license-files)) ; installed by ‘make install’
|
||||
;; Both the build and tests fail randomly when run in parallel.
|
||||
#:parallel-build? #f
|
||||
#:parallel-tests? #f))
|
||||
(home-page "https://www.atnf.csiro.au/people/mcalabre/WCS")
|
||||
`(#:phases (modify-phases %standard-phases
|
||||
(add-before 'configure 'patch-/bin/sh
|
||||
(lambda _
|
||||
(substitute* "makedefs.in"
|
||||
(("/bin/sh") "sh"))
|
||||
#t)))))
|
||||
(home-page "http://www.atnf.csiro.au/people/mcalabre/WCS")
|
||||
(synopsis "Library which implements the FITS WCS standard")
|
||||
(description "The FITS \"World Coordinate System\" (@dfn{WCS}) standard
|
||||
defines keywords and usage that provide for the description of astronomical
|
||||
coordinate systems in a @dfn{FITS} (Flexible Image Transport System) image
|
||||
header.")
|
||||
(description "The FITS \"World Coordinate System\" (WCS) standard defines
|
||||
keywords and usage that provide for the description of astronomical coordinate
|
||||
systems in a FITS image header.")
|
||||
(license license:lgpl3+)))
|
||||
|
||||
(define-public gnuastro
|
||||
(package
|
||||
(name "gnuastro")
|
||||
(version "0.6")
|
||||
(version "0.3")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
@@ -111,15 +101,17 @@ header.")
|
||||
version ".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"16a212j9ghdirm11d25s5q5qw32bkjrxsh3rblfyyv29djch34w6"))))
|
||||
"109xjwbs36gbkx5sd5yzf6ailfcldc5d28vl1n19z0ylfzww4nwa"))))
|
||||
(inputs
|
||||
`(("cfitsio" ,cfitsio)
|
||||
("gsl" ,gsl)
|
||||
("libjpeg" ,libjpeg)
|
||||
("libtiff" ,libtiff)
|
||||
("wcslib" ,wcslib)
|
||||
("zlib" ,zlib)))
|
||||
("libjpeg" ,libjpeg-8)
|
||||
("wcslib" ,wcslib)))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
;; Reduce the number of required type conversions by enabling arithmetic
|
||||
;; with all the supported types.
|
||||
`(#:configure-flags '("--enable-bin-op-alltypes")))
|
||||
(home-page "https://www.gnu.org/software/gnuastro/")
|
||||
(synopsis "Astronomy utilities")
|
||||
(description "The GNU Astronomy Utilities (Gnuastro) is a suite of
|
||||
@@ -129,16 +121,15 @@ programs for the manipulation and analysis of astronomical data.")
|
||||
(define-public stellarium
|
||||
(package
|
||||
(name "stellarium")
|
||||
(version "0.18.0")
|
||||
(version "0.16.0")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "https://github.com/Stellarium/" name
|
||||
"/releases/download/v" version
|
||||
"/" name "-" version ".tar.gz"))
|
||||
(file-name (string-append name "-" version ".tar.gz"))
|
||||
(uri (string-append "mirror://sourceforge/stellarium/"
|
||||
"Stellarium-sources/"
|
||||
version "/stellarium-" version ".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"06lid4b9x6551swjxsbiqrd2pxh77fhzfxznhh1vwlvvqgxrimjs"))))
|
||||
"1krxj51lix096xbz64lys166a8zdwhill5vvs7dlxdn14amc8d98"))))
|
||||
(build-system cmake-build-system)
|
||||
(inputs
|
||||
`(("qtbase" ,qtbase)
|
||||
@@ -153,20 +144,20 @@ programs for the manipulation and analysis of astronomical data.")
|
||||
("qtbase" ,qtbase) ; Qt MOC is needed at compile time
|
||||
("qttools" ,qttools)))
|
||||
(arguments
|
||||
`(#:test-target "test"
|
||||
#:configure-flags (list "-DENABLE_TESTING=1"
|
||||
(string-append
|
||||
"-DCMAKE_CXX_FLAGS=-isystem "
|
||||
(assoc-ref %build-inputs "qtserialport")
|
||||
"/include/qt5"))
|
||||
#:phases (modify-phases %standard-phases
|
||||
(add-before 'check 'set-offscreen-display
|
||||
(lambda _
|
||||
;; make Qt render "offscreen", required for tests
|
||||
(setenv "QT_QPA_PLATFORM" "offscreen")
|
||||
(setenv "HOME" "/tmp")
|
||||
#t)))))
|
||||
(home-page "http://stellarium.org/")
|
||||
`(#:test-target "tests"
|
||||
#:phases (modify-phases %standard-phases
|
||||
(add-after 'unpack 'patch-tests
|
||||
(lambda _
|
||||
(substitute* "src/tests/testStelSphereGeometry.cpp"
|
||||
(("Vec3d v[(]0[)]") "Vec3d v(0.0)"))
|
||||
#t))
|
||||
(add-before 'check 'set-offscreen-display
|
||||
(lambda _
|
||||
;; make Qt render "offscreen", required for tests
|
||||
(setenv "QT_QPA_PLATFORM" "offscreen")
|
||||
(setenv "HOME" "/tmp")
|
||||
#t)))))
|
||||
(home-page "http://www.stellarium.org/")
|
||||
(synopsis "3D sky viewer")
|
||||
(description "Stellarium is a planetarium. It shows a realistic sky in
|
||||
3D, just like what you see with the naked eye, binoculars, or a telescope. It
|
||||
|
||||
+9
-14
@@ -1,7 +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 © 2018 Mark H Weaver <mhw@netris.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
@@ -43,14 +42,13 @@
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'configure 'patch-makefile-SHELL
|
||||
(lambda _
|
||||
(patch-makefile-SHELL "include/buildmacros")
|
||||
#t))
|
||||
(patch-makefile-SHELL "include/buildmacros")))
|
||||
(replace 'install
|
||||
(lambda _
|
||||
(invoke "make"
|
||||
"install"
|
||||
"install-lib"
|
||||
"install-dev")))
|
||||
(zero? (system* "make"
|
||||
"install"
|
||||
"install-lib"
|
||||
"install-dev"))))
|
||||
(replace 'check
|
||||
(lambda* (#:key target #:allow-other-keys)
|
||||
;; Use the right shell.
|
||||
@@ -59,14 +57,11 @@
|
||||
(which "sh")))
|
||||
|
||||
;; When building natively, run the tests.
|
||||
;;
|
||||
;; Note that we use system* and unconditionally return #t here
|
||||
;; to ignore the test result, because the tests will fail when
|
||||
;; the build is performed on a file system without support for
|
||||
;; extended attributes, and we wish to allow Guix to be built
|
||||
;; on such systems.
|
||||
(unless target
|
||||
(system* "make" "tests" "-C" "test"))
|
||||
|
||||
;; XXX: Ignore the test result since this is
|
||||
;; dependent on the underlying file system.
|
||||
#t)))))
|
||||
(inputs
|
||||
;; Perl is needed to run tests; remove it from cross builds.
|
||||
@@ -76,7 +71,7 @@
|
||||
(native-inputs
|
||||
`(("gettext" ,gettext-minimal)))
|
||||
|
||||
(home-page "https://savannah.nongnu.org/projects/attr/")
|
||||
(home-page "http://savannah.nongnu.org/projects/attr/")
|
||||
(synopsis "Library and tools for manipulating extended attributes")
|
||||
(description
|
||||
"Portable library and tools for manipulating extended attributes.")
|
||||
|
||||
+268
-836
File diff suppressed because it is too large
Load Diff
+3
-15
@@ -1,7 +1,5 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
|
||||
;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
|
||||
;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
|
||||
;;; Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
@@ -32,24 +30,14 @@
|
||||
(define-public augeas
|
||||
(package
|
||||
(name "augeas")
|
||||
(version "1.10.1")
|
||||
(version "1.8.0")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "http://download.augeas.net/augeas-"
|
||||
version ".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"0k9nssn7lk58cl5zv3c8kv2zx9cm2yks3sj7q4fd6qdjz9m2bnsj"))
|
||||
(modules '((guix build utils)))
|
||||
(snippet
|
||||
'(begin
|
||||
;; The gnulib test-lock test is prone to writer starvation
|
||||
;; with our glibc@2.25, which prefers readers, so disable it.
|
||||
;; The gnulib commit b20e8afb0b2 should fix this once
|
||||
;; incorporated here.
|
||||
(substitute* "gnulib/tests/Makefile.in"
|
||||
(("test-lock\\$\\(EXEEXT\\) ") ""))
|
||||
#t))))
|
||||
"1iac5lwi1q10r343ii9v5p2fdplvh06yv9svsi8zz6cd2c2fjp2i"))))
|
||||
(build-system gnu-build-system)
|
||||
;; Marked as "required" in augeas.pc
|
||||
(propagated-inputs
|
||||
|
||||
+61
-107
@@ -1,14 +1,11 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
|
||||
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2015 Mathieu Lirzin <mthl@openmailbox.org>
|
||||
;;; Copyright © 2014 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
|
||||
;;; Copyright © 2015, 2017, 2018 Mark H Weaver <mhw@netris.org>
|
||||
;;; Copyright © 2015, 2017 Mark H Weaver <mhw@netris.org>
|
||||
;;; Copyright © 2016 David Thompson <davet@gnu.org>
|
||||
;;; Copyright © 2017 Nils Gillmann <ng0@n0.is>
|
||||
;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
|
||||
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||
;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
|
||||
;;; Copyright © 2017 ng0 <ng0@libertad.pw>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
@@ -29,7 +26,6 @@
|
||||
#:use-module (guix licenses)
|
||||
#:use-module (gnu packages)
|
||||
#:use-module (gnu packages perl)
|
||||
#:use-module (gnu packages python)
|
||||
#:use-module (gnu packages m4)
|
||||
#:use-module (gnu packages man)
|
||||
#:use-module (gnu packages bash)
|
||||
@@ -121,13 +117,13 @@ know anything about Autoconf or M4.")
|
||||
(out (assoc-ref outputs "out")))
|
||||
(setenv "CONFIG_SHELL" bash)
|
||||
(setenv "SHELL" bash)
|
||||
(invoke bash "./configure"
|
||||
(string-append "--prefix=" out)
|
||||
(string-append "--build=" build))))))))))
|
||||
(zero? (system* bash "./configure"
|
||||
(string-append "--prefix=" out)
|
||||
(string-append "--build=" build)))))))))))
|
||||
|
||||
|
||||
(define (make-autoconf-wrapper autoconf)
|
||||
"Return a wrapper around AUTOCONF that generates `configure' scripts that
|
||||
(define* (autoconf-wrapper #:optional (autoconf autoconf))
|
||||
"Return an wrapper around AUTOCONF that generates `configure' scripts that
|
||||
use our own Bash instead of /bin/sh in shebangs. For that reason, it should
|
||||
only be used internally---users should not end up distributing `configure'
|
||||
files with a system-specific shebang."
|
||||
@@ -193,19 +189,12 @@ exec ~a --no-auto-compile \"$0\" \"$@\"
|
||||
(patch-shebang "configure"))
|
||||
(exit (status:exit-val result))))
|
||||
port)))
|
||||
(chmod (string-append bin "/autoconf") #o555)
|
||||
#t))))
|
||||
|
||||
;; Do not show it in the UI since it's meant for internal use.
|
||||
(properties '((hidden? . #t)))))
|
||||
|
||||
(define-public autoconf-wrapper
|
||||
(make-autoconf-wrapper autoconf))
|
||||
(chmod (string-append bin "/autoconf") #o555)))))))
|
||||
|
||||
(define-public autoconf-archive
|
||||
(package
|
||||
(name "autoconf-archive")
|
||||
(version "2018.03.13")
|
||||
(version "2017.03.21")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
@@ -213,7 +202,7 @@ exec ~a --no-auto-compile \"$0\" \"$@\"
|
||||
version ".tar.xz"))
|
||||
(sha256
|
||||
(base32
|
||||
"0ng1lvpijf3kv7w7nb1shqs23vp0398yicyvkf9lsk56kw6zjxb1"))))
|
||||
"0rfpapadka2023qhy8294ca5awxpb8d4904js6kv7piby5ax8siq"))))
|
||||
(build-system gnu-build-system)
|
||||
(home-page "https://www.gnu.org/software/autoconf-archive/")
|
||||
(synopsis "Collection of freely reusable Autoconf macros")
|
||||
@@ -250,19 +239,21 @@ output is indexed in many ways to simplify browsing.")
|
||||
(define-public automake
|
||||
(package
|
||||
(name "automake")
|
||||
(version "1.16.1")
|
||||
(version "1.15")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "mirror://gnu/automake/automake-"
|
||||
version ".tar.xz"))
|
||||
(sha256
|
||||
(base32
|
||||
"08g979ficj18i1w6w5219bgmns7czr03iadf20mk3lrzl8wbn1ax"))
|
||||
"0dl6vfi2lzz8alnklwxzfz624b95hb1ipjvd3mk177flmddcf24r"))
|
||||
(patches
|
||||
(search-patches "automake-skip-amhello-tests.patch"))))
|
||||
(search-patches "automake-regexp-syntax.patch"
|
||||
"automake-skip-amhello-tests.patch"
|
||||
"automake-test-gzip-warning.patch"))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs
|
||||
`(("autoconf" ,autoconf-wrapper)
|
||||
`(("autoconf" ,(autoconf-wrapper))
|
||||
("perl" ,perl)))
|
||||
(native-search-paths
|
||||
(list (search-path-specification
|
||||
@@ -274,48 +265,47 @@ output is indexed in many ways to simplify browsing.")
|
||||
(srfi srfi-1)
|
||||
(srfi srfi-26)
|
||||
(rnrs io ports))
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-before 'patch-source-shebangs 'patch-tests-shebangs
|
||||
(lambda _
|
||||
(let ((sh (which "sh")))
|
||||
(substitute* (find-files "t" "\\.(sh|tap)$")
|
||||
(("#![[:blank:]]?/bin/sh")
|
||||
(string-append "#!" sh)))
|
||||
#:phases (alist-cons-before
|
||||
'patch-source-shebangs 'patch-tests-shebangs
|
||||
(lambda _
|
||||
(let ((sh (which "sh")))
|
||||
(substitute* (find-files "t" "\\.(sh|tap)$")
|
||||
(("#![[:blank:]]?/bin/sh")
|
||||
(string-append "#!" sh)))
|
||||
|
||||
;; Set these variables for all the `configure' runs
|
||||
;; that occur during the test suite.
|
||||
(setenv "SHELL" sh)
|
||||
(setenv "CONFIG_SHELL" sh)
|
||||
#t)))
|
||||
;; Set these variables for all the `configure' runs
|
||||
;; that occur during the test suite.
|
||||
(setenv "SHELL" sh)
|
||||
(setenv "CONFIG_SHELL" sh)))
|
||||
|
||||
;; Files like `install-sh', `mdate.sh', etc. must use
|
||||
;; #!/bin/sh, otherwise users could leak erroneous shebangs
|
||||
;; in the wild. See <http://bugs.gnu.org/14201> for an
|
||||
;; example.
|
||||
(add-after 'install 'unpatch-shebangs
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(dir (string-append out "/share")))
|
||||
(define (starts-with-shebang? file)
|
||||
(equal? (call-with-input-file file
|
||||
(lambda (p)
|
||||
(list (get-u8 p) (get-u8 p))))
|
||||
(map char->integer '(#\# #\!))))
|
||||
;; Files like `install-sh', `mdate.sh', etc. must use
|
||||
;; #!/bin/sh, otherwise users could leak erroneous shebangs
|
||||
;; in the wild. See <http://bugs.gnu.org/14201> for an
|
||||
;; example.
|
||||
(alist-cons-after
|
||||
'install 'unpatch-shebangs
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(dir (string-append out "/share")))
|
||||
(define (starts-with-shebang? file)
|
||||
(equal? (call-with-input-file file
|
||||
(lambda (p)
|
||||
(list (get-u8 p) (get-u8 p))))
|
||||
(map char->integer '(#\# #\!))))
|
||||
|
||||
(for-each (lambda (file)
|
||||
(when (and (starts-with-shebang? file)
|
||||
(executable-file? file))
|
||||
(format #t "restoring shebang on `~a'~%"
|
||||
file)
|
||||
(substitute* file
|
||||
(("^#!.*/bin/sh")
|
||||
"#!/bin/sh")
|
||||
(("^#!.*/bin/env(.*)$" _ args)
|
||||
(string-append "#!/usr/bin/env"
|
||||
args)))))
|
||||
(find-files dir ".*"))
|
||||
#t))))))
|
||||
(for-each (lambda (file)
|
||||
(when (and (starts-with-shebang? file)
|
||||
(executable-file? file))
|
||||
(format #t "restoring shebang on `~a'~%"
|
||||
file)
|
||||
(substitute* file
|
||||
(("^#!.*/bin/sh")
|
||||
"#!/bin/sh")
|
||||
(("^#!.*/bin/env(.*)$" _ args)
|
||||
(string-append "#!/usr/bin/env"
|
||||
args)))))
|
||||
(find-files dir ".*"))))
|
||||
%standard-phases))))
|
||||
(home-page "https://www.gnu.org/software/automake/")
|
||||
(synopsis "Making GNU standards-compliant Makefiles")
|
||||
(description
|
||||
@@ -341,12 +331,9 @@ Makefile, simplifying the entire process for the developer.")
|
||||
(propagated-inputs `(("m4" ,m4)))
|
||||
(native-inputs `(("m4" ,m4)
|
||||
("perl" ,perl)
|
||||
;; XXX: this shouldn't be necessary, but without it test
|
||||
;; 102 fails because it cannot find ltdl/libltdl.la.
|
||||
("libltdl" ,libltdl)
|
||||
("help2man" ,help2man) ;because we modify ltmain.sh
|
||||
("automake" ,automake) ;some tests rely on 'aclocal'
|
||||
("autoconf" ,autoconf-wrapper))) ;others on 'autom4te'
|
||||
("autoconf" ,(autoconf-wrapper)))) ;others on 'autom4te'
|
||||
|
||||
(arguments
|
||||
`(;; Libltdl is provided as a separate package, so don't install it here.
|
||||
@@ -405,46 +392,13 @@ complexity of working with shared libraries across platforms.")
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
'(#:configure-flags '("--enable-ltdl-install") ;really install it
|
||||
#:phases (modify-phases %standard-phases
|
||||
(add-before 'configure 'change-directory
|
||||
(lambda _ (chdir "libltdl") #t)))))
|
||||
#:phases (alist-cons-before
|
||||
'configure 'change-directory
|
||||
(lambda _
|
||||
(chdir "libltdl"))
|
||||
%standard-phases)))
|
||||
|
||||
(synopsis "System-independent dlopen wrapper of GNU libtool")
|
||||
(description (package-description libtool))
|
||||
(home-page (package-home-page libtool))
|
||||
(license lgpl2.1+)))
|
||||
|
||||
(define-public pyconfigure
|
||||
(package
|
||||
(name "pyconfigure")
|
||||
(version "0.2.3")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "mirror://gnu/pyconfigure/pyconfigure-"
|
||||
version ".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"0kxi9bg7l6ric39vbz9ykz4a21xlihhh2zcc3297db8amvhqwhrp"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
`(#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-before 'configure 'patch-python
|
||||
(lambda _
|
||||
(substitute* "pyconf.in"
|
||||
(("/usr/bin/env python") (which "python3")))
|
||||
#t)))))
|
||||
(inputs
|
||||
`(("python" ,python-3)))
|
||||
(synopsis "@command{configure} interface for Python-based packages")
|
||||
(description
|
||||
"GNU pyconfigure provides template files for easily implementing
|
||||
standards-compliant configure scripts and Makefiles for Python-based packages.
|
||||
It is designed to work alongside existing Python setup scripts, making it easy
|
||||
to integrate into existing projects. Powerful and flexible Autoconf macros
|
||||
are available, allowing you to easily make adjustments to the installation
|
||||
procedure based on the capabilities of the target computer.")
|
||||
(home-page "https://www.gnu.org/software/pyconfigure/manual/")
|
||||
(license
|
||||
(fsf-free
|
||||
"https://www.gnu.org/prep/maintain/html_node/License-Notices-for-Other-Files.html"))))
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
;;; guix-emacs.el --- Emacs packages installed with Guix
|
||||
|
||||
;; Copyright © 2014, 2015, 2016, 2017 Alex Kost <alezost@gmail.com>
|
||||
;; Copyright © 2017 Kyle Meyer <kyle@kyleam.com>
|
||||
|
||||
;; This file is part of GNU Guix.
|
||||
|
||||
@@ -88,11 +87,9 @@ profiles.
|
||||
(interactive (list (if (fboundp 'guix-read-package-profile)
|
||||
(funcall 'guix-read-package-profile)
|
||||
guix-user-profile)))
|
||||
(let* ((env (getenv "GUIX_ENVIRONMENT"))
|
||||
(profiles (or profiles
|
||||
(append (list "/run/current-system/profile"
|
||||
guix-user-profile)
|
||||
(and env (list env))))))
|
||||
(let ((profiles (or profiles
|
||||
(list "/run/current-system/profile"
|
||||
guix-user-profile))))
|
||||
(dolist (profile profiles)
|
||||
(let ((dirs (guix-emacs-directories profile)))
|
||||
(when dirs
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/x86 4.1.49-gnu Kernel Configuration
|
||||
# Linux/x86 4.1.0-gnu Kernel Configuration
|
||||
#
|
||||
# CONFIG_64BIT is not set
|
||||
CONFIG_X86_32=y
|
||||
@@ -738,7 +738,6 @@ CONFIG_PCIEASPM_DEFAULT=y
|
||||
# CONFIG_PCIEASPM_POWERSAVE is not set
|
||||
# CONFIG_PCIEASPM_PERFORMANCE is not set
|
||||
CONFIG_PCIE_PME=y
|
||||
CONFIG_PCI_BUS_ADDR_T_64BIT=y
|
||||
CONFIG_PCI_MSI=y
|
||||
# CONFIG_PCI_DEBUG is not set
|
||||
CONFIG_PCI_REALLOC_ENABLE_AUTO=y
|
||||
@@ -1303,7 +1302,6 @@ CONFIG_BRIDGE=m
|
||||
CONFIG_BRIDGE_IGMP_SNOOPING=y
|
||||
CONFIG_BRIDGE_VLAN_FILTERING=y
|
||||
CONFIG_HAVE_NET_DSA=y
|
||||
# CONFIG_NET_DSA is not set
|
||||
CONFIG_VLAN_8021Q=m
|
||||
CONFIG_VLAN_8021Q_GVRP=y
|
||||
CONFIG_VLAN_8021Q_MVRP=y
|
||||
@@ -1956,7 +1954,7 @@ CONFIG_BLK_DEV_CRYPTOLOOP=m
|
||||
CONFIG_BLK_DEV_DRBD=m
|
||||
# CONFIG_DRBD_FAULT_INJECTION is not set
|
||||
CONFIG_BLK_DEV_NBD=m
|
||||
CONFIG_BLK_DEV_NVME=y
|
||||
CONFIG_BLK_DEV_NVME=m
|
||||
CONFIG_BLK_DEV_OSD=m
|
||||
CONFIG_BLK_DEV_SX8=m
|
||||
CONFIG_BLK_DEV_RAM=y
|
||||
@@ -2004,7 +2002,7 @@ CONFIG_HMC6352=m
|
||||
CONFIG_DS1682=m
|
||||
CONFIG_TI_DAC7512=m
|
||||
CONFIG_VMWARE_BALLOON=m
|
||||
CONFIG_BMP085=m
|
||||
CONFIG_BMP085=y
|
||||
CONFIG_BMP085_I2C=m
|
||||
CONFIG_BMP085_SPI=m
|
||||
CONFIG_PCH_PHUB=m
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/x86 4.1.49-gnu Kernel Configuration
|
||||
# Linux/x86 4.1.0-gnu Kernel Configuration
|
||||
#
|
||||
CONFIG_64BIT=y
|
||||
CONFIG_X86_64=y
|
||||
@@ -727,7 +727,6 @@ CONFIG_PCIEASPM_DEFAULT=y
|
||||
# CONFIG_PCIEASPM_POWERSAVE is not set
|
||||
# CONFIG_PCIEASPM_PERFORMANCE is not set
|
||||
CONFIG_PCIE_PME=y
|
||||
CONFIG_PCI_BUS_ADDR_T_64BIT=y
|
||||
CONFIG_PCI_MSI=y
|
||||
# CONFIG_PCI_DEBUG is not set
|
||||
CONFIG_PCI_REALLOC_ENABLE_AUTO=y
|
||||
@@ -802,6 +801,7 @@ CONFIG_X86_X32=y
|
||||
CONFIG_COMPAT=y
|
||||
CONFIG_COMPAT_FOR_U64_ALIGNMENT=y
|
||||
CONFIG_SYSVIPC_COMPAT=y
|
||||
CONFIG_KEYS_COMPAT=y
|
||||
CONFIG_X86_DEV_DMA_OPS=y
|
||||
CONFIG_PMC_ATOM=y
|
||||
CONFIG_NET=y
|
||||
@@ -1282,7 +1282,6 @@ CONFIG_BRIDGE=m
|
||||
CONFIG_BRIDGE_IGMP_SNOOPING=y
|
||||
CONFIG_BRIDGE_VLAN_FILTERING=y
|
||||
CONFIG_HAVE_NET_DSA=y
|
||||
# CONFIG_NET_DSA is not set
|
||||
CONFIG_VLAN_8021Q=m
|
||||
CONFIG_VLAN_8021Q_GVRP=y
|
||||
CONFIG_VLAN_8021Q_MVRP=y
|
||||
@@ -1920,7 +1919,7 @@ CONFIG_BLK_DEV_CRYPTOLOOP=m
|
||||
CONFIG_BLK_DEV_DRBD=m
|
||||
# CONFIG_DRBD_FAULT_INJECTION is not set
|
||||
CONFIG_BLK_DEV_NBD=m
|
||||
CONFIG_BLK_DEV_NVME=y
|
||||
CONFIG_BLK_DEV_NVME=m
|
||||
CONFIG_BLK_DEV_SKD=m
|
||||
CONFIG_BLK_DEV_OSD=m
|
||||
CONFIG_BLK_DEV_SX8=m
|
||||
@@ -1967,7 +1966,7 @@ CONFIG_HMC6352=m
|
||||
CONFIG_DS1682=m
|
||||
CONFIG_TI_DAC7512=m
|
||||
CONFIG_VMWARE_BALLOON=m
|
||||
CONFIG_BMP085=m
|
||||
CONFIG_BMP085=y
|
||||
CONFIG_BMP085_I2C=m
|
||||
CONFIG_BMP085_SPI=m
|
||||
CONFIG_USB_SWITCH_FSA9480=m
|
||||
@@ -7770,7 +7769,6 @@ CONFIG_OPTIMIZE_INLINING=y
|
||||
# Security options
|
||||
#
|
||||
CONFIG_KEYS=y
|
||||
CONFIG_KEYS_COMPAT=y
|
||||
CONFIG_PERSISTENT_KEYRINGS=y
|
||||
CONFIG_BIG_KEYS=y
|
||||
CONFIG_TRUSTED_KEYS=y
|
||||
|
||||
+188
-341
File diff suppressed because it is too large
Load Diff
+184
-353
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/x86 4.4.113-gnu Kernel Configuration
|
||||
# Linux/x86 4.4.0-gnu Kernel Configuration
|
||||
#
|
||||
# CONFIG_64BIT is not set
|
||||
CONFIG_X86_32=y
|
||||
@@ -302,6 +302,11 @@ CONFIG_MODULE_UNLOAD=y
|
||||
CONFIG_MODVERSIONS=y
|
||||
CONFIG_MODULE_SRCVERSION_ALL=y
|
||||
# CONFIG_MODULE_SIG is not set
|
||||
# CONFIG_MODULE_SIG_SHA1 is not set
|
||||
# CONFIG_MODULE_SIG_SHA224 is not set
|
||||
# CONFIG_MODULE_SIG_SHA256 is not set
|
||||
# CONFIG_MODULE_SIG_SHA384 is not set
|
||||
# CONFIG_MODULE_SIG_SHA512 is not set
|
||||
# CONFIG_MODULE_COMPRESS is not set
|
||||
CONFIG_MODULES_TREE_LOOKUP=y
|
||||
CONFIG_BLOCK=y
|
||||
@@ -374,7 +379,6 @@ CONFIG_SMP=y
|
||||
CONFIG_X86_FEATURE_NAMES=y
|
||||
CONFIG_X86_MPPARSE=y
|
||||
# CONFIG_X86_BIGSMP is not set
|
||||
CONFIG_RETPOLINE=y
|
||||
CONFIG_X86_EXTENDED_PLATFORM=y
|
||||
# CONFIG_X86_GOLDFISH is not set
|
||||
CONFIG_X86_INTEL_MID=y
|
||||
@@ -1323,7 +1327,6 @@ CONFIG_BRIDGE=m
|
||||
CONFIG_BRIDGE_IGMP_SNOOPING=y
|
||||
CONFIG_BRIDGE_VLAN_FILTERING=y
|
||||
CONFIG_HAVE_NET_DSA=y
|
||||
# CONFIG_NET_DSA is not set
|
||||
CONFIG_VLAN_8021Q=m
|
||||
CONFIG_VLAN_8021Q_GVRP=y
|
||||
CONFIG_VLAN_8021Q_MVRP=y
|
||||
@@ -1445,6 +1448,7 @@ CONFIG_OPENVSWITCH_VXLAN=m
|
||||
CONFIG_OPENVSWITCH_GENEVE=m
|
||||
CONFIG_VSOCKETS=m
|
||||
CONFIG_VMWARE_VMCI_VSOCKETS=m
|
||||
CONFIG_NETLINK_MMAP=y
|
||||
CONFIG_NETLINK_DIAG=m
|
||||
CONFIG_MPLS=y
|
||||
CONFIG_NET_MPLS_GSO=m
|
||||
@@ -1771,7 +1775,6 @@ CONFIG_DEV_COREDUMP=y
|
||||
CONFIG_SYS_HYPERVISOR=y
|
||||
# CONFIG_GENERIC_CPU_DEVICES is not set
|
||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||
CONFIG_GENERIC_CPU_VULNERABILITIES=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_REGMAP_I2C=y
|
||||
CONFIG_REGMAP_SPI=y
|
||||
@@ -2013,7 +2016,7 @@ CONFIG_VIRTIO_BLK=y
|
||||
# CONFIG_BLK_DEV_HD is not set
|
||||
CONFIG_BLK_DEV_RBD=m
|
||||
CONFIG_BLK_DEV_RSXX=m
|
||||
CONFIG_BLK_DEV_NVME=y
|
||||
CONFIG_BLK_DEV_NVME=m
|
||||
|
||||
#
|
||||
# Misc devices
|
||||
@@ -2044,7 +2047,7 @@ CONFIG_HMC6352=m
|
||||
CONFIG_DS1682=m
|
||||
CONFIG_TI_DAC7512=m
|
||||
CONFIG_VMWARE_BALLOON=m
|
||||
CONFIG_BMP085=m
|
||||
CONFIG_BMP085=y
|
||||
CONFIG_BMP085_I2C=m
|
||||
CONFIG_BMP085_SPI=m
|
||||
CONFIG_PCH_PHUB=m
|
||||
@@ -8354,7 +8357,7 @@ CONFIG_CRYPTO_RNG_DEFAULT=m
|
||||
CONFIG_CRYPTO_PCOMP=m
|
||||
CONFIG_CRYPTO_PCOMP2=y
|
||||
CONFIG_CRYPTO_AKCIPHER2=y
|
||||
CONFIG_CRYPTO_AKCIPHER=y
|
||||
CONFIG_CRYPTO_AKCIPHER=m
|
||||
CONFIG_CRYPTO_RSA=m
|
||||
CONFIG_CRYPTO_MANAGER=y
|
||||
CONFIG_CRYPTO_MANAGER2=y
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/x86 4.4.113-gnu Kernel Configuration
|
||||
# Linux/x86 4.4.0-gnu Kernel Configuration
|
||||
#
|
||||
CONFIG_64BIT=y
|
||||
CONFIG_X86_64=y
|
||||
@@ -315,6 +315,11 @@ CONFIG_MODULE_UNLOAD=y
|
||||
CONFIG_MODVERSIONS=y
|
||||
CONFIG_MODULE_SRCVERSION_ALL=y
|
||||
# CONFIG_MODULE_SIG is not set
|
||||
# CONFIG_MODULE_SIG_SHA1 is not set
|
||||
# CONFIG_MODULE_SIG_SHA224 is not set
|
||||
# CONFIG_MODULE_SIG_SHA256 is not set
|
||||
# CONFIG_MODULE_SIG_SHA384 is not set
|
||||
# CONFIG_MODULE_SIG_SHA512 is not set
|
||||
# CONFIG_MODULE_COMPRESS is not set
|
||||
CONFIG_MODULES_TREE_LOOKUP=y
|
||||
CONFIG_BLOCK=y
|
||||
@@ -387,7 +392,6 @@ CONFIG_SMP=y
|
||||
CONFIG_X86_FEATURE_NAMES=y
|
||||
CONFIG_X86_X2APIC=y
|
||||
CONFIG_X86_MPPARSE=y
|
||||
CONFIG_RETPOLINE=y
|
||||
CONFIG_X86_EXTENDED_PLATFORM=y
|
||||
CONFIG_X86_NUMACHIP=y
|
||||
# CONFIG_X86_VSMP is not set
|
||||
@@ -811,6 +815,7 @@ CONFIG_X86_X32=y
|
||||
CONFIG_COMPAT=y
|
||||
CONFIG_COMPAT_FOR_U64_ALIGNMENT=y
|
||||
CONFIG_SYSVIPC_COMPAT=y
|
||||
CONFIG_KEYS_COMPAT=y
|
||||
CONFIG_X86_DEV_DMA_OPS=y
|
||||
CONFIG_PMC_ATOM=y
|
||||
CONFIG_NET=y
|
||||
@@ -1300,7 +1305,6 @@ CONFIG_BRIDGE=m
|
||||
CONFIG_BRIDGE_IGMP_SNOOPING=y
|
||||
CONFIG_BRIDGE_VLAN_FILTERING=y
|
||||
CONFIG_HAVE_NET_DSA=y
|
||||
# CONFIG_NET_DSA is not set
|
||||
CONFIG_VLAN_8021Q=m
|
||||
CONFIG_VLAN_8021Q_GVRP=y
|
||||
CONFIG_VLAN_8021Q_MVRP=y
|
||||
@@ -1418,6 +1422,7 @@ CONFIG_OPENVSWITCH_VXLAN=m
|
||||
CONFIG_OPENVSWITCH_GENEVE=m
|
||||
CONFIG_VSOCKETS=m
|
||||
CONFIG_VMWARE_VMCI_VSOCKETS=m
|
||||
CONFIG_NETLINK_MMAP=y
|
||||
CONFIG_NETLINK_DIAG=m
|
||||
CONFIG_MPLS=y
|
||||
CONFIG_NET_MPLS_GSO=m
|
||||
@@ -1739,7 +1744,6 @@ CONFIG_DEV_COREDUMP=y
|
||||
CONFIG_SYS_HYPERVISOR=y
|
||||
# CONFIG_GENERIC_CPU_DEVICES is not set
|
||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||
CONFIG_GENERIC_CPU_VULNERABILITIES=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_REGMAP_I2C=y
|
||||
CONFIG_REGMAP_SPI=y
|
||||
@@ -1976,7 +1980,7 @@ CONFIG_VIRTIO_BLK=y
|
||||
# CONFIG_BLK_DEV_HD is not set
|
||||
CONFIG_BLK_DEV_RBD=m
|
||||
CONFIG_BLK_DEV_RSXX=m
|
||||
CONFIG_BLK_DEV_NVME=y
|
||||
CONFIG_BLK_DEV_NVME=m
|
||||
|
||||
#
|
||||
# Misc devices
|
||||
@@ -2005,7 +2009,7 @@ CONFIG_HMC6352=m
|
||||
CONFIG_DS1682=m
|
||||
CONFIG_TI_DAC7512=m
|
||||
CONFIG_VMWARE_BALLOON=m
|
||||
CONFIG_BMP085=m
|
||||
CONFIG_BMP085=y
|
||||
CONFIG_BMP085_I2C=m
|
||||
CONFIG_BMP085_SPI=m
|
||||
CONFIG_USB_SWITCH_FSA9480=m
|
||||
@@ -8054,14 +8058,12 @@ CONFIG_PUNIT_ATOM_DEBUG=m
|
||||
# Security options
|
||||
#
|
||||
CONFIG_KEYS=y
|
||||
CONFIG_KEYS_COMPAT=y
|
||||
CONFIG_PERSISTENT_KEYRINGS=y
|
||||
CONFIG_BIG_KEYS=y
|
||||
CONFIG_TRUSTED_KEYS=y
|
||||
CONFIG_ENCRYPTED_KEYS=y
|
||||
# CONFIG_SECURITY_DMESG_RESTRICT is not set
|
||||
CONFIG_SECURITY=y
|
||||
CONFIG_PAGE_TABLE_ISOLATION=y
|
||||
CONFIG_SECURITYFS=y
|
||||
CONFIG_SECURITY_NETWORK=y
|
||||
CONFIG_SECURITY_NETWORK_XFRM=y
|
||||
@@ -8142,7 +8144,7 @@ CONFIG_CRYPTO_RNG_DEFAULT=m
|
||||
CONFIG_CRYPTO_PCOMP=m
|
||||
CONFIG_CRYPTO_PCOMP2=y
|
||||
CONFIG_CRYPTO_AKCIPHER2=y
|
||||
CONFIG_CRYPTO_AKCIPHER=y
|
||||
CONFIG_CRYPTO_AKCIPHER=m
|
||||
CONFIG_CRYPTO_RSA=m
|
||||
CONFIG_CRYPTO_MANAGER=y
|
||||
CONFIG_CRYPTO_MANAGER2=y
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/x86 4.9.78-gnu Kernel Configuration
|
||||
# Linux/x86 4.9.0-gnu Kernel Configuration
|
||||
#
|
||||
# CONFIG_64BIT is not set
|
||||
CONFIG_X86_32=y
|
||||
@@ -397,7 +397,6 @@ CONFIG_X86_FAST_FEATURE_TESTS=y
|
||||
CONFIG_X86_MPPARSE=y
|
||||
# CONFIG_X86_BIGSMP is not set
|
||||
# CONFIG_GOLDFISH is not set
|
||||
CONFIG_RETPOLINE=y
|
||||
CONFIG_X86_EXTENDED_PLATFORM=y
|
||||
# CONFIG_X86_GOLDFISH is not set
|
||||
CONFIG_X86_INTEL_MID=y
|
||||
@@ -1384,7 +1383,6 @@ CONFIG_BRIDGE=m
|
||||
CONFIG_BRIDGE_IGMP_SNOOPING=y
|
||||
CONFIG_BRIDGE_VLAN_FILTERING=y
|
||||
CONFIG_HAVE_NET_DSA=y
|
||||
# CONFIG_NET_DSA is not set
|
||||
CONFIG_VLAN_8021Q=m
|
||||
CONFIG_VLAN_8021Q_GVRP=y
|
||||
CONFIG_VLAN_8021Q_MVRP=y
|
||||
@@ -1866,7 +1864,6 @@ CONFIG_DEV_COREDUMP=y
|
||||
CONFIG_SYS_HYPERVISOR=y
|
||||
# CONFIG_GENERIC_CPU_DEVICES is not set
|
||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||
CONFIG_GENERIC_CPU_VULNERABILITIES=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_REGMAP_I2C=y
|
||||
CONFIG_REGMAP_SPI=y
|
||||
@@ -2108,8 +2105,8 @@ CONFIG_VIRTIO_BLK=y
|
||||
# CONFIG_BLK_DEV_HD is not set
|
||||
CONFIG_BLK_DEV_RBD=m
|
||||
CONFIG_BLK_DEV_RSXX=m
|
||||
CONFIG_NVME_CORE=y
|
||||
CONFIG_BLK_DEV_NVME=y
|
||||
CONFIG_NVME_CORE=m
|
||||
CONFIG_BLK_DEV_NVME=m
|
||||
# CONFIG_BLK_DEV_NVME_SCSI is not set
|
||||
CONFIG_NVME_FABRICS=m
|
||||
CONFIG_NVME_RDMA=m
|
||||
@@ -6041,7 +6038,6 @@ CONFIG_SND_SOC_INTEL_HASWELL=m
|
||||
CONFIG_SND_SOC_INTEL_HASWELL_MACH=m
|
||||
CONFIG_SND_SOC_INTEL_BXT_DA7219_MAX98357A_MACH=m
|
||||
CONFIG_SND_SOC_INTEL_BXT_RT298_MACH=m
|
||||
# CONFIG_SND_SOC_INTEL_BDW_RT5677_MACH is not set
|
||||
CONFIG_SND_SOC_INTEL_BROADWELL_MACH=m
|
||||
CONFIG_SND_SOC_INTEL_BYTCR_RT5640_MACH=m
|
||||
CONFIG_SND_SOC_INTEL_BYTCR_RT5651_MACH=m
|
||||
@@ -8759,7 +8755,7 @@ CONFIG_CRYPTO=y
|
||||
#
|
||||
CONFIG_CRYPTO_ALGAPI=y
|
||||
CONFIG_CRYPTO_ALGAPI2=y
|
||||
CONFIG_CRYPTO_AEAD=y
|
||||
CONFIG_CRYPTO_AEAD=m
|
||||
CONFIG_CRYPTO_AEAD2=y
|
||||
CONFIG_CRYPTO_BLKCIPHER=y
|
||||
CONFIG_CRYPTO_BLKCIPHER2=y
|
||||
@@ -8767,7 +8763,7 @@ CONFIG_CRYPTO_HASH=y
|
||||
CONFIG_CRYPTO_HASH2=y
|
||||
CONFIG_CRYPTO_RNG=y
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CRYPTO_RNG_DEFAULT=y
|
||||
CONFIG_CRYPTO_RNG_DEFAULT=m
|
||||
CONFIG_CRYPTO_AKCIPHER2=y
|
||||
CONFIG_CRYPTO_AKCIPHER=y
|
||||
CONFIG_CRYPTO_KPP2=y
|
||||
@@ -8779,8 +8775,8 @@ CONFIG_CRYPTO_MANAGER=y
|
||||
CONFIG_CRYPTO_MANAGER2=y
|
||||
CONFIG_CRYPTO_USER=m
|
||||
CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y
|
||||
CONFIG_CRYPTO_GF128MUL=y
|
||||
CONFIG_CRYPTO_NULL=y
|
||||
CONFIG_CRYPTO_GF128MUL=m
|
||||
CONFIG_CRYPTO_NULL=m
|
||||
CONFIG_CRYPTO_NULL2=y
|
||||
CONFIG_CRYPTO_PCRYPT=m
|
||||
CONFIG_CRYPTO_WORKQUEUE=y
|
||||
@@ -8795,16 +8791,16 @@ CONFIG_CRYPTO_GLUE_HELPER_X86=m
|
||||
# Authenticated Encryption with Associated Data
|
||||
#
|
||||
CONFIG_CRYPTO_CCM=m
|
||||
CONFIG_CRYPTO_GCM=y
|
||||
CONFIG_CRYPTO_GCM=m
|
||||
CONFIG_CRYPTO_CHACHA20POLY1305=m
|
||||
CONFIG_CRYPTO_SEQIV=y
|
||||
CONFIG_CRYPTO_SEQIV=m
|
||||
CONFIG_CRYPTO_ECHAINIV=m
|
||||
|
||||
#
|
||||
# Block modes
|
||||
#
|
||||
CONFIG_CRYPTO_CBC=y
|
||||
CONFIG_CRYPTO_CTR=y
|
||||
CONFIG_CRYPTO_CTR=m
|
||||
CONFIG_CRYPTO_CTS=m
|
||||
CONFIG_CRYPTO_ECB=y
|
||||
CONFIG_CRYPTO_LRW=m
|
||||
@@ -8828,7 +8824,7 @@ CONFIG_CRYPTO_CRC32C_INTEL=y
|
||||
CONFIG_CRYPTO_CRC32=m
|
||||
CONFIG_CRYPTO_CRC32_PCLMUL=m
|
||||
CONFIG_CRYPTO_CRCT10DIF=y
|
||||
CONFIG_CRYPTO_GHASH=y
|
||||
CONFIG_CRYPTO_GHASH=m
|
||||
CONFIG_CRYPTO_POLY1305=m
|
||||
CONFIG_CRYPTO_MD4=m
|
||||
CONFIG_CRYPTO_MD5=y
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/x86 4.9.78-gnu Kernel Configuration
|
||||
# Linux/x86 4.9.0-gnu Kernel Configuration
|
||||
#
|
||||
CONFIG_64BIT=y
|
||||
CONFIG_X86_64=y
|
||||
@@ -414,7 +414,6 @@ CONFIG_X86_FAST_FEATURE_TESTS=y
|
||||
CONFIG_X86_X2APIC=y
|
||||
CONFIG_X86_MPPARSE=y
|
||||
# CONFIG_GOLDFISH is not set
|
||||
CONFIG_RETPOLINE=y
|
||||
CONFIG_X86_EXTENDED_PLATFORM=y
|
||||
CONFIG_X86_NUMACHIP=y
|
||||
# CONFIG_X86_VSMP is not set
|
||||
@@ -872,6 +871,7 @@ CONFIG_X86_X32=y
|
||||
CONFIG_COMPAT=y
|
||||
CONFIG_COMPAT_FOR_U64_ALIGNMENT=y
|
||||
CONFIG_SYSVIPC_COMPAT=y
|
||||
CONFIG_KEYS_COMPAT=y
|
||||
CONFIG_X86_DEV_DMA_OPS=y
|
||||
CONFIG_PMC_ATOM=y
|
||||
CONFIG_NET=y
|
||||
@@ -1373,7 +1373,6 @@ CONFIG_BRIDGE=m
|
||||
CONFIG_BRIDGE_IGMP_SNOOPING=y
|
||||
CONFIG_BRIDGE_VLAN_FILTERING=y
|
||||
CONFIG_HAVE_NET_DSA=y
|
||||
# CONFIG_NET_DSA is not set
|
||||
CONFIG_VLAN_8021Q=m
|
||||
CONFIG_VLAN_8021Q_GVRP=y
|
||||
CONFIG_VLAN_8021Q_MVRP=y
|
||||
@@ -1846,7 +1845,6 @@ CONFIG_DEV_COREDUMP=y
|
||||
CONFIG_SYS_HYPERVISOR=y
|
||||
# CONFIG_GENERIC_CPU_DEVICES is not set
|
||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||
CONFIG_GENERIC_CPU_VULNERABILITIES=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_REGMAP_I2C=y
|
||||
CONFIG_REGMAP_SPI=y
|
||||
@@ -2083,8 +2081,8 @@ CONFIG_VIRTIO_BLK=y
|
||||
# CONFIG_BLK_DEV_HD is not set
|
||||
CONFIG_BLK_DEV_RBD=m
|
||||
CONFIG_BLK_DEV_RSXX=m
|
||||
CONFIG_NVME_CORE=y
|
||||
CONFIG_BLK_DEV_NVME=y
|
||||
CONFIG_NVME_CORE=m
|
||||
CONFIG_BLK_DEV_NVME=m
|
||||
# CONFIG_BLK_DEV_NVME_SCSI is not set
|
||||
CONFIG_NVME_FABRICS=m
|
||||
CONFIG_NVME_RDMA=m
|
||||
@@ -4475,6 +4473,8 @@ CONFIG_USBPCWATCHDOG=m
|
||||
# Watchdog Pretimeout Governors
|
||||
#
|
||||
# CONFIG_WATCHDOG_PRETIMEOUT_GOV is not set
|
||||
# CONFIG_WATCHDOG_PRETIMEOUT_DEFAULT_GOV_NOOP is not set
|
||||
# CONFIG_WATCHDOG_PRETIMEOUT_DEFAULT_GOV_PANIC is not set
|
||||
CONFIG_SSB_POSSIBLE=y
|
||||
|
||||
#
|
||||
@@ -5848,7 +5848,6 @@ CONFIG_SND_SOC_INTEL_HASWELL=m
|
||||
CONFIG_SND_SOC_INTEL_HASWELL_MACH=m
|
||||
CONFIG_SND_SOC_INTEL_BXT_DA7219_MAX98357A_MACH=m
|
||||
CONFIG_SND_SOC_INTEL_BXT_RT298_MACH=m
|
||||
# CONFIG_SND_SOC_INTEL_BDW_RT5677_MACH is not set
|
||||
CONFIG_SND_SOC_INTEL_BROADWELL_MACH=m
|
||||
CONFIG_SND_SOC_INTEL_BYTCR_RT5640_MACH=m
|
||||
CONFIG_SND_SOC_INTEL_BYTCR_RT5651_MACH=m
|
||||
@@ -8496,7 +8495,6 @@ CONFIG_PUNIT_ATOM_DEBUG=m
|
||||
# Security options
|
||||
#
|
||||
CONFIG_KEYS=y
|
||||
CONFIG_KEYS_COMPAT=y
|
||||
CONFIG_PERSISTENT_KEYRINGS=y
|
||||
CONFIG_BIG_KEYS=y
|
||||
CONFIG_TRUSTED_KEYS=y
|
||||
@@ -8504,7 +8502,6 @@ CONFIG_ENCRYPTED_KEYS=y
|
||||
CONFIG_KEY_DH_OPERATIONS=y
|
||||
# CONFIG_SECURITY_DMESG_RESTRICT is not set
|
||||
CONFIG_SECURITY=y
|
||||
CONFIG_PAGE_TABLE_ISOLATION=y
|
||||
CONFIG_SECURITYFS=y
|
||||
CONFIG_SECURITY_NETWORK=y
|
||||
CONFIG_SECURITY_NETWORK_XFRM=y
|
||||
@@ -8584,7 +8581,7 @@ CONFIG_CRYPTO=y
|
||||
#
|
||||
CONFIG_CRYPTO_ALGAPI=y
|
||||
CONFIG_CRYPTO_ALGAPI2=y
|
||||
CONFIG_CRYPTO_AEAD=y
|
||||
CONFIG_CRYPTO_AEAD=m
|
||||
CONFIG_CRYPTO_AEAD2=y
|
||||
CONFIG_CRYPTO_BLKCIPHER=y
|
||||
CONFIG_CRYPTO_BLKCIPHER2=y
|
||||
@@ -8592,7 +8589,7 @@ CONFIG_CRYPTO_HASH=y
|
||||
CONFIG_CRYPTO_HASH2=y
|
||||
CONFIG_CRYPTO_RNG=y
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CRYPTO_RNG_DEFAULT=y
|
||||
CONFIG_CRYPTO_RNG_DEFAULT=m
|
||||
CONFIG_CRYPTO_AKCIPHER2=y
|
||||
CONFIG_CRYPTO_AKCIPHER=y
|
||||
CONFIG_CRYPTO_KPP2=y
|
||||
@@ -8604,8 +8601,8 @@ CONFIG_CRYPTO_MANAGER=y
|
||||
CONFIG_CRYPTO_MANAGER2=y
|
||||
CONFIG_CRYPTO_USER=m
|
||||
CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y
|
||||
CONFIG_CRYPTO_GF128MUL=y
|
||||
CONFIG_CRYPTO_NULL=y
|
||||
CONFIG_CRYPTO_GF128MUL=m
|
||||
CONFIG_CRYPTO_NULL=m
|
||||
CONFIG_CRYPTO_NULL2=y
|
||||
CONFIG_CRYPTO_PCRYPT=m
|
||||
CONFIG_CRYPTO_WORKQUEUE=y
|
||||
@@ -8620,16 +8617,16 @@ CONFIG_CRYPTO_GLUE_HELPER_X86=m
|
||||
# Authenticated Encryption with Associated Data
|
||||
#
|
||||
CONFIG_CRYPTO_CCM=m
|
||||
CONFIG_CRYPTO_GCM=y
|
||||
CONFIG_CRYPTO_GCM=m
|
||||
CONFIG_CRYPTO_CHACHA20POLY1305=m
|
||||
CONFIG_CRYPTO_SEQIV=y
|
||||
CONFIG_CRYPTO_SEQIV=m
|
||||
CONFIG_CRYPTO_ECHAINIV=m
|
||||
|
||||
#
|
||||
# Block modes
|
||||
#
|
||||
CONFIG_CRYPTO_CBC=y
|
||||
CONFIG_CRYPTO_CTR=y
|
||||
CONFIG_CRYPTO_CTR=m
|
||||
CONFIG_CRYPTO_CTS=m
|
||||
CONFIG_CRYPTO_ECB=y
|
||||
CONFIG_CRYPTO_LRW=m
|
||||
@@ -8654,7 +8651,7 @@ CONFIG_CRYPTO_CRC32=m
|
||||
CONFIG_CRYPTO_CRC32_PCLMUL=m
|
||||
CONFIG_CRYPTO_CRCT10DIF=y
|
||||
CONFIG_CRYPTO_CRCT10DIF_PCLMUL=m
|
||||
CONFIG_CRYPTO_GHASH=y
|
||||
CONFIG_CRYPTO_GHASH=m
|
||||
CONFIG_CRYPTO_POLY1305=m
|
||||
CONFIG_CRYPTO_POLY1305_X86_64=m
|
||||
CONFIG_CRYPTO_MD4=m
|
||||
|
||||
@@ -1,313 +0,0 @@
|
||||
/* GNU Guix --- Functional package management for GNU
|
||||
Copyright (C) 2018 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/>. */
|
||||
|
||||
/* Make the given @WRAPPED_PROGRAM@ relocatable by executing it in a separate
|
||||
mount namespace where the store is mounted in its right place.
|
||||
|
||||
We would happily do that in Scheme using 'call-with-container'. However,
|
||||
this very program needs to be relocatable, so it needs to be statically
|
||||
linked, which complicates things (Guile's modules can hardly be "linked"
|
||||
into a single executable.) */
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <sched.h>
|
||||
#include <sys/mount.h>
|
||||
#include <errno.h>
|
||||
#include <libgen.h>
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#include <fcntl.h>
|
||||
#include <dirent.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
/* Concatenate DIRECTORY, a slash, and FILE. Return the result, which the
|
||||
caller must eventually free. */
|
||||
static char *
|
||||
concat (const char *directory, const char *file)
|
||||
{
|
||||
char *result = malloc (strlen (directory) + 2 + strlen (file));
|
||||
assert (result != NULL);
|
||||
|
||||
strcpy (result, directory);
|
||||
strcat (result, "/");
|
||||
strcat (result, file);
|
||||
return result;
|
||||
}
|
||||
|
||||
static void
|
||||
mkdir_p (const char *directory)
|
||||
{
|
||||
if (strcmp (directory, "/") != 0)
|
||||
{
|
||||
char *parent = dirname (strdupa (directory));
|
||||
mkdir_p (parent);
|
||||
int err = mkdir (directory, 0700);
|
||||
if (err < 0 && errno != EEXIST)
|
||||
assert_perror (errno);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
rm_rf (const char *directory)
|
||||
{
|
||||
DIR *stream = opendir (directory);
|
||||
|
||||
for (struct dirent *entry = readdir (stream);
|
||||
entry != NULL;
|
||||
entry = readdir (stream))
|
||||
{
|
||||
if (strcmp (entry->d_name, ".") == 0
|
||||
|| strcmp (entry->d_name, "..") == 0)
|
||||
continue;
|
||||
|
||||
char *full = concat (directory, entry->d_name);
|
||||
|
||||
int err = unlink (full);
|
||||
if (err < 0)
|
||||
{
|
||||
if (errno == EISDIR)
|
||||
/* Recurse (we expect a shallow directory structure so there's
|
||||
little risk of stack overflow.) */
|
||||
rm_rf (full);
|
||||
else
|
||||
assert_perror (errno);
|
||||
}
|
||||
|
||||
free (full);
|
||||
}
|
||||
|
||||
closedir (stream);
|
||||
|
||||
int err = rmdir (directory);
|
||||
if (err < 0 && errno != ENOENT)
|
||||
assert_perror (errno);
|
||||
}
|
||||
|
||||
/* Bind mount all the top-level entries in SOURCE to TARGET. */
|
||||
static void
|
||||
bind_mount (const char *source, const char *target)
|
||||
{
|
||||
DIR *stream = opendir (source);
|
||||
|
||||
for (struct dirent *entry = readdir (stream);
|
||||
entry != NULL;
|
||||
entry = readdir (stream))
|
||||
{
|
||||
/* XXX: Some file systems may not report a useful 'd_type'. Ignore them
|
||||
for now. */
|
||||
assert (entry->d_type != DT_UNKNOWN);
|
||||
|
||||
if (strcmp (entry->d_name, ".") == 0
|
||||
|| strcmp (entry->d_name, "..") == 0)
|
||||
continue;
|
||||
|
||||
char *abs_source = concat (source, entry->d_name);
|
||||
char *new_entry = concat (target, entry->d_name);
|
||||
|
||||
if (entry->d_type == DT_LNK)
|
||||
{
|
||||
char target[PATH_MAX];
|
||||
|
||||
ssize_t result = readlink (abs_source, target, sizeof target - 1);
|
||||
if (result > 0)
|
||||
{
|
||||
target[result] = '\0';
|
||||
int err = symlink (target, new_entry);
|
||||
if (err < 0)
|
||||
assert_perror (errno);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Create the mount point. */
|
||||
if (entry->d_type == DT_DIR)
|
||||
{
|
||||
int err = mkdir (new_entry, 0700);
|
||||
if (err != 0)
|
||||
assert_perror (errno);
|
||||
}
|
||||
else
|
||||
close (open (new_entry, O_WRONLY | O_CREAT));
|
||||
|
||||
int err = mount (abs_source, new_entry, "none",
|
||||
MS_BIND | MS_REC | MS_RDONLY, NULL);
|
||||
|
||||
/* It used to be that only directories could be bind-mounted. Thus,
|
||||
keep going if we fail to bind-mount a non-directory entry.
|
||||
That's OK because regular files in the root file system are
|
||||
usually uninteresting. */
|
||||
if (err != 0 && entry->d_type != DT_DIR)
|
||||
assert_perror (errno);
|
||||
|
||||
free (new_entry);
|
||||
free (abs_source);
|
||||
}
|
||||
}
|
||||
|
||||
closedir (stream);
|
||||
}
|
||||
|
||||
/* Write the user/group ID map for PID to FILE, mapping ID to itself. See
|
||||
user_namespaces(7). */
|
||||
static void
|
||||
write_id_map (pid_t pid, const char *file, int id)
|
||||
{
|
||||
char id_map_file[100];
|
||||
snprintf (id_map_file, sizeof id_map_file, "/proc/%d/%s", pid, file);
|
||||
|
||||
char id_map[100];
|
||||
|
||||
/* Map root and the current user. */
|
||||
int len = snprintf (id_map, sizeof id_map, "%d %d 1\n", id, id);
|
||||
int fd = open (id_map_file, O_WRONLY);
|
||||
if (fd < 0)
|
||||
assert_perror (errno);
|
||||
|
||||
int n = write (fd, id_map, len);
|
||||
if (n < 0)
|
||||
assert_perror (errno);
|
||||
|
||||
close (fd);
|
||||
}
|
||||
|
||||
/* Disallow setgroups(2) for PID. */
|
||||
static void
|
||||
disallow_setgroups (pid_t pid)
|
||||
{
|
||||
char file[100];
|
||||
|
||||
snprintf (file, sizeof file, "/proc/%d/setgroups", pid);
|
||||
|
||||
int fd = open (file, O_WRONLY);
|
||||
if (fd < 0)
|
||||
assert_perror (errno);
|
||||
|
||||
int err = write (fd, "deny", 5);
|
||||
if (err < 0)
|
||||
assert_perror (errno);
|
||||
|
||||
close (fd);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
ssize_t size;
|
||||
char self[PATH_MAX];
|
||||
size = readlink ("/proc/self/exe", self, sizeof self - 1);
|
||||
assert (size > 0);
|
||||
|
||||
/* SELF is something like "/home/ludo/.local/gnu/store/…-foo/bin/ls" and we
|
||||
want to extract "/home/ludo/.local/gnu/store". */
|
||||
size_t index = strlen (self)
|
||||
- strlen ("@WRAPPED_PROGRAM@")
|
||||
+ strlen ("@STORE_DIRECTORY@");
|
||||
char *store = strdup (self);
|
||||
store[index] = '\0';
|
||||
|
||||
struct stat statbuf;
|
||||
|
||||
/* If STORE is already at the "right" place, we can execute
|
||||
@WRAPPED_PROGRAM@ right away. This is not just an optimization: it's
|
||||
needed when running one of these wrappers from within an unshare'd
|
||||
namespace, because 'unshare' fails with EPERM in that context. */
|
||||
if (strcmp (store, "@STORE_DIRECTORY@") != 0
|
||||
&& lstat ("@WRAPPED_PROGRAM@", &statbuf) != 0)
|
||||
{
|
||||
/* Spawn @WRAPPED_PROGRAM@ in a separate namespace where STORE is
|
||||
bind-mounted in the right place. */
|
||||
int err;
|
||||
char *new_root = mkdtemp (strdup ("/tmp/guix-exec-XXXXXX"));
|
||||
char *new_store = concat (new_root, "@STORE_DIRECTORY@");
|
||||
char *cwd = get_current_dir_name ();
|
||||
|
||||
/* Create a child with separate namespaces and set up bind-mounts from
|
||||
there. That way, bind-mounts automatically disappear when the child
|
||||
exits, which simplifies cleanup for the parent. Note: clone is more
|
||||
convenient than fork + unshare since the parent can directly write
|
||||
the child uid_map/gid_map files. */
|
||||
pid_t child = syscall (SYS_clone, SIGCHLD | CLONE_NEWNS | CLONE_NEWUSER,
|
||||
NULL, NULL, NULL);
|
||||
switch (child)
|
||||
{
|
||||
case 0:
|
||||
/* Note: Due to <https://bugzilla.kernel.org/show_bug.cgi?id=183461>
|
||||
we cannot make NEW_ROOT a tmpfs (which would have saved the need
|
||||
for 'rm_rf'.) */
|
||||
bind_mount ("/", new_root);
|
||||
mkdir_p (new_store);
|
||||
err = mount (store, new_store, "none", MS_BIND | MS_REC | MS_RDONLY,
|
||||
NULL);
|
||||
if (err < 0)
|
||||
assert_perror (errno);
|
||||
|
||||
chdir (new_root);
|
||||
err = chroot (new_root);
|
||||
if (err < 0)
|
||||
assert_perror (errno);
|
||||
|
||||
/* Change back to where we were before chroot'ing. */
|
||||
chdir (cwd);
|
||||
break;
|
||||
|
||||
case -1:
|
||||
fprintf (stderr, "%s: error: 'clone' failed: %m\n", argv[0]);
|
||||
fprintf (stderr, "\
|
||||
This may be because \"user namespaces\" are not supported on this system.\n\
|
||||
Consequently, we cannot run '@WRAPPED_PROGRAM@',\n\
|
||||
unless you move it to the '@STORE_DIRECTORY@' directory.\n\
|
||||
\n\
|
||||
Please refer to the 'guix pack' documentation for more information.\n");
|
||||
return EXIT_FAILURE;
|
||||
|
||||
default:
|
||||
{
|
||||
/* Map the current user/group ID in the child's namespace (the
|
||||
default is to get the "overflow UID", i.e., the UID of
|
||||
"nobody"). We must first disallow 'setgroups' for that
|
||||
process. */
|
||||
disallow_setgroups (child);
|
||||
write_id_map (child, "uid_map", getuid ());
|
||||
write_id_map (child, "gid_map", getgid ());
|
||||
|
||||
int status;
|
||||
waitpid (child, &status, 0);
|
||||
chdir ("/"); /* avoid EBUSY */
|
||||
rm_rf (new_root);
|
||||
free (new_root);
|
||||
exit (status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* The executable is available under @STORE_DIRECTORY@, so we can now
|
||||
execute it. */
|
||||
int err = execv ("@WRAPPED_PROGRAM@", argv);
|
||||
if (err < 0)
|
||||
assert_perror (errno);
|
||||
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
+31
-18
@@ -1,7 +1,6 @@
|
||||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2013, 2014, 2015, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2013, 2014, 2015, 2017 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
|
||||
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
@@ -34,7 +33,7 @@
|
||||
(define-public avahi
|
||||
(package
|
||||
(name "avahi")
|
||||
(version "0.7")
|
||||
(version "0.6.31")
|
||||
(home-page "http://avahi.org")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
@@ -42,7 +41,7 @@
|
||||
version ".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"0128n7jlshw4bpx0vg8lwj8qwdisjxi7mvniwfafgnkzzrfrpaap"))
|
||||
"0j5b5ld6bjyh3qhd2nw0jb84znq0wqai7fsrdzg7bpg24jdp2wl3"))
|
||||
(patches (search-patches "avahi-localstatedir.patch"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
@@ -77,25 +76,39 @@ DNS-SD (for \"DNS-Based Service Discovery\") protocols.")
|
||||
(define-public nss-mdns
|
||||
(package
|
||||
(name "nss-mdns")
|
||||
(version "0.14.1")
|
||||
(home-page "https://github.com/lathiat/nss-mdns")
|
||||
(version "0.10")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append home-page "/releases/download/v" version "/"
|
||||
name "-" version ".tar.gz"))
|
||||
(uri (list
|
||||
(string-append
|
||||
"mirror://debian/pool/main/n/nss-mdns/nss-mdns_"
|
||||
version ".orig.tar.gz")
|
||||
"http://pkgs.fedoraproject.org/repo/pkgs/nss-mdns/nss-mdns-0.10.tar.gz/03938f17646efbb50aa70ba5f99f51d7/nss-mdns-0.10.tar.gz"
|
||||
|
||||
;; This used to be the canonical URL but it vanished.
|
||||
;; See <http://bugs.gnu.org/18704>.
|
||||
;; (string-append
|
||||
;; "http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-"
|
||||
;; version ".tar.gz")
|
||||
))
|
||||
(sha256
|
||||
(base32
|
||||
"134wdr0n9cm5ab4g6dwq76lvzqns9dcylr470i2xxjimnw0l22d2"))))
|
||||
"0vgs6j0qsl0mwzh5a0m0bykr7x6bx79vnbyn0r3q289rghp3qs0y"))
|
||||
(file-name (string-append name "-" version ".tar.gz"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
;; The Avahi daemon socket is expected by 'configure.ac' to be at
|
||||
;; "$(localstatedir)/run/avahi-daemon/socket", but nowadays it lives in
|
||||
;; /run/avahi-daemon/socket. Remove the "$(localstatedir)" bit.
|
||||
'(#:configure-flags '("AVAHI_SOCKET=/run/avahi-daemon/socket")))
|
||||
(synopsis "Multicast DNS Name Service Switch (@dfn{NSS}) plug-in")
|
||||
;; The Avahi daemon socket is expected by src/Makefile.am to be at
|
||||
;; "$(localstatedir)/run/avahi-daemon/socket", so set $(localstatedir)
|
||||
;; appropriately.
|
||||
'(#:configure-flags '("--localstatedir=/var")))
|
||||
|
||||
;; XXX: Stale URL, missing replacement. See <http://bugs.gnu.org/18704>.
|
||||
(home-page "http://0pointer.de/lennart/projects/nss-mdns/")
|
||||
|
||||
(synopsis "The mDNS Name Service Switch (NSS) plug-in")
|
||||
(description
|
||||
"Nss-mdns is a plug-in for the GNU C Library's Name Service Switch
|
||||
(@dfn{NSS}) that resolves host names via multicast DNS (@dfn{mDNS}). It is
|
||||
most often used in home and other small networks without a local name server,
|
||||
to resolve host names in the @samp{.local} top-level domain.")
|
||||
"Nss-mdns is a plug-in for the Name Service Switch (NSS) functionality
|
||||
of the GNU C Library, providing host name resolution via Multicast DNS (mDNS).
|
||||
It allows for name resolution by programs in the ad-hoc mDNS domain
|
||||
'.local'.")
|
||||
(license lgpl2.1+)))
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user