Merge branch 'master' into staging.
With "conflicts" solved (all in favor of master except git) in: gnu/local.mk gnu/packages/databases.scm gnu/packages/glib.scm gnu/packages/gnome.scm gnu/packages/gnupg.scm gnu/packages/gnuzilla.scm gnu/packages/graphics.scm gnu/packages/gstreamer.scm gnu/packages/gtk.scm gnu/packages/linux.scm gnu/packages/machine-learning.scm gnu/packages/networking.scm gnu/packages/polkit.scm gnu/packages/pulseaudio.scm gnu/packages/rpc.scm gnu/packages/rust.scm gnu/packages/version-control.scm gnu/packages/w3m.scm
This commit is contained in:
commit
1a5302435f
1329 changed files with 537205 additions and 316690 deletions
|
@ -57,6 +57,12 @@
|
|||
(eval . (put 'substitute* 'scheme-indent-function 1))
|
||||
(eval . (put 'match-record 'scheme-indent-function 2))
|
||||
|
||||
;; 'modify-inputs' and its keywords.
|
||||
(eval . (put 'modify-inputs 'scheme-indent-function 1))
|
||||
(eval . (put 'replace 'scheme-indent-function 1))
|
||||
(eval . (put 'prepend 'scheme-indent-function 2))
|
||||
(eval . (put 'append 'scheme-indent-function 2))
|
||||
|
||||
;; 'modify-phases' and its keywords.
|
||||
(eval . (put 'modify-phases 'scheme-indent-function 1))
|
||||
(eval . (put 'replace 'scheme-indent-function 1))
|
||||
|
@ -120,6 +126,7 @@
|
|||
(eval . (put 'with-extensions 'scheme-indent-function 1))
|
||||
(eval . (put 'with-parameters 'scheme-indent-function 1))
|
||||
(eval . (put 'let-system 'scheme-indent-function 1))
|
||||
(eval . (put 'with-build-variables 'scheme-indent-function 2))
|
||||
|
||||
(eval . (put 'with-database 'scheme-indent-function 2))
|
||||
(eval . (put 'call-with-database 'scheme-indent-function 1))
|
||||
|
|
3
.gitattributes
vendored
Normal file
3
.gitattributes
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
*.scm diff=scheme
|
||||
*.scm.in diff=scheme
|
||||
*.texi diff=texinfo
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -133,6 +133,7 @@
|
|||
/pre-inst-env
|
||||
/release-*
|
||||
/scripts/guix
|
||||
/t-*/
|
||||
/test-env
|
||||
/test-tmp
|
||||
/tests/*.trs
|
||||
|
@ -144,6 +145,7 @@ Makefile
|
|||
Makefile.in
|
||||
config.cache
|
||||
stamp-h[0-9]
|
||||
.am[0-9]*/
|
||||
.dirstamp
|
||||
.deps
|
||||
tmp
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
|
||||
(("AD17 A21E F8AE D8F1 CC02 DBD9 F7D5 C9BF 765C 61E3"
|
||||
(name "andreas"))
|
||||
("2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5"
|
||||
(name "ajgrf"))
|
||||
("4FB9 9F49 2B12 A365 7997 E664 8246 0C08 2A0E E98F"
|
||||
(name "alezost"))
|
||||
("50F3 3E2E 5B0C 3D90 0424 ABE8 9BDC F497 A4BB CC7F"
|
||||
|
@ -16,21 +14,9 @@
|
|||
(name "apteryx"))
|
||||
("7F73 0343 F2F0 9F3C 77BF 79D3 2E25 EE8B 6180 2BB3"
|
||||
(name "arunisaac"))
|
||||
(;; primary: "3B12 9196 AE30 0C3C 0E90 A26F A715 5567 3271 9948"
|
||||
"9A2B 401E D001 0650 1584 BAAC 8BC4 F447 6E8A 8E00"
|
||||
(name "atheia"))
|
||||
(;; primary: "BE62 7373 8E61 6D6D 1B3A 08E8 A21A 0202 4881 6103"
|
||||
"39B3 3C8D 9448 0D2D DCC2 A498 8B44 A0CD C7B9 56F2"
|
||||
(name "bandali"))
|
||||
(;; primary: "34FF 38BC D151 25A6 E340 A0B5 3453 2F9F AFCA 8B8E"
|
||||
"A3A4 B419 0074 087C A7DE 5698 BC45 CA67 E2F8 D007"
|
||||
(name "bavier"))
|
||||
("45CC 63B8 5258 C9D5 5F34 B239 D37D 0EA7 CECC 3912"
|
||||
(name "biscuolo"))
|
||||
("7988 3B9F 7D6A 4DBF 3719 0367 2506 A96C CF63 0B21"
|
||||
(name "boskovits"))
|
||||
("E82A C026 95D6 FF02 43CA 1E5C F6C5 2DD1 BA27 CB87"
|
||||
(name "brettgilio"))
|
||||
(;; primary: "8929 BBC5 73CD 9206 3DDD 979D 3D36 CAA0 116F 0F99"
|
||||
"1C9B F005 1A1A 6A44 5257 599A A949 03A1 66A1 8FAE"
|
||||
(name "bricewge"))
|
||||
|
@ -50,8 +36,6 @@
|
|||
(name "davexunit"))
|
||||
("8CCB A7F5 52B9 CBEA E1FB 2915 8328 C747 0FF1 D807" ;FIXME: to be confirmed!
|
||||
(name "davexunit (2nd)"))
|
||||
("53C4 1E6E 41AA FE55 335A CA5E 446A 2ED4 D940 BF14"
|
||||
(name "daviwil"))
|
||||
("A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351"
|
||||
(name "efraim"))
|
||||
(;; primary: "2453 02B1 BAB1 F867 FDCA 96BC 8F3F 861F 82EB 7A9A"
|
||||
|
@ -61,8 +45,6 @@
|
|||
(name "hoebjo"))
|
||||
("B943 509D 633E 80DD 27FC 4EED 634A 8DFF D3F6 31DF"
|
||||
(name "htgoebel"))
|
||||
("7440 26BA 7CA3 C668 E940 1D53 0B43 1E98 3705 6942"
|
||||
(name "ipetkov"))
|
||||
(;; primary: "66A5 6D9C 9A98 BE7F 719A B401 2652 5665 AE72 7D37"
|
||||
"0325 78A6 8298 94E7 2AA2 66F5 D415 BF25 3B51 5976"
|
||||
(name "iyzsong"))
|
||||
|
@ -79,19 +61,17 @@
|
|||
(name "lbraun (professional)"))
|
||||
("ACC2 3BA0 59F7 CCF4 08F0 43AD 442A 84B8 C70E 2F87"
|
||||
(name "lilyp"))
|
||||
("45E5 75FA 53EA 8BD6 1BCE 0B4E 3ADC 75F0 13D6 78F9"
|
||||
(name "leungbk"))
|
||||
(;; primary: "4F71 6F9A 8FA2 C80E F1B5 E1BA 5E35 F231 DE1A C5E0"
|
||||
"B051 5948 F1E7 D3C1 B980 38A0 2646 FA30 BACA 7F08"
|
||||
(name "lfam"))
|
||||
("8887 84C4 1459 ACCB 83E7 E84C 634C 6E89 79FA BEC2"
|
||||
(name "m1gu3l"))
|
||||
("CBF5 9755 CBE7 E7EF EF18 3FB1 DD40 9A15 D822 469D"
|
||||
(name "marusich"))
|
||||
("BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA"
|
||||
(name "mbakke"))
|
||||
("D919 0965 CE03 199E AF28 B3BE 7CEF 2984 7562 C516"
|
||||
(name "mhw"))
|
||||
("B845 5B7F FAD5 E8E9 5DEF 4296 637B 0B13 8065 B68A"
|
||||
(name "monego"))
|
||||
("4008 6A7E 0252 9B60 31FB 8607 8354 7635 3176 9CA6"
|
||||
(name "mothacehe"))
|
||||
(;; primary: "F5BC 5534 C36F 0087 B39D 36EF 1C9D C4FE B9DB 7C4B"
|
||||
|
@ -109,12 +89,8 @@
|
|||
(;; primary: "B68B DF22 73F9 DA0E 63C1 8A32 515B F416 9242 D600"
|
||||
"C699 ED09 E51B CE89 FD1D A078 AAC7 E891 896B 568A"
|
||||
(name "pgarlick"))
|
||||
("3A86 380E 58A8 B942 8D39 60E1 327C 1EF3 8DF5 4C32"
|
||||
(name "phant0mas"))
|
||||
("CD2D 5EAA A98C CB37 DA91 D6B0 5F58 1664 7F8B E551"
|
||||
(name "raghavgururajan"))
|
||||
("74D6 A930 F44B 9B84 9EA5 5606 C166 AA49 5F7F 189C"
|
||||
(name "reepca"))
|
||||
("BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC"
|
||||
(name "rekado"))
|
||||
(;; From commit cc51c03ff867d4633505354819c6d88af88bf919 (March 2020).
|
||||
|
|
4
.mailmap
4
.mailmap
|
@ -41,7 +41,8 @@ Joshua Grant <tadni@riseup.net> <tadnimi@gmail.com>
|
|||
Joshua Grant <tadni@riseup.net> <youlysses@riseup.net>
|
||||
Kei Kebreau <kkebreau@posteo.net>
|
||||
Leo Famulari <leo@famulari.name> <lfamular@gmail.com>
|
||||
Liliana Prikler <liliana.prikler@gmail.com> Leo Prikler <leo.prikler@student.tugraz.at>
|
||||
Liliana Marie Prikler <liliana.prikler@gmail.com>
|
||||
Liliana Marie Prikler <liliana.prikler@gmail.com> Leo Prikler <leo.prikler@student.tugraz.at>
|
||||
Ludovic Courtès <ludo@gnu.org> <ludovic.courtes@inria.fr>
|
||||
Marek Benc <dusxmt@gmx.com> <merkur32@gmail.com>
|
||||
Marius Bakke <marius@gnu.org> <mbakke@fastmail.com>
|
||||
|
@ -90,3 +91,4 @@ 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>
|
||||
Vincent Legoll <vincent.legoll@gmail.com> <vincent.legoll@idgrilles.fr>
|
||||
Zheng Junjie <873216071@qq.com> Z572 <873216071@qq.com>
|
||||
|
|
59
Makefile.am
59
Makefile.am
|
@ -81,6 +81,7 @@ MODULES = \
|
|||
guix/base64.scm \
|
||||
guix/ci.scm \
|
||||
guix/cpio.scm \
|
||||
guix/cpu.scm \
|
||||
guix/deprecation.scm \
|
||||
guix/docker.scm \
|
||||
guix/records.scm \
|
||||
|
@ -96,8 +97,10 @@ MODULES = \
|
|||
guix/discovery.scm \
|
||||
guix/android-repo-download.scm \
|
||||
guix/bzr-download.scm \
|
||||
guix/extracting-download.scm \
|
||||
guix/git-download.scm \
|
||||
guix/hg-download.scm \
|
||||
guix/hash.scm \
|
||||
guix/swh.scm \
|
||||
guix/monads.scm \
|
||||
guix/monad-repl.scm \
|
||||
|
@ -228,7 +231,6 @@ MODULES = \
|
|||
guix/build/union.scm \
|
||||
guix/build/profiles.scm \
|
||||
guix/build/compile.scm \
|
||||
guix/build/rpath.scm \
|
||||
guix/build/cvs.scm \
|
||||
guix/build/svn.scm \
|
||||
guix/build/syscalls.scm \
|
||||
|
@ -239,6 +241,7 @@ MODULES = \
|
|||
guix/build/emacs-utils.scm \
|
||||
guix/build/java-utils.scm \
|
||||
guix/build/lisp-utils.scm \
|
||||
guix/build/meson-configuration.scm \
|
||||
guix/build/maven/java.scm \
|
||||
guix/build/maven/plugin.scm \
|
||||
guix/build/maven/pom.scm \
|
||||
|
@ -293,6 +296,7 @@ MODULES = \
|
|||
guix/scripts/refresh.scm \
|
||||
guix/scripts/repl.scm \
|
||||
guix/scripts/describe.scm \
|
||||
guix/scripts/style.scm \
|
||||
guix/scripts/system.scm \
|
||||
guix/scripts/system/search.scm \
|
||||
guix/scripts/system/reconfigure.scm \
|
||||
|
@ -315,6 +319,7 @@ MODULES = \
|
|||
guix/scripts/import/stackage.scm \
|
||||
guix/scripts/import/texlive.scm \
|
||||
guix/scripts/environment.scm \
|
||||
guix/scripts/shell.scm \
|
||||
guix/scripts/publish.scm \
|
||||
guix/scripts/edit.scm \
|
||||
guix/scripts/size.scm \
|
||||
|
@ -374,10 +379,10 @@ AUX_FILES = \
|
|||
gnu/packages/aux-files/chromium/master-preferences.json \
|
||||
gnu/packages/aux-files/emacs/guix-emacs.el \
|
||||
gnu/packages/aux-files/guix.vim \
|
||||
gnu/packages/aux-files/linux-libre/5.14-arm.conf \
|
||||
gnu/packages/aux-files/linux-libre/5.14-arm64.conf \
|
||||
gnu/packages/aux-files/linux-libre/5.14-i686.conf \
|
||||
gnu/packages/aux-files/linux-libre/5.14-x86_64.conf \
|
||||
gnu/packages/aux-files/linux-libre/5.15-arm.conf \
|
||||
gnu/packages/aux-files/linux-libre/5.15-arm64.conf \
|
||||
gnu/packages/aux-files/linux-libre/5.15-i686.conf \
|
||||
gnu/packages/aux-files/linux-libre/5.15-x86_64.conf \
|
||||
gnu/packages/aux-files/linux-libre/5.10-arm.conf \
|
||||
gnu/packages/aux-files/linux-libre/5.10-arm64.conf \
|
||||
gnu/packages/aux-files/linux-libre/5.10-i686.conf \
|
||||
|
@ -398,6 +403,9 @@ AUX_FILES = \
|
|||
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/pack-audit.c \
|
||||
gnu/packages/aux-files/python/sanity-check.py \
|
||||
gnu/packages/aux-files/python/sitecustomize.py \
|
||||
gnu/packages/aux-files/renpy/renpy.in \
|
||||
gnu/packages/aux-files/run-in-namespace.c
|
||||
|
||||
# Templates, examples.
|
||||
|
@ -473,7 +481,9 @@ SCM_TESTS = \
|
|||
tests/graph.scm \
|
||||
tests/gremlin.scm \
|
||||
tests/hackage.scm \
|
||||
tests/home-import.scm \
|
||||
tests/import-git.scm \
|
||||
tests/import-github.scm \
|
||||
tests/import-utils.scm \
|
||||
tests/inferior.scm \
|
||||
tests/lint.scm \
|
||||
|
@ -511,6 +521,7 @@ SCM_TESTS = \
|
|||
tests/swh.scm \
|
||||
tests/syscalls.scm \
|
||||
tests/system.scm \
|
||||
tests/style.scm \
|
||||
tests/texlive.scm \
|
||||
tests/transformations.scm \
|
||||
tests/ui.scm \
|
||||
|
@ -546,10 +557,12 @@ SH_TESTS = \
|
|||
tests/guix-package-aliases.sh \
|
||||
tests/guix-package-net.sh \
|
||||
tests/guix-system.sh \
|
||||
tests/guix-home.sh \
|
||||
tests/guix-archive.sh \
|
||||
tests/guix-authenticate.sh \
|
||||
tests/guix-environment.sh \
|
||||
tests/guix-environment-container.sh \
|
||||
tests/guix-shell.sh \
|
||||
tests/guix-graph.sh \
|
||||
tests/guix-describe.sh \
|
||||
tests/guix-repl.sh \
|
||||
|
@ -638,21 +651,24 @@ EXTRA_DIST += \
|
|||
build-aux/check-final-inputs-self-contained.scm \
|
||||
build-aux/check-channel-news.scm \
|
||||
build-aux/compile-as-derivation.scm \
|
||||
build-aux/convert-xref.scm \
|
||||
build-aux/generate-authors.scm \
|
||||
build-aux/test-driver.scm \
|
||||
build-aux/update-guix-package.scm \
|
||||
build-aux/update-NEWS.scm \
|
||||
tests/test.drv \
|
||||
tests/signing-key.pub \
|
||||
tests/signing-key.sec \
|
||||
tests/cve-sample.json \
|
||||
tests/civodul.key \
|
||||
tests/rsa.key \
|
||||
tests/dsa.key \
|
||||
tests/ed25519.key \
|
||||
tests/ed25519.sec \
|
||||
tests/ed25519bis.key \
|
||||
tests/ed25519bis.sec \
|
||||
tests/keys/signing-key.pub \
|
||||
tests/keys/signing-key.sec \
|
||||
tests/keys/civodul.pub \
|
||||
tests/keys/rsa.pub \
|
||||
tests/keys/dsa.pub \
|
||||
tests/keys/ed25519.pub \
|
||||
tests/keys/ed25519.sec \
|
||||
tests/keys/ed25519-2.pub \
|
||||
tests/keys/ed25519-2.sec \
|
||||
tests/keys/ed25519-3.pub \
|
||||
tests/keys/ed25519-3.sec \
|
||||
build-aux/config.rpath \
|
||||
bootstrap \
|
||||
doc/build.scm \
|
||||
|
@ -697,8 +713,6 @@ $(1): $(2)
|
|||
--completed $(3) \
|
||||
$$(filter %.scm,$$^)
|
||||
|
||||
.PHONY: $(1)
|
||||
|
||||
endef
|
||||
|
||||
# Split compilation in several steps, each of which building a subset of
|
||||
|
@ -710,22 +724,31 @@ MODULES_CORE = guix.scm $(filter-out guix/scripts/%,$(filter guix/%,$(MODULE
|
|||
MODULES_PACKAGES = $(filter gnu/packages/%,$(MODULES))
|
||||
MODULES_SYSTEM = gnu.scm $(filter-out gnu/packages/%,$(filter gnu/%,$(MODULES)))
|
||||
MODULES_CLI = $(filter guix/scripts/%,$(MODULES))
|
||||
MODULES_PO = guix/build/po.scm
|
||||
|
||||
$(eval $(call guile-compilation-rule,make-core-go, \
|
||||
$(MODULES_CORE) guix/config.scm $(dist_noinst_DATA), \
|
||||
0))
|
||||
.PHONY: make-core-go
|
||||
|
||||
$(eval $(call guile-compilation-rule,make-packages-go, \
|
||||
$(MODULES_PACKAGES) make-core-go, \
|
||||
$(words $(MODULES_CORE))))
|
||||
.PHONY: make-packages-go
|
||||
|
||||
$(eval $(call guile-compilation-rule,make-system-go, \
|
||||
$(MODULES_SYSTEM) make-packages-go make-core-go, \
|
||||
$(words $(MODULES_CORE) $(MODULES_PACKAGES))))
|
||||
.PHONY: make-system-go
|
||||
|
||||
$(eval $(call guile-compilation-rule,make-cli-go, \
|
||||
$(MODULES_CLI) make-system-go make-packages-go make-core-go, \
|
||||
$(words $(MODULES_CORE) $(MODULES_PACKAGES) $(MODULES_SYSTEM))))
|
||||
.PHONY: make-cli-go
|
||||
|
||||
$(eval $(call guile-compilation-rule,guix/build/po.go, \
|
||||
$(MODULES_PO), \
|
||||
0))
|
||||
|
||||
SUFFIXES = .go
|
||||
|
||||
|
@ -944,7 +967,7 @@ release: dist-with-updated-version all
|
|||
--system=$$system --fallback \
|
||||
gnu/system/install.scm` ; \
|
||||
if [ ! -f "$$image" ] ; then \
|
||||
echo "failed to produced Guix installation image for $$system" >&2 ; \
|
||||
echo "failed to produce Guix installation image for $$system" >&2 ; \
|
||||
exit 1 ; \
|
||||
fi ; \
|
||||
cp "$$image" "$(releasedir)/$(GUIX_SYSTEM_IMAGE_BASE).$$system.iso.tmp" ; \
|
||||
|
@ -959,7 +982,7 @@ release: dist-with-updated-version all
|
|||
--system=$$system --fallback \
|
||||
gnu/system/examples/vm-image.tmpl` ; \
|
||||
if [ ! -f "$$image" ] ; then \
|
||||
echo "failed to produced Guix VM image for $$system" >&2 ; \
|
||||
echo "failed to produce Guix VM image for $$system" >&2 ; \
|
||||
exit 1 ; \
|
||||
fi ; \
|
||||
cp "$$image" "$(releasedir)/$(GUIX_SYSTEM_VM_IMAGE_BASE).$$system.qcow2"; \
|
||||
|
|
11
NEWS
11
NEWS
|
@ -14,15 +14,22 @@ Please send Guix bug reports to bug-guix@gnu.org.
|
|||
|
||||
* Changes in 1.4.0 (since 1.3.0)
|
||||
** Package management
|
||||
*** New ‘guix home’ command, for home environment management
|
||||
*** New ‘guix shell’ command, the successor to ‘guix environment’
|
||||
*** New ‘deb’ format for the ‘guix pack’ command
|
||||
*** New ‘guix import minetest’ command, to import Minetest extensions
|
||||
*** ‘guix import texlive’ rewritten to use the TLPDB as its source
|
||||
*** ‘guix import elpa’ now supports the non-GNU ELPA repository
|
||||
*** ‘guix import pypi’ can now import a specific version
|
||||
*** ‘guix import cran’ can now import a specific version
|
||||
*** New updater (see ‘guix refresh’): ‘generic-git’
|
||||
*** ‘guix graph’ has a new ‘--max-depth’ option
|
||||
*** ‘--with-commit’ option now accepts strings returned by ‘git describe’
|
||||
** Distribution
|
||||
*** The installation script can now enable local substitute servers discovery
|
||||
*** More control over boot-time file system checks and repairs
|
||||
*** XFS file systems can be created by the installer and mounted by label/UUID
|
||||
*** New interface for declaring swap space
|
||||
** Programming interfaces
|
||||
*** (guix records) now supports “field sanitizers”
|
||||
** Noteworthy bug fixes
|
||||
|
@ -32,6 +39,10 @@ Please send Guix bug reports to bug-guix@gnu.org.
|
|||
(<https://issues.guix.gnu.org/49697>)
|
||||
*** Fix pathological profile building performance in the presence of grafts
|
||||
(<https://issues.guix.gnu.org/49439>)
|
||||
*** Deduplication phase of the garbage collector is now faster
|
||||
(<https://issues.guix.gnu.org/24937>)
|
||||
*** File system flags are validated before system instantiation
|
||||
(<https://issues.guix.gnu.org/51425>)
|
||||
|
||||
* Changes in 1.3.0 (since 1.2.0)
|
||||
** Package management
|
||||
|
|
|
@ -494,7 +494,7 @@ files."
|
|||
(message (format #f "You found a bug: the program '~a'
|
||||
failed to compute the derivation for Guix (version: ~s; system: ~s;
|
||||
host version: ~s; pull-version: ~s).
|
||||
Please report it by email to <~a>.~%"
|
||||
Please report the COMPLETE output above by email to <~a>.~%"
|
||||
(derivation->output-path build)
|
||||
version system %guix-version pull-version
|
||||
%guix-bug-report-address))))))))))))
|
||||
|
|
26
build-aux/convert-xref.scm
Normal file
26
build-aux/convert-xref.scm
Normal file
|
@ -0,0 +1,26 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2021 Julien Lepiller <julien@lepiller.eu>
|
||||
;;;
|
||||
;;; 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/>.
|
||||
|
||||
;; Translate cross-references in a translated .texi manual.
|
||||
|
||||
(use-modules (guix build po)
|
||||
(ice-9 match))
|
||||
|
||||
(match (command-line)
|
||||
((program texi pofile)
|
||||
(translate-cross-references texi pofile)))
|
|
@ -73,9 +73,9 @@ then
|
|||
# Copy the keys so that the secret key has the right permissions (the
|
||||
# daemon errors out when this is not the case.)
|
||||
mkdir -p "$GUIX_CONFIGURATION_DIRECTORY"
|
||||
cp "@abs_top_srcdir@/tests/signing-key.sec" \
|
||||
"@abs_top_srcdir@/tests/signing-key.pub" \
|
||||
"$GUIX_CONFIGURATION_DIRECTORY"
|
||||
cp "@abs_top_srcdir@/tests/keys/signing-key.sec" \
|
||||
"@abs_top_srcdir@/tests/keys/signing-key.pub" \
|
||||
"$GUIX_CONFIGURATION_DIRECTORY"
|
||||
chmod 400 "$GUIX_CONFIGURATION_DIRECTORY/signing-key.sec"
|
||||
fi
|
||||
|
||||
|
|
|
@ -94,17 +94,6 @@ if test "x$guix_build_daemon" = "xyes"; then
|
|||
AC_CHECK_FUNCS([lutimes lchown posix_fallocate sched_setaffinity \
|
||||
statvfs nanosleep strsignal statx])
|
||||
|
||||
dnl Check whether the store optimiser can optimise symlinks.
|
||||
AC_MSG_CHECKING([whether it is possible to create a link to a symlink])
|
||||
ln -s bla tmp_link
|
||||
if ln tmp_link tmp_link2 2> /dev/null; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(CAN_LINK_SYMLINK, 1, [Whether link() works on symlinks.])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
rm -f tmp_link tmp_link2
|
||||
|
||||
dnl Check for <locale>.
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_CHECK_HEADERS([locale])
|
||||
|
|
|
@ -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.14 gnu tar-ustar silent-rules subdir-objects \
|
||||
color-tests parallel-tests -Woverride -Wno-portability])
|
||||
|
||||
# Enable silent rules by default.
|
||||
|
@ -102,6 +102,9 @@ if test "x$GUILD" = "x"; then
|
|||
AC_MSG_ERROR(['guild' binary not found; please check your Guile installation.])
|
||||
fi
|
||||
|
||||
dnl (guix ui), notably, requires 'default-optimization-level' added in 3.0.3.
|
||||
PKG_CHECK_MODULES([GUILE], [guile-3.0 >= 3.0.3])
|
||||
|
||||
dnl Get CFLAGS and LDFLAGS for libguile.
|
||||
GUILE_FLAGS
|
||||
|
||||
|
|
595
doc/build.scm
595
doc/build.scm
|
@ -1,5 +1,5 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2019-2022 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
|
@ -51,16 +51,7 @@
|
|||
(@@ (guix self) file-append*))
|
||||
|
||||
(define translated-texi-manuals
|
||||
(let ((translated (@@ (guix self) translate-texi-manuals)))
|
||||
(lambda (source)
|
||||
(let ((result (translated source)))
|
||||
;; Build with 'guile-3.0-latest', which is linked against
|
||||
;; 'libgc/disable-munmap', to avoid the dreaded "mmap(PROT_NONE)
|
||||
;; failed" crash: <https://bugs.gnu.org/47428>.
|
||||
(computed-file (computed-file-name result)
|
||||
(computed-file-gexp result)
|
||||
#:options (computed-file-options result)
|
||||
#:guile guile-3.0-latest)))))
|
||||
(@@ (guix self) translate-texi-manuals))
|
||||
|
||||
(define info-manual
|
||||
(@@ (guix self) info-manual))
|
||||
|
@ -448,6 +439,7 @@ its <pre class=\"lisp\"> blocks (as produced by 'makeinfo --html')."
|
|||
("rarr" "→")
|
||||
("hellip" "…")
|
||||
("rsquo" "’")
|
||||
("nbsp" " ")
|
||||
(e (pk 'unknown-entity e) (primitive-exit 2))))
|
||||
|
||||
(define (concatenate-snippets pieces)
|
||||
|
@ -608,6 +600,175 @@ its <pre class=\"lisp\"> blocks (as produced by 'makeinfo --html')."
|
|||
|
||||
(computed-file name build))
|
||||
|
||||
(define* (stylized-html source input
|
||||
#:key
|
||||
(languages %languages)
|
||||
(manual %manual)
|
||||
(manual-css-url "/static/base/css/manual.css"))
|
||||
"Process all the HTML files in INPUT; add them MANUAL-CSS-URL as a <style>
|
||||
link, and add a menu to choose among LANGUAGES. Use the Guix PO files found
|
||||
in SOURCE."
|
||||
(define build
|
||||
(with-extensions (list guile-lib)
|
||||
(with-imported-modules `((guix build utils)
|
||||
((localization)
|
||||
=> ,(localization-helper-module
|
||||
source languages)))
|
||||
#~(begin
|
||||
(use-modules (htmlprag)
|
||||
(localization)
|
||||
(guix build utils)
|
||||
(srfi srfi-1)
|
||||
(ice-9 match)
|
||||
(ice-9 threads))
|
||||
|
||||
(define* (menu-dropdown #:key (label "Item") (url "#") (items '()))
|
||||
;; Return an SHTML <li> element representing a dropdown for the
|
||||
;; navbar. LABEL is the text of the dropdown menu, and ITEMS is
|
||||
;; the list of items in this menu.
|
||||
(define id "visible-dropdown")
|
||||
|
||||
`(li
|
||||
(@ (class "navbar-menu-item dropdown dropdown-btn"))
|
||||
(input (@ (class "navbar-menu-hidden-input")
|
||||
(type "radio")
|
||||
(name "dropdown")
|
||||
(id ,id)))
|
||||
(label (@ (for ,id)) ,label)
|
||||
(label (@ (for "all-dropdowns-hidden")) ,label)
|
||||
(div
|
||||
(@ (class "navbar-submenu")
|
||||
(id "navbar-submenu"))
|
||||
(div (@ (class "navbar-submenu-triangle"))
|
||||
" ")
|
||||
(ul ,@items))))
|
||||
|
||||
(define (menu-item label url)
|
||||
;; Return an SHTML <li> element for a menu item with the given
|
||||
;; LABEL and URL.
|
||||
`(li (a (@ (class "navbar-menu-item")
|
||||
(href ,url))
|
||||
,label)))
|
||||
|
||||
(define* (navigation-bar menus #:key split-node?)
|
||||
;; Return the navigation bar showing all of MENUS.
|
||||
`(header (@ (class "navbar"))
|
||||
(h1 (a (@ (class "branding")
|
||||
(href ,(if split-node? ".." "#")))))
|
||||
(nav (@ (class "navbar-menu"))
|
||||
(input (@ (class "navbar-menu-hidden-input")
|
||||
(type "radio")
|
||||
(name "dropdown")
|
||||
(id "all-dropdowns-hidden")))
|
||||
(ul ,@menus))
|
||||
|
||||
;; This is the button that shows up on small screen in
|
||||
;; lieu of the drop-down button.
|
||||
(a (@ (class "navbar-menu-btn")
|
||||
(href ,(if split-node? "../.." ".."))))))
|
||||
|
||||
(define* (base-language-url code manual
|
||||
#:key split-node?)
|
||||
;; Return the base URL of MANUAL for language CODE.
|
||||
(if split-node?
|
||||
(string-append "../../" (normalize code) "/html_node")
|
||||
(string-append "../" (normalize code) "/" manual
|
||||
(if (string=? code "en")
|
||||
""
|
||||
(string-append "." code))
|
||||
".html")))
|
||||
|
||||
(define (language-menu-items file)
|
||||
;; Return the language menu items to be inserted in FILE.
|
||||
(define split-node?
|
||||
(string-contains file "/html_node/"))
|
||||
|
||||
(append
|
||||
(map (lambda (code)
|
||||
(menu-item (language-code->native-name code)
|
||||
(base-language-url code #$manual
|
||||
#:split-node?
|
||||
split-node?)))
|
||||
'#$%languages)
|
||||
(list
|
||||
(menu-item "⊕"
|
||||
(if (string=? #$manual "guix-cookbook")
|
||||
"https://translate.fedoraproject.org/projects/guix/documentation-cookbook/"
|
||||
"https://translate.fedoraproject.org/projects/guix/documentation-manual/")))))
|
||||
|
||||
(define (stylized-html sxml file)
|
||||
;; Return SXML, which was read from FILE, with additional
|
||||
;; styling.
|
||||
(define split-node?
|
||||
(string-contains file "/html_node/"))
|
||||
|
||||
(let loop ((sxml sxml))
|
||||
(match sxml
|
||||
(('*TOP* decl body ...)
|
||||
`(*TOP* ,decl ,@(map loop body)))
|
||||
(('head elements ...)
|
||||
;; Add reference to our own manual CSS, which provides
|
||||
;; support for the language menu.
|
||||
`(head ,@elements
|
||||
(link (@ (rel "stylesheet")
|
||||
(type "text/css")
|
||||
(href #$manual-css-url)))))
|
||||
(('body ('@ attributes ...) elements ...)
|
||||
`(body (@ ,@attributes)
|
||||
,(navigation-bar
|
||||
;; TODO: Add "Contribute" menu, to report
|
||||
;; errors, etc.
|
||||
(list (menu-dropdown
|
||||
#:label
|
||||
`(img (@ (alt "Language")
|
||||
(src "/static/base/img/language-picker.svg")))
|
||||
#:items
|
||||
(language-menu-items file)))
|
||||
#:split-node? split-node?)
|
||||
,@elements))
|
||||
((tag ('@ attributes ...) body ...)
|
||||
`(,tag (@ ,@attributes) ,@(map loop body)))
|
||||
((tag body ...)
|
||||
`(,tag ,@(map loop body)))
|
||||
((? string? str)
|
||||
str))))
|
||||
|
||||
(define (process-html file)
|
||||
;; Parse FILE and add links to translations. Install the result
|
||||
;; to #$output.
|
||||
(format (current-error-port) "processing ~a...~%" file)
|
||||
(let* ((shtml (parameterize ((%strict-tokenizer? #t))
|
||||
(call-with-input-file file html->shtml)))
|
||||
(processed (stylized-html shtml file))
|
||||
(base (string-drop file (string-length #$input)))
|
||||
(target (string-append #$output base)))
|
||||
(mkdir-p (dirname target))
|
||||
(call-with-output-file target
|
||||
(lambda (port)
|
||||
(write-shtml-as-html processed port)))))
|
||||
|
||||
;; Install a UTF-8 locale so we can process UTF-8 files.
|
||||
(setenv "GUIX_LOCPATH"
|
||||
#+(file-append glibc-utf8-locales "/lib/locale"))
|
||||
(setlocale LC_ALL "en_US.utf8")
|
||||
(setenv "LC_ALL" "en_US.utf8")
|
||||
(setvbuf (current-error-port) 'line)
|
||||
|
||||
(n-par-for-each (parallel-job-count)
|
||||
(lambda (file)
|
||||
(if (string-suffix? ".html" file)
|
||||
(process-html file)
|
||||
;; Copy FILE as is to #$output.
|
||||
(let* ((base (string-drop file (string-length #$input)))
|
||||
(target (string-append #$output base)))
|
||||
(mkdir-p (dirname target))
|
||||
(if (eq? 'symlink (stat:type (lstat file)))
|
||||
(symlink (readlink file) target)
|
||||
(copy-file file target)))))
|
||||
(find-files #$input))))))
|
||||
|
||||
(computed-file "stylized-html-manual" build))
|
||||
|
||||
(define* (html-manual source #:key (languages %languages)
|
||||
(version "0.0")
|
||||
(manual %manual)
|
||||
|
@ -698,9 +859,11 @@ makeinfo OPTIONS."
|
|||
(filter (compose file-exists? language->texi-file-name)
|
||||
'#$languages)))))
|
||||
|
||||
(let* ((name (string-append manual "-html-manual"))
|
||||
(manual (computed-file name build)))
|
||||
(syntax-highlighted-html manual
|
||||
(let* ((name (string-append manual "-html-manual"))
|
||||
(manual* (computed-file name build #:local-build? #f)))
|
||||
(syntax-highlighted-html (stylized-html source manual*
|
||||
#:languages languages
|
||||
#:manual manual)
|
||||
#:mono-node-indexes mono-node-indexes
|
||||
#:split-node-indexes split-node-indexes
|
||||
#:name (string-append name "-highlighted"))))
|
||||
|
@ -723,7 +886,7 @@ makeinfo OPTIONS."
|
|||
;; accented letters.
|
||||
;;
|
||||
;; (define texlive
|
||||
;; (texlive-union (list texlive-tex-texinfo
|
||||
;; (texlive-updmap.cfg (list texlive-tex-texinfo
|
||||
;; texlive-generic-epsf
|
||||
;; texlive-fonts-ec)))
|
||||
|
||||
|
@ -803,7 +966,8 @@ PDF for language '~a'!~%~%"
|
|||
opts))))
|
||||
'#$languages))))
|
||||
|
||||
(computed-file (string-append manual "-pdf-manual") build))
|
||||
(computed-file (string-append manual "-pdf-manual") build
|
||||
#:local-build? #f))
|
||||
|
||||
(define (guix-manual-text-domain source languages)
|
||||
"Return the PO files for LANGUAGES of the 'guix-manual' text domain taken
|
||||
|
@ -832,6 +996,104 @@ from SOURCE."
|
|||
|
||||
(computed-file "guix-manual-po" build))
|
||||
|
||||
(define* (localization-helper-module source
|
||||
#:optional (languages %languages))
|
||||
"Return a file-like object for use as the (localization) module. SOURCE
|
||||
must be the Guix top-level source directory, from which PO files are taken."
|
||||
(define content
|
||||
(with-extensions (list guile-json-3)
|
||||
#~(begin
|
||||
(define-module (localization)
|
||||
#:use-module (json)
|
||||
#:use-module (srfi srfi-1)
|
||||
#:use-module (srfi srfi-19)
|
||||
#:use-module (ice-9 match)
|
||||
#:use-module (ice-9 popen)
|
||||
#:export (normalize
|
||||
with-language
|
||||
translate
|
||||
language-code->name
|
||||
language-code->native-name
|
||||
seconds->string))
|
||||
|
||||
(define (normalize language) ;XXX: deduplicate
|
||||
;; Normalize LANGUAGE. For instance, "zh_CN" becomes "zh-cn".
|
||||
(string-map (match-lambda
|
||||
(#\_ #\-)
|
||||
(chr chr))
|
||||
(string-downcase language)))
|
||||
|
||||
(define-syntax-rule (with-language language exp ...)
|
||||
(let ((lang (getenv "LANGUAGE")))
|
||||
(dynamic-wind
|
||||
(lambda ()
|
||||
(setenv "LANGUAGE" language)
|
||||
(setlocale LC_MESSAGES))
|
||||
(lambda () exp ...)
|
||||
(lambda ()
|
||||
(if lang
|
||||
(setenv "LANGUAGE" lang)
|
||||
(unsetenv "LANGUAGE"))
|
||||
(setlocale LC_MESSAGES)))))
|
||||
|
||||
;; (put 'with-language 'scheme-indent-function 1)
|
||||
(define* (translate str language
|
||||
#:key (domain "guix-manual"))
|
||||
(define exp
|
||||
`(begin
|
||||
(bindtextdomain "guix-manual"
|
||||
#+(guix-manual-text-domain
|
||||
source
|
||||
languages))
|
||||
(bindtextdomain "iso_639-3" ;language names
|
||||
#+(file-append iso-codes
|
||||
"/share/locale"))
|
||||
(setenv "LANGUAGE" ,language)
|
||||
(write (gettext ,str ,domain))))
|
||||
|
||||
;; Since the 'gettext' function caches msgid translations,
|
||||
;; regardless of $LANGUAGE, we have to spawn a new process each
|
||||
;; time we want to translate to a different language. Bah!
|
||||
(let* ((pipe (open-pipe* OPEN_READ
|
||||
#+(file-append guile-3.0
|
||||
"/bin/guile")
|
||||
"-c" (object->string exp)))
|
||||
(str (read pipe)))
|
||||
(close-pipe pipe)
|
||||
str))
|
||||
|
||||
(define %iso639-languages
|
||||
(vector->list
|
||||
(assoc-ref (call-with-input-file
|
||||
#+(file-append iso-codes
|
||||
"/share/iso-codes/json/iso_639-3.json")
|
||||
json->scm)
|
||||
"639-3")))
|
||||
|
||||
(define (language-code->name code)
|
||||
"Return the full name of a language from its ISO-639-3 code."
|
||||
(let ((code (match (string-index code #\_)
|
||||
(#f code)
|
||||
(index (string-take code index)))))
|
||||
(any (lambda (language)
|
||||
(and (string=? (or (assoc-ref language "alpha_2")
|
||||
(assoc-ref language "alpha_3"))
|
||||
code)
|
||||
(assoc-ref language "name")))
|
||||
%iso639-languages)))
|
||||
|
||||
(define (language-code->native-name code)
|
||||
"Return the name of language CODE in that language."
|
||||
(translate (language-code->name code) code
|
||||
#:domain "iso_639-3"))
|
||||
|
||||
(define (seconds->string seconds language)
|
||||
(let* ((time (make-time time-utc 0 seconds))
|
||||
(date (time-utc->date time)))
|
||||
(with-language language (date->string date "~e ~B ~Y")))))))
|
||||
|
||||
(scheme-file "localization.scm" content))
|
||||
|
||||
(define* (html-manual-indexes source
|
||||
#:key (languages %languages)
|
||||
(version "0.0")
|
||||
|
@ -841,207 +1103,132 @@ from SOURCE."
|
|||
"GNU Guix Cookbook"))
|
||||
(date 1))
|
||||
(define build
|
||||
(with-extensions (list guile-json-3)
|
||||
(with-imported-modules '((guix build utils))
|
||||
#~(begin
|
||||
(use-modules (guix build utils)
|
||||
(json)
|
||||
(ice-9 match)
|
||||
(ice-9 popen)
|
||||
(sxml simple)
|
||||
(srfi srfi-1)
|
||||
(srfi srfi-19))
|
||||
(with-imported-modules `((guix build utils)
|
||||
((localization)
|
||||
=> ,(localization-helper-module
|
||||
source languages)))
|
||||
#~(begin
|
||||
(use-modules (guix build utils)
|
||||
(localization)
|
||||
(sxml simple)
|
||||
(srfi srfi-1))
|
||||
|
||||
(define (normalize language) ;XXX: deduplicate
|
||||
;; Normalize LANGUAGE. For instance, "zh_CN" becomes "zh-cn".
|
||||
(string-map (match-lambda
|
||||
(#\_ #\-)
|
||||
(chr chr))
|
||||
(string-downcase language)))
|
||||
(define (guix-url path)
|
||||
(string-append #$%web-site-url path))
|
||||
|
||||
(define-syntax-rule (with-language language exp ...)
|
||||
(let ((lang (getenv "LANGUAGE")))
|
||||
(dynamic-wind
|
||||
(lambda ()
|
||||
(setenv "LANGUAGE" language)
|
||||
(setlocale LC_MESSAGES))
|
||||
(lambda () exp ...)
|
||||
(lambda ()
|
||||
(if lang
|
||||
(setenv "LANGUAGE" lang)
|
||||
(unsetenv "LANGUAGE"))
|
||||
(setlocale LC_MESSAGES)))))
|
||||
(define (sxml-index language title body)
|
||||
;; FIXME: Avoid duplicating styling info from guix-artwork.git.
|
||||
`(html (@ (lang ,language))
|
||||
(head
|
||||
(title ,(string-append title " — GNU Guix"))
|
||||
(meta (@ (charset "UTF-8")))
|
||||
(meta (@ (name "viewport") (content "width=device-width, initial-scale=1.0")))
|
||||
;; Menu prefetch.
|
||||
(link (@ (rel "prefetch") (href ,(guix-url "menu/index.html"))))
|
||||
;; Base CSS.
|
||||
(link (@ (rel "stylesheet") (href ,(guix-url "static/base/css/elements.css"))))
|
||||
(link (@ (rel "stylesheet") (href ,(guix-url "static/base/css/common.css"))))
|
||||
(link (@ (rel "stylesheet") (href ,(guix-url "static/base/css/messages.css"))))
|
||||
(link (@ (rel "stylesheet") (href ,(guix-url "static/base/css/navbar.css"))))
|
||||
(link (@ (rel "stylesheet") (href ,(guix-url "static/base/css/breadcrumbs.css"))))
|
||||
(link (@ (rel "stylesheet") (href ,(guix-url "static/base/css/buttons.css"))))
|
||||
(link (@ (rel "stylesheet") (href ,(guix-url "static/base/css/footer.css"))))
|
||||
|
||||
;; (put 'with-language 'scheme-indent-function 1)
|
||||
(define* (translate str language
|
||||
#:key (domain "guix-manual"))
|
||||
(define exp
|
||||
`(begin
|
||||
(bindtextdomain "guix-manual"
|
||||
#+(guix-manual-text-domain
|
||||
source
|
||||
languages))
|
||||
(bindtextdomain "iso_639-3" ;language names
|
||||
#+(file-append iso-codes
|
||||
"/share/locale"))
|
||||
(write (gettext ,str ,domain))))
|
||||
(link (@ (rel "stylesheet") (href ,(guix-url "static/base/css/page.css"))))
|
||||
(link (@ (rel "stylesheet") (href ,(guix-url "static/base/css/post.css")))))
|
||||
(body
|
||||
(header (@ (class "navbar"))
|
||||
(h1 (a (@ (class "branding")
|
||||
(href #$%web-site-url)))
|
||||
(span (@ (class "a11y-offset"))
|
||||
"Guix"))
|
||||
(nav (@ (class "menu"))))
|
||||
(nav (@ (class "breadcrumbs"))
|
||||
(a (@ (class "crumb")
|
||||
(href #$%web-site-url))
|
||||
"Home"))
|
||||
,body
|
||||
(footer))))
|
||||
|
||||
(with-language language
|
||||
;; Since the 'gettext' function caches msgid translations,
|
||||
;; regardless of $LANGUAGE, we have to spawn a new process each
|
||||
;; time we want to translate to a different language. Bah!
|
||||
(let* ((pipe (open-pipe* OPEN_READ
|
||||
#+(file-append guile-2.2
|
||||
"/bin/guile")
|
||||
"-c" (object->string exp)))
|
||||
(str (read pipe)))
|
||||
(close-pipe pipe)
|
||||
str)))
|
||||
(define (language-index language)
|
||||
(define title
|
||||
(translate #$title language))
|
||||
|
||||
(define (seconds->string seconds language)
|
||||
(let* ((time (make-time time-utc 0 seconds))
|
||||
(date (time-utc->date time)))
|
||||
(with-language language (date->string date "~e ~B ~Y"))))
|
||||
(sxml-index
|
||||
language title
|
||||
`(main
|
||||
(article
|
||||
(@ (class "page centered-block limit-width"))
|
||||
(h2 ,title)
|
||||
(p (@ (class "post-metadata centered-text"))
|
||||
#$version " — "
|
||||
,(seconds->string #$date language))
|
||||
|
||||
(define (guix-url path)
|
||||
(string-append #$%web-site-url path))
|
||||
(div
|
||||
(ul
|
||||
(li (a (@ (href "html_node"))
|
||||
"HTML, with a separate page per node"))
|
||||
(li (a (@ (href
|
||||
,(string-append
|
||||
#$manual
|
||||
(if (string=? language
|
||||
"en")
|
||||
""
|
||||
(string-append "."
|
||||
language))
|
||||
".html")))
|
||||
"HTML, entirely on one page"))
|
||||
,@(if (member language '("ru" "zh_CN"))
|
||||
'()
|
||||
`((li (a (@ (href ,(string-append
|
||||
#$manual
|
||||
(if (string=? language "en")
|
||||
""
|
||||
(string-append "."
|
||||
language))
|
||||
".pdf"))))
|
||||
"PDF")))))))))
|
||||
|
||||
(define (sxml-index language title body)
|
||||
;; FIXME: Avoid duplicating styling info from guix-artwork.git.
|
||||
`(html (@ (lang ,language))
|
||||
(head
|
||||
(title ,(string-append title " — GNU Guix"))
|
||||
(meta (@ (charset "UTF-8")))
|
||||
(meta (@ (name "viewport") (content "width=device-width, initial-scale=1.0")))
|
||||
;; Menu prefetch.
|
||||
(link (@ (rel "prefetch") (href ,(guix-url "menu/index.html"))))
|
||||
;; Base CSS.
|
||||
(link (@ (rel "stylesheet") (href ,(guix-url "static/base/css/elements.css"))))
|
||||
(link (@ (rel "stylesheet") (href ,(guix-url "static/base/css/common.css"))))
|
||||
(link (@ (rel "stylesheet") (href ,(guix-url "static/base/css/messages.css"))))
|
||||
(link (@ (rel "stylesheet") (href ,(guix-url "static/base/css/navbar.css"))))
|
||||
(link (@ (rel "stylesheet") (href ,(guix-url "static/base/css/breadcrumbs.css"))))
|
||||
(link (@ (rel "stylesheet") (href ,(guix-url "static/base/css/buttons.css"))))
|
||||
(link (@ (rel "stylesheet") (href ,(guix-url "static/base/css/footer.css"))))
|
||||
|
||||
(link (@ (rel "stylesheet") (href ,(guix-url "static/base/css/page.css"))))
|
||||
(link (@ (rel "stylesheet") (href ,(guix-url "static/base/css/post.css")))))
|
||||
(body
|
||||
(header (@ (class "navbar"))
|
||||
(h1 (a (@ (class "branding")
|
||||
(href #$%web-site-url)))
|
||||
(span (@ (class "a11y-offset"))
|
||||
"Guix"))
|
||||
(nav (@ (class "menu"))))
|
||||
(nav (@ (class "breadcrumbs"))
|
||||
(a (@ (class "crumb")
|
||||
(href #$%web-site-url))
|
||||
"Home"))
|
||||
,body
|
||||
(footer))))
|
||||
|
||||
(define (language-index language)
|
||||
(define title
|
||||
(translate #$title language))
|
||||
|
||||
(sxml-index
|
||||
language title
|
||||
`(main
|
||||
(article
|
||||
(@ (class "page centered-block limit-width"))
|
||||
(h2 ,title)
|
||||
(p (@ (class "post-metadata centered-text"))
|
||||
#$version " — "
|
||||
,(seconds->string #$date language))
|
||||
|
||||
(div
|
||||
(ul
|
||||
(li (a (@ (href "html_node"))
|
||||
"HTML, with a separate page per node"))
|
||||
(li (a (@ (href
|
||||
,(string-append
|
||||
#$manual
|
||||
(if (string=? language
|
||||
"en")
|
||||
""
|
||||
(string-append "."
|
||||
language))
|
||||
".html")))
|
||||
"HTML, entirely on one page"))
|
||||
,@(if (member language '("ru" "zh_CN"))
|
||||
'()
|
||||
`((li (a (@ (href ,(string-append
|
||||
#$manual
|
||||
(if (string=? language "en")
|
||||
""
|
||||
(string-append "."
|
||||
language))
|
||||
".pdf"))))
|
||||
"PDF")))))))))
|
||||
|
||||
(define %iso639-languages
|
||||
(vector->list
|
||||
(assoc-ref (call-with-input-file
|
||||
#+(file-append iso-codes
|
||||
"/share/iso-codes/json/iso_639-3.json")
|
||||
json->scm)
|
||||
"639-3")))
|
||||
|
||||
(define (language-code->name code)
|
||||
"Return the full name of a language from its ISO-639-3 code."
|
||||
(let ((code (match (string-index code #\_)
|
||||
(#f code)
|
||||
(index (string-take code index)))))
|
||||
(any (lambda (language)
|
||||
(and (string=? (or (assoc-ref language "alpha_2")
|
||||
(assoc-ref language "alpha_3"))
|
||||
code)
|
||||
(assoc-ref language "name")))
|
||||
%iso639-languages)))
|
||||
|
||||
(define (top-level-index languages)
|
||||
(define title #$title)
|
||||
(sxml-index
|
||||
"en" title
|
||||
`(main
|
||||
(article
|
||||
(@ (class "page centered-block limit-width"))
|
||||
(h2 ,title)
|
||||
(div
|
||||
"This document is available in the following
|
||||
(define (top-level-index languages)
|
||||
(define title #$title)
|
||||
(sxml-index
|
||||
"en" title
|
||||
`(main
|
||||
(article
|
||||
(@ (class "page centered-block limit-width"))
|
||||
(h2 ,title)
|
||||
(div
|
||||
"This document is available in the following
|
||||
languages:\n"
|
||||
(ul
|
||||
,@(map (lambda (language)
|
||||
`(li (a (@ (href ,(normalize language)))
|
||||
,(translate
|
||||
(language-code->name language)
|
||||
language
|
||||
#:domain "iso_639-3"))))
|
||||
languages)))))))
|
||||
(ul
|
||||
,@(map (lambda (language)
|
||||
`(li (a (@ (href ,(normalize language)))
|
||||
,(language-code->native-name language))))
|
||||
languages)))))))
|
||||
|
||||
(define (write-html file sxml)
|
||||
(call-with-output-file file
|
||||
(lambda (port)
|
||||
(display "<!DOCTYPE html>\n" port)
|
||||
(sxml->xml sxml port))))
|
||||
(define (write-html file sxml)
|
||||
(call-with-output-file file
|
||||
(lambda (port)
|
||||
(display "<!DOCTYPE html>\n" port)
|
||||
(sxml->xml sxml port))))
|
||||
|
||||
(setenv "GUIX_LOCPATH"
|
||||
#+(file-append glibc-utf8-locales "/lib/locale"))
|
||||
(setenv "LC_ALL" "en_US.utf8")
|
||||
(setlocale LC_ALL "en_US.utf8")
|
||||
(setenv "GUIX_LOCPATH"
|
||||
#+(file-append glibc-utf8-locales "/lib/locale"))
|
||||
(setenv "LC_ALL" "en_US.utf8")
|
||||
(setlocale LC_ALL "en_US.utf8")
|
||||
|
||||
(for-each (lambda (language)
|
||||
(define directory
|
||||
(string-append #$output "/"
|
||||
(normalize language)))
|
||||
(for-each (lambda (language)
|
||||
(define directory
|
||||
(string-append #$output "/"
|
||||
(normalize language)))
|
||||
|
||||
(mkdir-p directory)
|
||||
(write-html (string-append directory "/index.html")
|
||||
(language-index language)))
|
||||
'#$languages)
|
||||
(mkdir-p directory)
|
||||
(write-html (string-append directory "/index.html")
|
||||
(language-index language)))
|
||||
'#$languages)
|
||||
|
||||
(write-html (string-append #$output "/index.html")
|
||||
(top-level-index '#$languages))))))
|
||||
(write-html (string-append #$output "/index.html")
|
||||
(top-level-index '#$languages)))))
|
||||
|
||||
(computed-file "html-indexes" build))
|
||||
|
||||
|
|
|
@ -73,10 +73,10 @@ all the dependencies and appropriate environment variables are set up to
|
|||
hack on Guix:
|
||||
|
||||
@example
|
||||
guix environment guix --pure
|
||||
guix shell -D guix --pure
|
||||
@end example
|
||||
|
||||
@xref{Invoking guix environment}, for more information on that command.
|
||||
@xref{Invoking guix shell}, for more information on that command.
|
||||
|
||||
If you are unable to use Guix when building Guix from a checkout, the
|
||||
following are the required packages in addition to those mentioned in the
|
||||
|
@ -92,10 +92,10 @@ installation instructions (@pxref{Requirements}).
|
|||
@end itemize
|
||||
|
||||
On Guix, extra dependencies can be added by instead running @command{guix
|
||||
environment} with @option{--ad-hoc}:
|
||||
shell}:
|
||||
|
||||
@example
|
||||
guix environment guix --pure --ad-hoc help2man git strace
|
||||
guix shell -D guix help2man git strace --pure
|
||||
@end example
|
||||
|
||||
Run @command{./bootstrap} to generate the build system infrastructure
|
||||
|
@ -120,12 +120,12 @@ export ACLOCAL_PATH=/usr/share/aclocal
|
|||
@xref{Macro Search Path,,, automake, The GNU Automake Manual}, for
|
||||
more information.
|
||||
|
||||
Then, run @command{./configure} as usual. Make sure to pass
|
||||
@code{--localstatedir=@var{directory}} where @var{directory} is the
|
||||
@code{localstatedir} value used by your current installation (@pxref{The
|
||||
Store}, for information about this), usually @file{/var}. Note that you
|
||||
will probably not run @command{make install} at the end (you don't have
|
||||
to) but it's still important to pass the right @code{localstatedir}.
|
||||
Then, run @command{./configure --localstatedir=@var{directory}}, where
|
||||
@var{directory} is the @code{localstatedir} value used by your current
|
||||
installation (@pxref{The Store}, for information about this), usually
|
||||
@file{/var}. Note that you will probably not run @command{make install}
|
||||
at the end (you don't have to) but it's still important to pass the
|
||||
right @code{localstatedir}.
|
||||
|
||||
Finally, you have to invoke @code{make && make check} to build Guix and
|
||||
run the tests (@pxref{Running the Test Suite}). If anything fails, take
|
||||
|
@ -695,7 +695,7 @@ package typically include a @file{snippets} directory, which could be
|
|||
copied to the installation directory using:
|
||||
|
||||
@lisp
|
||||
#:include (cons "^snippets/" %default-include))
|
||||
#:include (cons "^snippets/" %default-include)
|
||||
@end lisp
|
||||
|
||||
When encountering problems, it is wise to check for the presence of the
|
||||
|
@ -959,17 +959,11 @@ If you do not use Emacs, please make sure to let your editor knows these
|
|||
rules. To automatically indent a package definition, you can also run:
|
||||
|
||||
@example
|
||||
./etc/indent-code.el gnu/packages/@var{file}.scm @var{package}
|
||||
./pre-inst-env guix style @var{package}
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
This automatically indents the definition of @var{package} in
|
||||
@file{gnu/packages/@var{file}.scm} by running Emacs in batch mode. To
|
||||
indent a whole file, omit the second argument:
|
||||
|
||||
@example
|
||||
./etc/indent-code.el gnu/services/@var{file}.scm
|
||||
@end example
|
||||
@xref{Invoking guix style}, for more information.
|
||||
|
||||
@cindex Vim, Scheme code editing
|
||||
If you are editing code with Vim, we recommend that you run @code{:set
|
||||
|
@ -992,9 +986,12 @@ keyword parameters for procedures that take more than four parameters.
|
|||
Development is done using the Git distributed version control system.
|
||||
Thus, access to the repository is not strictly necessary. We welcome
|
||||
contributions in the form of patches as produced by @code{git
|
||||
format-patch} sent to the @email{guix-patches@@gnu.org} mailing list.
|
||||
Seasoned Guix developers may also want to look at the section on commit
|
||||
access (@pxref{Commit Access}).
|
||||
format-patch} sent to the @email{guix-patches@@gnu.org} mailing list
|
||||
(@pxref{submitting patches,, Submitting patches to a project, git, Git
|
||||
User Manual}). Contributors are encouraged to take a moment to set some
|
||||
Git repository options (@pxref{Configuring Git}) first, which can
|
||||
improve the readability of patches. Seasoned Guix developers may also
|
||||
want to look at the section on commit access (@pxref{Commit Access}).
|
||||
|
||||
This mailing list is backed by a Debbugs instance, which allows us to
|
||||
keep track of submissions (@pxref{Tracking Bugs and Patches}). Each
|
||||
|
@ -1014,8 +1011,11 @@ please run through this check list:
|
|||
@cindex @code{git format-patch}
|
||||
@cindex @code{git-format-patch}
|
||||
@item
|
||||
We recommend to use the command @code{git format-patch --base} to
|
||||
include the commit where your patch applies.
|
||||
When generating your patches with @code{git format-patch} or @code{git
|
||||
send-email}, we recommend using the option @code{--base=}, perhaps with
|
||||
the value @code{auto}. This option adds a note to the patch stating
|
||||
which commit the patch is based on. This helps reviewers understand how
|
||||
to apply and review your patches.
|
||||
|
||||
@item
|
||||
If the authors of the packaged software provide a cryptographic
|
||||
|
@ -1032,6 +1032,10 @@ Run @code{guix lint @var{package}}, where @var{package} is the
|
|||
name of the new or modified package, and fix any errors it reports
|
||||
(@pxref{Invoking guix lint}).
|
||||
|
||||
@item
|
||||
Run @code{guix style @var{package}} to format the new package definition
|
||||
according to the project's conventions (@pxref{Invoking guix style}).
|
||||
|
||||
@item
|
||||
Make sure the package builds on your platform, using @code{guix build
|
||||
@var{package}}.
|
||||
|
@ -1169,8 +1173,8 @@ Examples of unrelated changes include the addition of several packages,
|
|||
or a package update along with fixes to that package.
|
||||
|
||||
@item
|
||||
Please follow our code formatting rules, possibly running the
|
||||
@command{etc/indent-code.el} script to do that automatically for you
|
||||
Please follow our code formatting rules, possibly running
|
||||
@command{guix style} script to do that automatically for you
|
||||
(@pxref{Formatting Code}).
|
||||
|
||||
@item
|
||||
|
@ -1211,11 +1215,46 @@ should not be delayed.
|
|||
When a bug is resolved, please close the thread by sending an email to
|
||||
@email{@var{NNN}-done@@debbugs.gnu.org}.
|
||||
|
||||
@node Configuring Git
|
||||
@subsection Configuring Git
|
||||
@cindex git configuration
|
||||
@cindex @code{git format-patch}
|
||||
@cindex @code{git send-email}
|
||||
|
||||
If you have not done so already, you may wish to set a name and email
|
||||
that will be associated with your commits (@pxref{telling git your name,
|
||||
, Telling Git your name, git, Git User Manual}). If you wish to use a
|
||||
different name or email just for commits in this repository, you can
|
||||
use @command{git config --local}, or edit @file{.git/config} in the
|
||||
repository instead of @file{~/.gitconfig}.
|
||||
|
||||
We provide some default settings in @file{etc/git/gitconfig} which
|
||||
modify how patches are generated, making them easier to read and apply.
|
||||
These settings can be applied by manually copying them to
|
||||
@file{.git/config} in your checkout, or by telling Git to include the
|
||||
whole file:
|
||||
|
||||
@example
|
||||
git config --local include.path ../etc/git/gitconfig
|
||||
@end example
|
||||
|
||||
From then on, any changes to @file{etc/git/gitconfig} would
|
||||
automatically take effect.
|
||||
|
||||
Since the first patch in a series must be sent separately
|
||||
(@pxref{Sending a Patch Series}), it can also be helpful to tell
|
||||
@command{git format-patch} to handle the e-mail threading instead of
|
||||
@command{git send-email}:
|
||||
|
||||
@example
|
||||
git config --local format.thread shallow
|
||||
git config --local sendemail.thread no
|
||||
@end example
|
||||
|
||||
@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
|
||||
|
|
|
@ -6,8 +6,7 @@
|
|||
;; Augment the package definition of GDB with the build tools
|
||||
;; needed when developing GDB (and which are not needed when
|
||||
;; simply installing it.)
|
||||
(package (inherit gdb)
|
||||
(native-inputs `(("autoconf" ,autoconf-2.64)
|
||||
("automake" ,automake)
|
||||
("texinfo" ,texinfo)
|
||||
,@(package-native-inputs gdb))))
|
||||
(package
|
||||
(inherit gdb)
|
||||
(native-inputs (modify-inputs (package-native-inputs gdb)
|
||||
(prepend autoconf-2.64 automake texinfo))))
|
||||
|
|
|
@ -57,10 +57,12 @@ its API, and related concepts.
|
|||
@c TRANSLATORS: You can replace the following paragraph with information on
|
||||
@c how to join your own translation team and how to report issues with the
|
||||
@c translation.
|
||||
If you would like to translate this document in your native language, consider
|
||||
joining
|
||||
This manual is also available in French (@pxref{Top,,, guix-cookbook.fr,
|
||||
Livre de recettes de GNU Guix}) and German (@pxref{Top,,,
|
||||
guix-cookbook.de, GNU-Guix-Kochbuch}). If you would like to translate
|
||||
this document in your native language, consider joining
|
||||
@uref{https://translate.fedoraproject.org/projects/guix/documentation-cookbook,
|
||||
Weblate}.
|
||||
Weblate} (@pxref{Translating Guix,,, guix, GNU Guix reference manual}).
|
||||
|
||||
@menu
|
||||
* Scheme tutorials:: Meet your new favorite language!
|
||||
|
@ -793,10 +795,8 @@ another, more sophisticated package (slightly modified from the source):
|
|||
"17pjvprmdrx4h6bb1hhc98w9qi6ki7yl57f090n9kbhswxqfs7s3"))
|
||||
(patches (search-patches "libgit2-mtime-0.patch"))
|
||||
(modules '((guix build utils)))
|
||||
(snippet '(begin
|
||||
;; Remove bundled software.
|
||||
(delete-file-recursively "deps")
|
||||
#true))))
|
||||
;; Remove bundled software.
|
||||
(snippet '(delete-file-recursively "deps"))))
|
||||
(build-system cmake-build-system)
|
||||
(outputs '("out" "debug"))
|
||||
(arguments
|
||||
|
@ -810,23 +810,19 @@ another, more sophisticated package (slightly modified from the source):
|
|||
(("#!/bin/sh") (string-append "#!" (which "sh"))))
|
||||
(substitute* "tests/clar/fs.h"
|
||||
(("/bin/cp") (which "cp"))
|
||||
(("/bin/rm") (which "rm")))
|
||||
#true))
|
||||
(("/bin/rm") (which "rm")))))
|
||||
;; Run checks more verbosely.
|
||||
(replace 'check
|
||||
(lambda _ (invoke "./libgit2_clar" "-v" "-Q")))
|
||||
(add-after 'unpack 'make-files-writable-for-tests
|
||||
(lambda _ (for-each make-file-writable (find-files "." ".*")))))))
|
||||
(inputs
|
||||
`(("libssh2" ,libssh2)
|
||||
("http-parser" ,http-parser)
|
||||
("python" ,python-wrapper)))
|
||||
(list libssh2 http-parser python-wrapper))
|
||||
(native-inputs
|
||||
`(("pkg-config" ,pkg-config)))
|
||||
(list pkg-config))
|
||||
(propagated-inputs
|
||||
;; These two libraries are in 'Requires.private' in libgit2.pc.
|
||||
`(("openssl" ,openssl)
|
||||
("zlib" ,zlib)))
|
||||
(list openssl zlib))
|
||||
(home-page "https://libgit2.github.com/")
|
||||
(synopsis "Library providing Git core methods")
|
||||
(description
|
||||
|
@ -890,22 +886,6 @@ Snippets might need additional Guile modules which can be imported from the
|
|||
|
||||
@subsubsection Inputs
|
||||
|
||||
First, a syntactic comment: See the quasi-quote / comma syntax?
|
||||
|
||||
@lisp
|
||||
(native-inputs
|
||||
`(("pkg-config" ,pkg-config)))
|
||||
@end lisp
|
||||
|
||||
is equivalent to
|
||||
|
||||
@lisp
|
||||
(native-inputs
|
||||
(list (list "pkg-config" pkg-config)))
|
||||
@end lisp
|
||||
|
||||
You'll mostly see the former because it's shorter.
|
||||
|
||||
There are 3 different input types. In short:
|
||||
|
||||
@table @asis
|
||||
|
@ -939,6 +919,24 @@ It also matters when a substitute is available, in which case only the @emph{inp
|
|||
and @emph{propagated inputs} will be fetched: the @emph{native inputs} are not required to
|
||||
install a package from a substitute.
|
||||
|
||||
@quotation Note
|
||||
You may see here and there snippets where package inputs are written
|
||||
quite differently, like so:
|
||||
|
||||
@lisp
|
||||
;; The "old style" for inputs.
|
||||
(inputs
|
||||
`(("libssh2" ,libssh2)
|
||||
("http-parser" ,http-parser)
|
||||
("python" ,python-wrapper)))
|
||||
@end lisp
|
||||
|
||||
This is the ``old style'', where each input in the list is explicitly
|
||||
given a label (a string). It is still supported but we recommend using
|
||||
the style above instead. @xref{package Reference,,, guix, GNU Guix
|
||||
Reference Manual}, for more info.
|
||||
@end quotation
|
||||
|
||||
@subsubsection Outputs
|
||||
|
||||
Just like how a package can have multiple inputs, it can also produce multiple
|
||||
|
@ -1224,10 +1222,7 @@ $ guix import cran --recursive walrus
|
|||
"1nk2glcvy4hyksl5ipq2mz8jy4fss90hx6cq98m3w96kzjni6jjj"))))
|
||||
(build-system r-build-system)
|
||||
(propagated-inputs
|
||||
`(("r-ggplot2" ,r-ggplot2)
|
||||
("r-jmvcore" ,r-jmvcore)
|
||||
("r-r6" ,r-r6)
|
||||
("r-wrs2" ,r-wrs2)))
|
||||
(list r-ggplot2 r-jmvcore r-r6 r-wrs2))
|
||||
(home-page "https://github.com/jamovi/walrus")
|
||||
(synopsis "Robust Statistical Methods")
|
||||
(description
|
||||
|
@ -1286,8 +1281,7 @@ noticed that a significant number of them have a @code{inherit} field:
|
|||
(sha256
|
||||
(base32
|
||||
"17fpahgh5dyckgz7rwqvzgnhx53cx9kr2xw0szprc6bnqy977fi8"))))
|
||||
(native-inputs
|
||||
`(("gtk-encode-symbolic-svg" ,gtk+ "bin")))))
|
||||
(native-inputs (list `(,gtk+ "bin")))))
|
||||
@end lisp
|
||||
|
||||
All unspecified fields are inherited from the parent package. This is very
|
||||
|
@ -1436,37 +1430,34 @@ The @code{linux-libre} kernel package definition is actually a procedure which
|
|||
creates a package.
|
||||
|
||||
@lisp
|
||||
(define* (make-linux-libre version hash supported-systems
|
||||
#:key
|
||||
;; A function that takes an arch and a variant.
|
||||
;; See kernel-config for an example.
|
||||
(extra-version #false)
|
||||
(configuration-file #false)
|
||||
(defconfig "defconfig")
|
||||
(extra-options %default-extra-linux-options)
|
||||
(patches (list %boot-logo-patch)))
|
||||
(define* (make-linux-libre* version gnu-revision source supported-systems
|
||||
#:key
|
||||
(extra-version #f)
|
||||
;; A function that takes an arch and a variant.
|
||||
;; See kernel-config for an example.
|
||||
(configuration-file #f)
|
||||
(defconfig "defconfig")
|
||||
(extra-options %default-extra-linux-options))
|
||||
...)
|
||||
@end lisp
|
||||
|
||||
The current @code{linux-libre} package is for the 5.1.x series, and is
|
||||
The current @code{linux-libre} package is for the 5.15.x series, and is
|
||||
declared like this:
|
||||
|
||||
@lisp
|
||||
(define-public linux-libre
|
||||
(make-linux-libre %linux-libre-version
|
||||
%linux-libre-hash
|
||||
'("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux")
|
||||
#:patches %linux-libre-5.1-patches
|
||||
#:configuration-file kernel-config))
|
||||
(define-public linux-libre-5.15
|
||||
(make-linux-libre* linux-libre-5.15-version
|
||||
linux-libre-5.15-gnu-revision
|
||||
linux-libre-5.15-source
|
||||
'("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux" "riscv64-linux")
|
||||
#:configuration-file kernel-config))
|
||||
@end lisp
|
||||
|
||||
Any keys which are not assigned values inherit their default value from the
|
||||
@code{make-linux-libre} definition. When comparing the two snippets above,
|
||||
you may notice that the code comment in the first doesn't actually refer to
|
||||
the @code{#:extra-version} keyword; it is actually for
|
||||
@code{#:configuration-file}. Because of this, it is not actually easy to
|
||||
include a custom kernel configuration from the definition, but don't worry,
|
||||
there are other ways to work with what we do have.
|
||||
notice the code comment that refers to @code{#:configuration-file}. Because of
|
||||
this, it is not actually easy to include a custom kernel configuration from the
|
||||
definition, but don't worry, there are other ways to work with what we do have.
|
||||
|
||||
There are two ways to create a kernel with a custom kernel configuration. The
|
||||
first is to provide a standard @file{.config} file during the build process by
|
||||
|
@ -1566,14 +1557,15 @@ custom kernel:
|
|||
(@@@@ (gnu packages linux) %default-extra-linux-options)))
|
||||
|
||||
(define-public linux-libre-macbook41
|
||||
;; XXX: Access the internal 'make-linux-libre' procedure, which is
|
||||
;; XXX: Access the internal 'make-linux-libre*' procedure, which is
|
||||
;; private and unexported, and is liable to change in the future.
|
||||
((@@@@ (gnu packages linux) make-linux-libre) (@@@@ (gnu packages linux) %linux-libre-version)
|
||||
(@@@@ (gnu packages linux) %linux-libre-hash)
|
||||
'("x86_64-linux")
|
||||
#:extra-version "macbook41"
|
||||
#:patches (@@@@ (gnu packages linux) %linux-libre-5.1-patches)
|
||||
#:extra-options %macbook41-config-options))
|
||||
((@@@@ (gnu packages linux) make-linux-libre*)
|
||||
(@@@@ (gnu packages linux) linux-libre-version)
|
||||
(@@@@ (gnu packages linux) linux-libre-gnu-revision)
|
||||
(@@@@ (gnu packages linux) linux-libre-source)
|
||||
'("x86_64-linux")
|
||||
#:extra-version "macbook41"
|
||||
#:extra-options %macbook41-config-options))
|
||||
@end lisp
|
||||
|
||||
In the above example @code{%file-systems} is a collection of flags enabling
|
||||
|
|
3015
doc/guix.texi
3015
doc/guix.texi
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
|||
(use-modules (gnu home)
|
||||
(gnu home-services)
|
||||
(gnu home-services shells)
|
||||
(gnu home services)
|
||||
(gnu home services shells)
|
||||
(gnu services)
|
||||
(gnu packages admin)
|
||||
(guix gexp))
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# 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=2020-01-11.22; # UTC
|
||||
htmlxrefversion=2021-09-24.23; # UTC
|
||||
|
||||
# Copyright 2010, 2011, 2012, 2013, 2014, 2015, 2019, 2020 Free Software Foundation, Inc.
|
||||
# Copyright 2010-2020 Free Software Foundation, Inc.
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification,
|
||||
# are permitted in any medium without royalty provided the copyright
|
||||
|
@ -110,6 +110,10 @@ cpio node ${GS}/cpio/manual/html_node/
|
|||
|
||||
cssc node ${GS}/cssc/manual/
|
||||
|
||||
CUIRASS = ${GS}/guix/cuirass/manual
|
||||
cuirass mono ${CUIRASS}/cuirass.html
|
||||
cuirass node ${CUIRASS}/html_node/
|
||||
|
||||
CVS = ${GS}/trans-coord/manual
|
||||
cvs mono ${CVS}/cvs/cvs.html
|
||||
cvs node ${CVS}/cvs/html_node/
|
||||
|
@ -118,6 +122,8 @@ ddd mono ${GS}/ddd/manual/html_mono/ddd.html
|
|||
|
||||
ddrescue mono ${GS}/ddrescue/manual/ddrescue_manual.html
|
||||
|
||||
dejagnu node ${GS}/dejagnu/manual/
|
||||
|
||||
DICO = https://puszcza.gnu.org.ua/software/dico/manual
|
||||
dico mono ${DICO}/dico.html
|
||||
dico chapter ${DICO}/html_chapter/
|
||||
|
@ -127,6 +133,9 @@ dico node ${DICO}/html_node/
|
|||
diffutils mono ${GS}/diffutils/manual/diffutils
|
||||
diffutils node ${GS}/diffutils/manual/html_node/
|
||||
|
||||
dmd mono ${GS}/dmd/manual/dmd
|
||||
dmd node ${GS}/dmd/manual/html_node/
|
||||
|
||||
ed mono ${GS}/ed/manual/ed_manual.html
|
||||
|
||||
EMACS = ${GS}/emacs/manual
|
||||
|
@ -181,6 +190,9 @@ emacs node ${EMACS}/html_node/emacs/
|
|||
idlwave mono ${EMACS}/html_mono/idlwave.html
|
||||
idlwave node ${EMACS}/html_node/idlwave/
|
||||
#
|
||||
info mono ${EMACS}/html_mono/info.html
|
||||
info node ${EMACS}/html_node/info/
|
||||
#
|
||||
message mono ${EMACS}/html_mono/message.html
|
||||
message node ${EMACS}/html_node/message/
|
||||
#
|
||||
|
@ -259,7 +271,7 @@ gcc node ${GCC}/gcc/
|
|||
gcj node ${GCC}/gcj/
|
||||
gfortran node ${GCC}/gfortran/
|
||||
gnat_rm node ${GCC}/gnat_rm/
|
||||
gnat_ugn_unw node ${GCC}/gnat_ugn_unw/
|
||||
gnat_ugn node ${GCC}/gnat_ugn/
|
||||
libgomp node ${GCC}/libgomp/
|
||||
libstdc++ node ${GCC}/libstdc++/
|
||||
#
|
||||
|
@ -288,6 +300,11 @@ gettext node ${GS}/gettext/manual/html_node/
|
|||
|
||||
gforth node https://www.complang.tuwien.ac.at/forth/gforth/Docs-html/
|
||||
|
||||
# Also found at:
|
||||
# https://mirrors.edge.kernel.org/pub/software/scm/git/docs/user-manual.html
|
||||
# https://git.github.io/htmldocs/user-manual.html
|
||||
git mono https://git-scm.com/docs/user-manual
|
||||
|
||||
global mono ${GS}/global/manual/global.html
|
||||
|
||||
gmediaserver node ${GS}/gmediaserver/manual/
|
||||
|
@ -335,8 +352,8 @@ GNUSTANDARDS = ${G}/prep
|
|||
standards mono ${GNUSTANDARDS}/standards/standards.html
|
||||
standards node ${GNUSTANDARDS}/standards/html_node/
|
||||
|
||||
gnutls mono http://gnutls.org/manual/gnutls.html
|
||||
gnutls node http://gnutls.org/manual/html_node/
|
||||
gnutls mono ${GS}/gnutls/manual/gnutls.html
|
||||
gnutls node ${GS}/gnutls/manual/html_node/
|
||||
|
||||
gnutls-guile mono http://gnutls.org/manual/gnutls-guile.html
|
||||
gnutls-guile node http://gnutls.org/manual/gnutls-guile/
|
||||
|
@ -397,18 +414,27 @@ guile-gtk node ${GS}/guile-gtk/docs/guile-gtk/
|
|||
guile-rpc mono ${GS}/guile-rpc/manual/guile-rpc.html
|
||||
guile-rpc node ${GS}/guile-rpc/manual/html_node/
|
||||
|
||||
guix.de mono ${GS}/guix/manual/de/guix.de.html
|
||||
guix.de node ${GS}/guix/manual/de/html_node/
|
||||
guix.es mono ${GS}/guix/manual/es/guix.es.html
|
||||
guix.es node ${GS}/guix/manual/es/html_node/
|
||||
guix.fr mono ${GS}/guix/manual/fr/guix.fr.html
|
||||
guix.fr node ${GS}/guix/manual/fr/html_node/
|
||||
guix.ru mono ${GS}/guix/manual/ru/guix.ru.html
|
||||
guix.ru node ${GS}/guix/manual/ru/html_node/
|
||||
guix.zh_CN mono ${GS}/guix/manual/zh-cn/guix.zh_CN.html
|
||||
guix.zh_CN node ${GS}/guix/manual/zh-cn/html_node/
|
||||
guix mono ${GS}/guix/manual/en/guix.html
|
||||
guix node ${GS}/guix/manual/en/html_node/
|
||||
GUIX = ${GS}/guix/manual
|
||||
guix.de mono ${GUIX}/de/guix.de.html
|
||||
guix.de node ${GUIX}/de/html_node/
|
||||
guix.es mono ${GUIX}/es/guix.es.html
|
||||
guix.es node ${GUIX}/es/html_node/
|
||||
guix.fr mono ${GUIX}/fr/guix.fr.html
|
||||
guix.fr node ${GUIX}/fr/html_node/
|
||||
guix.ru mono ${GUIX}/ru/guix.ru.html
|
||||
guix.ru node ${GUIX}/ru/html_node/
|
||||
guix.zh_CN mono ${GUIX}/zh-cn/guix.zh_CN.html
|
||||
guix.zh_CN node ${GUIX}/zh-cn/html_node/
|
||||
guix mono ${GUIX}/en/guix.html
|
||||
guix node ${GUIX}/en/html_node/
|
||||
|
||||
GUIX_COOKBOOK = ${GS}/guix/cookbook
|
||||
guix-cookbook.de mono ${GUIX_COOKBOOK}/de/guix-cookbook.html
|
||||
guix-cookbook.de node ${GUIX_COOKBOOK}/de/html_node/
|
||||
guix-cookbook.fr mono ${GUIX_COOKBOOK}/fr/guix-cookbook.html
|
||||
guix-cookbook.fr node ${GUIX_COOKBOOK}/fr/html_node/
|
||||
guix-cookbook mono ${GUIX_COOKBOOK}/en/guix-cookbook.html
|
||||
guix-cookbook node ${GUIX_COOKBOOK}/en/html_node/
|
||||
|
||||
gv mono ${GS}/gv/manual/gv.html
|
||||
gv node ${GS}/gv/manual/html_node/
|
||||
|
@ -503,18 +529,21 @@ mcron node ${GS}/mcron/manual/html_node/
|
|||
mdk mono ${GS}/mdk/manual/mdk.html
|
||||
mdk node ${GS}/mdk/manual/html_node/
|
||||
|
||||
METAEXCHANGE = http://ftp.gwdg.de/pub/gnu2/iwfmdh/doc/texinfo
|
||||
METAEXCHANGE = https://ftp.gwdg.de/pub/gnu2/iwfmdh/doc/texinfo
|
||||
iwf_mh node ${METAEXCHANGE}/iwf_mh.html
|
||||
scantest node ${METAEXCHANGE}/scantest.html
|
||||
|
||||
mes mono ${GS}/mes/manual/mes.html
|
||||
mes node ${GS}/mes/manual/html_node/
|
||||
|
||||
MIT_SCHEME = ${GS}/mit-scheme/documentation
|
||||
MIT_SCHEME = ${GS}/mit-scheme/documentation/stable
|
||||
mit-scheme-ref mono ${MIT_SCHEME}/mit-scheme-ref.html
|
||||
mit-scheme-ref node ${MIT_SCHEME}/mit-scheme-ref/
|
||||
mit-scheme-user mono ${MIT_SCHEME}/mit-scheme-user.html
|
||||
mit-scheme-user node ${MIT_SCHEME}/mit-scheme-user/
|
||||
sos mono ${MIT_SCHEME}/mit-scheme-sos.html
|
||||
sos node ${MIT_SCHEME}/mit-scheme-sos/
|
||||
mit-scheme-imail node ${MIT_SCHEME}/mit-scheme-imail/
|
||||
mit-scheme-imail mono ${MIT_SCHEME}/mit-scheme-imail.html
|
||||
|
||||
moe mono ${GS}/moe/manual/moe_manual.html
|
||||
|
||||
|
@ -572,7 +601,7 @@ R = https://cran.r-project.org/doc/manuals
|
|||
rcs mono ${GS}/rcs/manual/rcs.html
|
||||
rcs node ${GS}/rcs/manual/html_node/
|
||||
|
||||
READLINE = http://cnswww.cns.cwru.edu/php/chet/readline
|
||||
READLINE = https://tiswww.cwru.edu/php/chet/readline
|
||||
readline mono ${READLINE}/readline.html
|
||||
rluserman mono ${READLINE}/rluserman.html
|
||||
history mono ${READLINE}/history.html
|
||||
|
@ -629,7 +658,7 @@ swbis mono ${GS}/swbis/manual.html
|
|||
tar mono ${GS}/tar/manual/tar.html
|
||||
tar chapter ${GS}/tar/manual/html_chapter/
|
||||
tar section ${GS}/tar/manual/html_section/
|
||||
tar node ${GS}/autoconf/manual/html_node/
|
||||
tar node ${GS}/tar/manual/html_node/
|
||||
|
||||
teseq mono ${GS}/teseq/teseq.html
|
||||
teseq node ${GS}/teseq/html_node/
|
||||
|
@ -637,9 +666,6 @@ teseq node ${GS}/teseq/html_node/
|
|||
TEXINFO = ${GS}/texinfo/manual
|
||||
texinfo mono ${TEXINFO}/texinfo/texinfo.html
|
||||
texinfo node ${TEXINFO}/texinfo/html_node/
|
||||
#
|
||||
info mono ${TEXINFO}/info/info.html
|
||||
info node ${TEXINFO}/info/html_node/
|
||||
#
|
||||
info-stnd mono ${TEXINFO}/info-stnd/info-stnd.html
|
||||
info-stnd node ${TEXINFO}/info-stnd/html_node/
|
||||
|
|
45
doc/local.mk
45
doc/local.mk
|
@ -22,8 +22,8 @@
|
|||
# along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# If adding a language, update the following variables, and info_TEXINFOS.
|
||||
MANUAL_LANGUAGES = de es fa fr it ko pt_BR ru sk zh_CN
|
||||
COOKBOOK_LANGUAGES = de fa fr ko ru sk zh_Hans
|
||||
MANUAL_LANGUAGES = de es fa fi fr it ko pt_BR ru sk zh_CN
|
||||
COOKBOOK_LANGUAGES = de es fa fi fr ko ru sk zh_Hans
|
||||
|
||||
# Arg1: A list of languages codes.
|
||||
# Arg2: The file name stem.
|
||||
|
@ -35,6 +35,7 @@ info_TEXINFOS = %D%/guix.texi \
|
|||
%D%/guix.de.texi \
|
||||
%D%/guix.es.texi \
|
||||
%D%/guix.fa.texi \
|
||||
%D%/guix.fi.texi \
|
||||
%D%/guix.fr.texi \
|
||||
%D%/guix.it.texi \
|
||||
%D%/guix.ko.texi \
|
||||
|
@ -44,7 +45,9 @@ info_TEXINFOS = %D%/guix.texi \
|
|||
%D%/guix.zh_CN.texi \
|
||||
%D%/guix-cookbook.texi \
|
||||
%D%/guix-cookbook.de.texi \
|
||||
%D%/guix-cookbook.es.texi \
|
||||
%D%/guix-cookbook.fa.texi \
|
||||
%D%/guix-cookbook.fi.texi \
|
||||
%D%/guix-cookbook.fr.texi \
|
||||
%D%/guix-cookbook.ko.texi \
|
||||
%D%/guix-cookbook.ru.texi \
|
||||
|
@ -80,7 +83,8 @@ EXTRA_DIST += \
|
|||
OS_CONFIG_EXAMPLES_TEXI = \
|
||||
%D%/os-config-bare-bones.texi \
|
||||
%D%/os-config-desktop.texi \
|
||||
%D%/os-config-lightweight-desktop.texi
|
||||
%D%/os-config-lightweight-desktop.texi \
|
||||
%D%/he-config-bare-bones.scm
|
||||
|
||||
TRANSLATED_INFO = \
|
||||
$(call lang_to_texinfo,$(MANUAL_LANGUAGES),guix) \
|
||||
|
@ -97,46 +101,31 @@ 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
|
||||
# Because @pxref and @xref commands are references to sections 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 \
|
||||
if [ -n "$$e" ]; then \
|
||||
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 ;\
|
||||
fi ;\
|
||||
done
|
||||
$(top_srcdir)/pre-inst-env $(GUILE) --no-auto-compile \
|
||||
"$(top_srcdir)/build-aux/convert-xref.scm" \
|
||||
$@.tmp $<
|
||||
endef
|
||||
|
||||
$(srcdir)/%D%/guix.%.texi: po/doc/guix-manual.%.po $(srcdir)/%D%/contributing.%.texi
|
||||
$(srcdir)/%D%/guix.%.texi: po/doc/guix-manual.%.po $(srcdir)/%D%/contributing.%.texi guix/build/po.go
|
||||
-$(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)
|
||||
-$(AM_V_POXREF)LC_ALL=en_US.UTF-8 $(xref_command)
|
||||
-mv "$@.tmp" "$@"
|
||||
|
||||
$(srcdir)/%D%/guix-cookbook.%.texi: po/doc/guix-cookbook.%.po
|
||||
$(srcdir)/%D%/guix-cookbook.%.texi: po/doc/guix-cookbook.%.po guix/build/po.go
|
||||
-$(AM_V_PO4A)$(PO4A_TRANSLATE) $(PO4A_PARAMS) -m "%D%/guix-cookbook.texi" -p "$<" -l "$@.tmp"
|
||||
-sed -i "s|guix-cookbook\.info|$$(basename "$@" | sed 's|texi$$|info|')|" "$@.tmp"
|
||||
-$(AM_V_POXREF)$(xref_command)
|
||||
-$(AM_V_POXREF)LC_ALL=en_US.UTF-8 $(xref_command)
|
||||
-mv "$@.tmp" "$@"
|
||||
|
||||
$(srcdir)/%D%/contributing.%.texi: po/doc/guix-manual.%.po
|
||||
$(srcdir)/%D%/contributing.%.texi: po/doc/guix-manual.%.po guix/build/po.go
|
||||
-$(AM_V_PO4A)$(PO4A_TRANSLATE) $(PO4A_PARAMS) -m "%D%/contributing.texi" -p "$<" -l "$@.tmp"
|
||||
-$(AM_V_POXREF)$(xref_command)
|
||||
-$(AM_V_POXREF)LC_ALL=en_US.UTF-8 $(xref_command)
|
||||
-mv "$@.tmp" "$@"
|
||||
|
||||
%D%/os-config-%.texi: gnu/system/examples/%.tmpl
|
||||
|
|
|
@ -215,7 +215,12 @@ corresponding to the top-level definition containing the staged changes."
|
|||
"Print ChangeLog commit message for changes between OLD and NEW."
|
||||
(define (get-values expr field)
|
||||
(match ((sxpath `(// ,field quasiquote *)) expr)
|
||||
(() '())
|
||||
(()
|
||||
;; New-style plain lists
|
||||
(match ((sxpath `(// ,field list *)) expr)
|
||||
((inner) inner)
|
||||
(_ '())))
|
||||
;; Old-style labelled inputs
|
||||
((first . rest)
|
||||
(map cadadr first))))
|
||||
(define (listify items)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# GNU Guix --- Functional package management for GNU
|
||||
# Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
|
||||
# Copyright © 2015-2022 Ludovic Courtès <ludo@gnu.org>
|
||||
# Copyright © 2021 Tobias Geerinck-Rice <me@tobias.gr>
|
||||
#
|
||||
# This file is part of GNU Guix.
|
||||
|
@ -28,11 +28,12 @@ _guix_complete_command ()
|
|||
if [ -z "$_guix_commands" ]
|
||||
then
|
||||
# Cache the list of commands to speed things up.
|
||||
_guix_commands="$(guix --help 2> /dev/null \
|
||||
_guix_commands="$(${COMP_WORDS[0]} --help 2> /dev/null \
|
||||
| grep '^ ' \
|
||||
| sed '-es/^ *\([a-z-]\+\).*$/\1/g')"
|
||||
fi
|
||||
COMPREPLY=($(compgen -W "$_guix_commands" -- "$word_at_point"))
|
||||
|
||||
COMPREPLY+=($(compgen -W "$_guix_commands" -- "$word_at_point"))
|
||||
}
|
||||
|
||||
_guix_complete_subcommand ()
|
||||
|
@ -41,7 +42,7 @@ _guix_complete_subcommand ()
|
|||
local subcommands="$(${COMP_WORDS[0]} $command --help 2> /dev/null \
|
||||
| grep '^ [a-z]' \
|
||||
| sed -e's/^ \+\([a-z-]\+\).*$/\1/g')"
|
||||
COMPREPLY=($(compgen -W "$subcommands" -- "${COMP_WORDS[$COMP_CWORD]}"))
|
||||
COMPREPLY+=($(compgen -W "$subcommands" -- "${COMP_WORDS[$COMP_CWORD]}"))
|
||||
}
|
||||
|
||||
_guix_complete_available_package ()
|
||||
|
@ -54,7 +55,7 @@ _guix_complete_available_package ()
|
|||
_guix_available_packages="$(${COMP_WORDS[0]} package -A 2> /dev/null \
|
||||
| cut -f1)"
|
||||
fi
|
||||
COMPREPLY=($(compgen -W "$_guix_available_packages" -- "$prefix"))
|
||||
COMPREPLY+=($(compgen -W "$_guix_available_packages" -- "$prefix"))
|
||||
}
|
||||
|
||||
_guix_complete_installed_package ()
|
||||
|
@ -64,22 +65,28 @@ _guix_complete_installed_package ()
|
|||
local prefix="$1"
|
||||
local packages="$(${COMP_WORDS[0]} package -I "^$prefix" 2> /dev/null \
|
||||
| cut -f1)"
|
||||
COMPREPLY=($(compgen -W "$packages" -- "$prefix"))
|
||||
COMPREPLY+=($(compgen -W "$packages" -- "$prefix"))
|
||||
}
|
||||
|
||||
_guix_complete_option ()
|
||||
{
|
||||
local command="${COMP_WORDS[$1]}"
|
||||
local subcommand="${COMP_WORDS[$(($1 + 1))]}"
|
||||
if _guix_is_option "$subcommand"
|
||||
|
||||
if [ $1 -eq 0 ]
|
||||
then
|
||||
command=""
|
||||
subcommand=""
|
||||
elif _guix_is_option "$subcommand"
|
||||
then
|
||||
subcommand=""
|
||||
fi
|
||||
|
||||
local options="$(${COMP_WORDS[0]} $command $subcommand --help 2> /dev/null \
|
||||
| grep '^ \+-' \
|
||||
| sed -e's/^.*--\([a-zA-Z0-9_-]\+\)\(=\?\).*/--\1\2/g')"
|
||||
compopt -o nospace
|
||||
COMPREPLY=($(compgen -W "$options" -- "$2"))
|
||||
COMPREPLY+=($(compgen -W "$options" -- "$2"))
|
||||
}
|
||||
|
||||
_guix_is_option ()
|
||||
|
@ -171,10 +178,22 @@ _guix_complete_file ()
|
|||
COMPREPLY=()
|
||||
}
|
||||
|
||||
_guix_complete_available_package_or_store_file ()
|
||||
{
|
||||
_guix_complete_available_package "$@"
|
||||
|
||||
# The current _guix_complete_file implementation doesn't compose (append to
|
||||
# COMPREPLY), so we suggest file names only if no package names matched.
|
||||
if [[ -z "$COMPREPLY" ]]
|
||||
then
|
||||
_guix_complete_file # TODO: restrict to store files
|
||||
fi
|
||||
}
|
||||
|
||||
_guix_complete_pid ()
|
||||
{
|
||||
local pids="$(cd /proc; echo [0-9]*)"
|
||||
COMPREPLY=($(compgen -W "$pids" -- "$1"))
|
||||
COMPREPLY+=($(compgen -W "$pids" -- "$1"))
|
||||
}
|
||||
|
||||
_guix_complete ()
|
||||
|
@ -203,7 +222,7 @@ _guix_complete ()
|
|||
if [[ "$word" = "--" ]]
|
||||
then
|
||||
case "$command" in
|
||||
environment)
|
||||
environment|shell)
|
||||
break
|
||||
;;
|
||||
time-machine)
|
||||
|
@ -216,6 +235,7 @@ _guix_complete ()
|
|||
case $COMP_CWORD in
|
||||
$command_index)
|
||||
_guix_complete_command
|
||||
_guix_complete_option 0 "$word_at_point"
|
||||
;;
|
||||
*)
|
||||
if [[ "$command" = "package" ]]
|
||||
|
@ -237,15 +257,7 @@ _guix_complete ()
|
|||
else
|
||||
_guix_complete_available_package "$word_at_point"
|
||||
fi
|
||||
elif [[ "$command" = "remove" ]]
|
||||
then
|
||||
if _guix_is_dash_L || _guix_is_dash_m || _guix_is_dash_p
|
||||
then
|
||||
_guix_complete_file
|
||||
else
|
||||
_guix_complete_installed_package "$word_at_point"
|
||||
fi
|
||||
elif [[ "$command" = "upgrade" ]]
|
||||
elif [[ "$command" = "upgrade" || "$command" = "remove" ]]
|
||||
then
|
||||
if _guix_is_dash_L || _guix_is_dash_m || _guix_is_dash_p
|
||||
then
|
||||
|
@ -259,26 +271,33 @@ _guix_complete ()
|
|||
then
|
||||
_guix_complete_file
|
||||
else
|
||||
_guix_complete_available_package "$word_at_point"
|
||||
_guix_complete_available_package_or_store_file "$word_at_point"
|
||||
fi
|
||||
elif [[ "$command" = "environment" ]]
|
||||
elif [[ "$command" = "environment" || "$command" = "shell" ]]
|
||||
then
|
||||
if _guix_is_dash_L || _guix_is_dash_m || _guix_is_dash_p || _guix_is_dash_l
|
||||
then
|
||||
_guix_complete_file
|
||||
if _guix_is_dash_f && [[ "$command" = "shell" ]]
|
||||
then
|
||||
# The otherwise identical ‘guix environment’ lacks the ‘-f’ option.
|
||||
_guix_complete_file
|
||||
elif _guix_is_dash_L || _guix_is_dash_m || _guix_is_dash_p || _guix_is_dash_l
|
||||
then
|
||||
_guix_complete_file
|
||||
elif _guix_is_option "$word_at_point"
|
||||
then
|
||||
_guix_complete_option "$command_index" "$word_at_point"
|
||||
else
|
||||
_guix_complete_available_package "$word_at_point"
|
||||
fi
|
||||
elif [[ "$command" = "download" ]]
|
||||
elif [[ "$command" = "download" || "$command" = "gc" || "$command" = "hash" ]]
|
||||
then
|
||||
_guix_complete_file
|
||||
elif [[ "$command" = "system" ]]
|
||||
_guix_complete_file
|
||||
elif [[ "$command" = "size" ]]
|
||||
then
|
||||
case $COMP_CWORD in
|
||||
2) _guix_complete_subcommand;;
|
||||
_guix_complete_available_package_or_store_file "$word_at_point"
|
||||
elif [[ "$command" = "system" || "$command" = "home" ]]
|
||||
then
|
||||
case $((COMP_CWORD - command_index)) in
|
||||
1) _guix_complete_subcommand;;
|
||||
*) _guix_complete_file;; # TODO: restrict to *.scm
|
||||
esac
|
||||
elif [[ "$command" = "pull" ]]
|
||||
|
@ -297,22 +316,21 @@ _guix_complete ()
|
|||
fi
|
||||
elif [[ "$command" = "container" ]]
|
||||
then
|
||||
case $COMP_CWORD in
|
||||
2) _guix_complete_subcommand;;
|
||||
3) _guix_complete_pid "$word_at_point";;
|
||||
case $((COMP_CWORD - command_index)) in
|
||||
1) _guix_complete_subcommand;;
|
||||
2) _guix_complete_pid "$word_at_point";;
|
||||
*) _guix_complete_file;;
|
||||
esac
|
||||
elif [[ "$command" = "import" ]]
|
||||
then
|
||||
_guix_complete_subcommand
|
||||
elif [[ "$command" = "hash" || "$command" = "gc" ]]
|
||||
then
|
||||
_guix_complete_file
|
||||
elif [[ "$command" = "weather" ]]
|
||||
then
|
||||
if _guix_is_dash_m
|
||||
then
|
||||
_guix_complete_file
|
||||
else
|
||||
_guix_complete_available_package "$word_at_point"
|
||||
fi
|
||||
else
|
||||
_guix_complete_available_package "$word_at_point"
|
||||
|
|
|
@ -58,6 +58,7 @@ _guix_list_available_packages()
|
|||
if ( [[ ${+_guix_available_packages} -eq 0 ]] || _cache_invalid GUIX_AVAILABLE_PACKAGES ) \
|
||||
&& ! _retrieve_cache GUIX_AVAILABLE_PACKAGES; then
|
||||
_guix_available_packages=(${${(f)"$(guix package -A | cut -f1)"}})
|
||||
_guix_available_packages=("${_guix_available_packages[@]// /}")
|
||||
_store_cache GUIX_AVAILABLE_PACKAGES _guix_available_packages
|
||||
fi
|
||||
}
|
||||
|
|
|
@ -108,5 +108,5 @@ an empty directory if ORIGIN could not be disassembled."
|
|||
(manifest
|
||||
(list (manifest-entry
|
||||
(name "disarchive-collection")
|
||||
(version (length origins))
|
||||
(version (number->string (length origins)))
|
||||
(item (disarchive-collection origins))))))
|
||||
|
|
5
etc/git/gitconfig
Normal file
5
etc/git/gitconfig
Normal file
|
@ -0,0 +1,5 @@
|
|||
[diff "scheme"]
|
||||
xfuncname = "^(\\(define.*)$"
|
||||
|
||||
[diff "texinfo"]
|
||||
xfuncname = "^@node[[:space:]]+([^,]+).*$"
|
|
@ -302,6 +302,9 @@
|
|||
(allow guix_daemon_t
|
||||
guix_daemon_conf_t
|
||||
(lnk_file (create getattr rename unlink read)))
|
||||
(allow guix_daemon_t
|
||||
guix_daemon_conf_t
|
||||
(sock_file (write)))
|
||||
(allow guix_daemon_t net_conf_t
|
||||
(file (getattr open read)))
|
||||
(allow guix_daemon_t net_conf_t
|
||||
|
|
|
@ -345,11 +345,11 @@ sys_create_store()
|
|||
mv "${tmp_path}/gnu" /
|
||||
|
||||
_msg "${INF}Linking the root user's profile"
|
||||
mkdir -p "~root/.config/guix"
|
||||
mkdir -p ~root/.config/guix
|
||||
ln -sf /var/guix/profiles/per-user/root/current-guix \
|
||||
"~root/.config/guix/current"
|
||||
~root/.config/guix/current
|
||||
|
||||
GUIX_PROFILE="~root/.config/guix/current"
|
||||
GUIX_PROFILE=~root/.config/guix/current
|
||||
# shellcheck disable=SC1090
|
||||
source "${GUIX_PROFILE}/etc/profile"
|
||||
_msg "${PAS}activated root profile at ${GUIX_PROFILE}"
|
||||
|
@ -405,7 +405,7 @@ sys_enable_guix_daemon()
|
|||
case "$INIT_SYS" in
|
||||
upstart)
|
||||
{ initctl reload-configuration;
|
||||
cp "~root/.config/guix/current/lib/upstart/system/guix-daemon.conf" \
|
||||
cp ~root/.config/guix/current/lib/upstart/system/guix-daemon.conf \
|
||||
/etc/init/ &&
|
||||
configure_substitute_discovery /etc/init/guix-daemon.conf &&
|
||||
start guix-daemon; } &&
|
||||
|
@ -415,15 +415,15 @@ sys_enable_guix_daemon()
|
|||
{ # systemd .mount units must be named after the target directory.
|
||||
# Here we assume a hard-coded name of /gnu/store.
|
||||
# XXX Work around <https://issues.guix.gnu.org/41356> until next release.
|
||||
if [ -f "~root/.config/guix/current/lib/systemd/system/gnu-store.mount" ]; then
|
||||
cp "~root/.config/guix/current/lib/systemd/system/gnu-store.mount" \
|
||||
if [ -f ~root/.config/guix/current/lib/systemd/system/gnu-store.mount ]; then
|
||||
cp ~root/.config/guix/current/lib/systemd/system/gnu-store.mount \
|
||||
/etc/systemd/system/;
|
||||
chmod 664 /etc/systemd/system/gnu-store.mount;
|
||||
systemctl daemon-reload &&
|
||||
systemctl enable gnu-store.mount;
|
||||
fi
|
||||
|
||||
cp "~root/.config/guix/current/lib/systemd/system/guix-daemon.service" \
|
||||
cp ~root/.config/guix/current/lib/systemd/system/guix-daemon.service \
|
||||
/etc/systemd/system/;
|
||||
chmod 664 /etc/systemd/system/guix-daemon.service;
|
||||
|
||||
|
@ -447,7 +447,7 @@ sys_enable_guix_daemon()
|
|||
;;
|
||||
sysv-init)
|
||||
{ mkdir -p /etc/init.d;
|
||||
cp "~root/.config/guix/current/etc/init.d/guix-daemon" \
|
||||
cp ~root/.config/guix/current/etc/init.d/guix-daemon \
|
||||
/etc/init.d/guix-daemon;
|
||||
chmod 775 /etc/init.d/guix-daemon;
|
||||
|
||||
|
@ -460,7 +460,7 @@ sys_enable_guix_daemon()
|
|||
;;
|
||||
openrc)
|
||||
{ mkdir -p /etc/init.d;
|
||||
cp "~root/.config/guix/current/etc/openrc/guix-daemon" \
|
||||
cp ~root/.config/guix/current/etc/openrc/guix-daemon \
|
||||
/etc/init.d/guix-daemon;
|
||||
chmod 775 /etc/init.d/guix-daemon;
|
||||
|
||||
|
@ -492,7 +492,7 @@ sys_authorize_build_farms()
|
|||
if prompt_yes_no "Permit downloading pre-built package binaries from the \
|
||||
project's build farm? (yes/no)"; then
|
||||
guix archive --authorize \
|
||||
< "~root/.config/guix/current/share/guix/ci.guix.gnu.org.pub" \
|
||||
< ~root/.config/guix/current/share/guix/ci.guix.gnu.org.pub \
|
||||
&& _msg "${PAS}Authorized public key for ci.guix.gnu.org"
|
||||
else
|
||||
_msg "${INF}Skipped authorizing build farm public keys"
|
||||
|
|
|
@ -1,120 +0,0 @@
|
|||
:;exec emacs --batch --quick --load="$0" --funcall=main "$@"
|
||||
;;; indent-code.el --- Run Emacs to indent a package definition.
|
||||
|
||||
;; Copyright © 2017 Alex Kost <alezost@gmail.com>
|
||||
;; Copyright © 2017 Ludovic Courtès <ludo@gnu.org>
|
||||
;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
||||
;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||
|
||||
;; This file is part of GNU Guix.
|
||||
|
||||
;; GNU Guix is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or
|
||||
;; (at your option) any later version.
|
||||
|
||||
;; GNU Guix is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; This scripts indents the given file or package definition in the specified
|
||||
;; file using Emacs.
|
||||
|
||||
;;; Code:
|
||||
|
||||
;; Load Scheme indentation rules from ".dir-locals.el".
|
||||
(with-temp-buffer
|
||||
(scheme-mode)
|
||||
(let ((default-directory (file-name-as-directory load-file-name))
|
||||
(enable-local-variables :all))
|
||||
(hack-dir-local-variables)
|
||||
(hack-local-variables-apply)))
|
||||
|
||||
;; Add indentation info for Scheme constructs that are not Guix-specific.
|
||||
;; This is normally provided by Geiser but this file is for people who may not
|
||||
;; be running Geiser, so we just copy it here (from 'geiser-syntax.el').
|
||||
(defmacro guix-syntax--scheme-indent (&rest pairs)
|
||||
`(progn ,@(mapcar (lambda (p)
|
||||
`(put ',(car p) 'scheme-indent-function ',(cadr p)))
|
||||
pairs)))
|
||||
|
||||
(guix-syntax--scheme-indent
|
||||
(and-let* 1)
|
||||
(case-lambda 0)
|
||||
(catch defun)
|
||||
(class defun)
|
||||
(dynamic-wind 0)
|
||||
(guard 1)
|
||||
(let*-values 1)
|
||||
(let-values 1)
|
||||
(let/ec 1)
|
||||
(letrec* 1)
|
||||
(match 1)
|
||||
(match-lambda 0)
|
||||
(match-lambda* 0)
|
||||
(match-let scheme-let-indent)
|
||||
(match-let* 1)
|
||||
(match-letrec 1)
|
||||
(opt-lambda 1)
|
||||
(parameterize 1)
|
||||
(parameterize* 1)
|
||||
(receive 2)
|
||||
(require-extension 0)
|
||||
(syntax-case 2)
|
||||
(test-approximate 1)
|
||||
(test-assert 1)
|
||||
(test-eq 1)
|
||||
(test-equal 1)
|
||||
(test-eqv 1)
|
||||
(test-group-with-cleanup 1)
|
||||
(test-runner-on-bad-count! 1)
|
||||
(test-runner-on-bad-end-name! 1)
|
||||
(test-runner-on-final! 1)
|
||||
(test-runner-on-group-begin! 1)
|
||||
(test-runner-on-group-end! 1)
|
||||
(test-runner-on-test-begin! 1)
|
||||
(test-runner-on-test-end! 1)
|
||||
(test-with-runner 1)
|
||||
(unless 1)
|
||||
(when 1)
|
||||
(while 1)
|
||||
(with-exception-handler 1)
|
||||
(with-syntax 1))
|
||||
|
||||
|
||||
(defun main ()
|
||||
(pcase command-line-args-left
|
||||
(`(,file-name ,package-name)
|
||||
;; Indent the definition of PACKAGE-NAME in FILE-NAME.
|
||||
(find-file file-name)
|
||||
(goto-char (point-min))
|
||||
(if (re-search-forward (concat "^(define\\(\\|-public\\) +"
|
||||
package-name)
|
||||
nil t)
|
||||
(let ((indent-tabs-mode nil))
|
||||
(beginning-of-defun)
|
||||
(mark-sexp)
|
||||
(untabify (point) (mark))
|
||||
(indent-sexp)
|
||||
(save-buffer)
|
||||
(message "Done!"))
|
||||
(error "Package '%s' not found in '%s'"
|
||||
package-name file-name)))
|
||||
(`(,file-name)
|
||||
;; Indent all of FILE-NAME.
|
||||
(find-file file-name)
|
||||
(let ((indent-tabs-mode nil))
|
||||
(untabify (point-min) (point-max))
|
||||
(indent-region (point-min) (point-max))
|
||||
(save-buffer)
|
||||
(message "Done!")))
|
||||
(x
|
||||
(error "Usage: indent-code.el FILE [PACKAGE]"))))
|
||||
|
||||
;;; indent-code.el ends here
|
396
etc/news.scm
396
etc/news.scm
|
@ -1,11 +1,11 @@
|
|||
;; GNU Guix news, for use by 'guix pull'.
|
||||
;;
|
||||
;; Copyright © 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
|
||||
;; Copyright © 2019-2022 Ludovic Courtès <ludo@gnu.org>
|
||||
;; Copyright © 2019–2021 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||
;; Copyright © 2019, 2020 Miguel Ángel Arruga Vivas <rosen644835@gmail.com>
|
||||
;; Copyright © 2019, 2020 Konrad Hinsen <konrad.hinsen@fastmail.net>
|
||||
;; Copyright © 2019, 2020, 2021 Julien Lepiller <julien@lepiller.eu>
|
||||
;; Copyright © 2019, 2020, 2021 Florian Pelz <pelzflorian@pelzflorian.de>
|
||||
;; Copyright © 2019–2022 Florian Pelz <pelzflorian@pelzflorian.de>
|
||||
;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
|
||||
;; Copyright © 2020, 2021 Mathieu Othacehe <m.othacehe@gmail.com>
|
||||
;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
|
@ -16,6 +16,7 @@
|
|||
;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
|
||||
;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
|
||||
;; Copyright © 2021 Andrew Tropin <andrew@trop.in>
|
||||
;; Copyright © 2021 Jonathan Brielmaier <jonathan.brielmaier@web.de>
|
||||
;;
|
||||
;; Copying and distribution of this file, with or without modification, are
|
||||
;; permitted in any medium without royalty provided the copyright notice and
|
||||
|
@ -23,7 +24,312 @@
|
|||
|
||||
(channel-news
|
||||
(version 0)
|
||||
(entry (commit "a2324d8b56eabf8117bca220a507cc791edffd2e")
|
||||
|
||||
(entry (commit "c4fe13c294cc1e31dd8a49ce3981f603fb169e0a")
|
||||
(title
|
||||
(en "@command{guix style} can format package definitions")
|
||||
(de "@command{guix style} kann Paketdefinitionen formatieren")
|
||||
(fr "@command{guix style} peut mettre en forme les définitions de paquets"))
|
||||
(body
|
||||
(en "The recently-introduced @command{guix style} command can now be
|
||||
used to automatically format package definitions according to the Guix
|
||||
project's formatting guidelines. If you contribute packages to Guix or to a
|
||||
third-party channel, you may find it useful.
|
||||
|
||||
The new @option{--styling} option can currently be passed one of the following
|
||||
@dfn{styling rules}: @code{format}, to format package definitions, or
|
||||
@code{inputs}, to remove labels from package inputs. Omitting
|
||||
@option{--styling} is equivalent to passing @samp{--styling=format};
|
||||
previously it was equivalent to @samp{--styling=inputs}.
|
||||
|
||||
Run @code{info \"(guix) Invoking guix style\"}, for more info.")
|
||||
(de "Der kürzlich eingeführte Befehl @command{guix style} kann jetzt
|
||||
benutzt werden, um Paketdefinitionen automatisch nach den
|
||||
Formatierungsrichtlinien des Guix-Projekts zu formatieren. Wenn Sie Pakete zu
|
||||
Guix oder zu einem Drittanbieterkanal beitragen, könnte Ihnen das helfen.
|
||||
|
||||
Für die neue Befehlszeilenoption @option{--styling} können Sie derzeit eine
|
||||
der folgenden @dfn{Stilregeln} angeben: @code{format}, wodurch
|
||||
Paketdefinitionen formatiert werden, oder @code{inputs}, wodurch die
|
||||
Bezeichnungen aus Paketeingaben entfernt werden. Wenn Sie {--styling}
|
||||
weglassen, passiert das Gleiche wie wenn Sie @samp{--styling=format} angeben;
|
||||
früher war es das Gleiche wie @samp{--styling=inputs}.
|
||||
|
||||
Führen Sie @command{info \"(guix) Invoking guix style\"} aus, um mehr
|
||||
Informationen zu erhalten.")
|
||||
(fr "La commande @command{guix style}, récemment introduite, peut
|
||||
désormais être utilisée pour mettre en forme des définitions de paquets
|
||||
suivant les règles de style du projet Guix. Si vous contribuez des paquets à
|
||||
Guix ou à un canal tiers, cela peut vous être utile.
|
||||
|
||||
La nouvelle option @option{--style} peut pour le moment recevoir une des deux
|
||||
@dfn{règles de style} suivantes : @code{format}, pour mettre en forme les
|
||||
définitions de paquet, ou @code{inputs}, pour retirer les étiquettes des
|
||||
champs @code{inputs} des paquets. Omettre @option{--styling} revient à passer
|
||||
@samp{--styling=format} ; auparavant c'était équivalent à
|
||||
@samp{--styling=inputs}.
|
||||
|
||||
Lancer @command{info \"(guix.fr) Invoquer guix style\"}, pour plus
|
||||
d'informations.")))
|
||||
|
||||
(entry (commit "d090e9c37d693f5a0f381482c17fb03462cb6a48")
|
||||
(title
|
||||
(en "New @option{--tune} option for CPU micro-architecture tuning")
|
||||
(de "Neue Option @option{--tune} ermöglicht mikroarchitekturspezifische Optimierungen")
|
||||
(fr "Nouvelle option @option{--tune} pour optimiser pour une
|
||||
micro-architecture"))
|
||||
(body
|
||||
(en "The new @option{--tune} package transformation option instructs
|
||||
Guix to tune relevant packages for the micro-architecture of the host CPU.
|
||||
This lets the compiler use single-instruction/multiple-data (SIMD)
|
||||
instructions beyond the baseline instruction set architecture (ISA), which can
|
||||
noticeably improve performance in some cases such as linear algebra code.
|
||||
|
||||
As an example, here is how you would install the GNU Astronomy Utilities
|
||||
against an optimized variant of the GNU Scientific Library (GSL):
|
||||
|
||||
@example
|
||||
guix install gnuastro --tune
|
||||
@end example
|
||||
|
||||
Run @command{info \"(guix) Package Transformation Options\"} for more
|
||||
information.")
|
||||
(de "Die neue Paketumwandlungsoption @option{--tune} lässt Guix die
|
||||
betroffenen Pakete an die im Prozessor dieses Rechners benutzte
|
||||
Mikroarchitektur anpassen. Dadurch kann der Compiler Befehle für
|
||||
Single-Instruction/Multiple-Data (SIMD) einsetzen, die über den gemeinsamen
|
||||
Befehlssatz hinausgehen. Das kann in manchen Fällen die Leistung beträchtlich
|
||||
steigern, etwa für Berechnungen der linearen Algebra.
|
||||
|
||||
Zum Beispiel würden Sie so die GNU-Astronomieprogramme unter Nutzung einer
|
||||
optimierten Variante der GNU Scientific Library (GSL) installieren:
|
||||
|
||||
@example
|
||||
guix install gnuastro --tune
|
||||
@end example
|
||||
|
||||
Führen Sie für mehr Informationen @command{info \"(guix.de)
|
||||
Paketumwandlungsoptionen\"} aus.")
|
||||
(fr "La nouvelle option de transformation de paquets @option{--tune}
|
||||
demande à Guix d'optimiser les paquets pour lesquels c'est pertinent pour la
|
||||
micro-architecture du processeur hôte. Cela permet au compilateur d'utiliser
|
||||
des instructions vectorielles (SIMD) en plus des instructions de base de
|
||||
l'architecture, ce qui peut sensiblement améliorer les performance dans
|
||||
certains cas tels que pour du code d'algèbre linéaire.
|
||||
|
||||
Par exemple, voici comment installer les Utilitaires d'astronomie GNU de
|
||||
manière à ce qu'ils utilisent une variante optimisée de la Bibliothèque
|
||||
scientifique GNU (GSL) :
|
||||
|
||||
@example
|
||||
guix install gnuastro --tune
|
||||
@end example
|
||||
|
||||
Lancer @command{info \"(guix.fr) Options de transformation de paquets\"} pour
|
||||
plus d'informations.")))
|
||||
|
||||
(entry (commit "ea2fd313d52dc62593b478acf5c3e7ea052c45de")
|
||||
(title
|
||||
(en "@samp{integer expected from stream}? Update your Guix daemon")
|
||||
(de "@samp{integer expected from stream}? Aktualisieren Sie Ihren Guix-Daemon")
|
||||
(nl "@samp{integer expected from stream}? Werk je Guix daemon bij"))
|
||||
(body
|
||||
(en "We recently fixed a bug where substitution would fail with
|
||||
@samp{error: integer expected from stream}. Be sure to update your system's
|
||||
Guix package that provides the @command{guix-daemon} if you haven't done so
|
||||
recently. Run @command{info \"(guix) Upgrading Guix\"} for instructions.")
|
||||
(de "Unlängst haben wir einen Fehler behoben, dass die Substitution
|
||||
mit der Fehlermeldung @samp{error: integer expected from stream}
|
||||
fehlschlägt. Bitte aktualisieren Sie daher Ihr systemweites Guix-Paket, das
|
||||
@command{guix-daemon} zur Verfügung stellt, wenn es noch nicht geschehen
|
||||
ist. Führen Sie @command{info \"(guix.de) Aktualisieren von Guix\"} aus für
|
||||
genaue Anweisungen.")
|
||||
(nl "Onlangs herstelden we een fout waarbij substitutie mislukt met
|
||||
een @samp{error: integer expected from stream}. Werk zeker je systeemwijde
|
||||
Guix-pakket bij, dat de @command{guix-daemon} levert, als dat nog niet is
|
||||
gebeurd. Voer @command{info \"(guix) Upgrading Guix\"} uit voor meer uitleg.")))
|
||||
|
||||
(entry (commit "223f1b1eb3707f1d3ef91200dd616ee6c8b77db0")
|
||||
(title
|
||||
(en "Improved static networking support on Guix System")
|
||||
(de "Bessere Unterstützung für statische Netzwerkanbindungen auf Guix System")
|
||||
(fr "Meilleure prise en charge des réseaux statiques sur Guix System"))
|
||||
(body
|
||||
(en "Support for declarative static networking setup on Guix System
|
||||
has been improved. It now allows you to list IPv4 and IPv6 addresses in
|
||||
routes in a flexible way, similar to what you would do with the @command{ip}
|
||||
command, but in a declarative fashion, as in this example:
|
||||
|
||||
@lisp
|
||||
;; Static networking for one NIC, IPv4-only.
|
||||
(service static-networking-service-type
|
||||
(list (static-networking
|
||||
(addresses
|
||||
(list (network-address
|
||||
(device \"eno1\")
|
||||
(value \"10.0.2.15/24\"))))
|
||||
(routes
|
||||
(list (network-route
|
||||
(destination \"default\")
|
||||
(gateway \"10.0.2.2\"))))
|
||||
(name-servers '(\"10.0.2.3\")))))
|
||||
@end lisp
|
||||
|
||||
The @code{static-networking-service} procedure remains available but is
|
||||
deprecated. Run @command{info \"(guix) Networking Setup\"} for more
|
||||
information.")
|
||||
(de "Die deklarative Konfiguration für statische Netzwerkanbindungen
|
||||
auf Guix System wurde verbessert. Sie können jetzt die IPv4- und
|
||||
IPv6-Adressen in Routen flexibel auflisten, ähnlich wie Sie es mit dem
|
||||
@command{ip}-Befehl tun würden, aber auf deklarative Weise wie in diesem
|
||||
Beispiel:
|
||||
|
||||
@lisp
|
||||
;; Statische Netzwerkkonfiguration mit einer Netzwerkkarte, nur IPv4.
|
||||
(service static-networking-service-type
|
||||
(list (static-networking
|
||||
(addresses
|
||||
(list (network-address
|
||||
(device \"eno1\")
|
||||
(value \"10.0.2.15/24\"))))
|
||||
(routes
|
||||
(list (network-route
|
||||
(destination \"default\")
|
||||
(gateway \"10.0.2.2\"))))
|
||||
(name-servers '(\"10.0.2.3\")))))
|
||||
@end lisp
|
||||
|
||||
Die Prozedur @code{static-networking-service} gibt es noch, aber sie gilt als
|
||||
veraltet. Führen Sie @command{info \"(guix) Networking Setup\"} aus für
|
||||
weitere Informationen.")
|
||||
(fr "La configuration déclarative et statique du réseau est mieux
|
||||
prise en charge sur Guix System. Il est maintenant possible d'énumérer des
|
||||
adresses IPv6 et IPv4 et les chemins avec plus de flexibilité, un peu comme ce
|
||||
qu'on peut faire avec la commande @command{ip} mais de manière déclarative,
|
||||
comme dans cet exemple :
|
||||
|
||||
@lisp
|
||||
;; Réseau statique à une seule interface, IPv4 seulement.
|
||||
(service static-networking-service-type
|
||||
(list (static-networking
|
||||
(addresses
|
||||
(list (network-address
|
||||
(device \"eno1\")
|
||||
(value \"10.0.2.15/24\"))))
|
||||
(routes
|
||||
(list (network-route
|
||||
(destination \"default\")
|
||||
(gateway \"10.0.2.2\"))))
|
||||
(name-servers '(\"10.0.2.3\")))))
|
||||
@end lisp
|
||||
|
||||
La procédure @code{static-networking-service} reste disponible mais elle est
|
||||
obsolète. Lancer @command{info \"(guix) Networking Setup\"} pour plus
|
||||
d'informations.")))
|
||||
|
||||
(entry (commit "52cb5cf5b852117b5151a67af187d80764849ad3")
|
||||
(title
|
||||
(en "Icedove 91: profile folder moved to @file{~/.thunderbird}")
|
||||
(de "Icedove 91: Profilordner jetzt unter @file{~/.thunderbird}"))
|
||||
(body
|
||||
(en "Icedove 91 expects your profile folder under @file{~/.thunderbird}.
|
||||
You need to manually copy your Icedove profiles from @file{~/.icedove} to
|
||||
@file{~./thunderbird}. It may be required to start Icedove with
|
||||
@option{--ProfileManager} for the first time after the migration.")
|
||||
(de "Icedove 91 erwartet Ihren Profilordner unter @file{~/.thunderbird}.
|
||||
Dafür müssen sie Ihre Icedove-Profile von @file{~/.icedove} nach
|
||||
@file{~/.thunderbird} kopieren. Eventuell muss Icedove das erste Mal nach der
|
||||
Migration mit @option{--ProfileManager} gestartet werden.")))
|
||||
|
||||
(entry (commit "746584e0ca200e7bf51b139ceb36c19ea81d6ef1")
|
||||
(title
|
||||
(en "New @command{guix shell} command supersedes @command{guix
|
||||
environment}")
|
||||
(de "Neuer Befehl @command{guix shell} löst @command{guix
|
||||
environment} ab")
|
||||
(fr "Nouvelle commande @command{guix shell} en remplacement de
|
||||
@command{guix environment}"))
|
||||
(body
|
||||
(en "A new @command{guix shell} command is now available. It is
|
||||
similar to @command{guix environment}, but with a more convenient interface
|
||||
(@command{guix environment} is deprecated but will remain available until May,
|
||||
1st 2023). The main difference compared to @command{guix environment} is that
|
||||
the \"ad hoc\" mode is the default. Thus, to create an interactive
|
||||
environment containing Python, NumPy, and SciPy, you would run:
|
||||
|
||||
@example
|
||||
guix shell python python-numpy python-scipy
|
||||
@end example
|
||||
|
||||
To get a development environment for, say, Inkscape, pass the @option{-D}
|
||||
flag:
|
||||
|
||||
@example
|
||||
guix shell -D inkscape
|
||||
@end example
|
||||
|
||||
Another difference is that running @command{guix shell} without arguments
|
||||
loads @file{manifest.scm} or @file{guix.scm} for the current directory or an
|
||||
ancestor, provided you allowed it. The command maintains a cache to speed up
|
||||
access to such environments.
|
||||
|
||||
Run @command{info \"(guix) Invoking guix shell\"} for more information.")
|
||||
(de "Ein neuer Befehl @command{guix shell} ist ab jetzt
|
||||
verfügbar. Er ähnelt @command{guix environment}, ist aber leichter zu
|
||||
benutzen (@command{guix environment} gilt als veraltet, bleibt aber
|
||||
bis zum 1.@: Mai 2023 verfügbar). Der größte Unterschied ist, dass das
|
||||
Verhalten mit @option{--ad-hoc} nun der Normalfall ist. D.h.@: um eine
|
||||
interaktive Umgebung mit Python, NumPy und SciPy zu bekommen, lautet
|
||||
der Befehl:
|
||||
|
||||
@example
|
||||
guix shell python python-numpy python-scipy
|
||||
@end example
|
||||
|
||||
Wenn Sie eine Entwicklungsumgebung für, sagen wir, Inkscape schaffen
|
||||
wollen, übergeben Sie die Option @option{-D}:
|
||||
|
||||
@example
|
||||
guix shell -D inkscape
|
||||
@end example
|
||||
|
||||
Noch ein Unterschied ist, dass wenn Sie @command{guix shell} ohne
|
||||
Argumente ausführen, @file{manifest.scm} oder @file{guix.scm} aus dem
|
||||
aktuellen Arbeitsverzeichnis oder einem übergeordneten Verzeichnis
|
||||
geladen wird, wenn Sie die Berechtigung dazu erteilt haben. Für den
|
||||
Befehl wird ein Zwischenspeicher vorgehalten, damit Sie schneller auf
|
||||
solche Umgebungen zugreifen können.
|
||||
|
||||
Führen Sie @command{info \"(guix) Invoking guix shell\"} aus, um mehr
|
||||
zu erfahren.")
|
||||
(fr "Une nouvelle commande, @command{guix shell}, est maintenant
|
||||
disponible. Elle est similaire à @command{guix environment}, mais avec une
|
||||
interface plus pratique (@command{guix environment} est désuet mais restera
|
||||
disponible jusqu'au 1er mai 2023). La principale différence par rapport à
|
||||
@command{guix environment} est que le mode par défaut est le mode \"ad hoc\".
|
||||
Pour créer un environnement interactif contenant Python, NumPy et SciPy, il
|
||||
faut donc lancer :
|
||||
|
||||
@example
|
||||
guix shell python python-numpy python-scipy
|
||||
@end example
|
||||
|
||||
Pour obtenir un environnement de développement pour Inkscape, par exemple,
|
||||
passer l'option @option{-D} :
|
||||
|
||||
@example
|
||||
guix shell -D inkscape
|
||||
@end example
|
||||
|
||||
Une autre différence est qu'en lançant @command{guix shell} sans argument, le
|
||||
fichier @file{manifest.scm} ou @file{guix.scm} du répertoire courant ou d'un
|
||||
parent est automatiquement chargé, à condition de l'avoir autorisé. La
|
||||
commande garde un cache pour accélérer l'accès à ces environnements.
|
||||
|
||||
Lancer @command{info \"(guix.fr) Invoquer guix shell\"} pour plus
|
||||
d'informations.")))
|
||||
|
||||
(entry (commit "a2324d8b56eabf8117bca220a507cc791edffd2e")
|
||||
(title
|
||||
(en "Guix Home is a part of GNU Guix")
|
||||
(de "Guix Home ist jetzt Teil von GNU Guix")
|
||||
|
@ -155,6 +461,90 @@ Ce recours à Software Heritage fonctionne aussi pour les autres clones Git que
|
|||
Guix peut faire, comme lorsqu'on utilise @option{--with-commit} et les options
|
||||
de transformation de paquet similaires.")))
|
||||
|
||||
(entry (commit "db4681a4c17d282a661552f2f57e5c453d02e414")
|
||||
(title
|
||||
(en "@code{gdm-service-type} now supports Wayland")
|
||||
(de "@code{gdm-service-type} bietet nun Unterstützung für Wayland")
|
||||
(fr "@code{gdm-service-type} prend maintenant en charge Wayland"))
|
||||
(body
|
||||
(en "@code{gdm-service-type} has been updated to support being launched
|
||||
as a Wayland client, and to launch Wayland sessions. The @code{wayland?} boolean
|
||||
field in @code{gdm-configuration} controls whether GDM starts in Wayland or X
|
||||
mode. See @command{info \"(guix) X Window\"} for more information.
|
||||
|
||||
Wayland mode for GDM will soon become the default in Guix, so if your
|
||||
hardware doesn't support Wayland (Nvidia users are the most concerned here),
|
||||
please consider disabling it now.")
|
||||
(de "@code{gdm-service-type} wurde um Unterstützung dafür
|
||||
aktualisiert, als Wayland-Client gestartet zu werden und Wayland-Sitzungen zu
|
||||
starten. Der Boolesche Wert im Feld @code{wayland?} in
|
||||
@code{gdm-configuration} bestimmt, ob GDM im Wayland- oder X-Modus gestartet
|
||||
wird. Siehe @command{info \"(guix.de) X Window\"} für weitere Informationen.
|
||||
|
||||
Bald wird der Wayland-Modus für GDM die Vorgabeeinstellung in Guix werden,
|
||||
daher sollten Sie, wenn Ihre Hardware kein Wayland unterstützt (Nvidia-Nutzer
|
||||
betrifft dies am ehesten), ihn jetzt ausdrücklich abschalten.")
|
||||
(fr "@code{gdm-service-type} a été mis à jour et peut maintenant être
|
||||
lancé comme client Wayland, ainsi que lancer des sessions Wayland. Le champ
|
||||
booléen @code{wayland?} de @code{gdm-configuration} contrôle le mode dans lequel
|
||||
GDM est lancé (Wayland ou X). Pour plus d'informations, voir
|
||||
@command{info \"(guix) X Window\"} (en anglais).
|
||||
|
||||
GDM sera bientôt lancé en mode Wayland par défaut sur Guix, donc si votre matériel
|
||||
ne le prend pas en charge (les utilisateur·ices de cartes Nvidia sont les plus
|
||||
concerné·es), merci de le désactiver dès maintenant.")))
|
||||
|
||||
(entry (commit "f23803af2018a148fb088f2516d79c20d6bf95f0")
|
||||
(title
|
||||
(en "Input labels can now be omitted in package definitions")
|
||||
(de "Eingaben in Paketdefinitionen brauchen keine Bezeichnungen mehr"))
|
||||
(body
|
||||
(en "If you have written package definitions before, you may know
|
||||
that package inputs required a bit of boilerplate: each input needs to have an
|
||||
associated label (a string), which you can refer to in ``build-side code''.
|
||||
|
||||
Input labels are now unnecessary, meaning that you can write code like:
|
||||
|
||||
@lisp
|
||||
(package
|
||||
;; @dots{}
|
||||
(inputs (list libunistring libffi libgc)))
|
||||
@end lisp
|
||||
|
||||
Notice that the @code{inputs} field is simplified compared to the ``old
|
||||
style''. When needed, you can now use g-expressions (gexps) to refer to
|
||||
another package in build-side code. Additionally, the new
|
||||
@code{modify-inputs} macro facilitates common operations on inputs---deleting,
|
||||
replacing, adding inputs.
|
||||
|
||||
To ease transition to the ``new style'', a new @command{guix style} command is
|
||||
provided. Run @command{info \"(guix) Invoking guix style\"} for more info.")
|
||||
(de "Wenn Sie bereits Paketdefinitionen verfasst haben,
|
||||
erinnern Sie sich vielleicht, dass Sie für Paketeingaben manches
|
||||
doppelt schreiben mussten: Jede Eingabe wird assoziiert mit einer
|
||||
Bezeichnung (als Zeichenkette), auf die Sie sich in
|
||||
„erstellungsseitigem Code“ beziehen können.
|
||||
|
||||
Diese Eingabebezeichnungen sind @emph{nicht} mehr nötig. Sie können
|
||||
jetzt solchen Code schreiben:
|
||||
|
||||
@lisp
|
||||
(package
|
||||
;; …
|
||||
(inputs (list libunistring libffi libgc)))
|
||||
@end lisp
|
||||
|
||||
Achten Sie auf das gegenüber früher vereinfachte @code{inputs}-Feld.
|
||||
Wenn nötig können Sie in erstellungsseitigem Code G-Ausdrücke (gexps)
|
||||
benutzen, um andere Pakete zu referenzieren. Des Weiteren erleichtert
|
||||
das Makro @code{modify-inputs} geläufige Operationen auf Eingaben —
|
||||
das Löschen, Ersetzen, Hinzufügen von Eingaben.
|
||||
|
||||
Um den Übergang zum „neuen Stil“ zu erleichtern, steht ein neuer
|
||||
Befehl @command{guix style} zur Verfügung. Führen Sie @command{info
|
||||
\"(guix) Invoking guix style\"} aus, um mehr Informationen zu
|
||||
erhalten.")))
|
||||
|
||||
(entry (commit "82daab42811a2e3c7684ebdf12af75ff0fa67b99")
|
||||
(title
|
||||
(en "New @samp{deb} format for the @command{guix pack} command")
|
||||
|
|
|
@ -125,8 +125,13 @@ TARGET."
|
|||
(define %system-manifest
|
||||
(manifest
|
||||
(append-map (lambda (system)
|
||||
(map (cut package->manifest-entry* <> system)
|
||||
%system-packages))
|
||||
;; Some of %SYSTEM-PACKAGES are currently unsupported on some
|
||||
;; systems--e.g., GNOME on non-x86_64, due to Rust. Filter
|
||||
;; them out.
|
||||
(filter-map (lambda (package)
|
||||
(and (supported-package? package system)
|
||||
(package->manifest-entry* package system)))
|
||||
%system-packages))
|
||||
'("x86_64-linux" "i686-linux")))) ;Guix System
|
||||
|
||||
(define %cross-manifest
|
||||
|
|
|
@ -8,7 +8,7 @@ gnu: ${1:`(with-temp-buffer
|
|||
(magit-git-wash #'magit-diff-wash-diffs
|
||||
"diff" "--staged")
|
||||
(goto-char (point-min))
|
||||
(when (re-search-forward "(define-public \\(\\S-+\\)" nil 'noerror)
|
||||
(when (re-search-forward "^[ ]*(define-public \\(\\S-+\\)" nil 'noerror)
|
||||
(match-string-no-properties 1)))`}: Update to ${2:`(with-temp-buffer
|
||||
(magit-git-wash #'magit-diff-wash-diffs
|
||||
"diff" "--staged")
|
||||
|
|
|
@ -183,8 +183,13 @@ record."
|
|||
;; The <bootloader-configuration> record contains bootloader independant
|
||||
;; configuration used to fill bootloader configuration file.
|
||||
|
||||
(define-syntax-rule (warn-target-field-deprecation value)
|
||||
(%warn-target-field-deprecation value (current-source-location)))
|
||||
(define-with-syntax-properties (warn-target-field-deprecation
|
||||
(value properties))
|
||||
(when value
|
||||
(warning (source-properties->location properties)
|
||||
(G_ "the 'target' field is deprecated, please use 'targets' \
|
||||
instead~%")))
|
||||
value)
|
||||
|
||||
(define-record-type* <bootloader-configuration>
|
||||
bootloader-configuration make-bootloader-configuration
|
||||
|
@ -213,13 +218,6 @@ record."
|
|||
(serial-speed bootloader-configuration-serial-speed ;integer | #f
|
||||
(default #f)))
|
||||
|
||||
(define (%warn-target-field-deprecation value location)
|
||||
(when value
|
||||
(warning (source-properties->location location)
|
||||
(G_ "the 'target' field is deprecated, please use 'targets' \
|
||||
instead~%")))
|
||||
value)
|
||||
|
||||
(define-deprecated (bootloader-configuration-target config)
|
||||
bootloader-configuration-targets
|
||||
(%bootloader-configuration-target config))
|
||||
|
|
|
@ -264,36 +264,38 @@ is a string that can be inserted in grub.cfg."
|
|||
at_keyboard usb_keyboard))
|
||||
|
||||
(io (string-append
|
||||
"terminal_output "
|
||||
(symbols->string
|
||||
(map
|
||||
(lambda (output)
|
||||
(if (memq output valid-outputs) output #f)) outputs)) "\n"
|
||||
(if (null? inputs)
|
||||
""
|
||||
(string-append
|
||||
"terminal_input "
|
||||
(symbols->string
|
||||
(map
|
||||
(lambda (input)
|
||||
(if (memq input valid-inputs) input #f)) inputs)) "\n"))
|
||||
;; UNIT and SPEED are arguments to the same GRUB command
|
||||
;; ("serial"), so we process them together.
|
||||
(if (or unit speed)
|
||||
(string-append
|
||||
;; UNIT and SPEED are arguments to the same GRUB command
|
||||
;; ("serial"), so we process them together.
|
||||
(if (or unit speed)
|
||||
(string-append
|
||||
"serial"
|
||||
(if unit
|
||||
;; COM ports 1 through 4
|
||||
(if (and (exact-integer? unit) (<= unit 3) (>= unit 0))
|
||||
(string-append " --unit=" (number->string unit))
|
||||
#f)
|
||||
"")
|
||||
;; COM ports 1 through 4
|
||||
(if (and (exact-integer? unit) (<= unit 3) (>= unit 0))
|
||||
(string-append " --unit=" (number->string unit))
|
||||
#f)
|
||||
"")
|
||||
(if speed
|
||||
(if (exact-integer? speed)
|
||||
(string-append " --speed=" (number->string speed))
|
||||
#f)
|
||||
""))
|
||||
""))))
|
||||
(if (exact-integer? speed)
|
||||
(string-append " --speed=" (number->string speed))
|
||||
#f)
|
||||
"")
|
||||
"\n")
|
||||
"")
|
||||
(if (null? inputs)
|
||||
""
|
||||
(string-append
|
||||
"terminal_input "
|
||||
(symbols->string
|
||||
(map
|
||||
(lambda (input)
|
||||
(if (memq input valid-inputs) input #f)) inputs))
|
||||
"\n"))
|
||||
"terminal_output "
|
||||
(symbols->string
|
||||
(map
|
||||
(lambda (output)
|
||||
(if (memq output valid-outputs) output #f)) outputs)))))
|
||||
(format #f "~a" io)))
|
||||
|
||||
(define (grub-root-search device file)
|
||||
|
@ -415,8 +417,7 @@ menuentry ~s {
|
|||
;; Other type of devices aren't implemented.
|
||||
#~()))
|
||||
(let ((devices (map crypto-device->cryptomount store-crypto-devices))
|
||||
;; XXX: Add luks2 when grub 2.06 is packaged.
|
||||
(modules #~(format port "insmod luks~%")))
|
||||
(modules #~(format port "insmod luks~%insmod luks2~%")))
|
||||
(if (null? devices)
|
||||
devices
|
||||
(cons modules devices))))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2019, 2021 Ludovic Courtès <ludo@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -490,7 +490,11 @@ new UIDs."
|
|||
(uid id)
|
||||
(directory directory)
|
||||
(gid (if (number? group) group (group-id group)))
|
||||
(real-name (if previous
|
||||
|
||||
;; Users might change their name to something
|
||||
;; other than what the sysadmin chose, with
|
||||
;; 'chfn'. Thus consider it "stateful".
|
||||
(real-name (if (and previous (not system?))
|
||||
(password-entry-real-name previous)
|
||||
real-name))
|
||||
|
||||
|
|
|
@ -94,6 +94,7 @@ load the Grub bootloader located in the 'Guix_image' root partition."
|
|||
;; (not eliminate it).
|
||||
(format port
|
||||
"insmod part_msdos~@
|
||||
insmod part_gpt~@
|
||||
search --set=root --label Guix_image~@
|
||||
configfile /boot/grub/grub.cfg~%")))
|
||||
(install-efi grub-efi grub-config esp)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
|
||||
;;; Copyright © 2020, 2021 Marius Bakke <marius@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -17,13 +17,8 @@
|
|||
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
(define-module (gnu build chromium-extension)
|
||||
#:use-module (gcrypt base16)
|
||||
#:use-module ((gcrypt hash) #:prefix hash:)
|
||||
#:use-module (ice-9 iconv)
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (gnu packages base)
|
||||
#:use-module (gnu packages check)
|
||||
#:use-module (gnu packages chromium)
|
||||
#:use-module (gnu packages gnupg)
|
||||
#:use-module (gnu packages tls)
|
||||
|
@ -39,28 +34,30 @@
|
|||
|
||||
(define (make-signing-key seed)
|
||||
"Return a derivation for a deterministic PKCS #8 private key using SEED."
|
||||
(computed-file
|
||||
(string-append seed "-signing-key.pem")
|
||||
(with-extensions (list guile-gcrypt)
|
||||
#~(begin
|
||||
(use-modules (gcrypt base16) (gcrypt hash) (ice-9 iconv))
|
||||
(let* ((sha256sum (bytevector->base16-string
|
||||
(sha256 (string->bytevector #$seed "UTF-8"))))
|
||||
;; certtool.c wants a 56 byte seed for a 2048 bit key.
|
||||
(key-size 2048)
|
||||
(normalized-seed (string-take sha256sum 56)))
|
||||
|
||||
(define sha256sum
|
||||
(bytevector->base16-string (hash:sha256 (string->bytevector seed "UTF-8"))))
|
||||
|
||||
;; certtool.c wants a 56 byte seed for a 2048 bit key.
|
||||
(define size 2048)
|
||||
(define normalized-seed (string-take sha256sum 56))
|
||||
|
||||
(computed-file (string-append seed "-signing-key.pem")
|
||||
#~(system* #$(file-append gnutls "/bin/certtool")
|
||||
"--generate-privkey"
|
||||
"--key-type=rsa"
|
||||
"--pkcs8"
|
||||
;; Use the provable FIPS-PUB186-4 algorithm for
|
||||
;; deterministic results.
|
||||
"--provable"
|
||||
"--password="
|
||||
"--no-text"
|
||||
(string-append "--bits=" #$(number->string size))
|
||||
(string-append "--seed=" #$normalized-seed)
|
||||
"--outfile" #$output)
|
||||
#:local-build? #t))
|
||||
(system* #$(file-append gnutls "/bin/certtool")
|
||||
"--generate-privkey"
|
||||
"--key-type=rsa"
|
||||
"--pkcs8"
|
||||
;; Use the provable FIPS-PUB186-4 algorithm for
|
||||
;; deterministic results.
|
||||
"--provable"
|
||||
"--password="
|
||||
"--no-text"
|
||||
(string-append "--bits=" (number->string key-size))
|
||||
(string-append "--seed=" normalized-seed)
|
||||
"--outfile" #$output))))
|
||||
#:local-build? #t))
|
||||
|
||||
(define* (make-crx signing-key package #:optional (package-output "out"))
|
||||
"Create a signed \".crx\" file from the unpacked Chromium extension residing
|
||||
|
@ -68,9 +65,9 @@ in PACKAGE-OUTPUT of PACKAGE. The extension will be signed with SIGNING-KEY."
|
|||
(define name (package-name package))
|
||||
(define version (package-version package))
|
||||
|
||||
(with-imported-modules '((guix build utils))
|
||||
(computed-file
|
||||
(string-append name "-" version ".crx")
|
||||
(computed-file
|
||||
(string-append name "-" version ".crx")
|
||||
(with-imported-modules '((guix build utils))
|
||||
#~(begin
|
||||
;; This is not great. We pull Xorg and Chromium just to Zip and
|
||||
;; sign an extension. This should be implemented with something
|
||||
|
@ -78,27 +75,22 @@ in PACKAGE-OUTPUT of PACKAGE. The extension will be signed with SIGNING-KEY."
|
|||
(use-modules (guix build utils))
|
||||
(let ((chromium #$(file-append ungoogled-chromium "/bin/chromium"))
|
||||
(xvfb #$(file-append xorg-server "/bin/Xvfb"))
|
||||
(packdir "/tmp/extension"))
|
||||
(mkdir-p (dirname packdir))
|
||||
(copy-recursively (ungexp package package-output) packdir)
|
||||
(packdir (string-append (getcwd) "/extension")))
|
||||
(mkdir packdir)
|
||||
(copy-recursively (ungexp package package-output) packdir
|
||||
;; Ensure consistent file modification times.
|
||||
#:keep-mtime? #t)
|
||||
(system (string-append xvfb " :1 &"))
|
||||
(setenv "DISPLAY" ":1")
|
||||
(sleep 2) ;give Xorg some time to initialize...
|
||||
;; Chromium stores the current time in the .crx Zip archive.
|
||||
;; Use a fixed timestamp for deterministic behavior.
|
||||
;; FIXME (core-updates): faketime is missing an absolute reference
|
||||
;; to 'date', hence the need to set PATH.
|
||||
(setenv "PATH" #$(file-append coreutils "/bin"))
|
||||
(invoke #$(file-append libfaketime "/bin/faketime")
|
||||
"2000-01-01 00:00:00"
|
||||
chromium
|
||||
"--user-data-dir=/tmp/signing-profile"
|
||||
(invoke chromium
|
||||
"--user-data-dir=chromium-profile"
|
||||
(string-append "--pack-extension=" packdir)
|
||||
(string-append "--pack-extension-key=" #$signing-key))
|
||||
(copy-file (string-append packdir ".crx") #$output)))
|
||||
#:local-build? #t)))
|
||||
(copy-file (string-append packdir ".crx") #$output))))
|
||||
#:local-build? #t))
|
||||
|
||||
(define* (crx->chromium-json crx version)
|
||||
(define (crx->chromium-json crx version)
|
||||
"Return a derivation that creates a Chromium JSON settings file for the
|
||||
extension given as CRX. VERSION is used to signify the CRX version, and
|
||||
must match the version listed in the extension manifest.json."
|
||||
|
@ -127,66 +119,47 @@ format."
|
|||
"--outder")
|
||||
#:local-build? #t))
|
||||
|
||||
(define (chromium-json->profile-object json signing-key)
|
||||
"Return a derivation that installs JSON to the directory searched by
|
||||
Chromium, using a file name (aka extension ID) derived from SIGNING-KEY."
|
||||
(define der (signing-key->public-der signing-key))
|
||||
|
||||
(define (file-sha256sum file)
|
||||
(with-extensions (list guile-gcrypt)
|
||||
(with-imported-modules '((guix build utils))
|
||||
(computed-file
|
||||
"chromium-extension"
|
||||
#~(begin
|
||||
(use-modules (guix build utils)
|
||||
(gcrypt base16)
|
||||
(gcrypt hash))
|
||||
(define (base16-string->chromium-base16 str)
|
||||
;; Translate STR, a hexadecimal string, to a Chromium-style
|
||||
;; representation using the letters a-p (where a=0, p=15).
|
||||
(define s1 "0123456789abcdef")
|
||||
(define s2 "abcdefghijklmnop")
|
||||
(let loop ((chars (string->list str))
|
||||
(converted '()))
|
||||
(if (null? chars)
|
||||
(list->string (reverse converted))
|
||||
(loop (cdr chars)
|
||||
(cons (string-ref s2 (string-index s1 (car chars)))
|
||||
converted)))))
|
||||
#~(begin
|
||||
(use-modules (gcrypt base16) (gcrypt hash))
|
||||
(bytevector->base16-string (file-sha256 #$file)))))
|
||||
|
||||
(let* ((checksum (bytevector->base16-string (file-sha256 #$der)))
|
||||
(file-name (base16-string->chromium-base16
|
||||
(string-take checksum 32)))
|
||||
(extension-directory (string-append #$output
|
||||
"/share/chromium/extensions")))
|
||||
(mkdir-p extension-directory)
|
||||
(symlink #$json (string-append extension-directory "/"
|
||||
file-name ".json"))))
|
||||
#:local-build? #t))))
|
||||
|
||||
(define* (make-chromium-extension p #:optional (output "out"))
|
||||
"Create a Chromium extension from package P and return a package that,
|
||||
when installed, will make the extension contained in P available as a
|
||||
Chromium browser extension. OUTPUT specifies which output of P to use."
|
||||
(let* ((pname (package-name p))
|
||||
(version (package-version p))
|
||||
(signing-key (make-signing-key pname)))
|
||||
(define* (make-chromium-extension pkg #:optional (pkg-output "out"))
|
||||
"Create a Chromium extension from package PKG and return a package that,
|
||||
when installed, will make the extension contained in PKG available as a
|
||||
Chromium browser extension. PKG-OUTPUT specifies which output of PKG to use."
|
||||
(let* ((name (package-name pkg))
|
||||
(version (package-version pkg))
|
||||
(private-key (make-signing-key name))
|
||||
(public-key (signing-key->public-der private-key))
|
||||
(checksum (file-sha256sum public-key))
|
||||
(crx (make-crx private-key pkg pkg-output))
|
||||
(json (crx->chromium-json crx version)))
|
||||
(package
|
||||
(inherit p)
|
||||
(name (string-append pname "-chromium"))
|
||||
(inherit pkg)
|
||||
(name (string-append name "-chromium"))
|
||||
(source #f)
|
||||
(build-system trivial-build-system)
|
||||
(native-inputs '())
|
||||
(inputs
|
||||
`(("extension" ,(chromium-json->profile-object
|
||||
(crx->chromium-json (make-crx signing-key p output)
|
||||
version)
|
||||
signing-key))))
|
||||
(inputs '())
|
||||
(propagated-inputs '())
|
||||
(outputs '("out"))
|
||||
(build-system trivial-build-system)
|
||||
(arguments
|
||||
'(#:modules ((guix build utils))
|
||||
#:builder
|
||||
(begin
|
||||
(use-modules (guix build utils))
|
||||
(copy-recursively (assoc-ref %build-inputs "extension")
|
||||
(assoc-ref %outputs "out"))))))))
|
||||
(list #:modules '((guix build utils))
|
||||
#:builder
|
||||
#~(begin
|
||||
(use-modules (guix build utils))
|
||||
(define (base16-char->chromium-base16 char)
|
||||
;; Translate CHAR, a hexadecimal character, to a Chromium-style
|
||||
;; representation using the letters a-p (where a=0, p=15).
|
||||
(string-ref "abcdefghijklmnop"
|
||||
(string-index "0123456789abcdef" char)))
|
||||
(let ((file-name (string-map base16-char->chromium-base16
|
||||
(string-take #$checksum 32)))
|
||||
(extension-directory
|
||||
(string-append #$output
|
||||
"/share/chromium/extensions")))
|
||||
(mkdir-p extension-directory)
|
||||
(symlink #$json (string-append extension-directory "/"
|
||||
file-name ".json")))))))))
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
#:use-module (guix build bournish)
|
||||
#:use-module ((guix build syscalls)
|
||||
#:hide (file-system-type))
|
||||
#:use-module (guix diagnostics)
|
||||
#:use-module (guix i18n)
|
||||
#:use-module (rnrs io ports)
|
||||
#:use-module (rnrs bytevectors)
|
||||
#:use-module (ice-9 match)
|
||||
|
@ -54,7 +56,9 @@
|
|||
|
||||
mount-flags->bit-mask
|
||||
check-file-system
|
||||
mount-file-system))
|
||||
mount-file-system
|
||||
|
||||
swap-space->flags-bit-mask))
|
||||
|
||||
;;; Commentary:
|
||||
;;;
|
||||
|
@ -227,6 +231,36 @@ if DEVICE does not contain an linux-swap file system."
|
|||
"Return the label of Linux-swap superblock SBLOCK as a string."
|
||||
(null-terminated-latin1->string
|
||||
(sub-bytevector sblock (+ 1024 4 4 4 16) 16)))
|
||||
|
||||
(define (swap-space->flags-bit-mask swap)
|
||||
"Return the number suitable for the 'flags' argument of 'mount'
|
||||
that corresponds to the swap-space SWAP."
|
||||
(define prio-flag
|
||||
(let ((p (swap-space-priority swap))
|
||||
(max (ash SWAP_FLAG_PRIO_MASK (- SWAP_FLAG_PRIO_SHIFT))))
|
||||
(if p
|
||||
(logior SWAP_FLAG_PREFER
|
||||
(ash (cond
|
||||
((< p 0)
|
||||
(begin (warning
|
||||
(G_ "Given swap priority ~a is
|
||||
negative, defaulting to 0.~%") p)
|
||||
0))
|
||||
((> p max)
|
||||
(begin (warning
|
||||
(G_ "Limiting swap priority ~a to
|
||||
~a.~%")
|
||||
p max)
|
||||
max))
|
||||
(else p))
|
||||
SWAP_FLAG_PRIO_SHIFT))
|
||||
0)))
|
||||
(define delayed-flag
|
||||
(if (swap-space-discard? swap)
|
||||
SWAP_FLAG_DISCARD
|
||||
0))
|
||||
(logior prio-flag delayed-flag))
|
||||
|
||||
|
||||
|
||||
;;;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2020 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2020, 2021 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
|
@ -185,13 +185,9 @@ set."
|
|||
("servers/crash-suspend" ("/hurd/crash" "--suspend"))
|
||||
("servers/password" ("/hurd/password"))
|
||||
("servers/socket/1" ("/hurd/pflocal"))
|
||||
("servers/socket/2" ("/hurd/pfinet"
|
||||
"--interface" "eth0"
|
||||
"--address"
|
||||
"10.0.2.15" ;the default QEMU guest IP
|
||||
"--netmask" "255.255.255.0"
|
||||
"--gateway" "10.0.2.2"
|
||||
"--ipv6" "/servers/socket/16"))
|
||||
;; /servers/socket/2 and /26 are created by 'static-networking-service'.
|
||||
;; XXX: Spawn pfinet without arguments on these nodes so that a DHCP
|
||||
;; client has someone to talk to?
|
||||
("proc" ("/hurd/procfs" "--stat-mode=444"))))
|
||||
|
||||
(define devices
|
||||
|
|
|
@ -166,6 +166,7 @@ produced by #:references-graphs. Pass WAL-MODE? to call-with-database."
|
|||
bootcfg-location
|
||||
bootloader-package
|
||||
bootloader-installer
|
||||
(copy-closures? #t)
|
||||
(deduplicate? #t)
|
||||
references-graphs
|
||||
(register-closures? #t)
|
||||
|
@ -176,30 +177,50 @@ produced by #:references-graphs. Pass WAL-MODE? to call-with-database."
|
|||
"Initialize the given ROOT directory. Use BOOTCFG and BOOTCFG-LOCATION to
|
||||
install the bootloader configuration.
|
||||
|
||||
If REGISTER-CLOSURES? is true, register REFERENCES-GRAPHS in the store. If
|
||||
If COPY-CLOSURES? is true, copy all of REFERENCES-GRAPHS to the partition. If
|
||||
REGISTER-CLOSURES? is true, register REFERENCES-GRAPHS in the store. If
|
||||
DEDUPLICATE? is true, then also deduplicate files common to CLOSURES and the
|
||||
rest of the store when registering the closures. SYSTEM-DIRECTORY is the name
|
||||
of the directory of the 'system' derivation. Pass WAL-MODE? to
|
||||
register-closure."
|
||||
(define root-store
|
||||
(string-append root (%store-directory)))
|
||||
|
||||
(define tmp-store ".tmp-store")
|
||||
|
||||
(populate-root-file-system system-directory root)
|
||||
(populate-store references-graphs root
|
||||
#:deduplicate? deduplicate?)
|
||||
|
||||
(when copy-closures?
|
||||
(populate-store references-graphs root
|
||||
#:deduplicate? deduplicate?))
|
||||
|
||||
;; Populate /dev.
|
||||
(when make-device-nodes
|
||||
(make-device-nodes root))
|
||||
|
||||
(when register-closures?
|
||||
(unless copy-closures?
|
||||
;; XXX: 'register-closure' wants to palpate the things it registers, so
|
||||
;; create a symlink to the store.
|
||||
(rename-file root-store tmp-store)
|
||||
(symlink (%store-directory) root-store))
|
||||
|
||||
(for-each (lambda (closure)
|
||||
(register-closure root closure
|
||||
#:wal-mode? wal-mode?))
|
||||
references-graphs))
|
||||
references-graphs)
|
||||
|
||||
(when bootloader-installer
|
||||
(display "installing bootloader...\n")
|
||||
(bootloader-installer bootloader-package #f root))
|
||||
(when bootcfg
|
||||
(install-boot-config bootcfg bootcfg-location root)))
|
||||
(unless copy-closures?
|
||||
(delete-file root-store)
|
||||
(rename-file tmp-store root-store)))
|
||||
|
||||
;; There's no point installing a bootloader if we do not populate the store.
|
||||
(when copy-closures?
|
||||
(when bootloader-installer
|
||||
(display "installing bootloader...\n")
|
||||
(bootloader-installer bootloader-package #f root))
|
||||
(when bootcfg
|
||||
(install-boot-config bootcfg bootcfg-location root))))
|
||||
|
||||
(define* (make-iso9660-image xorriso grub-mkrescue-environment
|
||||
grub bootcfg system-directory root target
|
||||
|
|
|
@ -52,7 +52,7 @@ exists."
|
|||
(file-exists? "/proc/self/setgroups"))
|
||||
|
||||
(define %namespaces
|
||||
'(mnt pid ipc uts user net))
|
||||
'(cgroup mnt pid ipc uts user net))
|
||||
|
||||
(define (call-with-clean-exit thunk)
|
||||
"Apply THUNK, but exit with a status code of 1 if it fails."
|
||||
|
@ -210,6 +210,7 @@ corresponds to the symbols in NAMESPACES."
|
|||
;; Use the same flags as fork(3) in addition to the namespace flags.
|
||||
(apply logior SIGCHLD
|
||||
(map (match-lambda
|
||||
('cgroup CLONE_NEWCGROUP)
|
||||
('mnt CLONE_NEWNS)
|
||||
('uts CLONE_NEWUTS)
|
||||
('ipc CLONE_NEWIPC)
|
||||
|
|
|
@ -354,11 +354,13 @@ appears in BLACK-LIST are not loaded."
|
|||
(close-fdes fd)
|
||||
#t)
|
||||
(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)))))))
|
||||
(let ((errno (system-error-errno args)))
|
||||
(or (and recursive? ; we're operating in ‘modprobe’ style
|
||||
(member errno
|
||||
(list EEXIST ; already loaded
|
||||
EINVAL))) ; unsupported by hardware
|
||||
(apply throw args))))))))
|
||||
|
||||
(define (load-linux-modules-from-directory modules directory)
|
||||
"Load MODULES and their dependencies from DIRECTORY, a directory containing
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
|
@ -20,9 +20,11 @@
|
|||
(define-module (gnu build marionette)
|
||||
#:use-module (srfi srfi-9)
|
||||
#:use-module (srfi srfi-26)
|
||||
#:use-module (srfi srfi-64)
|
||||
#:use-module (rnrs io ports)
|
||||
#:use-module (ice-9 match)
|
||||
#:use-module (ice-9 popen)
|
||||
#:use-module (ice-9 regex)
|
||||
#:export (marionette?
|
||||
make-marionette
|
||||
marionette-eval
|
||||
|
@ -33,7 +35,10 @@
|
|||
marionette-screen-text
|
||||
wait-for-screen-text
|
||||
%qwerty-us-keystrokes
|
||||
marionette-type))
|
||||
marionette-type
|
||||
|
||||
system-test-runner
|
||||
qemu-command))
|
||||
|
||||
;;; Commentary:
|
||||
;;;
|
||||
|
@ -358,4 +363,79 @@ to actual keystrokes."
|
|||
(for-each (cut marionette-control <> marionette)
|
||||
(string->keystroke-commands str keystrokes)))
|
||||
|
||||
|
||||
;;;
|
||||
;;; Test helper.
|
||||
;;;
|
||||
|
||||
(define* (system-test-runner #:optional log-directory)
|
||||
"Return a SRFI-64 test runner that calls 'exit' upon 'test-end'. When
|
||||
LOG-DIRECTORY is specified, create log file within it."
|
||||
(let ((runner (test-runner-simple)))
|
||||
;; Log to a file under LOG-DIRECTORY.
|
||||
(test-runner-on-group-begin! runner
|
||||
(let ((on-begin (test-runner-on-group-begin runner)))
|
||||
(lambda (runner suite-name count)
|
||||
(when log-directory
|
||||
(catch 'system-error
|
||||
(lambda ()
|
||||
(mkdir log-directory))
|
||||
(lambda args
|
||||
(unless (= (system-error-errno args) EEXIST)
|
||||
(apply throw args))))
|
||||
(set! test-log-to-file
|
||||
(string-append log-directory "/" suite-name ".log")))
|
||||
(on-begin runner suite-name count))))
|
||||
|
||||
;; The default behavior on 'test-end' is to only write a line if the test
|
||||
;; failed. Arrange to also write a line on success.
|
||||
(test-runner-on-test-end! runner
|
||||
(let ((on-end (test-runner-on-test-end runner)))
|
||||
(lambda (runner)
|
||||
(let* ((kind (test-result-ref runner 'result-kind))
|
||||
(results (test-result-alist runner))
|
||||
(test-name (assq-ref results 'test-name)))
|
||||
(unless (memq kind '(fail xpass))
|
||||
(format (current-output-port) "~a: ~a~%"
|
||||
(string-upcase (symbol->string kind))
|
||||
test-name)))
|
||||
|
||||
(on-end runner))))
|
||||
|
||||
;; On 'test-end', display test results and exit with zero if and only if
|
||||
;; there were no test failures.
|
||||
(test-runner-on-final! runner
|
||||
(lambda (runner)
|
||||
(let ((success? (= (test-runner-fail-count runner) 0)))
|
||||
(test-on-final-simple runner)
|
||||
|
||||
(when (not success?)
|
||||
(let* ((log-port (test-runner-aux-value runner))
|
||||
(log-file (port-filename log-port)))
|
||||
(format (current-error-port)
|
||||
"\nTests failed, dumping log file '~a'.\n\n"
|
||||
log-file)
|
||||
|
||||
;; At this point LOG-PORT is not closed yet; flush it.
|
||||
(force-output log-port)
|
||||
|
||||
;; Brute force to avoid dependency on (guix build utils) for
|
||||
;; 'dump-port'.
|
||||
(let ((content (call-with-input-file log-file
|
||||
get-bytevector-all)))
|
||||
(put-bytevector (current-error-port) content))))
|
||||
|
||||
(exit success?))))
|
||||
runner))
|
||||
|
||||
(define* (qemu-command #:optional (system %host-type))
|
||||
"Return the default name of the QEMU command for SYSTEM."
|
||||
(let ((cpu (substring system 0
|
||||
(string-index system #\-))))
|
||||
(string-append "qemu-system-"
|
||||
(cond
|
||||
((string-match "^i[3456]86$" cpu) "i386")
|
||||
((string-match "armhf" cpu) "arm")
|
||||
(else cpu)))))
|
||||
|
||||
;;; marionette.scm ends here
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2020 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2020, 2021 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
|
@ -111,6 +111,15 @@ wait for at most HANDSHAKE-TIMEOUT seconds for handshake to complete. Return
|
|||
(close-port sock)
|
||||
#f))))
|
||||
|
||||
(define (delete-file* file)
|
||||
"Ensure FILE does not exist."
|
||||
(catch 'system-error
|
||||
(lambda ()
|
||||
(delete-file file))
|
||||
(lambda args
|
||||
(unless (= ENOENT (system-error-errno args))
|
||||
(apply throw args)))))
|
||||
|
||||
(define (secret-service-receive-secrets port)
|
||||
"Listen to local PORT and wait for a secret service client to send secrets.
|
||||
Write them to the file system. Return the list of files installed on success,
|
||||
|
@ -170,6 +179,12 @@ and #f otherwise."
|
|||
(log "installing file '~a' (~a bytes)...~%"
|
||||
file size)
|
||||
(mkdir-p (dirname file))
|
||||
|
||||
;; It could be that FILE already exists, for instance
|
||||
;; because it has been created by a service's activation
|
||||
;; snippet (e.g., SSH host keys). Delete it.
|
||||
(delete-file* file)
|
||||
|
||||
(call-with-output-file file
|
||||
(lambda (output)
|
||||
(dump port output size)
|
||||
|
|
500
gnu/build/vm.scm
500
gnu/build/vm.scm
|
@ -1,500 +0,0 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2016 Christine Lemmer-Webber <cwebber@dustycloud.org>
|
||||
;;; Copyright © 2016, 2017 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>
|
||||
;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||
;;;
|
||||
;;; 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 vm)
|
||||
#:use-module (guix build utils)
|
||||
#:use-module (guix build store-copy)
|
||||
#:use-module (guix build syscalls)
|
||||
#:use-module (guix store database)
|
||||
#:use-module (gnu build bootloader)
|
||||
#:use-module (gnu build linux-boot)
|
||||
#:use-module (gnu build install)
|
||||
#:use-module (gnu system uuid)
|
||||
#:use-module (guix records)
|
||||
#:use-module ((guix combinators) #:select (fold2))
|
||||
#:use-module (ice-9 format)
|
||||
#:use-module (ice-9 ftw)
|
||||
#: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-19)
|
||||
#:use-module (srfi srfi-26)
|
||||
#:export (qemu-command
|
||||
load-in-linux-vm
|
||||
format-partition
|
||||
|
||||
partition
|
||||
partition?
|
||||
partition-device
|
||||
partition-size
|
||||
partition-file-system
|
||||
partition-label
|
||||
partition-flags
|
||||
partition-initializer
|
||||
|
||||
estimated-partition-size
|
||||
root-partition-initializer
|
||||
initialize-partition-table
|
||||
initialize-hard-disk))
|
||||
|
||||
;;; Commentary:
|
||||
;;;
|
||||
;;; This module provides supporting code to run virtual machines and build
|
||||
;;; virtual machine images using QEMU.
|
||||
;;;
|
||||
;;; Code:
|
||||
|
||||
(define* (qemu-command #:optional (system %host-type))
|
||||
"Return the default name of the QEMU command for SYSTEM."
|
||||
(let ((cpu (substring system 0
|
||||
(string-index system #\-))))
|
||||
(string-append "qemu-system-"
|
||||
(cond
|
||||
((string-match "^i[3456]86$" cpu) "i386")
|
||||
((string-match "armhf" cpu) "arm")
|
||||
(else cpu)))))
|
||||
|
||||
(define* (load-in-linux-vm builder
|
||||
#:key
|
||||
output
|
||||
(qemu (qemu-command)) (memory-size 512)
|
||||
linux initrd
|
||||
make-disk-image?
|
||||
single-file-output?
|
||||
(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.
|
||||
|
||||
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
|
||||
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 target-arm32?
|
||||
(string-prefix? "arm-" %host-type))
|
||||
|
||||
(define target-aarch64?
|
||||
(string-prefix? "aarch64-" %host-type))
|
||||
|
||||
(define target-arm?
|
||||
(or target-arm32? target-aarch64?))
|
||||
|
||||
(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-arm?
|
||||
'("-M" "virt")
|
||||
'())
|
||||
|
||||
;; On ARM32, if the kernel is built without LPAE support, ECAM conflicts
|
||||
;; with VIRT_PCIE_MMIO causing PCI devices not to show up. Disable
|
||||
;; explicitely highmem to fix it.
|
||||
;; See: https://bugs.launchpad.net/qemu/+bug/1790975.
|
||||
,@(if target-arm32?
|
||||
'("-machine" "highmem=off")
|
||||
'())
|
||||
|
||||
;; 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 ARM boards. Do not use it even if available.
|
||||
,@(if (and (file-exists? "/dev/kvm")
|
||||
(not target-arm?))
|
||||
'("-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-arm? "ttyAMA0" "ttyS0"))))
|
||||
|
||||
(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)))
|
||||
|
||||
(mkdir "xchg")
|
||||
(mkdir "tmp")
|
||||
|
||||
(match references-graphs
|
||||
((graph-files ...)
|
||||
;; Copy the reference-graph files under xchg/ so EXP can access it.
|
||||
(map (lambda (file)
|
||||
(copy-file file (string-append "xchg/" file)))
|
||||
graph-files))
|
||||
(_ #f))
|
||||
|
||||
(apply invoke qemu "-nographic" "-no-reboot"
|
||||
;; CPU "max" behaves as "host" when KVM is enabled, and like a system
|
||||
;; CPU with the maximum possible feature set otherwise.
|
||||
"-cpu" "max"
|
||||
"-m" (number->string memory-size)
|
||||
"-nic" "user,model=virtio-net-pci"
|
||||
"-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 (file-exists? "xchg/.exit-status")
|
||||
(error "VM did not produce an exit code"))
|
||||
|
||||
(match (call-with-input-file "xchg/.exit-status" read)
|
||||
(0 #t)
|
||||
(status (error "guest VM code exited with a non-zero status" status)))
|
||||
|
||||
(delete-file "xchg/.exit-status")
|
||||
|
||||
;; 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)))))
|
||||
|
||||
(define* (register-closure prefix closure
|
||||
#:key
|
||||
(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."
|
||||
(let ((items (call-with-input-file closure read-reference-graph)))
|
||||
(parameterize ((sql-schema schema))
|
||||
(with-database (store-database-file #:prefix prefix) db
|
||||
(register-items db items
|
||||
#:prefix prefix
|
||||
#:registration-time %epoch)))))
|
||||
|
||||
|
||||
;;;
|
||||
;;; Partitions.
|
||||
;;;
|
||||
|
||||
(define-record-type* <partition> partition make-partition
|
||||
partition?
|
||||
(device partition-device (default #f))
|
||||
(size partition-size)
|
||||
(file-system partition-file-system (default "ext4"))
|
||||
(file-system-options partition-file-system-options ;passed to 'mkfs.FS'
|
||||
(default '()))
|
||||
(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))))
|
||||
|
||||
(define* (initialize-partition-table device partitions
|
||||
#:key
|
||||
(label-type "msdos")
|
||||
(offset (expt 2 20)))
|
||||
"Create on DEVICE a partition table of type LABEL-TYPE, containing the given
|
||||
PARTITIONS (a list of <partition> objects), starting at OFFSET bytes. On
|
||||
success, return PARTITIONS with their 'device' field changed to reflect their
|
||||
actual /dev name based on DEVICE."
|
||||
(define (partition-options part offset index)
|
||||
(cons* "mkpart" "primary" "ext2"
|
||||
(format #f "~aB" offset)
|
||||
(format #f "~aB" (+ offset (partition-size part)))
|
||||
(append-map (lambda (flag)
|
||||
(list "set" (number->string index)
|
||||
(symbol->string flag) "on"))
|
||||
(partition-flags part))))
|
||||
|
||||
(define (options partitions offset)
|
||||
(let loop ((partitions partitions)
|
||||
(offset offset)
|
||||
(index 1)
|
||||
(result '()))
|
||||
(match partitions
|
||||
(()
|
||||
(concatenate (reverse result)))
|
||||
((head tail ...)
|
||||
(loop tail
|
||||
;; Leave one sector (512B) between partitions to placate
|
||||
;; Parted.
|
||||
(+ offset 512 (partition-size head))
|
||||
(+ 1 index)
|
||||
(cons (partition-options head offset index)
|
||||
result))))))
|
||||
|
||||
(format #t "creating partition table with ~a partitions (~a)...\n"
|
||||
(length partitions)
|
||||
(string-join (map (compose (cut string-append <> " MiB")
|
||||
number->string
|
||||
(lambda (size)
|
||||
(round (/ size (expt 2. 20))))
|
||||
partition-size)
|
||||
partitions)
|
||||
", "))
|
||||
(apply invoke "parted" "--script"
|
||||
device "mklabel" label-type
|
||||
(options partitions offset))
|
||||
|
||||
;; Set the 'device' field of each partition.
|
||||
(reverse
|
||||
(fold2 (lambda (part result index)
|
||||
(values (cons (partition
|
||||
(inherit part)
|
||||
(device (string-append device
|
||||
(number->string index))))
|
||||
result)
|
||||
(+ 1 index)))
|
||||
'()
|
||||
1
|
||||
partitions)))
|
||||
|
||||
(define MS_BIND 4096) ; <sys/mounts.h> again!
|
||||
|
||||
(define* (create-ext-file-system partition type
|
||||
#:key label uuid (options '()))
|
||||
"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))
|
||||
'())
|
||||
,@options)))
|
||||
|
||||
(define* (create-fat-file-system partition
|
||||
#:key label uuid (options '()))
|
||||
"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
|
||||
volume name."
|
||||
;; FIXME: UUID is ignored!
|
||||
(format #t "creating FAT partition...\n")
|
||||
(apply invoke "mkfs.fat" partition
|
||||
(append (if label `("-n" ,label) '()) options)))
|
||||
|
||||
(define* (format-partition partition type
|
||||
#:key label uuid (options '()))
|
||||
"Create a file system TYPE on PARTITION. If LABEL is true, use that as the
|
||||
volume name. Options is a list of command-line options passed to 'mkfs.FS'."
|
||||
(cond ((string-prefix? "ext" type)
|
||||
(create-ext-file-system partition type #:label label #:uuid uuid
|
||||
#:options options))
|
||||
((or (string-prefix? "fat" type) (string= "vfat" type))
|
||||
(create-fat-file-system partition #:label label #:uuid uuid
|
||||
#:options options))
|
||||
(else (error "Unsupported file system."))))
|
||||
|
||||
(define (initialize-partition partition)
|
||||
"Format PARTITION, a <partition> object with a non-#f 'device' field, mount
|
||||
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)
|
||||
#:options (partition-file-system-options partition))
|
||||
(mkdir-p target)
|
||||
(mount (partition-device partition) target
|
||||
(partition-file-system partition))
|
||||
|
||||
((partition-initializer partition) target)
|
||||
|
||||
(umount target)
|
||||
partition))
|
||||
|
||||
(define* (root-partition-initializer #:key (closures '())
|
||||
copy-closures?
|
||||
(register-closures? #t)
|
||||
system-directory
|
||||
(deduplicate? #t)
|
||||
(make-device-nodes
|
||||
make-essential-device-nodes)
|
||||
(extra-directives '()))
|
||||
"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.
|
||||
SYSTEM-DIRECTORY is the name of the directory of the 'system' derivation.
|
||||
|
||||
EXTRA-DIRECTIVES is an optional list of directives to populate the root file
|
||||
system that is passed to 'populate-root-file-system'."
|
||||
(lambda (target)
|
||||
(define target-store
|
||||
(string-append target (%store-directory)))
|
||||
|
||||
(when copy-closures?
|
||||
;; Populate the store.
|
||||
(populate-store (map (cut string-append "/xchg/" <>) closures)
|
||||
target
|
||||
#:deduplicate? deduplicate?))
|
||||
|
||||
;; Populate /dev.
|
||||
(make-device-nodes target)
|
||||
|
||||
;; 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
|
||||
;; bind-mount the store on the target.
|
||||
(mkdir-p target-store)
|
||||
(mount (%store-directory) target-store "" MS_BIND))
|
||||
|
||||
(display "registering closures...\n")
|
||||
(for-each (lambda (closure)
|
||||
(register-closure target
|
||||
(string-append "/xchg/" closure)))
|
||||
closures)
|
||||
(unless copy-closures?
|
||||
(umount target-store)))
|
||||
|
||||
;; Add the non-store directories and files.
|
||||
(display "populating...\n")
|
||||
(populate-root-file-system system-directory target
|
||||
#:extras extra-directives)
|
||||
|
||||
;; 'register-closure' resets timestamps and everything, so no need to do it
|
||||
;; once more in that case.
|
||||
(unless register-closures?
|
||||
;; 'reset-timestamps' also resets file permissions; do that everywhere
|
||||
;; except on /dev so that /dev/null remains writable, etc.
|
||||
(for-each (lambda (directory)
|
||||
(reset-timestamps (string-append target "/" directory)))
|
||||
(scandir target
|
||||
(match-lambda
|
||||
((or "." ".." "dev") #f)
|
||||
(_ #t))))
|
||||
(reset-timestamps (string-append target "/dev")
|
||||
#:preserve-permissions? #t))))
|
||||
|
||||
(define (register-bootcfg-root target bootcfg)
|
||||
"On file system TARGET, register BOOTCFG as a GC root."
|
||||
(let ((directory (string-append target "/var/guix/gcroots")))
|
||||
(mkdir-p directory)
|
||||
(symlink bootcfg (string-append directory "/bootcfg"))))
|
||||
|
||||
(define* (initialize-hard-disk device
|
||||
#:key
|
||||
bootloader-package
|
||||
bootcfg
|
||||
bootcfg-location
|
||||
bootloader-installer
|
||||
(grub-efi #f)
|
||||
(partitions '()))
|
||||
"Initialize DEVICE as a disk containing all the <partition> objects listed
|
||||
in PARTITIONS, and using BOOTCFG as its bootloader configuration file.
|
||||
|
||||
Each partition is initialized by calling its 'initializer' procedure,
|
||||
passing it a directory name where it is mounted."
|
||||
|
||||
(define (partition-bootable? partition)
|
||||
"Return the first partition found with the boot flag set."
|
||||
(member 'boot (partition-flags partition)))
|
||||
|
||||
(define (partition-esp? partition)
|
||||
"Return the first EFI System Partition."
|
||||
(member 'esp (partition-flags partition)))
|
||||
|
||||
(let* ((partitions (initialize-partition-table device partitions))
|
||||
(root (find partition-bootable? partitions))
|
||||
(esp (find partition-esp? partitions))
|
||||
(target "/fs"))
|
||||
(unless root
|
||||
(error "no bootable partition specified" partitions))
|
||||
|
||||
(for-each initialize-partition partitions)
|
||||
|
||||
(display "mounting root partition...\n")
|
||||
(mkdir-p target)
|
||||
(mount (partition-device root) target (partition-file-system root))
|
||||
(install-boot-config bootcfg bootcfg-location target)
|
||||
(when bootloader-installer
|
||||
(display "installing bootloader...\n")
|
||||
(bootloader-installer bootloader-package device target))
|
||||
|
||||
(when esp
|
||||
;; Mount the ESP somewhere and install GRUB UEFI image.
|
||||
(let ((mount-point (string-append target "/boot/efi")))
|
||||
(display "mounting EFI system partition...\n")
|
||||
(mkdir-p mount-point)
|
||||
(mount (partition-device esp) mount-point
|
||||
(partition-file-system esp))
|
||||
|
||||
(display "creating EFI firmware image...")
|
||||
(install-efi-loader grub-efi mount-point)
|
||||
(display "done.\n")
|
||||
|
||||
(umount mount-point)))
|
||||
|
||||
;; Register BOOTCFG as a GC root.
|
||||
(register-bootcfg-root target bootcfg)
|
||||
|
||||
(umount target)))
|
||||
|
||||
;;; vm.scm ends here
|
142
gnu/ci.scm
142
gnu/ci.scm
|
@ -1,5 +1,5 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2012-2021 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2017, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
|
||||
;;; Copyright © 2020 Julien Lepiller <julien@lepiller.eu>
|
||||
|
@ -28,6 +28,7 @@
|
|||
#:use-module (guix grafts)
|
||||
#:use-module (guix profiles)
|
||||
#:use-module (guix packages)
|
||||
#:autoload (guix transformations) (tunable-package? tuned-package)
|
||||
#:use-module (guix channels)
|
||||
#:use-module (guix config)
|
||||
#:use-module (guix derivations)
|
||||
|
@ -69,7 +70,6 @@
|
|||
#:export (derivation->job
|
||||
image->job
|
||||
|
||||
%bootstrap-packages
|
||||
%core-packages
|
||||
%cross-targets
|
||||
channel-source->package
|
||||
|
@ -86,7 +86,7 @@
|
|||
(define* (derivation->job name drv
|
||||
#:key
|
||||
(max-silent-time 3600)
|
||||
(timeout 3600))
|
||||
(timeout (* 5 3600)))
|
||||
"Return a Cuirass job called NAME and describing DRV.
|
||||
|
||||
MAX-SILENT-TIME and TIMEOUT are build options passed to the daemon when
|
||||
|
@ -108,9 +108,9 @@ building the derivation."
|
|||
(#:timeout . ,timeout)))
|
||||
|
||||
(define* (package-job store job-name package system
|
||||
#:key cross? target)
|
||||
#:key cross? target (suffix ""))
|
||||
"Return a job called JOB-NAME that builds PACKAGE on SYSTEM."
|
||||
(let ((job-name (string-append job-name "." system)))
|
||||
(let ((job-name (string-append job-name "." system suffix)))
|
||||
(parameterize ((%graft? #f))
|
||||
(let* ((drv (if cross?
|
||||
(package-cross-derivation store package target system
|
||||
|
@ -130,7 +130,7 @@ building the derivation."
|
|||
(define (package-cross-job store job-name package target system)
|
||||
"Return a job called TARGET.JOB-NAME that cross-builds PACKAGE for TARGET on
|
||||
SYSTEM."
|
||||
(let ((name (string-append target "." job-name "." system)))
|
||||
(let ((name (string-append target "." job-name)))
|
||||
(package-job store name package system
|
||||
#:cross? #t
|
||||
#:target target)))
|
||||
|
@ -139,9 +139,9 @@ SYSTEM."
|
|||
;; Note: Don't put the '-final' package variants because (1) that's
|
||||
;; implicit, and (2) they cannot be cross-built (due to the explicit input
|
||||
;; chain.)
|
||||
(list gcc-7 gcc-8 gcc-9 gcc-10 glibc binutils
|
||||
(list gcc-8 gcc-9 gcc-10 gcc-11 glibc binutils
|
||||
gmp mpfr mpc coreutils findutils diffutils patch sed grep
|
||||
gawk gnu-gettext hello guile-2.0 guile-2.2 zlib gzip xz
|
||||
gawk gnu-gettext hello guile-2.2 guile-3.0 zlib gzip xz guix
|
||||
%bootstrap-binaries-tarball
|
||||
%binutils-bootstrap-tarball
|
||||
(%glibc-bootstrap-tarball)
|
||||
|
@ -149,13 +149,18 @@ SYSTEM."
|
|||
%guile-bootstrap-tarball
|
||||
%bootstrap-tarballs))
|
||||
|
||||
(define %bootstrap-packages
|
||||
;; Return the list of bootstrap packages from the commencement module.
|
||||
(filter package?
|
||||
(module-map
|
||||
(lambda (sym var)
|
||||
(variable-ref var))
|
||||
(resolve-module '(gnu packages commencement)))))
|
||||
(define (commencement-packages system)
|
||||
"Return the list of bootstrap packages from the commencement module for
|
||||
SYSTEM."
|
||||
;; Only include packages supported on SYSTEM. For example, the Mes
|
||||
;; bootstrap graph is currently not supported on ARM so it should be
|
||||
;; excluded.
|
||||
(filter (lambda (obj)
|
||||
(and (package? obj)
|
||||
(supported-package? obj system)))
|
||||
(module-map (lambda (sym var)
|
||||
(variable-ref var))
|
||||
(resolve-module '(gnu packages commencement)))))
|
||||
|
||||
(define (packages-to-cross-build target)
|
||||
"Return the list of packages to cross-build for TARGET."
|
||||
|
@ -297,20 +302,16 @@ otherwise use the IMAGE name."
|
|||
|
||||
(define channel-build-system
|
||||
;; Build system used to "convert" a channel instance to a package.
|
||||
(let* ((build (lambda* (store name inputs
|
||||
#:key source commit system
|
||||
#:allow-other-keys)
|
||||
(run-with-store store
|
||||
;; SOURCE can be a lowerable object such as <local-file>
|
||||
;; or a file name. Adjust accordingly.
|
||||
(mlet* %store-monad ((source (if (string? source)
|
||||
(return source)
|
||||
(lower-object source)))
|
||||
(instance
|
||||
-> (checkout->channel-instance
|
||||
source #:commit commit)))
|
||||
(channel-instances->derivation (list instance)))
|
||||
#:system system)))
|
||||
(let* ((build (lambda* (name inputs
|
||||
#:key source commit system
|
||||
#:allow-other-keys)
|
||||
(mlet* %store-monad ((source (if (string? source)
|
||||
(return source)
|
||||
(lower-object source)))
|
||||
(instance
|
||||
-> (checkout->channel-instance
|
||||
source #:commit commit)))
|
||||
(channel-instances->derivation (list instance)))))
|
||||
(lower (lambda* (name #:key system source commit
|
||||
#:allow-other-keys)
|
||||
(bag
|
||||
|
@ -395,21 +396,39 @@ otherwise use the IMAGE name."
|
|||
(((_ inputs _ ...) ...)
|
||||
inputs))))
|
||||
(%final-inputs)))))
|
||||
(lambda (store package system)
|
||||
(lambda* (store package system #:key (suffix ""))
|
||||
"Return a job for PACKAGE on SYSTEM, or #f if this combination is not
|
||||
valid."
|
||||
valid. Append SUFFIX to the job name."
|
||||
(cond ((member package base-packages)
|
||||
(package-job store (string-append "base." (job-name package))
|
||||
package system))
|
||||
package system #:suffix suffix))
|
||||
((supported-package? package system)
|
||||
(let ((drv (package-derivation store package system
|
||||
#:graft? #f)))
|
||||
(and (substitutable-derivation? drv)
|
||||
(package-job store (job-name package)
|
||||
package system))))
|
||||
package system #:suffix suffix))))
|
||||
(else
|
||||
#f)))))
|
||||
|
||||
(define %x86-64-micro-architectures
|
||||
;; Micro-architectures for which we build tuned variants.
|
||||
'("westmere" "ivybridge" "haswell" "skylake" "skylake-avx512"))
|
||||
|
||||
(define (tuned-package-jobs store package system)
|
||||
"Return a list of jobs for PACKAGE tuned for SYSTEM's micro-architectures."
|
||||
(filter-map (lambda (micro-architecture)
|
||||
(define suffix
|
||||
(string-append "." micro-architecture))
|
||||
|
||||
(package->job store
|
||||
(tuned-package package micro-architecture)
|
||||
system
|
||||
#:suffix suffix))
|
||||
(match system
|
||||
("x86_64-linux" %x86-64-micro-architectures)
|
||||
(_ '()))))
|
||||
|
||||
(define (all-packages)
|
||||
"Return the list of packages to build."
|
||||
(define (adjust package result)
|
||||
|
@ -443,19 +462,40 @@ valid."
|
|||
(map channel-url channels)))
|
||||
arguments))
|
||||
|
||||
(define (manifests->packages store manifests)
|
||||
"Return the list of packages found in MANIFESTS."
|
||||
(define (manifests->jobs store manifests)
|
||||
"Return the list of jobs for the entries in MANIFESTS, a list of file
|
||||
names."
|
||||
(define (load-manifest manifest)
|
||||
(save-module-excursion
|
||||
(lambda ()
|
||||
(set-current-module (make-user-module '((guix profiles) (gnu))))
|
||||
(primitive-load manifest))))
|
||||
|
||||
(delete-duplicates!
|
||||
(map manifest-entry-item
|
||||
(append-map (compose manifest-entries
|
||||
load-manifest)
|
||||
manifests))))
|
||||
(define (manifest-entry-job-name entry)
|
||||
(string-append (manifest-entry-name entry) "-"
|
||||
(manifest-entry-version entry)))
|
||||
|
||||
(define (manifest-entry->job entry)
|
||||
(let* ((obj (manifest-entry-item entry))
|
||||
(drv (parameterize ((%graft? #f))
|
||||
(run-with-store store
|
||||
(lower-object obj))))
|
||||
(max-silent-time (or (and (package? obj)
|
||||
(assoc-ref (package-properties obj)
|
||||
'max-silent-time))
|
||||
3600))
|
||||
(timeout (or (and (package? obj)
|
||||
(assoc-ref (package-properties obj) 'timeout))
|
||||
(* 5 3600))))
|
||||
(derivation->job (manifest-entry-job-name entry) drv
|
||||
#:max-silent-time max-silent-time
|
||||
#:timeout timeout)))
|
||||
|
||||
(map manifest-entry->job
|
||||
(delete-duplicates
|
||||
(append-map (compose manifest-entries load-manifest)
|
||||
manifests)
|
||||
manifest-entry=?)))
|
||||
|
||||
(define (arguments->systems arguments)
|
||||
"Return the systems list from ARGUMENTS."
|
||||
|
@ -506,10 +546,16 @@ valid."
|
|||
('all
|
||||
;; Build everything, including replacements.
|
||||
(let ((all (all-packages))
|
||||
(job (lambda (package)
|
||||
(package->job store package system))))
|
||||
(jobs (lambda (package)
|
||||
(match (package->job store package system)
|
||||
(#f '())
|
||||
(main-job
|
||||
(cons main-job
|
||||
(if (tunable-package? package)
|
||||
(tuned-package-jobs store package system)
|
||||
'())))))))
|
||||
(append
|
||||
(filter-map job all)
|
||||
(append-map jobs all)
|
||||
(cross-jobs store system))))
|
||||
('core
|
||||
;; Build core packages only.
|
||||
|
@ -517,7 +563,7 @@ valid."
|
|||
(map (lambda (package)
|
||||
(package-job store (job-name package)
|
||||
package system))
|
||||
(append %bootstrap-packages %core-packages))
|
||||
(append (commencement-packages system) %core-packages))
|
||||
(cross-jobs store system)))
|
||||
('guix
|
||||
;; Build Guix modules only.
|
||||
|
@ -568,12 +614,8 @@ valid."
|
|||
packages)))
|
||||
(('manifests . rest)
|
||||
;; Build packages in the list of manifests.
|
||||
(let* ((manifests (arguments->manifests rest channels))
|
||||
(packages (manifests->packages store manifests)))
|
||||
(map (lambda (package)
|
||||
(package-job store (job-name package)
|
||||
package system))
|
||||
packages)))
|
||||
(let ((manifests (arguments->manifests rest channels)))
|
||||
(manifests->jobs store manifests)))
|
||||
(else
|
||||
(error "unknown subset" subset))))
|
||||
systems)))
|
||||
|
|
|
@ -1,109 +0,0 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2021 Andrew Tropin <andrew@trop.in>
|
||||
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
|
||||
;;;
|
||||
;;; 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 home-services configuration)
|
||||
#:use-module (gnu services configuration)
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (srfi srfi-1)
|
||||
#:use-module (ice-9 curried-definitions)
|
||||
#:use-module (ice-9 match)
|
||||
#:use-module (guix i18n)
|
||||
#:use-module (guix diagnostics)
|
||||
|
||||
#:export (filter-configuration-fields
|
||||
|
||||
interpose
|
||||
list-of
|
||||
|
||||
list-of-strings?
|
||||
alist?
|
||||
string-or-gexp?
|
||||
serialize-string-or-gexp
|
||||
text-config?
|
||||
serialize-text-config
|
||||
generic-serialize-alist-entry
|
||||
generic-serialize-alist))
|
||||
|
||||
(define* (filter-configuration-fields configuration-fields fields
|
||||
#:optional negate?)
|
||||
"Retrieve the fields listed in FIELDS from CONFIGURATION-FIELDS.
|
||||
If NEGATE? is @code{#t}, retrieve all fields except FIELDS."
|
||||
(filter (lambda (field)
|
||||
(let ((member? (member (configuration-field-name field) fields)))
|
||||
(if (not negate?) member? (not member?))))
|
||||
configuration-fields))
|
||||
|
||||
|
||||
(define* (interpose ls #:optional (delimiter "\n") (grammar 'infix))
|
||||
"Same as @code{string-join}, but without join and string, returns an
|
||||
DELIMITER interposed LS. Support 'infix and 'suffix GRAMMAR values."
|
||||
(when (not (member grammar '(infix suffix)))
|
||||
(raise
|
||||
(formatted-message
|
||||
(G_ "The GRAMMAR value must be 'infix or 'suffix, but ~a provided.")
|
||||
grammar)))
|
||||
(fold-right (lambda (e acc)
|
||||
(cons e
|
||||
(if (and (null? acc) (eq? grammar 'infix))
|
||||
acc
|
||||
(cons delimiter acc))))
|
||||
'() ls))
|
||||
|
||||
(define (list-of pred?)
|
||||
"Return a procedure that takes a list and check if all the elements of
|
||||
the list result in @code{#t} when applying PRED? on them."
|
||||
(lambda (x)
|
||||
(if (list? x)
|
||||
(every pred? x)
|
||||
#f)))
|
||||
|
||||
|
||||
(define list-of-strings?
|
||||
(list-of string?))
|
||||
|
||||
(define alist? list?)
|
||||
|
||||
(define (string-or-gexp? sg) (or (string? sg) (gexp? sg)))
|
||||
(define (serialize-string-or-gexp field-name val) "")
|
||||
|
||||
(define (text-config? config)
|
||||
(and (list? config) (every string-or-gexp? config)))
|
||||
(define (serialize-text-config field-name val)
|
||||
#~(string-append #$@(interpose val "\n" 'suffix)))
|
||||
|
||||
(define ((generic-serialize-alist-entry serialize-field) entry)
|
||||
"Apply the SERIALIZE-FIELD procedure on the field and value of ENTRY."
|
||||
(match entry
|
||||
((field . val) (serialize-field field val))))
|
||||
|
||||
(define (generic-serialize-alist combine serialize-field fields)
|
||||
"Generate a configuration from an association list FIELDS.
|
||||
|
||||
SERIALIZE-FIELD is a procedure that takes two arguments, it will be
|
||||
applied on the fields and values of FIELDS using the
|
||||
@code{generic-serialize-alist-entry} procedure.
|
||||
|
||||
COMBINE is a procedure that takes one or more arguments and combines
|
||||
all the alist entries into one value, @code{string-append} or
|
||||
@code{append} are usually good candidates for this.
|
||||
|
||||
See the @code{serialize-alist} procedure in `@code{(gnu home-services
|
||||
version-control}' for an example usage.)}"
|
||||
(apply combine
|
||||
(map (generic-serialize-alist-entry serialize-field) fields)))
|
20
gnu/home.scm
20
gnu/home.scm
|
@ -17,14 +17,16 @@
|
|||
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
(define-module (gnu home)
|
||||
#:use-module (gnu home-services)
|
||||
#:use-module (gnu home-services symlink-manager)
|
||||
#:use-module (gnu home-services shells)
|
||||
#:use-module (gnu home-services xdg)
|
||||
#:use-module (gnu home-services fontutils)
|
||||
#:use-module (gnu home services)
|
||||
#:use-module (gnu home services symlink-manager)
|
||||
#:use-module (gnu home services shells)
|
||||
#:use-module (gnu home services xdg)
|
||||
#:use-module (gnu home services fontutils)
|
||||
#:use-module (gnu services)
|
||||
#:use-module (guix records)
|
||||
#:use-module (guix diagnostics)
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (guix store)
|
||||
|
||||
#:export (home-environment
|
||||
home-environment?
|
||||
|
@ -104,3 +106,11 @@ of HOME-PROVENANCE-SERVICE-TYPE to its services."
|
|||
(inherit he)
|
||||
(services (cons (service home-provenance-service-type config-file)
|
||||
(home-environment-user-services he)))))
|
||||
|
||||
(define-gexp-compiler (home-environment-compiler (he <home-environment>)
|
||||
system target)
|
||||
((store-lift
|
||||
(lambda (store)
|
||||
(run-with-store store (home-environment-derivation he)
|
||||
#:system system
|
||||
#:target target)))))
|
||||
|
|
|
@ -17,8 +17,9 @@
|
|||
;;; 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 home-services)
|
||||
(define-module (gnu home services)
|
||||
#:use-module (gnu services)
|
||||
#:use-module ((gnu packages package-management) #:select (guix))
|
||||
#:use-module (guix channels)
|
||||
#:use-module (guix monads)
|
||||
#:use-module (guix store)
|
||||
|
@ -28,7 +29,7 @@
|
|||
#:use-module (guix ui)
|
||||
#:use-module (guix discovery)
|
||||
#:use-module (guix diagnostics)
|
||||
|
||||
#:use-module (guix i18n)
|
||||
#:use-module (srfi srfi-1)
|
||||
#:use-module (ice-9 match)
|
||||
|
||||
|
@ -41,7 +42,9 @@
|
|||
home-run-on-change-service-type
|
||||
home-provenance-service-type
|
||||
|
||||
fold-home-service-types)
|
||||
fold-home-service-types
|
||||
|
||||
%initialize-gettext)
|
||||
|
||||
#:re-export (service
|
||||
service-type
|
||||
|
@ -274,26 +277,44 @@ directory containing FILES."
|
|||
(description "Configuration files for programs that
|
||||
will be put in @file{~/.guix-home/files}.")))
|
||||
|
||||
(define (compute-on-first-login-script _ gexps)
|
||||
(gexp->script
|
||||
"on-first-login"
|
||||
#~(let* ((xdg-runtime-dir (or (getenv "XDG_RUNTIME_DIR")
|
||||
(format #f "/run/user/~a" (getuid))))
|
||||
(flag-file-path (string-append
|
||||
xdg-runtime-dir "/on-first-login-executed"))
|
||||
(touch (lambda (file-name)
|
||||
(call-with-output-file file-name (const #t)))))
|
||||
;; XDG_RUNTIME_DIR dissapears on logout, that means such trick
|
||||
;; allows to launch on-first-login script on first login only
|
||||
;; after complete logout/reboot.
|
||||
(when (not (file-exists? flag-file-path))
|
||||
(begin #$@gexps (touch flag-file-path))))))
|
||||
(define %initialize-gettext
|
||||
#~(begin
|
||||
(bindtextdomain %gettext-domain
|
||||
(string-append #$guix "/share/locale"))
|
||||
(textdomain %gettext-domain)
|
||||
(setlocale LC_ALL "")))
|
||||
|
||||
(define (on-first-login-script-entry m-on-first-login)
|
||||
(define (compute-on-first-login-script _ gexps)
|
||||
(program-file
|
||||
"on-first-login"
|
||||
#~(begin
|
||||
(use-modules (guix i18n))
|
||||
#$%initialize-gettext
|
||||
|
||||
(let* ((xdg-runtime-dir (or (getenv "XDG_RUNTIME_DIR")
|
||||
(format #f "/run/user/~a" (getuid))))
|
||||
(flag-file-path (string-append
|
||||
xdg-runtime-dir "/on-first-login-executed"))
|
||||
(touch (lambda (file-name)
|
||||
(call-with-output-file file-name (const #t)))))
|
||||
;; XDG_RUNTIME_DIR dissapears on logout, that means such trick
|
||||
;; allows to launch on-first-login script on first login only
|
||||
;; after complete logout/reboot.
|
||||
(if (file-exists? xdg-runtime-dir)
|
||||
(unless (file-exists? flag-file-path)
|
||||
(begin #$@gexps (touch flag-file-path)))
|
||||
;; TRANSLATORS: 'on-first-login' is the name of a service and
|
||||
;; shouldn't be translated
|
||||
(display (G_ "XDG_RUNTIME_DIR doesn't exists, on-first-login script
|
||||
won't execute anything. You can check if xdg runtime directory exists,
|
||||
XDG_RUNTIME_DIR variable is set to appropriate value and manually execute the
|
||||
script by running '$HOME/.guix-home/on-first-login'")))))))
|
||||
|
||||
(define (on-first-login-script-entry on-first-login)
|
||||
"Return, as a monadic value, an entry for the on-first-login script
|
||||
in the home environment directory."
|
||||
(mlet %store-monad ((on-first-login m-on-first-login))
|
||||
(return `(("on-first-login" ,on-first-login)))))
|
||||
(with-monad %store-monad
|
||||
(return `(("on-first-login" ,on-first-login)))))
|
||||
|
||||
(define home-run-on-first-login-service-type
|
||||
(service-type (name 'home-run-on-first-login)
|
||||
|
@ -346,7 +367,7 @@ extended with one gexp.")))
|
|||
(unless new-home-env (setenv "GUIX_NEW_HOME" #f))
|
||||
(unless old-home-env (setenv "GUIX_OLD_HOME" #f)))
|
||||
(format #t "\
|
||||
Activation script was either called or loaded by file from this direcotry:
|
||||
Activation script was either called or loaded by file from this directory:
|
||||
~a
|
||||
It doesn't seem that home environment is somewhere around.
|
||||
Make sure that you call ./activate by symlink from -home store item.\n"
|
||||
|
@ -380,6 +401,10 @@ with one gexp, but many times, and all gexps must be idempotent.")))
|
|||
|
||||
(define (compute-on-change-gexp eval-gexps? pattern-gexp-tuples)
|
||||
#~(begin
|
||||
(use-modules (guix i18n))
|
||||
|
||||
#$%initialize-gettext
|
||||
|
||||
(define (equal-regulars? file1 file2)
|
||||
"Check if FILE1 and FILE2 are bit for bit identical."
|
||||
(let* ((cmp-binary #$(file-append
|
||||
|
@ -444,21 +469,23 @@ with one gexp, but many times, and all gexps must be idempotent.")))
|
|||
"/gnu/store/non-existing-generation")
|
||||
"/" (car x)))
|
||||
(file2 (string-append (getenv "GUIX_NEW_HOME") "/" (car x)))
|
||||
(_ (format #t "Comparing ~a and\n~10t~a..." file1 file2))
|
||||
(_ (format #t (G_ "Comparing ~a and\n~10t~a...") file1 file2))
|
||||
(any-changes? (something-changed? file1 file2))
|
||||
(_ (format #t " done (~a)\n"
|
||||
(_ (format #t (G_ " done (~a)\n")
|
||||
(if any-changes? "changed" "same"))))
|
||||
(if any-changes? (cadr x) "")))
|
||||
'#$pattern-gexp-tuples))
|
||||
|
||||
(if #$eval-gexps?
|
||||
(begin
|
||||
(display "Evaling on-change gexps.\n\n")
|
||||
;;; TRANSLATORS: 'on-change' is the name of a service type, it
|
||||
;;; probably shouldn't be translated.
|
||||
(display (G_ "Evaluating on-change gexps.\n\n"))
|
||||
(for-each primitive-eval expressions-to-eval)
|
||||
(display "On-change gexps evaluation finished.\n\n"))
|
||||
(display (G_ "On-change gexps evaluation finished.\n\n")))
|
||||
(display "\
|
||||
On-change gexps won't be evaluated, disabled by service
|
||||
configuration.\n"))))
|
||||
On-change gexps won't be evaluated; evaluation has been disabled in the
|
||||
service configuration"))))
|
||||
|
||||
(define home-run-on-change-service-type
|
||||
(service-type (name 'home-run-on-change)
|
||||
|
@ -508,15 +535,16 @@ environment, and its configuration file, when available.")))
|
|||
|
||||
(define %guix-home-root-directory
|
||||
;; Absolute file name of the module hierarchy.
|
||||
(parent-directory (dirname (search-path %load-path "gnu/home-services.scm"))))
|
||||
(parent-directory
|
||||
(dirname (dirname (search-path %load-path "gnu/home/services.scm")))))
|
||||
|
||||
(define %service-type-path
|
||||
;; Search path for service types.
|
||||
(make-parameter `((,%guix-home-root-directory . "gnu/home-services"))))
|
||||
(make-parameter `((,%guix-home-root-directory . "gnu/home/services"))))
|
||||
|
||||
(define (all-home-service-modules)
|
||||
"Return the default set of home-service modules."
|
||||
(cons (resolve-interface '(gnu home-services))
|
||||
"Return the default set of `home service' modules."
|
||||
(cons (resolve-interface '(gnu home services))
|
||||
(all-modules (%service-type-path)
|
||||
#:warn warn-about-load-error)))
|
||||
|
|
@ -17,8 +17,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/>.
|
||||
|
||||
(define-module (gnu home-services fontutils)
|
||||
#:use-module (gnu home-services)
|
||||
(define-module (gnu home services fontutils)
|
||||
#:use-module (gnu home services)
|
||||
#:use-module (gnu packages fontutils)
|
||||
#:use-module (guix gexp)
|
||||
|
|
@ -17,11 +17,11 @@
|
|||
;;; 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 home-services mcron)
|
||||
(define-module (gnu home services mcron)
|
||||
#:use-module (gnu packages guile-xyz)
|
||||
#:use-module (gnu home-services)
|
||||
#:use-module (gnu home-services shepherd)
|
||||
#:use-module (gnu home services)
|
||||
#:use-module (gnu services shepherd)
|
||||
#:use-module (gnu home services shepherd)
|
||||
#:use-module (guix records)
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (srfi srfi-1)
|
|
@ -17,11 +17,10 @@
|
|||
;;; 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 home-services shells)
|
||||
(define-module (gnu home services shells)
|
||||
#:use-module (gnu services configuration)
|
||||
#:use-module (gnu home-services configuration)
|
||||
#:use-module (gnu home-services utils)
|
||||
#:use-module (gnu home-services)
|
||||
#:use-module (gnu home services utils)
|
||||
#:use-module (gnu home services)
|
||||
#:use-module (gnu packages shells)
|
||||
#:use-module (gnu packages bash)
|
||||
#:use-module (guix gexp)
|
||||
|
@ -67,10 +66,10 @@
|
|||
@code{home-environment}, DO NOT create this service manually, it can
|
||||
only be extended.
|
||||
|
||||
@code{profile} is a list of strings or gexps, which will go to
|
||||
@code{profile} is a list of file-like objects, which will go to
|
||||
@file{~/.profile}. By default @file{~/.profile} contains the
|
||||
initialization code, which have to be evaluated by login shell to make
|
||||
home-environment's profile avaliable to the user, but other commands
|
||||
home-environment's profile available to the user, but other commands
|
||||
can be added to the file if it is really necessary.
|
||||
|
||||
In most cases shell's configuration files are preferred places for
|
||||
|
@ -108,7 +107,7 @@ $HOME_ENVIRONMENT/on-first-login\n"
|
|||
(default-value (home-shell-profile-configuration))
|
||||
(description "Create @file{~/.profile}, which is used
|
||||
for environment initialization of POSIX compliant login shells. This
|
||||
service type can be extended with a list of strings or gexps.")))
|
||||
service type can be extended with a list of file-like objects.")))
|
||||
|
||||
(define (serialize-boolean field-name val) "")
|
||||
(define (serialize-posix-env-vars field-name val)
|
||||
|
@ -144,30 +143,30 @@ Shell startup process will continue with
|
|||
serialize-posix-env-vars)
|
||||
(zshenv
|
||||
(text-config '())
|
||||
"List of strings or gexps, which will be added to @file{.zshenv}.
|
||||
"List of file-like objects, which will be added to @file{.zshenv}.
|
||||
Used for setting user's shell environment variables. Must not contain
|
||||
commands assuming the presence of tty or producing output. Will be
|
||||
read always. Will be read before any other file in @env{ZDOTDIR}.")
|
||||
(zprofile
|
||||
(text-config '())
|
||||
"List of strings or gexps, which will be added to @file{.zprofile}.
|
||||
"List of file-like objects, which will be added to @file{.zprofile}.
|
||||
Used for executing user's commands at start of login shell (In most
|
||||
cases the shell started on tty just after login). Will be read before
|
||||
@file{.zlogin}.")
|
||||
(zshrc
|
||||
(text-config '())
|
||||
"List of strings or gexps, which will be added to @file{.zshrc}.
|
||||
"List of file-like objects, which will be added to @file{.zshrc}.
|
||||
Used for executing user's commands at start of interactive shell (The
|
||||
shell for interactive usage started by typing @code{zsh} or by
|
||||
terminal app or any other program).")
|
||||
(zlogin
|
||||
(text-config '())
|
||||
"List of strings or gexps, which will be added to @file{.zlogin}.
|
||||
"List of file-like objects, which will be added to @file{.zlogin}.
|
||||
Used for executing user's commands at the end of starting process of
|
||||
login shell.")
|
||||
(zlogout
|
||||
(text-config '())
|
||||
"List of strings or gexps, which will be added to @file{.zlogout}.
|
||||
"List of file-like objects, which will be added to @file{.zlogout}.
|
||||
Used for executing user's commands at the exit of login shell. It
|
||||
won't be read in some cases (if the shell terminates by exec'ing
|
||||
another process for example)."))
|
||||
|
@ -245,19 +244,19 @@ source ~/.profile
|
|||
"Association list of environment variables to set.")
|
||||
(zshrc
|
||||
(text-config '())
|
||||
"List of strings or gexps.")
|
||||
"List of file-like objects.")
|
||||
(zshenv
|
||||
(text-config '())
|
||||
"List of strings or gexps.")
|
||||
"List of file-like objects.")
|
||||
(zprofile
|
||||
(text-config '())
|
||||
"List of strings or gexps.")
|
||||
"List of file-like objects.")
|
||||
(zlogin
|
||||
(text-config '())
|
||||
"List of strings or gexps.")
|
||||
"List of file-like objects.")
|
||||
(zlogout
|
||||
(text-config '())
|
||||
"List of strings or gexps."))
|
||||
"List of file-like objects."))
|
||||
|
||||
(define (home-zsh-extensions original-config extension-configs)
|
||||
(home-zsh-configuration
|
||||
|
@ -306,33 +305,65 @@ source ~/.profile
|
|||
;;; Bash.
|
||||
;;;
|
||||
|
||||
(define (bash-serialize-aliases field-name val)
|
||||
#~(string-append
|
||||
#$@(map
|
||||
(match-lambda
|
||||
((key . #f)
|
||||
"")
|
||||
((key . #t)
|
||||
#~(string-append "alias " #$key "\n"))
|
||||
((key . value)
|
||||
#~(string-append "alias " #$key "=\"" #$value "\"\n")))
|
||||
val)))
|
||||
|
||||
(define-configuration home-bash-configuration
|
||||
(package
|
||||
(package bash)
|
||||
"The Bash package to use.")
|
||||
(guix-defaults?
|
||||
(boolean #t)
|
||||
"Add sane defaults like reading @file{/etc/bashrc}, coloring output
|
||||
for @code{ls} provided by guix to @file{.bashrc}.")
|
||||
"Add sane defaults like reading @file{/etc/bashrc} and coloring the output of
|
||||
@command{ls} to the end of the @file{.bashrc} file.")
|
||||
(environment-variables
|
||||
(alist '())
|
||||
"Association list of environment variables to set for the Bash session."
|
||||
"Association list of environment variables to set for the Bash session. The
|
||||
rules for the @code{home-environment-variables-service-type} apply
|
||||
here (@pxref{Essential Home Services}). The contents of this field will be
|
||||
added after the contents of the @code{bash-profile} field."
|
||||
serialize-posix-env-vars)
|
||||
(aliases
|
||||
(alist '())
|
||||
"Association list of aliases to set for the Bash session. The aliases will be
|
||||
defined after the contents of the @code{bashrc} field has been put in the
|
||||
@file{.bashrc} file. The alias will automatically be quoted, so something line
|
||||
this:
|
||||
|
||||
@lisp
|
||||
'((\"ls\" . \"ls -alF\"))
|
||||
@end lisp
|
||||
|
||||
turns into
|
||||
|
||||
@example
|
||||
alias ls=\"ls -alF\"
|
||||
@end example"
|
||||
bash-serialize-aliases)
|
||||
(bash-profile
|
||||
(text-config '())
|
||||
"List of strings or gexps, which will be added to @file{.bash_profile}.
|
||||
"List of file-like objects, which will be added to @file{.bash_profile}.
|
||||
Used for executing user's commands at start of login shell (In most
|
||||
cases the shell started on tty just after login). @file{.bash_login}
|
||||
won't be ever read, because @file{.bash_profile} always present.")
|
||||
(bashrc
|
||||
(text-config '())
|
||||
"List of strings or gexps, which will be added to @file{.bashrc}.
|
||||
"List of file-like objects, which will be added to @file{.bashrc}.
|
||||
Used for executing user's commands at start of interactive shell (The
|
||||
shell for interactive usage started by typing @code{bash} or by
|
||||
terminal app or any other program).")
|
||||
(bash-logout
|
||||
(text-config '())
|
||||
"List of strings or gexps, which will be added to @file{.bash_logout}.
|
||||
"List of file-like objects, which will be added to @file{.bash_logout}.
|
||||
Used for executing user's commands at the exit of login shell. It
|
||||
won't be read in some cases (if the shell terminates by exec'ing
|
||||
another process for example)."))
|
||||
|
@ -359,7 +390,9 @@ then
|
|||
fi
|
||||
|
||||
# Source the system-wide file.
|
||||
source /etc/bashrc
|
||||
if [[ -e /etc/bashrc ]]; then
|
||||
source /etc/bashrc
|
||||
fi
|
||||
|
||||
# Adjust the prompt depending on whether we're in 'guix environment'.
|
||||
if [ -n \"$GUIX_ENVIRONMENT\" ]
|
||||
|
@ -388,10 +421,10 @@ alias grep='grep --color=auto'\n")
|
|||
(if (or extra-content
|
||||
(not (null? ((configuration-field-getter field-obj) config))))
|
||||
`(,(object->snake-case-string file-name)
|
||||
,(mixed-text-file
|
||||
(object->snake-case-string file-name)
|
||||
(if extra-content extra-content "")
|
||||
(serialize-field field)))
|
||||
,(apply mixed-text-file
|
||||
(object->snake-case-string file-name)
|
||||
(append (or extra-content '())
|
||||
(list (serialize-field field)))))
|
||||
'())))
|
||||
|
||||
(filter
|
||||
|
@ -414,8 +447,8 @@ if [ -f ~/.bashrc ]; then source ~/.bashrc; fi
|
|||
,@(list (file-if-not-empty
|
||||
'bashrc
|
||||
(if (home-bash-configuration-guix-defaults? config)
|
||||
guix-bashrc
|
||||
#f))
|
||||
(list (serialize-field 'aliases) guix-bashrc)
|
||||
(list (serialize-field 'alises))))
|
||||
(file-if-not-empty 'bash-logout)))))
|
||||
|
||||
(define (add-bash-packages config)
|
||||
|
@ -424,36 +457,52 @@ if [ -f ~/.bashrc ]; then source ~/.bashrc; fi
|
|||
(define-configuration/no-serialization home-bash-extension
|
||||
(environment-variables
|
||||
(alist '())
|
||||
"Association list of environment variables to set.")
|
||||
"Additional environment variables to set. These will be combined with the
|
||||
environment variables from other extensions and the base service to form one
|
||||
coherent block of environment variables.")
|
||||
(aliases
|
||||
(alist '())
|
||||
"Additional aliases to set. These will be combined with the aliases from
|
||||
other extensions and the base service.")
|
||||
(bash-profile
|
||||
(text-config '())
|
||||
"List of strings or gexps.")
|
||||
"Additional text blocks to add to @file{.bash_profile}, which will be combined
|
||||
with text blocks from other extensions and the base service.")
|
||||
(bashrc
|
||||
(text-config '())
|
||||
"List of strings or gexps.")
|
||||
"Additional text blocks to add to @file{.bashrc}, which will be combined
|
||||
with text blocks from other extensions and the base service.")
|
||||
(bash-logout
|
||||
(text-config '())
|
||||
"List of strings or gexps."))
|
||||
"Additional text blocks to add to @file{.bash_logout}, which will be combined
|
||||
with text blocks from other extensions and the base service."))
|
||||
|
||||
(define (home-bash-extensions original-config extension-configs)
|
||||
(home-bash-configuration
|
||||
(inherit original-config)
|
||||
(environment-variables
|
||||
(append (home-bash-configuration-environment-variables original-config)
|
||||
(append-map
|
||||
home-bash-extension-environment-variables extension-configs)))
|
||||
(bash-profile
|
||||
(append (home-bash-configuration-bash-profile original-config)
|
||||
(append-map
|
||||
home-bash-extension-bash-profile extension-configs)))
|
||||
(bashrc
|
||||
(append (home-bash-configuration-bashrc original-config)
|
||||
(append-map
|
||||
home-bash-extension-bashrc extension-configs)))
|
||||
(bash-logout
|
||||
(append (home-bash-configuration-bash-logout original-config)
|
||||
(append-map
|
||||
home-bash-extension-bash-logout extension-configs)))))
|
||||
(match original-config
|
||||
(($ <home-bash-configuration> _ _ _ environment-variables aliases
|
||||
bash-profile bashrc bash-logout)
|
||||
(home-bash-configuration
|
||||
(inherit original-config)
|
||||
(environment-variables
|
||||
(append environment-variables
|
||||
(append-map
|
||||
home-bash-extension-environment-variables extension-configs)))
|
||||
(aliases
|
||||
(append aliases
|
||||
(append-map
|
||||
home-bash-extension-aliases extension-configs)))
|
||||
(bash-profile
|
||||
(append bash-profile
|
||||
(append-map
|
||||
home-bash-extension-bash-profile extension-configs)))
|
||||
(bashrc
|
||||
(append bashrc
|
||||
(append-map
|
||||
home-bash-extension-bashrc extension-configs)))
|
||||
(bash-logout
|
||||
(append bash-logout
|
||||
(append-map
|
||||
home-bash-extension-bash-logout extension-configs)))))))
|
||||
|
||||
(define home-bash-service-type
|
||||
(service-type (name 'home-bash)
|
||||
|
@ -507,7 +556,7 @@ if [ -f ~/.bashrc ]; then source ~/.bashrc; fi
|
|||
"The Fish package to use.")
|
||||
(config
|
||||
(text-config '())
|
||||
"List of strings or gexps, which will be added to
|
||||
"List of file-like objects, which will be added to
|
||||
@file{$XDG_CONFIG_HOME/fish/config.fish}.")
|
||||
(environment-variables
|
||||
(alist '())
|
||||
|
@ -554,7 +603,7 @@ end\n\n")
|
|||
(define-configuration/no-serialization home-fish-extension
|
||||
(config
|
||||
(text-config '())
|
||||
"List of strings or gexps for extending the Fish initialization file.")
|
||||
"List of file-like objects for extending the Fish initialization file.")
|
||||
(environment-variables
|
||||
(alist '())
|
||||
"Association list of environment variables to set.")
|
||||
|
@ -610,10 +659,16 @@ Install and configure Fish, the friendly interactive shell.")))
|
|||
'home-shell-profile-configuration))
|
||||
|
||||
(define (generate-home-bash-documentation)
|
||||
(generate-documentation
|
||||
`((home-bash-configuration
|
||||
,home-bash-configuration-fields))
|
||||
'home-bash-configuration))
|
||||
(string-append
|
||||
(generate-documentation
|
||||
`((home-bash-configuration
|
||||
,home-bash-configuration-fields))
|
||||
'home-bash-configuration)
|
||||
"\n\n"
|
||||
(generate-documentation
|
||||
`((home-bash-extension
|
||||
,home-bash-extension-fields))
|
||||
'home-bash-extension)))
|
||||
|
||||
(define (generate-home-zsh-documentation)
|
||||
(generate-documentation
|
|
@ -17,8 +17,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/>.
|
||||
|
||||
(define-module (gnu home-services shepherd)
|
||||
#:use-module (gnu home-services)
|
||||
(define-module (gnu home services shepherd)
|
||||
#:use-module (gnu home services)
|
||||
#:use-module (gnu packages admin)
|
||||
#:use-module (gnu services shepherd)
|
||||
#:use-module (guix sets)
|
|
@ -17,8 +17,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/>.
|
||||
|
||||
(define-module (gnu home-services symlink-manager)
|
||||
#:use-module (gnu home-services)
|
||||
(define-module (gnu home services symlink-manager)
|
||||
#:use-module (gnu home services)
|
||||
#:use-module (guix gexp)
|
||||
|
||||
#:export (home-symlink-manager-service-type))
|
||||
|
@ -41,7 +41,9 @@
|
|||
(use-modules (ice-9 ftw)
|
||||
(ice-9 curried-definitions)
|
||||
(ice-9 match)
|
||||
(srfi srfi-1))
|
||||
(srfi srfi-1)
|
||||
(guix i18n))
|
||||
#$%initialize-gettext
|
||||
(define ((simplify-file-tree parent) file)
|
||||
"Convert the result produced by `file-system-tree' to less
|
||||
verbose and more suitable for further processing format.
|
||||
|
@ -139,20 +141,21 @@ appear only after all nested items already listed."
|
|||
(backup-file
|
||||
(lambda (path)
|
||||
(mkdir-p backup-dir)
|
||||
(format #t "Backing up ~a..." (get-target-path path))
|
||||
(format #t (G_ "Backing up ~a...") (get-target-path path))
|
||||
(mkdir-p (dirname (get-backup-path path)))
|
||||
(rename-file (get-target-path path) (get-backup-path path))
|
||||
(display " done\n")))
|
||||
(display (G_ " done\n"))))
|
||||
|
||||
(cleanup-symlinks
|
||||
(lambda ()
|
||||
(let ((to-delete ((file-tree-traverse #f) old-tree)))
|
||||
(display
|
||||
"Cleaning up symlinks from previous home-environment.\n\n")
|
||||
(G_
|
||||
"Cleaning up symlinks from previous home-environment.\n\n"))
|
||||
(map
|
||||
(match-lambda
|
||||
(('dir . ".")
|
||||
(display "Cleanup finished.\n\n"))
|
||||
(display (G_ "Cleanup finished.\n\n")))
|
||||
|
||||
(('dir . path)
|
||||
(if (and
|
||||
|
@ -160,12 +163,13 @@ appear only after all nested items already listed."
|
|||
(directory? (get-target-path path))
|
||||
(empty-directory? (get-target-path path)))
|
||||
(begin
|
||||
(format #t "Removing ~a..."
|
||||
(format #t (G_ "Removing ~a...")
|
||||
(get-target-path path))
|
||||
(rmdir (get-target-path path))
|
||||
(display " done\n"))
|
||||
(display (G_ " done\n")))
|
||||
(format
|
||||
#t "Skipping ~a (not an empty directory)... done\n"
|
||||
#t
|
||||
(G_ "Skipping ~a (not an empty directory)... done\n")
|
||||
(get-target-path path))))
|
||||
|
||||
(('file . path)
|
||||
|
@ -175,12 +179,12 @@ appear only after all nested items already listed."
|
|||
;; up later during create-symlinks phase.
|
||||
(if (symlink-to-store? (get-target-path path))
|
||||
(begin
|
||||
(format #t "Removing ~a..." (get-target-path path))
|
||||
(format #t (G_ "Removing ~a...") (get-target-path path))
|
||||
(delete-file (get-target-path path))
|
||||
(display " done\n"))
|
||||
(display (G_ " done\n")))
|
||||
(format
|
||||
#t
|
||||
"Skipping ~a (not a symlink to store)... done\n"
|
||||
(G_ "Skipping ~a (not a symlink to store)... done\n")
|
||||
(get-target-path path))))))
|
||||
to-delete))))
|
||||
|
||||
|
@ -191,9 +195,9 @@ appear only after all nested items already listed."
|
|||
(match-lambda
|
||||
(('dir . ".")
|
||||
(display
|
||||
"New symlinks to home-environment will be created soon.\n")
|
||||
(G_ "New symlinks to home-environment will be created soon.\n"))
|
||||
(format
|
||||
#t "All conflicting files will go to ~a.\n\n" backup-dir))
|
||||
#t (G_ "All conflicting files will go to ~a.\n\n") backup-dir))
|
||||
|
||||
(('dir . path)
|
||||
(let ((target-path (get-target-path path)))
|
||||
|
@ -203,20 +207,20 @@ appear only after all nested items already listed."
|
|||
|
||||
(if (file-exists? target-path)
|
||||
(format
|
||||
#t "Skipping ~a (directory already exists)... done\n"
|
||||
#t (G_ "Skipping ~a (directory already exists)... done\n")
|
||||
target-path)
|
||||
(begin
|
||||
(format #t "Creating ~a..." target-path)
|
||||
(format #t (G_ "Creating ~a...") target-path)
|
||||
(mkdir target-path)
|
||||
(display " done\n")))))
|
||||
(display (G_ " done\n"))))))
|
||||
|
||||
(('file . path)
|
||||
(when (file-exists? (get-target-path path))
|
||||
(backup-file path))
|
||||
(format #t "Symlinking ~a -> ~a..."
|
||||
(format #t (G_ "Symlinking ~a -> ~a...")
|
||||
(get-target-path path) (get-source-path path))
|
||||
(symlink (get-source-path path) (get-target-path path))
|
||||
(display " done\n")))
|
||||
(display (G_ " done\n"))))
|
||||
to-create)))))
|
||||
|
||||
(when old-tree
|
||||
|
@ -227,7 +231,7 @@ appear only after all nested items already listed."
|
|||
(symlink new-home new-he-path)
|
||||
(rename-file new-he-path he-path)
|
||||
|
||||
(display " done\nFinished updating symlinks.\n\n")))))
|
||||
(display (G_" done\nFinished updating symlinks.\n\n"))))))
|
||||
|
||||
|
||||
(define (update-symlinks-gexp _)
|
|
@ -17,7 +17,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/>.
|
||||
|
||||
(define-module (gnu home-services utils)
|
||||
(define-module (gnu home services utils)
|
||||
#:use-module (ice-9 string-fun)
|
||||
#:use-module (srfi srfi-1)
|
||||
#:use-module (srfi srfi-26)
|
||||
|
@ -28,7 +28,7 @@
|
|||
list->human-readable-list))
|
||||
|
||||
(define (maybe-object->string object)
|
||||
"Like @code{object->string} but don't do anyting if OBJECT already is
|
||||
"Like @code{object->string} but don't do anything if OBJECT already is
|
||||
a string."
|
||||
(if (string? object)
|
||||
object
|
|
@ -17,12 +17,11 @@
|
|||
;;; 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 home-services xdg)
|
||||
(define-module (gnu home services xdg)
|
||||
#:use-module (gnu services configuration)
|
||||
#:use-module (gnu home-services configuration)
|
||||
#:use-module (gnu home-services)
|
||||
#:use-module (gnu home services)
|
||||
#:use-module (gnu packages freedesktop)
|
||||
#:use-module (gnu home-services utils)
|
||||
#:use-module (gnu home services utils)
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (guix records)
|
||||
#:use-module (guix i18n)
|
||||
|
@ -137,7 +136,7 @@ are no extensions use configuration instead."
|
|||
(description "Configure XDG base directories. This
|
||||
service introduces two additional variables @env{XDG_STATE_HOME},
|
||||
@env{XDG_LOG_HOME}. They are not a part of XDG specification, at
|
||||
least yet, but are convinient to have, it improves the consistency
|
||||
least yet, but are convenient to have, it improves the consistency
|
||||
between different home services. The services of this service-type is
|
||||
instantiated by default, to provide non-default value, extend the
|
||||
service-type (using @code{simple-service} for example).")))
|
|
@ -17,6 +17,7 @@
|
|||
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
(define-module (gnu image)
|
||||
#:use-module (gnu platform)
|
||||
#:use-module (guix records)
|
||||
#:export (partition
|
||||
partition?
|
||||
|
@ -34,12 +35,15 @@
|
|||
image?
|
||||
image-name
|
||||
image-format
|
||||
image-target
|
||||
image-platform
|
||||
image-size
|
||||
image-operating-system
|
||||
image-partition-table-type
|
||||
image-partitions
|
||||
image-compression?
|
||||
image-volatile-root?
|
||||
image-shared-store?
|
||||
image-shared-network?
|
||||
image-substitutable?
|
||||
|
||||
image-type
|
||||
|
@ -47,7 +51,8 @@
|
|||
image-type-name
|
||||
image-type-constructor
|
||||
|
||||
os->image))
|
||||
os->image
|
||||
os+platform->image))
|
||||
|
||||
|
||||
;;;
|
||||
|
@ -78,18 +83,24 @@
|
|||
(name image-name ;symbol
|
||||
(default #f))
|
||||
(format image-format) ;symbol
|
||||
(target image-target
|
||||
(platform image-platform ;<platform>
|
||||
(default #f))
|
||||
(size image-size ;size in bytes as integer
|
||||
(default 'guess))
|
||||
(operating-system image-operating-system ;<operating-system>
|
||||
(default #f))
|
||||
(partition-table-type image-partition-table-type ; 'mbr or 'gpt
|
||||
(default 'mbr))
|
||||
(partitions image-partitions ;list of <partition>
|
||||
(default '()))
|
||||
(compression? image-compression? ;boolean
|
||||
(default #t))
|
||||
(volatile-root? image-volatile-root? ;boolean
|
||||
(default #t))
|
||||
(shared-store? image-shared-store? ;boolean
|
||||
(default #f))
|
||||
(shared-network? image-shared-network? ;boolean
|
||||
(default #f))
|
||||
(substitutable? image-substitutable? ;boolean
|
||||
(default #t)))
|
||||
|
||||
|
@ -112,3 +123,8 @@
|
|||
(define* (os->image os #:key type)
|
||||
(let ((constructor (image-type-constructor type)))
|
||||
(constructor os)))
|
||||
|
||||
(define* (os+platform->image os platform #:key type)
|
||||
(image
|
||||
(inherit (os->image os #:type type))
|
||||
(platform platform)))
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#:use-module (gnu packages linux)
|
||||
#:use-module (gnu packages ncurses)
|
||||
#:use-module (gnu packages package-management)
|
||||
#:use-module (gnu packages tls)
|
||||
#:use-module (gnu packages xorg)
|
||||
#:use-module (gnu system locale)
|
||||
#:use-module (ice-9 match)
|
||||
|
@ -351,7 +352,7 @@ selected keymap."
|
|||
;; packages …), etc. modules.
|
||||
(with-extensions (list guile-gcrypt guile-newt
|
||||
guile-parted guile-bytestructures
|
||||
guile-json-3 guile-git guix)
|
||||
guile-json-3 guile-git guix gnutls)
|
||||
(with-imported-modules `(,@(source-module-closure
|
||||
`(,@modules
|
||||
(gnu services herd)
|
||||
|
|
|
@ -105,36 +105,6 @@ USERS."
|
|||
(write-passwd password (string-append etc "/passwd"))
|
||||
(write-shadow shadow (string-append etc "/shadow")))
|
||||
|
||||
(define* (kill-cow-users cow-path #:key (spare '("udevd")))
|
||||
"Kill all processes that have references to the given COW-PATH in their
|
||||
'maps' file. The process whose names are in SPARE list are spared."
|
||||
(define %not-nul
|
||||
(char-set-complement (char-set #\nul)))
|
||||
|
||||
(let ((pids
|
||||
(filter-map (lambda (pid)
|
||||
(false-if-exception
|
||||
(call-with-input-file
|
||||
(string-append "/proc/" pid "/maps")
|
||||
(lambda (port)
|
||||
(and (string-contains (get-string-all port)
|
||||
cow-path)
|
||||
(string->number pid))))))
|
||||
(scandir "/proc" string->number))))
|
||||
(for-each (lambda (pid)
|
||||
;; cmdline does not always exist.
|
||||
(false-if-exception
|
||||
(call-with-input-file
|
||||
(string-append "/proc/" (number->string pid) "/cmdline")
|
||||
(lambda (port)
|
||||
(match (string-tokenize (read-string port) %not-nul)
|
||||
((argv0 _ ...)
|
||||
(unless (member (basename argv0) spare)
|
||||
(syslog "Killing process ~a (~a)~%" pid argv0)
|
||||
(kill pid SIGKILL)))
|
||||
(_ #f))))))
|
||||
pids)))
|
||||
|
||||
(define (call-with-mnt-container thunk)
|
||||
"This is a variant of call-with-container. Run THUNK in a new container
|
||||
process, within a separate MNT namespace. The container is not jailed so that
|
||||
|
@ -149,6 +119,28 @@ it can interact with the rest of the system."
|
|||
(match (waitpid pid)
|
||||
((_ . status) status))))
|
||||
|
||||
(define (install-locale locale)
|
||||
"Install the given LOCALE or the en_US.utf8 locale as a fallback."
|
||||
(let ((supported? (false-if-exception
|
||||
(setlocale LC_ALL locale))))
|
||||
(if supported?
|
||||
(begin
|
||||
(syslog "install supported locale ~a~%." locale)
|
||||
(setenv "LC_ALL" locale))
|
||||
(begin
|
||||
;; If the selected locale is not supported, install a default UTF-8
|
||||
;; locale. This is required to copy some files with UTF-8
|
||||
;; characters, in the nss-certs package notably. Set LANGUAGE
|
||||
;; anyways, to have translated messages if possible.
|
||||
(syslog "~a locale is not supported, installating en_US.utf8 \
|
||||
locale instead.~%" locale)
|
||||
(setlocale LC_ALL "en_US.utf8")
|
||||
(setenv "LC_ALL" "en_US.utf8")
|
||||
(setenv "LANGUAGE"
|
||||
(string-take locale
|
||||
(or (string-index locale #\_)
|
||||
(string-length locale))))))))
|
||||
|
||||
(define* (install-system locale #:key (users '()))
|
||||
"Create /etc/shadow and /etc/passwd on the installation target for USERS.
|
||||
Start COW-STORE service on target directory and launch guix install command in
|
||||
|
@ -199,6 +191,10 @@ or #f. Return #t on success and #f on failure."
|
|||
(lambda ()
|
||||
(dynamic-wind
|
||||
(lambda ()
|
||||
;; Install the locale before mounting the cow-store, otherwise
|
||||
;; the loaded cow-store locale files will prevent umounting.
|
||||
(install-locale locale)
|
||||
|
||||
;; Save the database, so that it can be restored once the
|
||||
;; cow-store is umounted.
|
||||
(copy-file database-file saved-database)
|
||||
|
@ -221,9 +217,8 @@ or #f. Return #t on success and #f on failure."
|
|||
(lambda ()
|
||||
(with-error-to-file "/dev/console"
|
||||
(lambda ()
|
||||
(run-command install-command
|
||||
#:locale locale)))))
|
||||
(run-command install-command #:locale locale))))
|
||||
(run-command install-command)))))
|
||||
(run-command install-command))))
|
||||
(lambda ()
|
||||
;; Restart guix-daemon so that it does no keep the MNT namespace
|
||||
;; alive.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
|
||||
;;; Copyright © 2018, 2021 Mathieu Othacehe <othacehe@gnu.org>
|
||||
;;; Copyright © 2020 Florian Pelz <pelzflorian@pelzflorian.de>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
|
@ -79,6 +79,11 @@
|
|||
"Parse FILE and return two values, the list of supported X11-KEYMAP-MODEL
|
||||
and X11-KEYMAP-LAYOUT records. FILE is an XML file from the X Keyboard
|
||||
Configuration Database, describing possible XKB configurations."
|
||||
(define maybe-empty
|
||||
(match-lambda
|
||||
((x) x)
|
||||
(#f "")))
|
||||
|
||||
(define (model m)
|
||||
(sxml-match m
|
||||
[(model
|
||||
|
@ -108,7 +113,7 @@ Configuration Database, describing possible XKB configurations."
|
|||
. ,rest-variant))
|
||||
(x11-keymap-variant
|
||||
(name name)
|
||||
(description (car
|
||||
(description (maybe-empty
|
||||
(assoc-ref rest-variant 'description))))]))
|
||||
|
||||
(define (layout l)
|
||||
|
@ -120,9 +125,9 @@ Configuration Database, describing possible XKB configurations."
|
|||
(variantList ,[variant -> v] ...))
|
||||
(x11-keymap-layout
|
||||
(name name)
|
||||
(synopsis (car
|
||||
(synopsis (maybe-empty
|
||||
(assoc-ref rest-layout 'shortDescription)))
|
||||
(description (car
|
||||
(description (maybe-empty
|
||||
(assoc-ref rest-layout 'description)))
|
||||
(variants (list v ...)))]
|
||||
[(layout
|
||||
|
@ -131,9 +136,9 @@ Configuration Database, describing possible XKB configurations."
|
|||
. ,rest-layout))
|
||||
(x11-keymap-layout
|
||||
(name name)
|
||||
(synopsis (car
|
||||
(synopsis (maybe-empty
|
||||
(assoc-ref rest-layout 'shortDescription)))
|
||||
(description (car
|
||||
(description (maybe-empty
|
||||
(assoc-ref rest-layout 'description)))
|
||||
(variants '()))]))
|
||||
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
#:use-module (srfi srfi-34)
|
||||
#:use-module (srfi srfi-35)
|
||||
#:use-module (ice-9 match)
|
||||
#:use-module (web client)
|
||||
#:use-module (web response)
|
||||
#:use-module (newt)
|
||||
#:export (run-network-page))
|
||||
|
||||
|
@ -119,8 +121,23 @@ network devices were found. Do you want to continue anyway?"))
|
|||
(define (wait-service-online)
|
||||
"Display a newt scale until connman detects an Internet access. Do
|
||||
FULL-VALUE tentatives, spaced by 1 second."
|
||||
(define (ci-available?)
|
||||
(dynamic-wind
|
||||
(lambda ()
|
||||
(sigaction SIGALRM
|
||||
(lambda _ #f))
|
||||
(alarm 3))
|
||||
(lambda ()
|
||||
(false-if-exception
|
||||
(= (response-code
|
||||
(http-request "https://ci.guix.gnu.org"))
|
||||
200)))
|
||||
(lambda ()
|
||||
(alarm 0))))
|
||||
|
||||
(define (online?)
|
||||
(or (connman-online?)
|
||||
(or (and (connman-online?)
|
||||
(ci-available?))
|
||||
(file-exists? "/tmp/installer-assume-online")))
|
||||
|
||||
(let* ((full-value 5))
|
||||
|
@ -137,7 +154,7 @@ FULL-VALUE tentatives, spaced by 1 second."
|
|||
(unless (online?)
|
||||
(run-error-page
|
||||
(G_ "The selected network does not provide access to the \
|
||||
Internet, please try again.")
|
||||
Internet and the Guix substitute server, please try again.")
|
||||
(G_ "Connection error"))
|
||||
(raise
|
||||
(condition
|
||||
|
|
|
@ -83,7 +83,8 @@ DEVICES list."
|
|||
devices))
|
||||
|
||||
(let* ((result (run-listbox-selection-page
|
||||
#:info-text (G_ "Please select a disk.")
|
||||
#:info-text (G_ "Please select a \
|
||||
disk. The installation device as well as the small devices are filtered.")
|
||||
#:title (G_ "Disk")
|
||||
#:listbox-items (device-items)
|
||||
#:listbox-item->text cdr
|
||||
|
@ -131,7 +132,11 @@ Be careful, all data on the disk will be lost.")
|
|||
(run-listbox-selection-page
|
||||
#:info-text (G_ "Please select the file-system type for this partition.")
|
||||
#:title (G_ "File-system type")
|
||||
#:listbox-items '(ext4 btrfs fat16 fat32 jfs ntfs xfs swap)
|
||||
#:listbox-items '(btrfs ext4 jfs xfs
|
||||
swap
|
||||
;; These lack basic Unix features. Their only use
|
||||
;; on GNU is for interoperation, e.g., with UEFI.
|
||||
fat32 fat16 ntfs)
|
||||
#:listbox-item->text user-fs-type-name
|
||||
#:sort-listbox-items? #f
|
||||
#:button-text (G_ "Exit")
|
||||
|
@ -788,13 +793,13 @@ by pressing the Exit button.~%~%")))
|
|||
result-user-partitions)))))
|
||||
|
||||
(init-parted)
|
||||
(let* ((non-install-devices (non-install-devices))
|
||||
(user-partitions (run-page non-install-devices))
|
||||
(let* ((eligible-devices (eligible-devices))
|
||||
(user-partitions (run-page eligible-devices))
|
||||
(user-partitions-with-pass (prompt-luks-passwords
|
||||
user-partitions))
|
||||
(form (draw-formatting-page user-partitions)))
|
||||
;; Make sure the disks are not in use before proceeding to formatting.
|
||||
(free-parted non-install-devices)
|
||||
(free-parted eligible-devices)
|
||||
(format-user-partitions user-partitions-with-pass)
|
||||
(syslog "formatted ~a user partitions~%"
|
||||
(length user-partitions-with-pass))
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
;;; Copyright © 2021 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||
;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -68,18 +69,16 @@ system.")
|
|||
(condition
|
||||
(&installer-step-abort)))))))
|
||||
|
||||
(define (run-other-services-cbt-page)
|
||||
"Run a page allowing the user to select other services."
|
||||
(define (run-printing-services-cbt-page)
|
||||
"Run a page allowing the user to select document services such as CUPS."
|
||||
(let ((items (filter (lambda (service)
|
||||
(not (member (system-service-type service)
|
||||
'(desktop
|
||||
network-management
|
||||
networking))))
|
||||
(eq? 'document
|
||||
(system-service-type service)))
|
||||
%system-services)))
|
||||
(run-checkbox-tree-page
|
||||
#:info-text (G_ "You can now select other services to run on your \
|
||||
#:info-text (G_ "You can now select the CUPS printing service to run on your \
|
||||
system.")
|
||||
#:title (G_ "Other services")
|
||||
#:title (G_ "Printing and document services")
|
||||
#:items items
|
||||
#:selection (map system-service-recommended? items)
|
||||
#:item->text (compose G_ system-service-name)
|
||||
|
@ -90,6 +89,27 @@ system.")
|
|||
(condition
|
||||
(&installer-step-abort)))))))
|
||||
|
||||
(define (run-console-services-cbt-page)
|
||||
"Run a page to select various system adminstration services for non-graphical
|
||||
systems."
|
||||
(let ((items (filter (lambda (service)
|
||||
(eq? 'administration
|
||||
(system-service-type service)))
|
||||
%system-services)))
|
||||
(run-checkbox-tree-page
|
||||
#:title (G_ "Console services")
|
||||
#:info-text (G_ "Select miscellaneous services to run on your \
|
||||
non-graphical system.")
|
||||
#:items items
|
||||
#:selection (map system-service-recommended? items)
|
||||
#:item->text (compose G_ system-service-name)
|
||||
#:checkbox-tree-height 5
|
||||
#:exit-button-callback-procedure
|
||||
(lambda ()
|
||||
(raise
|
||||
(condition
|
||||
(&installer-step-abort)))))))
|
||||
|
||||
(define (run-network-management-page)
|
||||
"Run a page to select among several network management methods."
|
||||
(let ((title (G_ "Network management")))
|
||||
|
@ -121,6 +141,7 @@ client may be enough for a server.")
|
|||
(append desktop
|
||||
(run-networking-cbt-page)
|
||||
(if (null? desktop)
|
||||
(list (run-network-management-page))
|
||||
(cons (run-network-management-page)
|
||||
(run-console-services-cbt-page))
|
||||
'())
|
||||
(run-other-services-cbt-page))))
|
||||
(run-printing-services-cbt-page))))
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#:use-module ((gnu build file-systems)
|
||||
#:select (canonicalize-device-spec
|
||||
find-partition-by-label
|
||||
find-partition-by-uuid
|
||||
read-partition-uuid
|
||||
read-luks-partition-uuid))
|
||||
#:use-module ((gnu build linux-boot)
|
||||
|
@ -80,7 +81,7 @@
|
|||
|
||||
with-delay-device-in-use?
|
||||
force-device-sync
|
||||
non-install-devices
|
||||
eligible-devices
|
||||
partition-user-type
|
||||
user-fs-type-name
|
||||
partition-filesystem-user-type
|
||||
|
@ -345,35 +346,59 @@ fail. See rereadpt function in wipefs.c of util-linux for an explanation."
|
|||
(with-null-output-ports
|
||||
(invoke "dmsetup" "remove_all")))
|
||||
|
||||
(define (installation-device)
|
||||
"Return the installation device path."
|
||||
(define (installer-root-partition-path)
|
||||
"Return the root partition path, or #f if it could not be detected."
|
||||
(let* ((cmdline (linux-command-line))
|
||||
(root (find-long-option "--root" cmdline)))
|
||||
(and root
|
||||
(canonicalize-device-spec (uuid root)))))
|
||||
(or (and (access? root F_OK) root)
|
||||
(find-partition-by-label root)
|
||||
(and=> (uuid root)
|
||||
find-partition-by-uuid)))))
|
||||
|
||||
(define (non-install-devices)
|
||||
"Return all the available devices, except the install device."
|
||||
(define (read-only? device)
|
||||
(dynamic-wind
|
||||
(lambda ()
|
||||
(device-open device))
|
||||
(lambda ()
|
||||
(device-read-only? device))
|
||||
(lambda ()
|
||||
(device-close device))))
|
||||
;; Minimal installation device size.
|
||||
(define %min-device-size
|
||||
(* 2 GIBIBYTE-SIZE)) ;2GiB
|
||||
|
||||
;; If parted reports that a device is read-only it is probably the
|
||||
;; installation device. However, as this detection does not always work,
|
||||
;; compare the device path to the installation device path read from the
|
||||
;; command line.
|
||||
(let ((install-device (installation-device)))
|
||||
(remove (lambda (device)
|
||||
(let ((file-name (device-path device)))
|
||||
(or (read-only? device)
|
||||
(and install-device
|
||||
(string=? file-name install-device)))))
|
||||
(devices))))
|
||||
(define (eligible-devices)
|
||||
"Return all the available devices except the install device and the devices
|
||||
which are smaller than %MIN-DEVICE-SIZE."
|
||||
|
||||
(define the-installer-root-partition-path
|
||||
(installer-root-partition-path))
|
||||
|
||||
(define (small-device? device)
|
||||
(let ((length (device-length device))
|
||||
(sector-size (device-sector-size device)))
|
||||
(and (< (* length sector-size) %min-device-size)
|
||||
(syslog "~a is not eligible because it is smaller than ~a.~%"
|
||||
(device-path device)
|
||||
(unit-format-custom-byte device
|
||||
%min-device-size
|
||||
UNIT-GIGABYTE)))))
|
||||
|
||||
;; Read partition table of device and compare each path to the one
|
||||
;; we're booting from to determine if it is the installation
|
||||
;; device.
|
||||
(define (installation-device? device)
|
||||
;; When using CDROM based installation, the root partition path may be the
|
||||
;; device path.
|
||||
(and (or (string=? the-installer-root-partition-path
|
||||
(device-path device))
|
||||
(let ((disk (disk-new device)))
|
||||
(and disk
|
||||
(any (lambda (partition)
|
||||
(string=? the-installer-root-partition-path
|
||||
(partition-get-path partition)))
|
||||
(disk-partitions disk)))))
|
||||
(syslog "~a is not eligible because it is the installation device.~%"
|
||||
(device-path device))))
|
||||
|
||||
(remove
|
||||
(lambda (device)
|
||||
(or (installation-device? device)
|
||||
(small-device? device)))
|
||||
(devices)))
|
||||
|
||||
|
||||
;;
|
||||
|
@ -1414,9 +1439,11 @@ USER-PARTITIONS, or return nothing."
|
|||
(let* ((uuids (map (lambda (file)
|
||||
(uuid->string (read-partition-uuid file)))
|
||||
swap-devices)))
|
||||
`((swap-devices (list ,@(map (lambda (uuid)
|
||||
`(uuid ,uuid))
|
||||
uuids))))))
|
||||
`((swap-devices
|
||||
(list ,@(map (lambda (uuid)
|
||||
`(swap-space
|
||||
(target (uuid ,uuid))))
|
||||
uuids))))))
|
||||
,@(if (null? encrypted-partitions)
|
||||
'()
|
||||
`((mapped-devices
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
;;; Copyright © 2021 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||
;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -104,6 +105,17 @@
|
|||
(packages '((specification->package "nss-certs")))
|
||||
(recommended? #t))
|
||||
|
||||
;; Miscellaneous system administration services.
|
||||
(system-service
|
||||
(name (G_ "Network time service (NTP), to set the clock automatically"))
|
||||
(type 'administration)
|
||||
(recommended? #t)
|
||||
(snippet '((service ntp-service-type))))
|
||||
(system-service
|
||||
(name (G_ "GPM mouse daemon, to use the mouse on the console"))
|
||||
(type 'administration)
|
||||
(snippet '((service gpm-service-type))))
|
||||
|
||||
;; Network connectivity management.
|
||||
(system-service
|
||||
(name (G_ "NetworkManager network connection manager"))
|
||||
|
|
|
@ -221,7 +221,11 @@ ROOT-PASSWORD, and USERS."
|
|||
(choose-network-management-tool?
|
||||
(lambda (service)
|
||||
(string-contains service "DHCP")))
|
||||
(choose-misc-service?
|
||||
(lambda (service)
|
||||
(string-contains service "NTP")))
|
||||
(choose-other-service? (const #f)))
|
||||
|
||||
"Converse over PORT to choose services."
|
||||
(define desktop-environments '())
|
||||
|
||||
|
@ -243,7 +247,12 @@ ROOT-PASSWORD, and USERS."
|
|||
(null? desktop-environments)
|
||||
(find choose-network-management-tool? services))
|
||||
|
||||
((checkbox-list (title "Other services") (text _)
|
||||
((checkbox-list (title "Console services") (text _)
|
||||
(items ,services))
|
||||
(null? desktop-environments)
|
||||
(filter choose-misc-service? services))
|
||||
|
||||
((checkbox-list (title "Printing and document services") (text _)
|
||||
(items ,services))
|
||||
(filter choose-other-service? services))))
|
||||
|
||||
|
|
|
@ -74,9 +74,9 @@ number. If no percentage is found, return #f"
|
|||
(and result
|
||||
(string->number (match:substring result 1)))))
|
||||
|
||||
(define* (run-command command #:key locale)
|
||||
"Run COMMAND, a list of strings, in the given LOCALE. Return true if
|
||||
COMMAND exited successfully, #f otherwise."
|
||||
(define* (run-command command)
|
||||
"Run COMMAND, a list of strings. Return true if COMMAND exited
|
||||
successfully, #f otherwise."
|
||||
(define env (environ))
|
||||
|
||||
(define (pause)
|
||||
|
@ -90,18 +90,6 @@ COMMAND exited successfully, #f otherwise."
|
|||
|
||||
(setenv "PATH" "/run/current-system/profile/bin")
|
||||
|
||||
(when locale
|
||||
(let ((supported? (false-if-exception
|
||||
(setlocale LC_ALL locale))))
|
||||
;; If LOCALE is not supported, then set LANGUAGE, which might at
|
||||
;; least give us translated messages.
|
||||
(if supported?
|
||||
(setenv "LC_ALL" locale)
|
||||
(setenv "LANGUAGE"
|
||||
(string-take locale
|
||||
(or (string-index locale #\_)
|
||||
(string-length locale)))))))
|
||||
|
||||
(guard (c ((invoke-error? c)
|
||||
(newline)
|
||||
(format (current-error-port)
|
||||
|
|
397
gnu/local.mk
397
gnu/local.mk
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays@sdf.org>
|
||||
;;; Copyright © 2020, 2021 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2020-2022 Ludovic Courtès <ludo@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -26,6 +26,7 @@
|
|||
#:use-module (gnu system uuid)
|
||||
#:use-module ((gnu services) #:select (sexp->system-provenance))
|
||||
#:use-module (guix diagnostics)
|
||||
#:use-module (guix memoization)
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (guix i18n)
|
||||
#:use-module (guix modules)
|
||||
|
@ -83,6 +84,7 @@
|
|||
(define-record-type* <machine-ssh-configuration> machine-ssh-configuration
|
||||
make-machine-ssh-configuration
|
||||
machine-ssh-configuration?
|
||||
this-machine-ssh-configuration
|
||||
(host-name machine-ssh-configuration-host-name) ; string
|
||||
(system machine-ssh-configuration-system) ; string
|
||||
(build-locally? machine-ssh-configuration-build-locally? ; boolean
|
||||
|
@ -91,6 +93,8 @@
|
|||
(default #t))
|
||||
(allow-downgrades? machine-ssh-configuration-allow-downgrades? ; boolean
|
||||
(default #f))
|
||||
(safety-checks? machine-ssh-configuration-safety-checks? ;boolean
|
||||
(default #t))
|
||||
(port machine-ssh-configuration-port ; integer
|
||||
(default 22))
|
||||
(user machine-ssh-configuration-user ; string
|
||||
|
@ -98,29 +102,41 @@
|
|||
(identity machine-ssh-configuration-identity ; path to a private key
|
||||
(default #f))
|
||||
(session machine-ssh-configuration-session ; session
|
||||
(default #f))
|
||||
(thunked)
|
||||
(default
|
||||
;; By default, open the session once and cache it.
|
||||
(open-machine-ssh-session* this-machine-ssh-configuration)))
|
||||
(host-key machine-ssh-configuration-host-key ; #f | string
|
||||
(default #f)))
|
||||
|
||||
(define (open-machine-ssh-session config)
|
||||
"Open an SSH session for CONFIG, a <machine-ssh-configuration> record."
|
||||
(let ((host-name (machine-ssh-configuration-host-name config))
|
||||
(user (machine-ssh-configuration-user config))
|
||||
(port (machine-ssh-configuration-port config))
|
||||
(identity (machine-ssh-configuration-identity config))
|
||||
(host-key (machine-ssh-configuration-host-key config)))
|
||||
(unless host-key
|
||||
(warning (G_ "<machine-ssh-configuration> without a 'host-key' \
|
||||
is deprecated~%")))
|
||||
(open-ssh-session host-name
|
||||
#:user user
|
||||
#:port port
|
||||
#:identity identity
|
||||
#:host-key host-key)))
|
||||
|
||||
(define open-machine-ssh-session*
|
||||
(mlambdaq (config)
|
||||
"Memoizing variant of 'open-machine-ssh-session'."
|
||||
(open-machine-ssh-session config)))
|
||||
|
||||
(define (machine-ssh-session machine)
|
||||
"Return the SSH session that was given in MACHINE's configuration, or create
|
||||
one from the configuration's parameters if one was not provided."
|
||||
(maybe-raise-unsupported-configuration-error machine)
|
||||
(let ((config (machine-configuration machine)))
|
||||
(or (machine-ssh-configuration-session config)
|
||||
(let ((host-name (machine-ssh-configuration-host-name config))
|
||||
(user (machine-ssh-configuration-user config))
|
||||
(port (machine-ssh-configuration-port config))
|
||||
(identity (machine-ssh-configuration-identity config))
|
||||
(host-key (machine-ssh-configuration-host-key config)))
|
||||
(unless host-key
|
||||
(warning (G_ "<machine-ssh-configuration> without a 'host-key' \
|
||||
is deprecated~%")))
|
||||
(open-ssh-session host-name
|
||||
#:user user
|
||||
#:port port
|
||||
#:identity identity
|
||||
#:host-key host-key)))))
|
||||
(open-machine-ssh-session config))))
|
||||
|
||||
|
||||
;;;
|
||||
|
@ -226,18 +242,21 @@ exist on the machine."
|
|||
(raise (formatted-message (G_ "no file system with UUID '~a'")
|
||||
(uuid->string (file-system-device fs)))))))
|
||||
|
||||
(append (map check-literal-file-system
|
||||
(filter (lambda (fs)
|
||||
(string? (file-system-device fs)))
|
||||
file-systems))
|
||||
(map check-labeled-file-system
|
||||
(filter (lambda (fs)
|
||||
(file-system-label? (file-system-device fs)))
|
||||
file-systems))
|
||||
(map check-uuid-file-system
|
||||
(filter (lambda (fs)
|
||||
(uuid? (file-system-device fs)))
|
||||
file-systems))))
|
||||
(if (machine-ssh-configuration-safety-checks?
|
||||
(machine-configuration machine))
|
||||
(append (map check-literal-file-system
|
||||
(filter (lambda (fs)
|
||||
(string? (file-system-device fs)))
|
||||
file-systems))
|
||||
(map check-labeled-file-system
|
||||
(filter (lambda (fs)
|
||||
(file-system-label? (file-system-device fs)))
|
||||
file-systems))
|
||||
(map check-uuid-file-system
|
||||
(filter (lambda (fs)
|
||||
(uuid? (file-system-device fs)))
|
||||
file-systems)))
|
||||
'()))
|
||||
|
||||
(define (machine-check-initrd-modules machine)
|
||||
"Return a list of <remote-assertion> that raise a '&message' error condition
|
||||
|
@ -277,7 +296,10 @@ not available in the initrd."
|
|||
(file-system-device fs)
|
||||
missing)))))
|
||||
|
||||
(map missing-modules file-systems))
|
||||
(if (machine-ssh-configuration-safety-checks?
|
||||
(machine-configuration machine))
|
||||
(map missing-modules file-systems)
|
||||
'()))
|
||||
|
||||
(define* (machine-check-forward-update machine)
|
||||
"Check whether we are making a forward update for MACHINE. Depending on its
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2012-2020, 2022 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>
|
||||
|
@ -51,6 +51,7 @@
|
|||
%auxiliary-files-path
|
||||
%package-module-path
|
||||
%default-package-module-path
|
||||
cache-is-authoritative?
|
||||
|
||||
fold-packages
|
||||
fold-available-packages
|
||||
|
|
|
@ -78,14 +78,9 @@
|
|||
"--disable-static"
|
||||
"--enable-fake")))
|
||||
(native-inputs
|
||||
`(("latex2html" ,latex2html)
|
||||
("pkg-config" ,pkg-config)
|
||||
("python" ,python-wrapper)
|
||||
("swig" ,swig)))
|
||||
(list latex2html pkg-config python-wrapper swig))
|
||||
(inputs
|
||||
`(("glib" ,glib)
|
||||
("gtk+" ,gtk+-2)
|
||||
("libusb" ,libusb-compat)))
|
||||
(list glib gtk+-2 libusb-compat))
|
||||
(synopsis "Portable Braille Library")
|
||||
(description "Libbraille is a library to easily access Braille displays and
|
||||
terminals.")
|
||||
|
@ -95,22 +90,24 @@ terminals.")
|
|||
(define-public brltty
|
||||
(package
|
||||
(name "brltty")
|
||||
(version "6.2")
|
||||
(version "6.4")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri
|
||||
(string-append "https://brltty.app/archive/brltty-" version ".tar.gz"))
|
||||
(sha256
|
||||
(base32 "0m0cq3p1cwp52n81si621gij82w3mdqwgr39m6bs652pmk5na72l"))))
|
||||
(base32 "0zybi9i9izv25g0wphl0snddrhb6xl5879y4pkpjpnxq61wm9gry"))))
|
||||
(build-system glib-or-gtk-build-system)
|
||||
(arguments
|
||||
`(#:tests? #f ; No target
|
||||
|
||||
;; High parallelism may cause errors such as:
|
||||
;; ranlib: ./libbrlapi_stubs.a: error reading brlapi_stubs.o: file truncated
|
||||
#:parallel-build? #f
|
||||
|
||||
#:configure-flags
|
||||
(list
|
||||
(string-append "--with-tcl-config="
|
||||
(assoc-ref %build-inputs "tcl")
|
||||
"/lib/tclConfig.sh")
|
||||
(string-append "--with-libbraille="
|
||||
(assoc-ref %build-inputs "libbraille"))
|
||||
(string-append "--with-espeak_ng="
|
||||
|
@ -152,50 +149,48 @@ terminals.")
|
|||
(string-append "extra_link_args = ['-Wl,-rpath="
|
||||
(assoc-ref outputs "out")
|
||||
"/lib'], "
|
||||
"extra_compile_args = ")))
|
||||
#t)))))
|
||||
"extra_compile_args = "))))))))
|
||||
(native-inputs
|
||||
`(("clisp" ,clisp)
|
||||
("cython" ,python-cython)
|
||||
("doxygen" ,doxygen)
|
||||
("gettext" ,gettext-minimal)
|
||||
("java" ,icedtea "jdk")
|
||||
;; ("linuxdoc" ,linuxdoc-tools)
|
||||
("ocaml" ,ocaml)
|
||||
("ocamlfind" ,ocaml-findlib)
|
||||
("pkg-config" ,pkg-config)
|
||||
("python" ,python-wrapper)
|
||||
("tcl" ,tcl)))
|
||||
(list clisp
|
||||
python-cython
|
||||
doxygen
|
||||
gettext-minimal
|
||||
`(,icedtea "jdk")
|
||||
;; ("linuxdoc" ,linuxdoc-tools)
|
||||
ocaml
|
||||
ocaml-findlib
|
||||
pkg-config
|
||||
python-wrapper
|
||||
tcl))
|
||||
(inputs
|
||||
`(("alsa" ,alsa-lib)
|
||||
("atspi2" ,at-spi2-core)
|
||||
("bluez" ,bluez)
|
||||
("dbus" ,dbus)
|
||||
("espeak" ,espeak)
|
||||
("espeak-ng" ,espeak-ng)
|
||||
("expat" ,expat)
|
||||
("festival" ,festival)
|
||||
("flite" ,flite)
|
||||
("glib" ,glib)
|
||||
("gpm" ,gpm)
|
||||
("iconv" ,libiconv)
|
||||
("icu" ,icu4c)
|
||||
("libbraille" ,libbraille)
|
||||
("libpcre2" ,pcre2)
|
||||
("linux-headers" ,linux-libre-headers)
|
||||
("louis" ,liblouis)
|
||||
("ncurses" ,ncurses)
|
||||
("polkit" ,polkit)
|
||||
("speech-dispatcher" ,speech-dispatcher)
|
||||
("util-linux" ,util-linux)
|
||||
("util-linux:lib" ,util-linux "lib")
|
||||
("x11" ,libx11)
|
||||
("xaw" ,libxaw)
|
||||
("xaw3d" ,libxaw3d)
|
||||
("xext" ,libxext)
|
||||
("xfixes" ,libxfixes)
|
||||
("xt" ,libxt)
|
||||
("xtst" ,libxtst)))
|
||||
(list alsa-lib
|
||||
at-spi2-core
|
||||
bluez
|
||||
dbus
|
||||
espeak
|
||||
espeak-ng
|
||||
expat
|
||||
festival
|
||||
flite
|
||||
glib
|
||||
gpm
|
||||
libiconv
|
||||
icu4c
|
||||
libbraille
|
||||
pcre2
|
||||
liblouis
|
||||
ncurses
|
||||
polkit
|
||||
speech-dispatcher
|
||||
util-linux
|
||||
`(,util-linux "lib")
|
||||
libx11
|
||||
libxaw
|
||||
libxaw3d
|
||||
libxext
|
||||
libxfixes
|
||||
libxt
|
||||
libxtst))
|
||||
(synopsis "Braille TTY")
|
||||
(description "BRLTTY is a background process (daemon) which provides access
|
||||
to the Linux/Unix console (when in text mode) for a blind person using a
|
||||
|
@ -223,19 +218,17 @@ incorporated.")
|
|||
"--without-docs"
|
||||
"--with-notification")))
|
||||
(inputs
|
||||
`(("libxml2" ,libxml2)
|
||||
("libglade" ,libglade)
|
||||
("librsvg" ,librsvg)
|
||||
("gstreamer" ,gstreamer)
|
||||
("cairo" ,cairo)
|
||||
("gtk+" ,gtk+)
|
||||
("libxtst" ,libxtst)
|
||||
("libxcomposite" ,libxcomposite)
|
||||
("libnotify" ,libnotify)))
|
||||
(list libxml2
|
||||
libglade
|
||||
librsvg
|
||||
gstreamer
|
||||
cairo
|
||||
gtk+
|
||||
libxtst
|
||||
libxcomposite
|
||||
libnotify))
|
||||
(native-inputs
|
||||
`(("gettext-minimal" ,gettext-minimal)
|
||||
("intltool" ,intltool)
|
||||
("pkg-config" ,pkg-config)))
|
||||
(list gettext-minimal intltool pkg-config))
|
||||
(home-page "http://florence.sourceforge.net/")
|
||||
(synopsis "Extensible, scalable virtual keyboard for X11")
|
||||
(description
|
||||
|
@ -268,9 +261,9 @@ available to help to click.")
|
|||
"14pyzc4ws1mj859xs9n4x83wzxxvd3bh5bdxzr6nv267xwx1mq68"))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs
|
||||
`(("pkg-config" ,pkg-config)))
|
||||
(list pkg-config))
|
||||
(inputs
|
||||
`(("hidapi" ,hidapi)))
|
||||
(list hidapi))
|
||||
(arguments
|
||||
`(#:tests? #f ; no tests
|
||||
#:make-flags (list (string-append "CC=" ,(cc-for-target)))
|
||||
|
@ -315,7 +308,7 @@ devices have vendorId:productId = 0c45:7403 or 0c45:7404.")
|
|||
(modify-phases %standard-phases
|
||||
(delete 'configure))))
|
||||
(inputs
|
||||
`(("libX11" ,libx11)))
|
||||
(list libx11))
|
||||
(home-page "https://gitlab.com/amiloradovsky/magnify")
|
||||
(synopsis "Tiny screen magnifier for X11")
|
||||
(description
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
(define-public acl
|
||||
(package
|
||||
(name "acl")
|
||||
(version "2.2.53")
|
||||
(version "2.3.1")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
|
@ -48,7 +48,7 @@
|
|||
version ".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"1ir6my3w74s6nfbgbqgzj6w570sn0qjf3524zx8xh67lqrjrigh6"))))
|
||||
"1bqi7hj0xkpivwg7lx5cv3yvs9ks1i6azvpgbvfpzcq1i736233n"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
`(#:modules ((ice-9 ftw)
|
||||
|
@ -86,7 +86,7 @@
|
|||
((".*test/cp\\.test.*") "")
|
||||
((".*test/setfacl-X\\.test.*") ""))
|
||||
#t)))))
|
||||
(inputs `(("attr" ,attr)))
|
||||
(inputs (list attr))
|
||||
(native-inputs
|
||||
`(("gettext" ,gettext-minimal)
|
||||
("perl" ,perl)))
|
||||
|
@ -114,23 +114,23 @@
|
|||
(modify-phases %standard-phases
|
||||
(add-after 'unpack 'disable-tests
|
||||
(lambda* (#:key outputs inputs #:allow-other-keys)
|
||||
;; These tests operate on real files, but our tempfs does not support
|
||||
;; ACLs
|
||||
;; These tests operate on real files, but our tmpfs does not support
|
||||
;; ACLs.
|
||||
(substitute* "tests/test_acls.py"
|
||||
(("( *)def test_applyto(_extended(_mixed)?)?" match indent)
|
||||
(string-append indent "@pytest.mark.skip(reason=\"guix\")\n" match)))
|
||||
#t))
|
||||
(string-append indent "@pytest.mark.skip(reason=\"guix\")\n"
|
||||
match)))))
|
||||
(replace 'check
|
||||
(lambda* (#:key inputs outputs tests? #:allow-other-keys)
|
||||
(when tests?
|
||||
(add-installed-pythonpath inputs outputs)
|
||||
(invoke "pytest" "tests"))
|
||||
#t)))))
|
||||
(inputs `(("acl" ,acl)))
|
||||
(native-inputs `(("python-pytest" ,python-pytest)))
|
||||
(invoke "pytest" "tests")))))))
|
||||
(inputs (list acl))
|
||||
(native-inputs (list python-pytest))
|
||||
(home-page "https://pylibacl.k1024.org/")
|
||||
(synopsis "POSIX.1e ACLs for python")
|
||||
(description "Python 3.4+ extension module that allows you to manipulate
|
||||
the POSIX.1e Access Control Lists present in some OS/file-systems
|
||||
combinations.")
|
||||
(synopsis "POSIX.1e @acronym{ACLs, access control lists} for Python")
|
||||
(description
|
||||
"This Python extension module manipulates the POSIX.1e @acronym{ACLs,
|
||||
Access Control Lists} available on many file systems. These allow more
|
||||
fine-grained access control than traditional user/group permissions.")
|
||||
(license lgpl2.1+)))
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2018 Danny Milosavljevic <dannym@scratchpost.org>
|
||||
;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||
;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -48,17 +49,20 @@
|
|||
(file-name (git-file-name name version))))
|
||||
(build-system gnu-build-system)
|
||||
(supported-systems (list "i686-linux" "x86_64-linux"
|
||||
"armhf-linux" "aarch64-linux"))
|
||||
"armhf-linux" "aarch64-linux"
|
||||
"powerpc-linux"))
|
||||
(outputs (list "out" "debug"))
|
||||
(arguments
|
||||
`(#:system
|
||||
,@(match (%current-system)
|
||||
;; This package predates 64-bit PCs: a ‘64-bit’ adaexec segfaults.
|
||||
;; Force a 32-bit build targeting a similar architecture.
|
||||
((or "armhf-linux" "aarch64-linux")
|
||||
("aarch64-linux"
|
||||
`("armhf-linux"))
|
||||
("x86_64-linux"
|
||||
`("i686-linux"))
|
||||
(_
|
||||
`("i686-linux")))
|
||||
(list (%current-system))))
|
||||
#:make-flags
|
||||
(let ((out (assoc-ref %outputs "out")))
|
||||
(list (string-append
|
||||
|
@ -130,7 +134,7 @@
|
|||
(find-files "share" ".")))
|
||||
#t)))))))
|
||||
(native-inputs
|
||||
`(("sed" ,sed)))
|
||||
(list sed))
|
||||
(home-page (string-append "https://web.archive.org/web/20140902150609/"
|
||||
"http://www2.informatik.uni-stuttgart.de/iste/ps/"
|
||||
"ada-software/html/dos_ada.html"))
|
||||
|
@ -163,10 +167,7 @@ level.")
|
|||
(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)))
|
||||
(list python2-docutils python2-enum34 python2-funcy python2-mako))
|
||||
(arguments
|
||||
`(#:python ,python-2
|
||||
#:tests? #f)) ; Tests would requite gprbuild (Ada).
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -2,7 +2,7 @@
|
|||
;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2015, 2016, 2018, 2020 Efraim Flashner <efraim@flashner.co.il>
|
||||
;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
|
||||
;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
|
||||
;;; Copyright © 2019, 2021 Marius Bakke <marius@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -52,7 +52,7 @@
|
|||
;; XXX: Tests expect real name resolution to work.
|
||||
#:tests? #f))
|
||||
(native-inputs
|
||||
`(("m4" ,m4)))
|
||||
(list m4))
|
||||
(home-page "https://www.gnu.org/software/adns/")
|
||||
(synopsis "Asynchronous DNS client library and utilities")
|
||||
(description
|
||||
|
@ -65,7 +65,7 @@ scripts.")
|
|||
(define-public c-ares
|
||||
(package
|
||||
(name "c-ares")
|
||||
(version "1.16.0")
|
||||
(version "1.17.2")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append
|
||||
|
@ -73,11 +73,19 @@ scripts.")
|
|||
".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"129sm0wzij0mp8vdv68v18hnykcjb6ivi66wnqnnw598q7bql1fy"))))
|
||||
(replacement c-ares/fixed)
|
||||
"0gcincjvpll2qmlc906jx6mfq97s87mgi0zby0753ki0rr2ch0s8"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
'(;; FIXME: Some tests require network access
|
||||
#:tests? #f
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-before 'check 'filter-live-tests
|
||||
(lambda _
|
||||
;; Filter tests that require internet access.
|
||||
(setenv "GTEST_FILTER" "-*.Live*:*.FamilyV4*"))))))
|
||||
(native-inputs
|
||||
`(("pkg-config" ,pkg-config)))
|
||||
(list pkg-config))
|
||||
(home-page "https://c-ares.haxx.se/")
|
||||
(synopsis "C library for asynchronous DNS requests")
|
||||
(description
|
||||
|
@ -88,23 +96,6 @@ 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"))))
|
||||
|
||||
(define-public c-ares/fixed
|
||||
(package
|
||||
(inherit c-ares)
|
||||
(name "c-ares")
|
||||
(version "1.17.1")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append
|
||||
"https://c-ares.haxx.se/download/" name "-" version
|
||||
".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"0h7wjfnk2092glqcp9mqaax7xx0s13m501z1gi0gsjl2vvvd0gfp"))))
|
||||
(arguments
|
||||
`(;; FIXME: Some tests require network access
|
||||
#:tests? #f))))
|
||||
|
||||
;; gRPC requires a c-ares built with CMake in order to get the .cmake modules.
|
||||
;; We can not build c-ares itself with CMake because that would introduce a
|
||||
;; circular dependency through nghttp2.
|
||||
|
@ -118,3 +109,25 @@ multiple clients and programs with graphical user interfaces.")
|
|||
(arguments
|
||||
`(;; XXX: Tests require name resolution (the normal variant runs no tests).
|
||||
#:tests? #f)))))
|
||||
|
||||
(define-public c-ares-for-node
|
||||
(hidden-package
|
||||
(package
|
||||
(inherit c-ares)
|
||||
(name "c-ares")
|
||||
(version "1.18.1")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append
|
||||
"https://c-ares.haxx.se/download/" name "-" version
|
||||
".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"1kxviskwsaa7dcgscvssxa8ps88pdq7kq4z93gxvz7sam2l54z8s"))))
|
||||
(arguments
|
||||
'(#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-before 'check 'filter-live-tests
|
||||
(lambda _
|
||||
;; Filter tests that require internet access.
|
||||
(setenv "GTEST_FILTER" "-*.Live*:*.FamilyV4*")))))))))
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
(define-public agda
|
||||
(package
|
||||
(name "agda")
|
||||
(version "2.6.0.1")
|
||||
(version "2.6.2.1")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
|
@ -45,33 +45,31 @@
|
|||
"https://hackage.haskell.org/package/Agda/Agda-"
|
||||
version ".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"1s600ry1qwizr3ynyj05rvlx7jdcw9a1viyc0ycjamm5sjf8mf3v"))))
|
||||
(base32 "03dw7jfqr3ffik6avigm525djqh2gn5c3qwnb2h6298zkr9lch9w"))))
|
||||
(build-system haskell-build-system)
|
||||
(inputs
|
||||
`(("ghc-aeson" ,ghc-aeson)
|
||||
("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-exceptions" ,ghc-exceptions)
|
||||
("ghc-filemanip" ,ghc-filemanip)
|
||||
("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-murmur-hash" ,ghc-murmur-hash)
|
||||
("ghc-uri-encode" ,ghc-uri-encode)
|
||||
("ghc-regex-tdfa" ,ghc-regex-tdfa)
|
||||
("ghc-strict" ,ghc-strict)
|
||||
("ghc-unordered-containers" ,ghc-unordered-containers)
|
||||
("ghc-zlib" ,ghc-zlib)))
|
||||
(list ghc-aeson
|
||||
ghc-alex
|
||||
ghc-async
|
||||
ghc-blaze-html
|
||||
ghc-boxes
|
||||
ghc-case-insensitive
|
||||
ghc-data-hash
|
||||
ghc-edit-distance
|
||||
ghc-equivalence
|
||||
ghc-gitrev
|
||||
ghc-happy
|
||||
ghc-hashable
|
||||
ghc-hashtables
|
||||
ghc-monad-control
|
||||
ghc-murmur-hash
|
||||
ghc-parallel
|
||||
ghc-regex-tdfa
|
||||
ghc-split
|
||||
ghc-strict
|
||||
ghc-unordered-containers
|
||||
ghc-uri-encode
|
||||
ghc-zlib))
|
||||
(arguments
|
||||
`(#:modules ((guix build haskell-build-system)
|
||||
(guix build utils)
|
||||
|
@ -82,50 +80,13 @@
|
|||
;; This allows us to call the 'agda' binary before installing.
|
||||
(add-after 'unpack 'set-ld-library-path
|
||||
(lambda _
|
||||
(setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/dist/build"))
|
||||
#t))
|
||||
;; FIXME: This is a copy of the standard configure phase with a tiny
|
||||
;; difference: this package needs the -package-db flag to be passed
|
||||
;; to "runhaskell" in addition to the "configure" action, because
|
||||
;; Setup.hs depends on filemanip. Without this option the Setup.hs
|
||||
;; file cannot be evaluated. The haskell-build-system should be
|
||||
;; changed to pass "-package-db" to "runhaskell" in any case.
|
||||
(replace 'configure
|
||||
(lambda* (#:key outputs inputs tests? (configure-flags '())
|
||||
#:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(name-version (strip-store-file-name out))
|
||||
(ghc-path (getenv "GHC_PACKAGE_PATH"))
|
||||
(params
|
||||
`(,(string-append "--prefix=" out)
|
||||
,(string-append "--libdir=" out "/lib")
|
||||
,(string-append "--docdir=" out
|
||||
"/share/doc/" name-version)
|
||||
"--libsubdir=$compiler/$pkg-$version"
|
||||
"--package-db=../package.conf.d"
|
||||
"--global"
|
||||
,@(if tests?
|
||||
'("--enable-tests")
|
||||
'())
|
||||
;; Build and link with shared libraries
|
||||
"--enable-shared"
|
||||
"--enable-executable-dynamic"
|
||||
"--ghc-option=-fPIC"
|
||||
,(string-append "--ghc-option=-optl=-Wl,-rpath=" out
|
||||
"/lib/$compiler/$pkg-$version")
|
||||
,@configure-flags)))
|
||||
(unsetenv "GHC_PACKAGE_PATH")
|
||||
(apply invoke "runhaskell" "-package-db=../package.conf.d"
|
||||
"Setup.hs" "configure" params)
|
||||
(setenv "GHC_PACKAGE_PATH" ghc-path)
|
||||
#t)))
|
||||
(setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/dist/build"))))
|
||||
(add-after 'compile 'agda-compile
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(agda-compiler (string-append out "/bin/agda")))
|
||||
(for-each (cut invoke agda-compiler <>)
|
||||
(find-files (string-append out "/share") "\\.agda$"))
|
||||
#t))))))
|
||||
(find-files (string-append out "/share") "\\.agda$"))))))))
|
||||
(home-page "https://wiki.portal.chalmers.se/agda/")
|
||||
(synopsis
|
||||
"Dependently typed functional programming language and proof assistant")
|
||||
|
@ -175,7 +136,7 @@ Agda. It also aids the input of Unicode characters.")))
|
|||
"0dlis6v6nzbscf713cmwlx8h9n2gxghci8y21qak3hp18gkxdp0g"))))
|
||||
(build-system gnu-build-system)
|
||||
(inputs
|
||||
`(("agda" ,agda)))
|
||||
(list agda))
|
||||
(arguments
|
||||
`(#:parallel-build? #f
|
||||
#:phases
|
||||
|
|
|
@ -30,60 +30,65 @@
|
|||
#:use-module (gnu packages autotools)
|
||||
#:use-module (gnu packages check)
|
||||
#:use-module (gnu packages imagemagick)
|
||||
#:use-module (gnu packages gettext)
|
||||
#:use-module (gnu packages glib)
|
||||
#:use-module (gnu packages gtk)
|
||||
#:use-module (gnu packages image)
|
||||
#:use-module (gnu packages perl)
|
||||
#:use-module (gnu packages pkg-config)
|
||||
#:use-module (gnu packages python)
|
||||
#:use-module (gnu packages python-xyz)
|
||||
#:use-module (gnu packages pretty-print)
|
||||
#:use-module (gnu packages qt)
|
||||
#:use-module (gnu packages video)
|
||||
#:use-module (guix build-system cmake)
|
||||
#:use-module (guix build-system gnu))
|
||||
|
||||
(define-public zxing-cpp
|
||||
(package
|
||||
;; Use the master branch as it includes unreleased build system improvements
|
||||
;; allowing to use system libraries (instead of attempting to fetch them
|
||||
;; from the Internet).
|
||||
(let ((revision "0")
|
||||
(commit "00783db7aa3bcf8620a301854ac71c0ceaaca0c1"))
|
||||
(package
|
||||
(name "zxing-cpp")
|
||||
(version (git-version "1.2.0" revision commit))
|
||||
(source (origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/nu-book/zxing-cpp")
|
||||
(commit commit)))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32
|
||||
"1yl2cpaqiv1g4nq9v0xfj1vd5faz55k4541vz6hsffvcxgn9nmc5"))))
|
||||
(build-system cmake-build-system)
|
||||
(native-inputs
|
||||
(list fmt googletest))
|
||||
(synopsis "C++ port of ZXing")
|
||||
(description "ZXing-CPP is a barcode scanning library.")
|
||||
(home-page "https://github.com/nu-book/zxing-cpp")
|
||||
(license license:asl2.0))))
|
||||
|
||||
;;; This older variant is kept for gst-plugins-bad (see:
|
||||
;;; https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1684).
|
||||
(define-public zxing-cpp-1.2
|
||||
(package/inherit zxing-cpp
|
||||
(name "zxing-cpp")
|
||||
(version "1.0.8")
|
||||
(source
|
||||
(origin
|
||||
(method git-fetch)
|
||||
(uri
|
||||
(git-reference
|
||||
(url "https://github.com/nu-book/zxing-cpp")
|
||||
(commit (string-append "v" version))))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32 "011sq8wcjfxbnd8sj6bf2fgkamlp8gj6q835g61c952npvwsnl71"))))
|
||||
(native-inputs
|
||||
`(("googletest-source" ,(package-source googletest))))
|
||||
(build-system cmake-build-system)
|
||||
(arguments
|
||||
`(#:out-of-source? #f
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'unpack 'unpack-googletest
|
||||
;; Copy the googletest sources to where the CMake build expects them.
|
||||
(lambda* (#:key inputs #:allow-other-keys)
|
||||
(let ((source (assoc-ref inputs "googletest-source"))
|
||||
(target "test/unit/googletest-src"))
|
||||
(mkdir-p target)
|
||||
(copy-recursively source target)
|
||||
;; Disable downloading via ExternalProject.
|
||||
(substitute* "test/unit/CMakeLists.txt.in"
|
||||
(("ExternalProject_Add\\(") "message("))
|
||||
#t)))
|
||||
(replace 'check
|
||||
(lambda _
|
||||
(with-directory-excursion "test/unit"
|
||||
(invoke "cmake" ".")
|
||||
(invoke "make")
|
||||
(invoke "./ZXingUnitTest"))
|
||||
#t)))))
|
||||
(synopsis "C++ port of ZXing")
|
||||
(description "ZXing-CPP is a barcode scanning library.")
|
||||
(home-page "https://github.com/nu-book/zxing-cpp")
|
||||
(license license:asl2.0)))
|
||||
(version "1.2.0")
|
||||
(source (origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/nu-book/zxing-cpp")
|
||||
(commit (string-append "v" version))))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32
|
||||
"1gjj9c7h634rrmmgzbc7cxjqsxdq0paj6113k02ncjm1s9abk7ik"))))
|
||||
;; Disable tests to avoid bundled dependencies.
|
||||
(arguments '(#:tests? #f
|
||||
#:configure-flags '("-DBUILD_BLACKBOX_TESTS=OFF")))
|
||||
(native-inputs '())))
|
||||
|
||||
(define-public barcode
|
||||
(package
|
||||
|
@ -97,6 +102,9 @@
|
|||
(base32
|
||||
"1indapql5fjz0bysyc88cmc54y8phqrbi7c76p71fgjp45jcyzp8"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
;; Fix build with GCC 10.
|
||||
'(#:configure-flags '("CFLAGS=-fcommon")))
|
||||
(synopsis "Convert text strings to printed bars in various standards")
|
||||
(description "GNU Barcode is a flexible tool to produce printed barcodes
|
||||
from text strings. It supports a variety of encoding standards and sizing
|
||||
|
@ -127,8 +135,8 @@ formats.")
|
|||
(with-directory-excursion "tests"
|
||||
(invoke "./test_basic.sh")))
|
||||
#t)))))
|
||||
(inputs `(("libpng" ,libpng)))
|
||||
(native-inputs `(("pkg-config" ,pkg-config)))
|
||||
(inputs (list libpng))
|
||||
(native-inputs (list pkg-config))
|
||||
(synopsis "Encode data into a QR Code symbol")
|
||||
(description "Libqrencode is a C library for encoding data in a QR Code
|
||||
symbol, a kind of 2D symbology that can be scanned by handy terminals such as
|
||||
|
@ -155,10 +163,7 @@ characters, and is highly robust.")
|
|||
;; XXX Test suite is broken: https://github.com/dmtx/libdmtx/issues/22
|
||||
`(#:tests? #f))
|
||||
(native-inputs
|
||||
`(("autoconf" ,autoconf)
|
||||
("automake" ,automake)
|
||||
("libtool" ,libtool)
|
||||
("pkg-config" ,pkg-config)))
|
||||
(list autoconf automake libtool pkg-config))
|
||||
(home-page "https://github.com/dmtx")
|
||||
(synopsis "Library for reading and writing Data Matrix 2D barcodes")
|
||||
(description "libdmtx is software for reading and writing Data Matrix 2D
|
||||
|
@ -169,16 +174,18 @@ C/C++ programs to use its capabilities without restrictions or overhead.")
|
|||
(define-public zbar
|
||||
(package
|
||||
(name "zbar")
|
||||
(version "0.23")
|
||||
(version "0.23.90")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "https://linuxtv.org/downloads/zbar/zbar-"
|
||||
version
|
||||
".tar.bz2"))
|
||||
(method git-fetch)
|
||||
(uri
|
||||
(git-reference
|
||||
(url "https://github.com/mchehab/zbar")
|
||||
(commit version)))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32
|
||||
"0bmd93a15qpgbsq9c9j33qms18rdrgz6gbc48zi6z9w5pvrvi7z9"))))
|
||||
"0rf3i7lx0fqzxsngird6l4d4dnl612nr32rm8sib699qqx67px8n"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
'(#:configure-flags (list "--with-gtk=auto"
|
||||
|
@ -187,17 +194,25 @@ C/C++ programs to use its capabilities without restrictions or overhead.")
|
|||
(assoc-ref %outputs "out")
|
||||
"/etc"))))
|
||||
(native-inputs
|
||||
`(("glib" ,glib "bin")
|
||||
("pkg-config" ,pkg-config)))
|
||||
`(("autoconf" ,autoconf)
|
||||
("automake" ,automake)
|
||||
("gettext" ,gettext-minimal)
|
||||
("glib" ,glib "bin")
|
||||
("gobject-introspection" ,gobject-introspection)
|
||||
("libtool" ,libtool)
|
||||
("pkg-config" ,pkg-config)
|
||||
("python-wrapper" ,python-wrapper)))
|
||||
(inputs
|
||||
`(("gobject-introspection" ,gobject-introspection)
|
||||
("gtk+" ,gtk+)
|
||||
`(("dbus" ,dbus)
|
||||
("imagemagick" ,imagemagick)
|
||||
("libjpeg" ,libjpeg-turbo)
|
||||
("perl" ,perl)
|
||||
("python" ,python)
|
||||
("qtbase" ,qtbase-5)
|
||||
("qtx11extras" ,qtx11extras)
|
||||
("v4l-utils" ,v4l-utils)))
|
||||
(propagated-inputs
|
||||
;; These are in 'requires' field of .pc files.
|
||||
(list glib gtk+ qtbase-5))
|
||||
(synopsis "Bar code reader")
|
||||
(description
|
||||
"ZBar can read barcodes from various sources, such as video streams,
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Andreas Enge <andreas@enge.fr>
|
||||
;;; Copyright © 2013, 2015, 2017, 2018, 2021 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
|
||||
;;; Copyright © 2016–2022 Nicolas Goaziou <mail@nicolasgoaziou.fr>
|
||||
;;; Copyright © 2014, 2018 Mark H Weaver <mhw@netris.org>
|
||||
;;; Copyright © 2016, 2018, 2019, 2021 Ricardo Wurmus <rekado@elephly.net>
|
||||
;;; Copyright © 2017, 2020 Efraim Flashner <efraim@flashner.co.il>
|
||||
;;; Copyright © 2017, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
|
||||
;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||
;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
|
||||
;;; Copyright © 2017, 2019, 2021 Eric Bavier <bavier@posteo.net>
|
||||
|
@ -12,7 +12,7 @@
|
|||
;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
|
||||
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
|
||||
;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
|
||||
;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
|
||||
;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
|
||||
;;; Copyright © 2021 Lars-Dominik Braun <ldb@leibniz-psychology.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
|
@ -42,6 +42,7 @@
|
|||
#:use-module (gnu packages ed)
|
||||
#:use-module (gnu packages flex)
|
||||
#:use-module (gnu packages fltk)
|
||||
#:use-module (gnu packages gcc)
|
||||
#:use-module (gnu packages gl)
|
||||
#:use-module (gnu packages graphviz)
|
||||
#:use-module (gnu packages image)
|
||||
|
@ -89,9 +90,7 @@
|
|||
"1545vgizpypqi2rrriad0ybqv0qwbn9zr0ibxpk00gha9ihv7acx"))))
|
||||
(build-system gnu-build-system)
|
||||
(propagated-inputs
|
||||
`(("gmp" ,gmp)
|
||||
("mpfr" ,mpfr)
|
||||
("mpc" ,mpc))) ; Header files are included by mpfrcx.h.
|
||||
(list gmp mpfr mpc)) ; Header files are included by mpfrcx.h.
|
||||
(synopsis "Arithmetic of polynomials over arbitrary precision numbers")
|
||||
(description
|
||||
"Mpfrcx is a library for the arithmetic of univariate polynomials over
|
||||
|
@ -138,10 +137,9 @@ greatest common divisor operations.")
|
|||
"0qq6b1kwb1byj8ws33ya5awq0ilkpm32037pi1l4cf2737fg9m42"))))
|
||||
(build-system gnu-build-system)
|
||||
(propagated-inputs
|
||||
`(("mpfrcx" ,mpfrcx)
|
||||
("zlib" ,zlib))) ; Header files included from cm_common.h.
|
||||
(list mpfrcx zlib)) ; Header files included from cm_common.h.
|
||||
(inputs
|
||||
`(("pari-gp" ,pari-gp)))
|
||||
(list pari-gp))
|
||||
(synopsis "CM constructions for elliptic curves")
|
||||
(description
|
||||
"The CM software implements the construction of ring class fields of
|
||||
|
@ -168,13 +166,9 @@ line applications.")
|
|||
(patches (search-patches "fplll-std-fenv.patch"))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs
|
||||
`(("autoconf" ,autoconf)
|
||||
("automake" ,automake)
|
||||
("libtool" ,libtool)
|
||||
("pkg-config" ,pkg-config)))
|
||||
(list autoconf automake libtool pkg-config))
|
||||
(propagated-inputs ; header files pulled in by fplll/defs.h
|
||||
`(("gmp" ,gmp)
|
||||
("mpfr" ,mpfr)))
|
||||
(list gmp mpfr))
|
||||
(home-page "https://github.com/fplll/fplll")
|
||||
(synopsis "Library for LLL-reduction of euclidean lattices")
|
||||
(description
|
||||
|
@ -219,16 +213,10 @@ the real span of the lattice.")
|
|||
"1a25iibihph626jl4wbs4b77xc4a2c4nfc2ypscf9wpani3dnhjf"))))
|
||||
(build-system python-build-system)
|
||||
(inputs
|
||||
`(("fplll" ,fplll)
|
||||
("gmp" ,gmp)
|
||||
("mpfr" ,mpfr)
|
||||
("pari-gp" ,pari-gp)))
|
||||
(list fplll gmp mpfr pari-gp))
|
||||
(propagated-inputs
|
||||
`(("cysignals" ,python-cysignals)
|
||||
("cython" ,python-cython)
|
||||
("flake8" ,python-flake8)
|
||||
("numpy" ,python-numpy)
|
||||
("pytest" ,python-pytest)))
|
||||
(list python-cysignals python-cython python-flake8 python-numpy
|
||||
python-pytest))
|
||||
(home-page "https://github.com/fplll/fpylll")
|
||||
(synopsis "Python interface for fplll")
|
||||
(description "fpylll is a Python wrapper for fplll.")
|
||||
|
@ -237,7 +225,7 @@ the real span of the lattice.")
|
|||
(define-public pari-gp
|
||||
(package
|
||||
(name "pari-gp")
|
||||
(version "2.13.2")
|
||||
(version "2.13.3")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append
|
||||
|
@ -245,15 +233,12 @@ the real span of the lattice.")
|
|||
version ".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"095s7vdlsxmxa0n0l1a082m6gjaypqfqkaj99z8j7dx0ji89hy8n"))))
|
||||
"1jm1cz1687cz8pl8lgvmyk3l33cms1xbayv38ca4z1f60qb7zfnc"))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs
|
||||
`(("texlive" ,(texlive-union
|
||||
(list texlive-amsfonts/patched)))))
|
||||
(inputs `(("gmp" ,gmp)
|
||||
("libx11" ,libx11)
|
||||
("perl" ,perl)
|
||||
("readline" ,readline)))
|
||||
`(("texlive" ,(texlive-updmap.cfg
|
||||
(list texlive-amsfonts)))))
|
||||
(inputs (list gmp libx11 perl readline))
|
||||
(arguments
|
||||
'(#:make-flags '("all")
|
||||
#:test-target "dobench"
|
||||
|
@ -289,8 +274,8 @@ PARI is also available as a C library to allow for faster computations.")
|
|||
(base32
|
||||
"039ip7qkwwv46wrcdrz7y12m30kazzkjr44kqbc0h137g4wzd7zf"))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs `(("perl" ,perl)))
|
||||
(inputs `(("pari-gp" ,pari-gp)))
|
||||
(native-inputs (list perl))
|
||||
(inputs (list pari-gp))
|
||||
(arguments
|
||||
'(#:configure-flags
|
||||
(list (string-append "--with-paricfg="
|
||||
|
@ -324,12 +309,12 @@ GP2C, the GP to C compiler, translates GP scripts to PARI programs.")
|
|||
"1ws2yhzxmm2l5xqqqcjcimmg40f9qq5l9i6d4i5434an9v9s8531"))))
|
||||
(build-system gnu-build-system)
|
||||
(inputs
|
||||
`(("gmp" ,gmp)
|
||||
("mpfr" ,mpfr)
|
||||
("mpc" ,mpc)
|
||||
("mpfrcx" ,mpfrcx)
|
||||
("fplll" ,fplll)
|
||||
("pari-gp" ,pari-gp)))
|
||||
(list gmp
|
||||
mpfr
|
||||
mpc
|
||||
mpfrcx
|
||||
fplll
|
||||
pari-gp))
|
||||
(synopsis "Igusa class polynomial computations")
|
||||
(description
|
||||
"The CMH software computes Igusa (genus 2) class polynomials, which
|
||||
|
@ -343,7 +328,7 @@ precision.")
|
|||
(define-public giac
|
||||
(package
|
||||
(name "giac")
|
||||
(version "1.7.0-33")
|
||||
(version "1.7.0-45")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
|
@ -355,7 +340,7 @@ precision.")
|
|||
"~parisse/debian/dists/stable/main/source/"
|
||||
"giac_" version ".tar.gz"))
|
||||
(sha256
|
||||
(base32 "0kz2q5vjynplbybn6j3qk11ww1dr72pqsm9gp9w2hb3h9gv4gk9w"))))
|
||||
(base32 "19hxbx27n5zby96d4pzhxxqn7mzk29g8sxn08fi638l17lr9x2q2"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
`(#:modules ((ice-9 ftw)
|
||||
|
@ -393,33 +378,33 @@ precision.")
|
|||
(delete-file (string-append out "/bin/xcasnew"))))))))
|
||||
(inputs
|
||||
;; TODO: Add libnauty, unbundle "libmicropython.a".
|
||||
`(("fltk" ,fltk)
|
||||
("glpk" ,glpk-4)
|
||||
("gmp" ,gmp)
|
||||
("gsl" ,gsl)
|
||||
("lapack" ,lapack)
|
||||
("libao" ,ao)
|
||||
("libjpeg" ,libjpeg-turbo)
|
||||
("libpng" ,libpng)
|
||||
("libsamplerate" ,libsamplerate)
|
||||
("libx11" ,libx11)
|
||||
("libxinerama" ,libxinerama)
|
||||
("libxft" ,libxft)
|
||||
("libxt" ,libxt)
|
||||
("mesa" ,mesa)
|
||||
("mpfi" ,mpfi)
|
||||
("mpfr" ,mpfr)
|
||||
("ntl" ,ntl)
|
||||
("perl" ,perl)
|
||||
("pari-gp" ,pari-gp)
|
||||
("tcsh" ,tcsh)))
|
||||
(list ao
|
||||
fltk
|
||||
glpk-4
|
||||
gmp
|
||||
gsl
|
||||
lapack
|
||||
libjpeg-turbo
|
||||
libpng
|
||||
libsamplerate
|
||||
libx11
|
||||
libxft
|
||||
libxinerama
|
||||
libxt
|
||||
mesa
|
||||
mpfi
|
||||
mpfr
|
||||
ntl
|
||||
pari-gp
|
||||
perl
|
||||
tcsh))
|
||||
(native-inputs
|
||||
`(("bison" ,bison)
|
||||
("flex" ,flex)
|
||||
("hevea" ,hevea)
|
||||
("python" ,python-wrapper)
|
||||
("readline" ,readline)
|
||||
("texlive" ,texlive-tiny)))
|
||||
(list bison
|
||||
flex
|
||||
hevea
|
||||
python-wrapper
|
||||
readline
|
||||
texlive-tiny))
|
||||
(home-page "https://www-fourier.ujf-grenoble.fr/~parisse/giac.html")
|
||||
(synopsis "Computer algebra system")
|
||||
(description
|
||||
|
@ -431,19 +416,18 @@ or text interfaces) or as a C++ library.")
|
|||
(define-public flint
|
||||
(package
|
||||
(name "flint")
|
||||
(version "2.6.3")
|
||||
(version "2.8.4")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "http://flintlib.org/flint-" version ".tar.gz"))
|
||||
(sha256
|
||||
(base32 "1qrf6hzbbmg7mhkhbb0bab8z2xpdnba5cj4kmmf72lzs0457a6nf"))))
|
||||
(base32 "1gp4wm2s8c27g2hh53d09cys62da1bsxfwbcsj9cd7cfikm95pv1"))))
|
||||
(build-system gnu-build-system)
|
||||
(inputs
|
||||
`(("ntl" ,ntl)))
|
||||
(list ntl))
|
||||
(propagated-inputs
|
||||
`(("gmp" ,gmp)
|
||||
("mpfr" ,mpfr))) ; header files from both are included by flint/arith.h
|
||||
(list gmp mpfr)) ; header files from both are included by flint/arith.h
|
||||
(arguments
|
||||
`(#:parallel-tests? #f ; seems to be necessary on arm
|
||||
#:phases
|
||||
|
@ -485,7 +469,7 @@ fast arithmetic.")
|
|||
(define-public arb
|
||||
(package
|
||||
(name "arb")
|
||||
(version "2.18.1")
|
||||
(version "2.21.1")
|
||||
(source (origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
|
@ -494,13 +478,12 @@ fast arithmetic.")
|
|||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32
|
||||
"15fx3dcbzgwddw9p1nysmx0dbh058afv5m8cj5pdjkcmcl7kw7z9"))))
|
||||
"1lmcl122qy6mr1g1y65bm7dk9fj0sym7gzmvar5vdgk7ln03c5iq"))))
|
||||
(build-system gnu-build-system)
|
||||
(propagated-inputs
|
||||
`(("flint" ,flint))) ; flint.h is included by arf.h
|
||||
(list flint)) ; flint.h is included by arf.h
|
||||
(inputs
|
||||
`(("gmp" ,gmp)
|
||||
("mpfr" ,mpfr)))
|
||||
(list gmp mpfr))
|
||||
(arguments
|
||||
`(#:phases
|
||||
(modify-phases %standard-phases
|
||||
|
@ -542,12 +525,11 @@ real and complex numbers, with automatic, rigorous error control.")
|
|||
(patches (search-patches "python-flint-includes.patch"))))
|
||||
(build-system python-build-system)
|
||||
(native-inputs
|
||||
`(("python-cython" ,python-cython)))
|
||||
(list python-cython))
|
||||
(propagated-inputs
|
||||
`(("python-numpy" ,python-numpy)))
|
||||
(list python-numpy))
|
||||
(inputs
|
||||
`(("arb" ,arb)
|
||||
("flint" ,flint)))
|
||||
(list arb flint))
|
||||
(synopsis "Python module wrapping ARB and FLINT")
|
||||
(description
|
||||
"Python-flint is a Python extension module wrapping FLINT
|
||||
|
@ -576,11 +558,9 @@ these types and other mathematical functions.")
|
|||
#t))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs
|
||||
`(("libtool" ,libtool)
|
||||
("perl" ,perl))) ; for configuration
|
||||
(list libtool perl)) ; for configuration
|
||||
(inputs
|
||||
`(("gmp" ,gmp)
|
||||
("gf2x" ,gf2x)))
|
||||
(list gmp gf2x))
|
||||
(arguments
|
||||
`(#:phases
|
||||
(modify-phases %standard-phases
|
||||
|
@ -609,7 +589,7 @@ matrices, and polynomials over the integers and over finite fields.")
|
|||
(define-public singular
|
||||
(package
|
||||
(name "singular")
|
||||
(version "4.1.3p2")
|
||||
(version "4.2.1")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
|
@ -618,17 +598,16 @@ matrices, and polynomials over the integers and over finite fields.")
|
|||
"Singular/SOURCES/"
|
||||
(string-join
|
||||
(string-split
|
||||
(string-trim-right version #\p
|
||||
0 (1- (string-length version)))
|
||||
(let ((index (string-index version #\p)))
|
||||
(if index (string-take version index)
|
||||
version))
|
||||
#\.) "-")
|
||||
"/singular-" version ".tar.gz"))
|
||||
(sha256 (base32
|
||||
"1524yrni7gh0hir5ckridq671q5s6avfjdsdyahj51kzdl3wcypf"))))
|
||||
"13gy1gdng8zijwlr1fn5sixw53z0zf9czzlg0vh1dcc59zw6v998"))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs
|
||||
`(("doxygen" ,doxygen)
|
||||
("graphviz" ,graphviz)
|
||||
("perl" ,perl)))
|
||||
(list doxygen graphviz perl))
|
||||
(inputs
|
||||
`(("cddlib" ,cddlib)
|
||||
("gmp" ,gmp)
|
||||
|
@ -667,7 +646,7 @@ geometry and singularity theory.")
|
|||
"0hxs24c2m3mh0nq1zz63z3sb7dhy1rilg2s1igwwcb26x3pb7xqc"))))
|
||||
(build-system gnu-build-system)
|
||||
(inputs
|
||||
`(("gmp" ,gmp)))
|
||||
(list gmp))
|
||||
(arguments
|
||||
`(#:configure-flags '("--enable-shared"
|
||||
;; Disable specific assembly routines, which depend
|
||||
|
@ -697,17 +676,15 @@ binary.")
|
|||
(patches (search-patches "bc-fix-cross-compilation.patch"))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs
|
||||
`(("automake" ,automake)
|
||||
("autoconf" ,autoconf)
|
||||
("ed" ,ed)
|
||||
("flex" ,flex)
|
||||
("texinfo" ,texinfo)))
|
||||
(list automake autoconf ed flex texinfo))
|
||||
(inputs
|
||||
(list readline))
|
||||
(arguments
|
||||
'(#:configure-flags
|
||||
(list "--with-readline")
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'unpack 'autogen
|
||||
(replace 'bootstrap
|
||||
(lambda _
|
||||
(invoke "autoreconf" "-vif"))))))
|
||||
(home-page "https://www.gnu.org/software/bc/")
|
||||
|
@ -781,7 +758,7 @@ a C program.")
|
|||
;; available on the user's machine when that package is built on a
|
||||
;; different machine.
|
||||
"ax_cv_c_flags__mtune_native=no")))
|
||||
(native-inputs `(("perl" ,perl)))
|
||||
(native-inputs (list perl))
|
||||
(home-page "http://fftw.org")
|
||||
(synopsis "Computing the discrete Fourier transform")
|
||||
(description
|
||||
|
@ -852,8 +829,7 @@ cosine/ sine transforms or DCT/DST).")
|
|||
"**/SparseVectorTest.java"
|
||||
"**/DenseVectorTest.java")))
|
||||
(native-inputs
|
||||
`(("java-junit" ,java-junit)
|
||||
("java-hamcrest-core" ,java-hamcrest-core)))
|
||||
(list java-junit 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
|
||||
|
@ -890,7 +866,7 @@ the la4j library are:
|
|||
#:tests? #f ; tests are not included in the release archive
|
||||
#:jdk ,icedtea-8))
|
||||
(propagated-inputs
|
||||
`(("java-commons-math3" ,java-commons-math3)))
|
||||
(list 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
|
||||
|
@ -915,8 +891,7 @@ that can store up to 263 elements.")
|
|||
#: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)))
|
||||
(list java-commons-math3 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
|
||||
|
@ -940,7 +915,7 @@ Sine Transform} (DST) and @dfn{Discrete Hartley Transform} (DHT).")
|
|||
"00bch77a6qgnw6vzsjn2a42n8n683ih3xm0wpr454jxa15hw78vf"))))
|
||||
(build-system cmake-build-system)
|
||||
(native-inputs
|
||||
`(("perl" ,perl))) ; for pod2man
|
||||
(list perl)) ; for pod2man
|
||||
(home-page "https://jugit.fz-juelich.de/mlz/lmfit")
|
||||
(synopsis "Levenberg-Marquardt minimization and least-squares fitting")
|
||||
(description "lmfit is a C library for Levenberg-Marquardt least-squares
|
||||
|
@ -973,10 +948,7 @@ algorithms from the FORTRAN library MINPACK.")
|
|||
"-DWITH_SYMENGINE_THREAD_SAFE=on"
|
||||
"-DBUILD_SHARED_LIBS=on"))) ;also build libsymengine
|
||||
(inputs
|
||||
`(("flint" ,flint)
|
||||
("gmp" ,gmp)
|
||||
("mpc" ,mpc)
|
||||
("mpfr" ,mpfr)))
|
||||
(list flint gmp mpc mpfr))
|
||||
(home-page "https://github.com/symengine/symengine")
|
||||
(synopsis "Fast symbolic manipulation library")
|
||||
(description
|
||||
|
@ -985,6 +957,35 @@ Optional thin wrappers allow usage of the library from other languages.")
|
|||
(license (list license:expat ;SymEngine
|
||||
license:bsd-3)))) ;3rd party code
|
||||
|
||||
(define-public ginac
|
||||
(package
|
||||
(name "ginac")
|
||||
(version "1.8.1")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "https://www.ginac.de/ginac-"
|
||||
version ".tar.bz2"))
|
||||
(sha256
|
||||
(base32 "1az1ypfcny4jdz0mic1kywwa9nynr547cl5s7zpn2w0qdfymssgi"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
`(#:configure-flags (list "--disable-static")))
|
||||
(native-inputs
|
||||
`(("bison" ,bison)
|
||||
("flex" ,flex)
|
||||
("pkg-config" ,pkg-config)
|
||||
("python" ,python-wrapper))) ; Python is required
|
||||
(inputs
|
||||
(list cln readline))
|
||||
(home-page "https://www.ginac.de/")
|
||||
(synopsis "Library for symbolic computation")
|
||||
(description "GiNaC is a C++ library for symbolic computation. Contrary
|
||||
to other CAS it does not try to provide extensive algebraic capabilities and a
|
||||
simple programming language but instead accepts a given language (C++) and
|
||||
extends it by a set of algebraic capabilities.")
|
||||
(license license:gpl2+)))
|
||||
|
||||
(define-public eigen
|
||||
(package
|
||||
(name "eigen")
|
||||
|
@ -1043,6 +1044,44 @@ features, and more.")
|
|||
;; See 'COPYING.README' for details.
|
||||
(license license:mpl2.0)))
|
||||
|
||||
(define-public eigen-benchmarks
|
||||
(package
|
||||
(inherit eigen)
|
||||
(name "eigen-benchmarks")
|
||||
(arguments
|
||||
'(#:phases (modify-phases %standard-phases
|
||||
(delete 'configure)
|
||||
(replace 'build
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(bin (string-append out "/bin")))
|
||||
(define (compile file)
|
||||
(format #t "compiling '~a'...~%" file)
|
||||
(let ((target
|
||||
(string-append bin "/"
|
||||
(basename file ".cpp"))))
|
||||
(invoke "c++" "-o" target file
|
||||
"-I" ".." "-O2" "-g"
|
||||
"-lopenblas" "-Wl,--as-needed")))
|
||||
|
||||
(mkdir-p bin)
|
||||
(with-directory-excursion "bench"
|
||||
;; There are more benchmarks, of varying quality.
|
||||
;; Here we pick some that appear to be useful.
|
||||
(for-each compile
|
||||
'("benchBlasGemm.cpp"
|
||||
"benchCholesky.cpp"
|
||||
;;"benchEigenSolver.cpp"
|
||||
"benchFFT.cpp"
|
||||
"benchmark-blocking-sizes.cpp"))))))
|
||||
(delete 'install))))
|
||||
(inputs (list boost openblas))
|
||||
|
||||
;; Mark as tunable to take advantage of SIMD code in Eigen.
|
||||
(properties '((tunable? . #t)))
|
||||
|
||||
(synopsis "Micro-benchmarks of the Eigen linear algebra library")))
|
||||
|
||||
(define-public eigen-for-tensorflow
|
||||
(let ((changeset "fd6845384b86")
|
||||
(revision "1"))
|
||||
|
@ -1066,8 +1105,9 @@ features, and more.")
|
|||
'(begin
|
||||
(substitute* "unsupported/CMakeLists.txt"
|
||||
(("add_subdirectory\\(test.*")
|
||||
"# Do not build the tests for unsupported features.\n"))
|
||||
#t)))))))
|
||||
"# Do not build the tests for unsupported features.\n"))))))
|
||||
(native-inputs
|
||||
(list gcc-7)))))
|
||||
|
||||
(define-public eigen-for-tensorflow-lite
|
||||
;; This commit was taken from
|
||||
|
@ -1111,8 +1151,7 @@ features, and more.")
|
|||
(file-name (git-file-name name version))))
|
||||
(build-system cmake-build-system)
|
||||
(native-inputs
|
||||
`(("googletest" ,googletest)
|
||||
("xtl" ,xtl)))
|
||||
(list googletest xtl))
|
||||
(arguments
|
||||
`(#:configure-flags
|
||||
'("-DBUILD_TESTS=ON")
|
||||
|
@ -1130,6 +1169,45 @@ xtensor provides:
|
|||
@end itemize")
|
||||
(license license:bsd-3)))
|
||||
|
||||
(define-public xtensor-benchmark
|
||||
(package
|
||||
(inherit xtensor)
|
||||
(name "xtensor-benchmark")
|
||||
(arguments
|
||||
`(#:configure-flags (list "-DBUILD_BENCHMARK=ON"
|
||||
"-DDOWNLOAD_GBENCHMARK=OFF")
|
||||
#:tests? #f
|
||||
#:phases (modify-phases %standard-phases
|
||||
(add-after 'unpack 'remove-march=native
|
||||
(lambda _
|
||||
(substitute* "benchmark/CMakeLists.txt"
|
||||
(("-march=native") ""))))
|
||||
(add-after 'unpack 'link-with-googlebenchmark
|
||||
(lambda _
|
||||
(substitute* "benchmark/CMakeLists.txt"
|
||||
(("find_package\\(benchmark.*" all)
|
||||
(string-append
|
||||
all "\n"
|
||||
"set(GBENCHMARK_LIBRARIES benchmark)\n")))))
|
||||
(replace 'build
|
||||
(lambda _
|
||||
(invoke "make" "benchmark_xtensor" "-j"
|
||||
(number->string (parallel-job-count)))))
|
||||
(replace 'install
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
;; Install nothing but the executable.
|
||||
(let ((out (assoc-ref outputs "out")))
|
||||
(install-file "benchmark/benchmark_xtensor"
|
||||
(string-append out "/bin"))))))))
|
||||
(synopsis "Benchmarks of the xtensor library")
|
||||
(native-inputs '())
|
||||
(inputs
|
||||
(modify-inputs (package-native-inputs xtensor)
|
||||
(prepend googlebenchmark xsimd)))
|
||||
|
||||
;; Mark as tunable to take advantage of SIMD code in xsimd/xtensor.
|
||||
(properties '((tunable? . #t)))))
|
||||
|
||||
(define-public gap
|
||||
(package
|
||||
(name "gap")
|
||||
|
@ -1193,9 +1271,7 @@ xtensor provides:
|
|||
#t))))
|
||||
(build-system gnu-build-system)
|
||||
(inputs
|
||||
`(("gmp" ,gmp)
|
||||
("readline" ,readline)
|
||||
("zlib" ,zlib)))
|
||||
(list gmp readline zlib))
|
||||
(arguments
|
||||
`(#:modules ((ice-9 ftw)
|
||||
(srfi srfi-26)
|
||||
|
@ -1282,9 +1358,7 @@ objects.")
|
|||
"0q1wdiwqj6fsbifaayb1zkp20bz8a1my81sqjsail577jmzwi07w"))))
|
||||
(build-system gnu-build-system)
|
||||
(inputs
|
||||
`(("boost" ,boost)
|
||||
("gmp" ,gmp)
|
||||
("mpfr" ,mpfr)))
|
||||
(list boost gmp mpfr))
|
||||
(arguments
|
||||
`(#:phases
|
||||
(modify-phases %standard-phases
|
||||
|
@ -1325,11 +1399,9 @@ for the Coq proof assistant.")
|
|||
"11wz57q6ijsvfs5r82masxgr319as92syi78lnl9lgdblpc6xigk"))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs
|
||||
`(("autoconf" ,autoconf)
|
||||
("automake" ,automake)
|
||||
("libtool" ,libtool)))
|
||||
(list autoconf automake libtool))
|
||||
(propagated-inputs
|
||||
`(("gmp" ,gmp))) ; gmp++.h includes gmpxx.h
|
||||
(list gmp)) ; gmp++.h includes gmpxx.h
|
||||
(synopsis "Algebraic computations with exact rings and fields")
|
||||
(description
|
||||
"Givaro is a C++ library implementing the basic arithmetic of various
|
||||
|
@ -1356,14 +1428,11 @@ compound objects, such as vectors, matrices and univariate polynomials.")
|
|||
"1ynbjd72qrwp0b4kpn0p5d7gddpvj8dlb5fwdxajr5pvkvi3if74"))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs
|
||||
`(("autoconf" ,autoconf)
|
||||
("automake" ,automake)
|
||||
("libtool" ,libtool)
|
||||
("pkg-config" ,pkg-config)))
|
||||
(list autoconf automake libtool pkg-config))
|
||||
(inputs
|
||||
`(("openblas" ,openblas)))
|
||||
(list openblas))
|
||||
(propagated-inputs
|
||||
`(("givaro" ,givaro))) ; required according to the .pc file
|
||||
(list givaro)) ; required according to the .pc file
|
||||
(arguments
|
||||
`(#:configure-flags
|
||||
(list (string-append "--with-blas-libs="
|
||||
|
@ -1399,12 +1468,9 @@ algebra, such as the row echelon form.")
|
|||
(patches (search-patches "linbox-fix-pkgconfig.patch"))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs
|
||||
`(("autoconf" ,autoconf)
|
||||
("automake" ,automake)
|
||||
("libtool" ,libtool)
|
||||
("pkg-config" ,pkg-config)))
|
||||
(list autoconf automake libtool pkg-config))
|
||||
(propagated-inputs
|
||||
`(("fflas-ffpack" ,fflas-ffpack)))
|
||||
(list fflas-ffpack))
|
||||
(synopsis "C++ library for linear algebra over exact rings")
|
||||
(description
|
||||
"LinBox is a C++ template library for exact linear algebra computation
|
||||
|
@ -1428,12 +1494,9 @@ finite fields.")
|
|||
"0xfg6pffbn8r1s0y7bn9b8i55l00d41dkmhrpf7pwk53qa3achd3"))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs
|
||||
`(("autoconf" ,autoconf)
|
||||
("automake" ,automake)
|
||||
("libtool" ,libtool)
|
||||
("pkg-config" ,pkg-config)))
|
||||
(list autoconf automake libtool pkg-config))
|
||||
(inputs
|
||||
`(("libpng" ,libpng)))
|
||||
(list libpng))
|
||||
(synopsis "Arithmetic of dense matrices over F_2")
|
||||
(description "M4RI is a library for fast arithmetic with dense matrices
|
||||
over F2. The name M4RI comes from the first implemented algorithm: The
|
||||
|
@ -1518,11 +1581,9 @@ polynomials, and the representation theory of Hecke algebras of type A_n.")
|
|||
"0r8lv46qx5mkz5kp3ay2jnsp0mbhlqr5z2z220wdk73wdshcznss"))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs
|
||||
`(("autoconf" ,autoconf)
|
||||
("automake" ,automake)
|
||||
("libtool" ,libtool)))
|
||||
(list autoconf automake libtool))
|
||||
(inputs
|
||||
`(("m4ri" ,m4ri)))
|
||||
(list m4ri))
|
||||
(synopsis "Arithmetic of dense matrices over F_{2^e}")
|
||||
(description "M4RI is a library for fast arithmetic with dense matrices
|
||||
over finite fields of characteristic 2. So it extends the functionality
|
||||
|
@ -1545,12 +1606,9 @@ of M4RI from F_2 to F_{2^e}.")
|
|||
"1gw27lqc3f525n8qdcmr2nyn16y9g10z9f6dnmckyyxcdzvhq35n"))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs
|
||||
`(("autoconf" ,autoconf)
|
||||
("automake" ,automake)
|
||||
("libtool" ,libtool)))
|
||||
(list autoconf automake libtool))
|
||||
(inputs
|
||||
`(("ntl" ,ntl)
|
||||
("pari-gp" ,pari-gp)))
|
||||
(list ntl pari-gp))
|
||||
(synopsis "Ranks of elliptic curves and modular symbols")
|
||||
(description "The eclib package includes mwrank (for 2-descent on
|
||||
elliptic curves over Q) and modular symbol code; it has been written by
|
||||
|
@ -1575,9 +1633,7 @@ John Cremona to compute his elliptic curve database.")
|
|||
(patches (search-patches "lrcalc-includes.patch"))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs
|
||||
`(("autoconf" ,autoconf)
|
||||
("automake" ,automake)
|
||||
("libtool" ,libtool)))
|
||||
(list autoconf automake libtool))
|
||||
(arguments
|
||||
`(#:phases
|
||||
(modify-phases %standard-phases
|
||||
|
@ -1687,12 +1743,12 @@ no more than about 20 bits long).")
|
|||
"11290ivi9h665cxi8f1shlavhy10vzb8s28m57hrcgnxyxqmhx0m"))))
|
||||
(build-system gnu-build-system)
|
||||
(inputs
|
||||
`(("fplll" ,fplll)
|
||||
("gmp" ,gmp)
|
||||
("gnuplot" ,gnuplot)
|
||||
("libxml2" ,libxml2)
|
||||
("mpfi" ,mpfi)
|
||||
("mpfr" ,mpfr)))
|
||||
(list fplll
|
||||
gmp
|
||||
gnuplot
|
||||
libxml2
|
||||
mpfi
|
||||
mpfr))
|
||||
(arguments
|
||||
`(#:configure-flags
|
||||
(list (string-append "--docdir=${datadir}/doc/sollya-" ,version))
|
||||
|
|
|
@ -4,12 +4,14 @@
|
|||
;;; Copyright © 2016, 2020 Marius Bakke <mbakke@fastmail.com>
|
||||
;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
|
||||
;;; Copyright © 2017 Hartmut Goebel <h.goebel@crazy-compilers.com>
|
||||
;;; Copyright © 2017, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
||||
;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||
;;; Copyright © 2017, 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
||||
;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||
;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
|
||||
;;; Copyright © 2019, 2020 Andreas Enge <andreas@enge.fr>
|
||||
;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
|
||||
;;; Copyright © 2020 Sergey Trofimov <sarg@sarg.org.ru>
|
||||
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
|
||||
;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -29,6 +31,7 @@
|
|||
(define-module (gnu packages android)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (guix download)
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (guix git-download)
|
||||
#:use-module (guix build-system android-ndk)
|
||||
#:use-module (guix build-system gnu)
|
||||
|
@ -43,6 +46,7 @@
|
|||
#:use-module (gnu packages gcc)
|
||||
#:use-module (gnu packages gnupg)
|
||||
#:use-module (gnu packages golang)
|
||||
#:use-module (gnu packages image)
|
||||
#:use-module (gnu packages java)
|
||||
#:use-module (gnu packages linux)
|
||||
#:use-module (gnu packages pcre)
|
||||
|
@ -52,7 +56,9 @@
|
|||
#:use-module (gnu packages python-xyz)
|
||||
#:use-module (gnu packages selinux)
|
||||
#:use-module (gnu packages serialization)
|
||||
#:use-module (gnu packages sphinx)
|
||||
#:use-module (gnu packages ssh)
|
||||
#:use-module (gnu packages time)
|
||||
#:use-module (gnu packages tls)
|
||||
#:use-module (gnu packages version-control)
|
||||
#:use-module (gnu packages virtualization)
|
||||
|
@ -188,6 +194,28 @@ use their packages mostly unmodified in our Android NDK build system.")
|
|||
(base32
|
||||
checksum))))
|
||||
|
||||
(define (android-platform-development version)
|
||||
(origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://android.googlesource.com/platform/development")
|
||||
(commit (string-append "android-" version))))
|
||||
(file-name (string-append "android-platform-development-"
|
||||
version "-checkout"))
|
||||
(sha256
|
||||
(base32 "0s92961yycg8wsga40i7fvbfmf1a5i6j2gk64j2jiy7s0hfd4rc3"))))
|
||||
|
||||
(define (android-platform-frameworks-native version)
|
||||
(origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://android.googlesource.com/platform/frameworks/native")
|
||||
(commit (string-append "android-" version))))
|
||||
(file-name (string-append "android-platform-frameworks-native-"
|
||||
version "-checkout"))
|
||||
(sha256
|
||||
(base32 "00dgx27wma7wzivniy8zyw2443fi2xx8gyxii081m0fwamqd3jrm"))))
|
||||
|
||||
(define-public android-liblog
|
||||
(package
|
||||
(name "android-liblog")
|
||||
|
@ -215,7 +243,7 @@ use their packages mostly unmodified in our Android NDK build system.")
|
|||
"../include/android" (string-append out "/include/android")))
|
||||
#t)))))
|
||||
(home-page "https://developer.android.com/")
|
||||
(synopsis "Logging library from the Android platform.")
|
||||
(synopsis "Logging library from the Android platform")
|
||||
(description "@code{liblog} represents an interface to the volatile Android
|
||||
Logging system for NDK (Native) applications and libraries and contain
|
||||
interfaces for either writing or reading logs. The log buffers are divided up
|
||||
|
@ -309,7 +337,7 @@ various Android core host applications.")
|
|||
(add-after 'unpack 'enter-source
|
||||
(lambda _ (chdir "libsparse") #t)))))
|
||||
(inputs
|
||||
`(("zlib" ,zlib)))
|
||||
(list zlib))
|
||||
(home-page "https://developer.android.com/")
|
||||
(synopsis "Android platform sparse library")
|
||||
(description "@code{android-libsparse} is a library in common use by the
|
||||
|
@ -340,11 +368,9 @@ various Android core host applications.")
|
|||
(string-append out "/include/ziparchive"))
|
||||
#t))))))
|
||||
(inputs
|
||||
`(("zlib" ,zlib)))
|
||||
(list zlib))
|
||||
(native-inputs
|
||||
`(("android-libbase" ,android-libbase)
|
||||
("android-libutils" ,android-libutils)
|
||||
("android-liblog" ,android-liblog)))
|
||||
(list android-libbase android-libutils 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
|
||||
|
@ -360,10 +386,12 @@ various Android core host applications.")
|
|||
(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 ."))
|
||||
,#~(list
|
||||
"CFLAGS=-Wno-error"
|
||||
"CXXFLAGS=-fpermissive -Wno-error -std=gnu++14 -D_Nonnull= -D_Nullable= -I ."
|
||||
(string-append
|
||||
"LDFLAGS=-Wl,-rpath=" #$output "/lib "
|
||||
"-Wl,-rpath=" #$(this-package-input "openssl") "/lib -L ."))
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'unpack 'enter-source
|
||||
|
@ -385,10 +413,7 @@ various Android core host applications.")
|
|||
(install-file "diagnose_usb.h" (string-append (assoc-ref outputs "out") "/include"))
|
||||
#t)))))
|
||||
(inputs
|
||||
`(("android-libbase" ,android-libbase)
|
||||
("android-libcutils" ,android-libcutils)
|
||||
("android-liblog" ,android-liblog)
|
||||
("openssl" ,openssl)))
|
||||
(list android-libbase android-libcutils android-liblog openssl))
|
||||
(home-page "https://developer.android.com/studio/command-line/adb.html")
|
||||
(synopsis "Android Debug Bridge")
|
||||
(description
|
||||
|
@ -507,11 +532,11 @@ that is safe to use for user space. It also includes
|
|||
(("#ifdef HOST") "#ifdef XXX"))
|
||||
#t)))))
|
||||
(inputs
|
||||
`(("openssl" ,openssl)))
|
||||
(list openssl))
|
||||
(native-inputs
|
||||
`(("android-bionic-uapi" ,android-bionic-uapi)
|
||||
;; pcre is inlined by our package.
|
||||
("pcre" ,pcre)))
|
||||
(list android-bionic-uapi
|
||||
;; pcre is inlined by our package.
|
||||
pcre))
|
||||
(home-page "https://developer.android.com/")
|
||||
(synopsis "Android version of the SELinux libraries and utilities")
|
||||
(description
|
||||
|
@ -530,29 +555,25 @@ the core SELinux management utilities.")
|
|||
(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")))
|
||||
,#~(list
|
||||
(string-append
|
||||
"CPPFLAGS="
|
||||
;"-Wno-error "
|
||||
"-I " #$(this-package-input "android-libselinux") "/include "
|
||||
"-I " #$(this-package-input "android-libsparse") "/include "
|
||||
"-I " #$(this-package-input "android-libcutils") "/include "
|
||||
"-I " #$(this-package-input "android-liblog") "/include "
|
||||
"-I ../core/include")
|
||||
"CFLAGS=-Wno-error"
|
||||
"install-libext4_utils_host.a"
|
||||
(string-append "prefix=" #$output))
|
||||
#: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))
|
||||
(copy-recursively (assoc-ref inputs "android-core")
|
||||
"core")))
|
||||
(add-after 'unpack-core 'enter-source
|
||||
(lambda _ (chdir "ext4_utils") #t))
|
||||
(replace 'install
|
||||
|
@ -561,11 +582,8 @@ the core SELinux management utilities.")
|
|||
(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)))
|
||||
(list android-libcutils android-liblog android-libselinux
|
||||
android-libsparse zlib))
|
||||
(native-inputs
|
||||
`(("android-core" ,(android-platform-system-core version))))
|
||||
(home-page "https://developer.android.com/")
|
||||
|
@ -585,6 +603,9 @@ Android core.")
|
|||
(modify-phases %standard-phases
|
||||
(add-after 'unpack 'enter-source
|
||||
(lambda _ (chdir "f2fs_utils") #t))
|
||||
(add-before 'build 'set-compilation-flags
|
||||
(lambda _
|
||||
(setenv "CFLAGS" "-fcommon")))
|
||||
(add-after 'install 'install-headers
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
(copy-recursively "." (string-append (assoc-ref outputs "out")
|
||||
|
@ -600,11 +621,8 @@ Android core.")
|
|||
(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)))
|
||||
(list f2fs-tools-1.7 android-libselinux android-libsparse
|
||||
android-libcutils zlib))
|
||||
(home-page "https://developer.android.com/")
|
||||
(synopsis "Android f2fs utils")
|
||||
(description "@code{android-f2fs-utils} is a library in common use by the
|
||||
|
@ -641,8 +659,7 @@ file system.")
|
|||
(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)))
|
||||
(list android-safe-iop android-libcutils))
|
||||
(native-inputs
|
||||
`(("android-bionic-uapi" ,android-bionic-uapi)
|
||||
("android-liblog" ,android-liblog)
|
||||
|
@ -668,7 +685,8 @@ file system.")
|
|||
(add-after 'enter-source 'patch-source
|
||||
(lambda _
|
||||
(substitute* "Android.mk"
|
||||
(("libext4_utils_host") "libext4_utils_host libselinux libpcre"))
|
||||
(("libext4_utils_host") "libext4_utils_host libselinux libpcre")
|
||||
(("\\$\\(shell git .*\\)") ,version))
|
||||
#t))
|
||||
(replace 'install
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
|
@ -678,22 +696,22 @@ file system.")
|
|||
(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)))
|
||||
(list adb
|
||||
android-safe-iop
|
||||
android-ext4-utils
|
||||
android-f2fs-utils
|
||||
android-libbase
|
||||
android-libcutils
|
||||
android-liblog
|
||||
android-libutils
|
||||
android-libsparse
|
||||
android-libziparchive
|
||||
android-libselinux
|
||||
pcre
|
||||
mkbootimg
|
||||
zlib))
|
||||
(native-inputs
|
||||
`(("xz" ,xz)))
|
||||
(list xz))
|
||||
(home-page "https://developer.android.com/studio/command-line/")
|
||||
(synopsis "Android image flasher")
|
||||
(description
|
||||
|
@ -703,7 +721,7 @@ file system.")
|
|||
(define-public android-udev-rules
|
||||
(package
|
||||
(name "android-udev-rules")
|
||||
(version "20200613")
|
||||
(version "20210501")
|
||||
(source
|
||||
(origin
|
||||
(method git-fetch)
|
||||
|
@ -712,7 +730,7 @@ file system.")
|
|||
(commit version)))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32 "0cf5br8x6iwxc1cifv0i1klw7skgs8hghdx6qlqby68kyqg81bb2"))))
|
||||
(base32 "0pl1wfd7k9vz8mvy2jb2icc5f11c5p07aixpyhjs6gi5cyaywm5f"))))
|
||||
(build-system trivial-build-system)
|
||||
(native-inputs `(("source" ,source)))
|
||||
(arguments
|
||||
|
@ -722,8 +740,7 @@ file system.")
|
|||
(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))))
|
||||
(string-append %output "/lib/udev/rules.d"))))))
|
||||
(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
|
||||
|
@ -737,6 +754,132 @@ it.
|
|||
to be passed to the @code{udev} service.")
|
||||
(license license:gpl3+)))
|
||||
|
||||
(define-public android-platform-frameworks-native-headers
|
||||
(package
|
||||
(name "android-platform-frameworks-native-headers")
|
||||
(version (android-platform-version))
|
||||
(source (android-platform-frameworks-native version))
|
||||
(build-system trivial-build-system)
|
||||
(arguments
|
||||
`(#:modules ((guix build utils))
|
||||
#:builder
|
||||
(begin
|
||||
(use-modules (guix build utils))
|
||||
(let ((source (assoc-ref %build-inputs "source"))
|
||||
(include (string-append %output "/include/android")))
|
||||
(mkdir-p include)
|
||||
(copy-recursively (string-append source "/include/android")
|
||||
(string-append include)) ; "/android"))
|
||||
))))
|
||||
(home-page "https://android.googlesource.com/platform/frameworks/native/")
|
||||
(synopsis "Headers for Android development from
|
||||
android-platform-frameworks-native")
|
||||
(description "This package contains headers used for developing software
|
||||
for Android. More precicely the headers from include/android in
|
||||
platform/frameworks/native.")
|
||||
(license license:asl2.0)))
|
||||
|
||||
(define-public libetc1
|
||||
(package
|
||||
(name "libetc1")
|
||||
(version (android-platform-version))
|
||||
(source (android-platform-frameworks-native version))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
`(#:tests? #f ; no tests
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'unpack 'create-Makefile
|
||||
(lambda _
|
||||
;; No useful makefile is shipped, so we create one.
|
||||
(with-output-to-file "Makefile"
|
||||
(lambda _
|
||||
(display
|
||||
(string-append
|
||||
"NAME = libETC1\n"
|
||||
"SOURCES = opengl/libs/ETC1/etc1.cpp\n"
|
||||
"CXXFLAGS += -fPIC\n"
|
||||
"CPPFLAGS += -Iopengl/include\n"
|
||||
"LDFLAGS += -shared -Wl,-soname,$(NAME).so.0\n"
|
||||
"$(NAME).so.0: $(SOURCES)\n"
|
||||
" $(CXX) $^ -o $@ $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS)\n"
|
||||
"build: $(NAME).so.0"))
|
||||
#t))))
|
||||
(add-after 'unpack 'remove-unused-stuff-to-reduce-warnings
|
||||
(lambda _
|
||||
(delete-file-recursively "opengl/libs/tools")))
|
||||
(delete 'configure)
|
||||
(replace 'install
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(lib (string-append out "/lib"))
|
||||
(include (string-append out "/include")))
|
||||
(install-file "libETC1.so.0" lib)
|
||||
(with-directory-excursion lib
|
||||
(symlink "libETC1.so.0" "libETC1.so"))
|
||||
(copy-recursively "opengl/include/ETC1"
|
||||
(string-append include "/ETC1"))))))))
|
||||
(home-page "https://android.googlesource.com/platform/frameworks/native/")
|
||||
(synopsis "ETC1 compression library")
|
||||
(description "Ericsson Texture Compression (ETC) is a lossy texture
|
||||
compression technique developed in collaboration with Ericsson Research in
|
||||
early 2005. libETC1 provides the encoding and decoding of ETC1 compression
|
||||
algorithm.")
|
||||
(license license:asl2.0)))
|
||||
|
||||
(define-public etc1tool
|
||||
(package
|
||||
(name "etc1tool")
|
||||
(version (android-platform-version))
|
||||
(source (android-platform-development version))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
`(#:tests? #f
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'unpack 'create-Makefile
|
||||
(lambda _
|
||||
;; No useful makefile is shipped, so we create one.
|
||||
(with-output-to-file "Makefile"
|
||||
(lambda _
|
||||
(display
|
||||
(string-append
|
||||
"NAME = etc1tool\n"
|
||||
"SOURCES = tools/etc1tool/etc1tool.cpp\n"
|
||||
"CPPFLAGS += -Iinclude\n"
|
||||
"LDFLAGS += -lpng -lETC1\n"
|
||||
"$(NAME): $(SOURCES)\n"
|
||||
" $(CXX) $^ -o $@ $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS)\n"
|
||||
"build: $(NAME)"))
|
||||
#t))))
|
||||
(add-before 'build 'fix-typos-in-help
|
||||
(lambda _
|
||||
(substitute* "tools/etc1tool/etc1tool.cpp"
|
||||
((" apropriate ") " appropriate "))
|
||||
#t))
|
||||
;; TODO: Add man-page from Debian
|
||||
(delete 'configure)
|
||||
(replace 'install
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(bin (string-append out "/bin")))
|
||||
(install-file "etc1tool" bin)))))))
|
||||
(inputs
|
||||
`(("libetc1" ,libetc1)
|
||||
("libpng" ,libpng)))
|
||||
(home-page "https://developer.android.com/studio/command-line/etc1tool.html")
|
||||
(synopsis "Encode and decode PNG images to resp. from the ETC1 compression
|
||||
standard.")
|
||||
(description
|
||||
"@command{etc1} is a command line utility that lets you encode PNG images
|
||||
to the ETC1 compression standard and decode ETC1 compressed images back to
|
||||
PNG. This tool is part of the Android SDK for working with media files for
|
||||
game apps.
|
||||
|
||||
The standard for the ETC1 texture format can be found at
|
||||
@uref{http://www.khronos.org/registry/gles/extensions/OES/OES_compressed_ETC1_RGB8_texture.txt}.")
|
||||
(license license:asl2.0)))
|
||||
|
||||
(define-public git-repo
|
||||
(package
|
||||
(name "git-repo")
|
||||
|
@ -828,7 +971,7 @@ to be passed to the @code{udev} service.")
|
|||
(native-inputs
|
||||
`(("pytest" ,python-pytest)))
|
||||
(home-page "https://code.google.com/p/git-repo/")
|
||||
(synopsis "Helps to manage many Git repositories.")
|
||||
(synopsis "Helps to manage many Git repositories")
|
||||
(description "Repo is a tool built on top of Git. Repo helps manage many
|
||||
Git repositories, does the uploads to revision control systems, and automates
|
||||
parts of the development workflow. Repo is not meant to replace Git, only to
|
||||
|
@ -894,21 +1037,18 @@ safest way, on a file image.")
|
|||
(invoke "nosetests" "--with-coverage" "--with-timer"
|
||||
"--timer-top-n" "50"))))))
|
||||
(native-inputs
|
||||
`(("python-codecov" ,python-codecov)
|
||||
("python-coverage" ,python-coverage)
|
||||
("python-mock" ,python-mock)
|
||||
("python-nose" ,python-nose)
|
||||
("python-nose-timer" ,python-nose-timer)))
|
||||
(list python-codecov python-coverage python-mock python-nose
|
||||
python-nose-timer))
|
||||
(propagated-inputs
|
||||
`(("python-asn1crypto" ,python-asn1crypto)
|
||||
("python-colorama" ,python-colorama)
|
||||
("python-future" ,python-future)
|
||||
("python-ipython" ,python-ipython)
|
||||
("python-lxml" ,python-lxml)
|
||||
("python-matplotlib" ,python-matplotlib)
|
||||
("python-networkx" ,python-networkx)
|
||||
("python-pygments" ,python-pygments)
|
||||
("python-pyperclip" ,python-pyperclip)))
|
||||
(list python-asn1crypto
|
||||
python-colorama
|
||||
python-future
|
||||
python-ipython
|
||||
python-lxml
|
||||
python-matplotlib
|
||||
python-networkx
|
||||
python-pygments
|
||||
python-pyperclip))
|
||||
(home-page "https://github.com/androguard/androguard")
|
||||
(synopsis "Python tool to play with Android files")
|
||||
(description
|
||||
|
@ -916,17 +1056,84 @@ safest way, on a file image.")
|
|||
useful for reverse engineering, analysis of Android applications and more.")
|
||||
(license license:asl2.0)))
|
||||
|
||||
(define-public python-android-backup
|
||||
(package
|
||||
(name "python-android-backup")
|
||||
(version "0.2.0")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (pypi-uri "android_backup" version))
|
||||
(sha256
|
||||
(base32
|
||||
"15wb2lyjj2fpf7bhvmgpqn0mglsjj11zfvbjycx7mnidisgnljw6"))))
|
||||
(build-system python-build-system)
|
||||
(propagated-inputs (list python-pycrypto))
|
||||
(home-page "https://github.com/bluec0re/android-backup-tools")
|
||||
(synopsis "Unpack and repack android backups")
|
||||
(description "This package allows you to unpack and repack Android
|
||||
backups. It supports encrypted archives.")
|
||||
(license license:asl2.0)))
|
||||
|
||||
(define-public python-miio
|
||||
(package
|
||||
(name "python-miio")
|
||||
(version "0.5.8")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (pypi-uri "python-miio" version))
|
||||
(sha256
|
||||
(base32
|
||||
"0a4f5ybjvibawwxcjm3r9nnrzf1yff6wwgy05yzyk0bb3rmc99fp"))))
|
||||
(build-system python-build-system)
|
||||
(arguments
|
||||
`(#:phases
|
||||
(modify-phases %standard-phases
|
||||
(replace 'check
|
||||
(lambda* (#:key inputs outputs tests? #:allow-other-keys)
|
||||
(when tests?
|
||||
(add-installed-pythonpath inputs outputs)
|
||||
(invoke "pytest" "miio")))))))
|
||||
(native-inputs
|
||||
(list python-pytest
|
||||
python-pytest-mock
|
||||
python-sphinx
|
||||
python-sphinx-click
|
||||
python-sphinx-rtd-theme
|
||||
python-sphinxcontrib-apidoc))
|
||||
(propagated-inputs
|
||||
(list python-android-backup
|
||||
python-appdirs
|
||||
python-attrs
|
||||
python-click
|
||||
python-construct
|
||||
python-croniter
|
||||
python-cryptography
|
||||
python-defusedxml
|
||||
python-importlib-metadata
|
||||
python-netifaces
|
||||
python-pytz
|
||||
python-pyyaml
|
||||
python-tqdm
|
||||
python-zeroconf))
|
||||
(home-page "https://github.com/rytilahti/python-miio")
|
||||
(synopsis "Control Xiaomi smart appliances")
|
||||
(description "This package provides library and command line interface
|
||||
for communicating with Xiaomi smart appliances over miIO and MIoT protocols.")
|
||||
(license license:gpl3+)))
|
||||
|
||||
(define-public fdroidserver
|
||||
(package
|
||||
(name "fdroidserver")
|
||||
(version "1.1.9")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (pypi-uri "fdroidserver" version))
|
||||
(sha256
|
||||
(base32
|
||||
"0m07f791z45w7r2dzx4yb6s54b3c3wykm3w9hn25p2jcyax082a2"))))
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (pypi-uri "fdroidserver" version))
|
||||
(sha256
|
||||
(base32
|
||||
"0m07f791z45w7r2dzx4yb6s54b3c3wykm3w9hn25p2jcyax082a2"))))
|
||||
(build-system python-build-system)
|
||||
(arguments
|
||||
`(#:phases
|
||||
|
@ -943,28 +1150,25 @@ useful for reverse engineering, analysis of Android applications and more.")
|
|||
(("docker-py >= 1.9, < 2.0") "docker >= 1.9"))
|
||||
#t)))))
|
||||
(propagated-inputs
|
||||
`(("python-androguard" ,python-androguard)
|
||||
("python-apache-libcloud" ,python-apache-libcloud)
|
||||
("python-clint" ,python-clint)
|
||||
("python-defusedxml" ,python-defusedxml)
|
||||
("python-docker" ,python-docker)
|
||||
("python-gitpython" ,python-gitpython)
|
||||
("python-mwclient" ,python-mwclient)
|
||||
("python-paramiko" ,python-paramiko)
|
||||
("python-pillow" ,python-pillow)
|
||||
("python-pyasn1" ,python-pyasn1)
|
||||
("python-pyasn1-modules" ,python-pyasn1-modules)
|
||||
("python-pyyaml" ,python-pyyaml)
|
||||
("python-qrcode" ,python-qrcode)
|
||||
("python-ruamel.yaml" ,python-ruamel.yaml)
|
||||
("python-requests" ,python-requests)
|
||||
("python-vagrant" ,python-vagrant)))
|
||||
(list python-androguard
|
||||
python-apache-libcloud
|
||||
python-clint
|
||||
python-defusedxml
|
||||
python-docker
|
||||
python-gitpython
|
||||
python-mwclient
|
||||
python-paramiko
|
||||
python-pillow
|
||||
python-pyasn1
|
||||
python-pyasn1-modules
|
||||
python-pyyaml
|
||||
python-qrcode
|
||||
python-ruamel.yaml
|
||||
python-requests
|
||||
python-vagrant))
|
||||
(native-inputs
|
||||
`(("python-babel" ,python-babel)
|
||||
("python-bcrypt" ,python-bcrypt)
|
||||
("python-docker-pycreds" ,python-docker-pycreds)
|
||||
("python-pynacl" ,python-pynacl)
|
||||
("python-websocket-client" ,python-websocket-client)))
|
||||
(list python-babel python-bcrypt python-docker-pycreds python-pynacl
|
||||
python-websocket-client))
|
||||
(home-page "https://f-droid.org")
|
||||
(synopsis "F-Droid server tools")
|
||||
(description
|
||||
|
@ -993,7 +1197,7 @@ main repository.")
|
|||
#:tests? #f ; TODO: Inputs missing.
|
||||
#:install-source? #f))
|
||||
(inputs
|
||||
`(("go-github-com-kr-pretty" ,go-github-com-kr-pretty)))
|
||||
(list go-github-com-kr-pretty))
|
||||
;(native-inputs
|
||||
; `(("go-github-com-rogpeppe-go-internal-testscript"
|
||||
; ,go-github-com-rogpeppe-go-internal-testscript)))
|
||||
|
@ -1026,13 +1230,6 @@ connected devices via ADB.")
|
|||
(arguments
|
||||
`(#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'unpack 'enjarify-wrapper-inherit-pythonpath
|
||||
;; enjarify sets PYTHONPATH from a shell script, overwriting
|
||||
;; PYTHONPATH set from guix. Comment out this line.
|
||||
(lambda _
|
||||
(substitute* "enjarify.sh"
|
||||
(("export PYTHONPATH") "# export PYTHONPATH"))
|
||||
#t))
|
||||
(add-before 'check 'fixup-expected-test-results
|
||||
;; Upstream adjusted this test in commit:
|
||||
;; 3ae884a6485af82d300515813f537685b08dd800
|
||||
|
@ -1053,7 +1250,7 @@ connected devices via ADB.")
|
|||
(mkdir-p (string-append out "/bin/"))
|
||||
(copy-file "enjarify.sh" (string-append out "/bin/enjarify"))
|
||||
#t))))))
|
||||
(native-inputs `(("openjdk" ,openjdk12)))
|
||||
(native-inputs (list openjdk12))
|
||||
(synopsis "Translate Dalvik bytecode to equivalent Java bytecode")
|
||||
(description "Android applications are Java programs that run on a
|
||||
customized virtual machine, which is part of the Android operating system, the
|
||||
|
|
|
@ -82,8 +82,7 @@
|
|||
"-Dlog=true"
|
||||
"-Dtest=true")))
|
||||
(native-inputs
|
||||
`(("googletest" ,googletest)
|
||||
("pkg-config" ,pkg-config)))
|
||||
(list googletest pkg-config))
|
||||
(synopsis "Lottie Animation Library")
|
||||
(description "Rlottie is a platform independent standalone c++ library for
|
||||
rendering vector based animations and art in realtime.")
|
||||
|
@ -179,11 +178,10 @@ C++ @dfn{Standard Template Library} (STL).")
|
|||
("libxml++" ,libxml++)
|
||||
("libsigc++" ,libsigc++)
|
||||
("mlt" ,mlt-6)
|
||||
("openexr" ,openexr)
|
||||
("openexr" ,openexr-2)
|
||||
("pango" ,pango)))
|
||||
(native-inputs
|
||||
`(("intltool" ,intltool)
|
||||
("pkg-config" ,pkg-config)))
|
||||
(list intltool pkg-config))
|
||||
(home-page "https://www.synfig.org")
|
||||
(synopsis "Vector-based 2D animation renderer")
|
||||
(description
|
||||
|
@ -225,13 +223,9 @@ for tweening, preventing the need to hand-draw each frame.")
|
|||
`("XDG_DATA_DIRS" ":" prefix (,gtk-share)))
|
||||
#t))))))
|
||||
(inputs
|
||||
`(("gtkmm" ,gtkmm)
|
||||
("gtk+" ,gtk+)
|
||||
("libsigc++" ,libsigc++)
|
||||
("synfig" ,synfig)))
|
||||
(list gtkmm-3 gtk+ libsigc++ synfig))
|
||||
(native-inputs
|
||||
`(("pkg-config" ,pkg-config)
|
||||
("intltool" ,intltool)))
|
||||
(list pkg-config intltool))
|
||||
(home-page "https://www.synfig.org")
|
||||
(synopsis "Vector-based 2D animation package (GUI)")
|
||||
(description
|
||||
|
@ -454,7 +448,7 @@ language.")
|
|||
("qtmultimedia" ,qtmultimedia)
|
||||
("libsndfile" ,libsndfile)))
|
||||
(native-inputs
|
||||
`(("qttools" ,qttools)))
|
||||
(list qttools))
|
||||
(home-page "https://www.lostmarble.com/papagayo/")
|
||||
(synopsis "Lip-syncing for animations")
|
||||
(description
|
||||
|
@ -480,10 +474,7 @@ waveform until they line up with the proper sounds.")
|
|||
"0b1nwiwyg01087q318vymg4si76dw41ykxbn2zwd6dqbxzbpr1dh"))))
|
||||
(build-system gnu-build-system)
|
||||
(inputs
|
||||
`(("qtbase" ,qtbase-5)
|
||||
("qtxmlpatterns" ,qtxmlpatterns)
|
||||
("qtmultimedia" ,qtmultimedia)
|
||||
("qtsvg" ,qtsvg)))
|
||||
(list qtbase-5 qtxmlpatterns qtmultimedia qtsvg))
|
||||
(arguments
|
||||
`(#:phases
|
||||
(modify-phases %standard-phases
|
||||
|
|
|
@ -66,11 +66,11 @@
|
|||
"clamav-config-llvm-libs.patch"))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs
|
||||
`(("autoconf" ,autoconf)
|
||||
("automake" ,automake)
|
||||
("check" ,check) ; for tests
|
||||
("libtool" ,libtool)
|
||||
("pkg-config" ,pkg-config)))
|
||||
(list autoconf
|
||||
automake
|
||||
check ; for tests
|
||||
libtool
|
||||
pkg-config))
|
||||
(inputs
|
||||
`(("bzip2" ,bzip2)
|
||||
("libcurl" ,curl)
|
||||
|
|
|
@ -48,8 +48,7 @@
|
|||
;; Thus, build sequentially.
|
||||
'(#:parallel-build? #f
|
||||
#:parallel-tests? #f))
|
||||
(inputs `(("perl" ,perl)
|
||||
("libltdl" ,libltdl)))
|
||||
(inputs (list perl libltdl))
|
||||
(home-page "http://apr.apache.org/")
|
||||
(synopsis "The Apache Portable Runtime Library")
|
||||
(description
|
||||
|
@ -75,9 +74,9 @@ around or take advantage of platform-specific deficiencies or features.")
|
|||
"0nq3s1yn13vplgl6qfm09f7n0wm08malff9s59bqf9nid9xjzqfk"))))
|
||||
(build-system gnu-build-system)
|
||||
(inputs
|
||||
`(("apr" ,apr)))
|
||||
(list apr))
|
||||
(propagated-inputs
|
||||
`(("expat" ,expat)))
|
||||
(list expat))
|
||||
(arguments
|
||||
'(#:phases
|
||||
(modify-phases %standard-phases
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2019 L p R n d n <guix@lprndn.info>
|
||||
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -65,7 +66,8 @@
|
|||
(base32 "1pd0avlzc2rig1hd37zbhc7r2s6fjzdhshfg9l9cfzibl7caclyw"))))
|
||||
(build-system cmake-build-system)
|
||||
(arguments
|
||||
`(#:configure-flags '("-DVIDEO_PLATFORM=egl-dri" "-DBUILTIN_LUA=off"
|
||||
`(#:configure-flags '("-DCMAKE_C_FLAGS=-fcommon"
|
||||
"-DVIDEO_PLATFORM=egl-dri" "-DBUILTIN_LUA=off"
|
||||
"-DSTATIC_OPENAL=off""-DENABLE_LWA=on"
|
||||
"-DSTATIC_SQLITE3=off" "-DSTATIC_FREETYPE=off"
|
||||
"-DSHMIF_TUI_ACCEL=on")
|
||||
|
@ -75,12 +77,10 @@
|
|||
(lambda* (#:key inputs #:allow-other-keys)
|
||||
(substitute* "src/platform/cmake/modules/FindGBMKMS.cmake"
|
||||
(("/usr/local/include/libdrm")
|
||||
(string-append (assoc-ref inputs "libdrm")
|
||||
"/include/libdrm")))
|
||||
(search-input-directory inputs "include/libdrm")))
|
||||
(substitute* "src/platform/cmake/modules/FindAPR.cmake"
|
||||
(("/usr/local/apr/include/apr-1")
|
||||
(string-append (assoc-ref inputs "apr")
|
||||
"/include/apr-1")))
|
||||
(search-input-directory inputs "include/apr-1")))
|
||||
#t))
|
||||
;; Normally, it tries to fetch patched openal with git
|
||||
;; but copying files manually in the right place seems to work too.
|
||||
|
@ -151,8 +151,7 @@
|
|||
(base32
|
||||
"0dcxcnqjkyyqdr2yk84mprvkncy5g172kfs6vc4zrkklsbkr8yi2"))))))
|
||||
(native-inputs
|
||||
`(("pkg-config" ,pkg-config)
|
||||
("ruby" ,ruby))) ; For documentation and testing
|
||||
(list pkg-config ruby)) ; For documentation and testing
|
||||
(home-page "https://arcan-fe.com")
|
||||
(synopsis "Display server, multimedia framework and game engine (egl-dri)")
|
||||
(description "Arcan is a development framework for creating virtually
|
||||
|
@ -171,14 +170,15 @@ engine programmable using Lua.")
|
|||
(inherit arcan)
|
||||
(name "arcan-sdl")
|
||||
(inputs
|
||||
`(("sdl" ,sdl)
|
||||
,@(fold alist-delete (package-inputs arcan)
|
||||
'("libdrm"))))
|
||||
(modify-inputs (package-inputs arcan)
|
||||
(delete "libdrm")
|
||||
(prepend sdl)))
|
||||
(arguments
|
||||
`(,@(ensure-keyword-arguments
|
||||
(package-arguments arcan)
|
||||
'(#:configure-flags
|
||||
'("-DVIDEO_PLATFORM=sdl" "-DBUILTIN_LUA=off"
|
||||
'("-DCMAKE_C_FLAGS=-fcommon"
|
||||
"-DVIDEO_PLATFORM=sdl" "-DBUILTIN_LUA=off"
|
||||
"-DSTATIC_OPENAL=off" "-DDISABLE_JIT=off"
|
||||
"-DENABLE_LWA=on" "-DSTATIC_SQLITE3=off"
|
||||
"-DSTATIC_FREETYPE=off" "-DSHMIF_TUI_ACCEL=on")))))
|
||||
|
@ -218,11 +218,7 @@ engine programmable using Lua.")
|
|||
,(string-append "--with-xkb-output="
|
||||
"/tmp")))) ; FIXME: Copied from xorg
|
||||
(native-inputs
|
||||
`(("pkg-config" ,pkg-config)
|
||||
("autoconf" ,autoconf)
|
||||
("automake" ,automake)
|
||||
("libtool" ,libtool)
|
||||
("util-macros" ,util-macros)))
|
||||
(list pkg-config autoconf automake libtool util-macros))
|
||||
(inputs
|
||||
`(("arcan" ,arcan)
|
||||
("font-util" ,font-util)
|
||||
|
@ -250,14 +246,14 @@ as a window under Arcan.")
|
|||
(inherit arcan)
|
||||
(name "arcan-wayland")
|
||||
(native-inputs
|
||||
`(("pkg-config" ,pkg-config)))
|
||||
(list pkg-config))
|
||||
(inputs
|
||||
`(("arcan" ,arcan)
|
||||
("libseccomp" ,libseccomp)
|
||||
("libxkbcommon" ,libxkbcommon)
|
||||
("mesa" ,mesa)
|
||||
("wayland" ,wayland)
|
||||
("wayland-protocols" ,wayland-protocols)))
|
||||
(list arcan
|
||||
libseccomp
|
||||
libxkbcommon
|
||||
mesa
|
||||
wayland
|
||||
wayland-protocols))
|
||||
(arguments
|
||||
`(#:tests? #f
|
||||
#:phases
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
;;; Copyright © 2013, 2014, 2015, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com>
|
||||
;;; Copyright © 2016 John Darrington <jmd@gnu.org>
|
||||
;;; Copyright © 2016, 2017, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
|
||||
;;; Copyright © 2016, 2017, 2019, 2020, 2022 Efraim Flashner <efraim@flashner.co.il>
|
||||
;;; Copyright © 2016 Christopher Andersson <christopher@8bits.nu>
|
||||
;;; Copyright © 2016 Theodoros Foradis <theodoros@foradis.org>
|
||||
;;; Copyright © 2016, 2017, 2019, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||
|
@ -73,7 +73,7 @@
|
|||
(string-append "\"filter-path" middle
|
||||
"\"" libdir "\"")))
|
||||
#t))))))
|
||||
(inputs `(("perl" ,perl)))
|
||||
(inputs (list perl))
|
||||
|
||||
(native-search-paths
|
||||
;; This is a Guix-specific environment variable that takes a single
|
||||
|
@ -131,12 +131,16 @@ dictionaries, including personal ones.")
|
|||
(list (string-append "dictdir=" out "/lib/aspell")
|
||||
(string-append "datadir=" out "/lib/aspell")))
|
||||
#:tests? #f))
|
||||
(native-inputs `(("aspell" ,aspell)
|
||||
("which" ,which)))
|
||||
(native-inputs (list aspell which))
|
||||
(synopsis (string-append full-name " dictionary for GNU Aspell")) ; XXX: i18n
|
||||
(description
|
||||
"This package provides a dictionary for the GNU Aspell spell checker.")
|
||||
(license gpl2+)
|
||||
(properties
|
||||
;; Unfortunately any versions with a trailing 'dash and digit' (eg.: '-0')
|
||||
;; will fail to register as a version.
|
||||
`((upstream-name . ,(string-append prefix dict-name))
|
||||
(ftp-directory . ,(string-append "/aspell/dict/" dict-name))))
|
||||
(home-page "http://aspell.net/")))
|
||||
|
||||
|
||||
|
@ -389,10 +393,7 @@ dictionaries, including personal ones.")
|
|||
(base32
|
||||
"11lkrnhwrf5mvrrq45k4mads3n9aswgac8dc25ba61c75alxb5rs"))))
|
||||
(native-inputs
|
||||
`(("tar" ,tar)
|
||||
("gzip" ,gzip)
|
||||
("perl" ,perl)
|
||||
("aspell" ,aspell)))
|
||||
(list tar gzip perl aspell))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
`(#:phases
|
||||
|
@ -522,10 +523,9 @@ under permissive licensing terms. See the 'Copyright' file."))))
|
|||
(format port "#define MAN45DIR \"~a/share/man/man5\"~%" out))))
|
||||
#t)))))
|
||||
(inputs
|
||||
`(("grep" ,grep)
|
||||
("ncurses" ,ncurses)))
|
||||
(list grep ncurses))
|
||||
(native-inputs
|
||||
`(("bison" ,bison)))
|
||||
(list bison))
|
||||
(synopsis "Interactive spell-checking tool for Unix")
|
||||
(description "Ispell is an interactive spell-checking tool supporting many
|
||||
European languages.")
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
|
||||
;;; Copyright © 2020 Christine Lemmer-Webber <cwebber@dustycloud.org>
|
||||
;;; Copyright © 2020 B. Wilson <elaexuotee@wilsonb.com>
|
||||
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
||||
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -57,17 +59,17 @@
|
|||
(define-public nasm
|
||||
(package
|
||||
(name "nasm")
|
||||
(version "2.14.02")
|
||||
(version "2.15.05")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "http://www.nasm.us/pub/nasm/releasebuilds/"
|
||||
version "/nasm-" version ".tar.xz"))
|
||||
(sha256
|
||||
(base32
|
||||
"1xg8dfr49py15vbwk1rzcjc3zpqydmr49ahlijm56wlgj8zdwjp2"))))
|
||||
"0gqand86b0r86k3h46dh560lykxmxqqywz5m55kgjfq7q4lngbrw"))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs `(("perl" ,perl) ;for doc and test target
|
||||
("texinfo" ,texinfo)))
|
||||
(native-inputs (list perl ;for doc and test target
|
||||
texinfo))
|
||||
(arguments
|
||||
`(#:test-target "test"
|
||||
#:phases
|
||||
|
@ -75,11 +77,10 @@
|
|||
(add-after 'unpack 'dont-build-ps-pdf-outputs
|
||||
(lambda _
|
||||
(substitute* "doc/Makefile.in"
|
||||
(("html nasmdoc.txt nasmdoc.pdf")
|
||||
(("html nasmdoc.txt nasmdoc.pdf \\$\\(XZFILES\\)")
|
||||
"html nasmdoc.txt")
|
||||
(("\\$\\(INSTALL_DATA\\) nasmdoc.pdf")
|
||||
"$(INSTALL_DATA)"))
|
||||
#t))
|
||||
"$(INSTALL_DATA)"))))
|
||||
(add-after 'install 'install-info
|
||||
(lambda _
|
||||
(invoke "make" "install_doc"))))))
|
||||
|
@ -139,7 +140,10 @@ debugging information in STABS, DWARF 2, and CodeView 8 formats.")
|
|||
(base32
|
||||
"1jgxbq2cm51dzi3zhz38mmgwdcgs328mfl8iviw8dxn6dn36p1gd"))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs `(("zlib" ,zlib)))
|
||||
(native-inputs (list zlib))
|
||||
(arguments
|
||||
;; Some tests fail when run in parallel.
|
||||
`(#:parallel-tests? #f))
|
||||
(synopsis "Library for generating assembly code at runtime")
|
||||
(description
|
||||
"GNU Lightning is a library that generates assembly language code at
|
||||
|
@ -177,14 +181,14 @@ speed on x86, NEON on ARM, etc.).")
|
|||
(define-public fasm
|
||||
(package
|
||||
(name "fasm")
|
||||
(version "1.73.27")
|
||||
(version "1.73.29")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "https://flatassembler.net/fasm-"
|
||||
version ".tgz"))
|
||||
(sha256
|
||||
(base32 "1cghiks49ql77b9l4mwrnlk76kai0fm0z22j71kbdlxngwvlh0b8"))))
|
||||
(base32 "0ar1k1504cmwi49y6g254rkzayll0kn90vjd4zj09xv86kcg8a33"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
`(#:tests? #f ; no tests exist
|
||||
|
@ -203,8 +207,7 @@ speed on x86, NEON on ARM, etc.).")
|
|||
(replace 'install
|
||||
(lambda _
|
||||
(let ((out (assoc-ref %outputs "out")))
|
||||
(install-file "fasm" (string-append out "/bin")))
|
||||
#t)))))
|
||||
(install-file "fasm" (string-append out "/bin"))))))))
|
||||
(supported-systems '("x86_64-linux" "i686-linux"))
|
||||
(synopsis "Assembler for x86 processors")
|
||||
(description
|
||||
|
@ -267,15 +270,15 @@ assembler, a C compiler and a linker. The assembler uses Intel syntax
|
|||
"0p6wklslkkp3s4aisj3w5a53bagqn5fy4m6088ppd4fcfxgqkrcd"))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs
|
||||
`(("autoconf" ,autoconf)
|
||||
("automake" ,automake)
|
||||
("bison" ,bison)
|
||||
("flex" ,flex)
|
||||
("help2man" ,help2man)
|
||||
("gettext" ,gettext-minimal)
|
||||
("libtool" ,libtool)
|
||||
("makeinfo" ,texinfo)
|
||||
("pkg-config" ,pkg-config)))
|
||||
(list autoconf
|
||||
automake
|
||||
bison
|
||||
flex
|
||||
help2man
|
||||
gettext-minimal
|
||||
libtool
|
||||
texinfo
|
||||
pkg-config))
|
||||
(home-page "https://www.gnu.org/software/libjit/")
|
||||
(synopsis "Just-In-Time compilation library")
|
||||
(description
|
||||
|
@ -320,12 +323,9 @@ runtime")
|
|||
,(string-append "PREFIX="
|
||||
(assoc-ref %outputs "out")))))
|
||||
(native-inputs
|
||||
`(("bison" ,bison)
|
||||
("flex" ,flex)
|
||||
("pkg-config" ,pkg-config)
|
||||
("util-linux" ,util-linux)))
|
||||
(list bison flex pkg-config util-linux))
|
||||
(inputs
|
||||
`(("libpng" ,libpng)))
|
||||
(list libpng))
|
||||
(home-page "https://github.com/gbdev/rgbds")
|
||||
(synopsis "Rednex Game Boy Development System")
|
||||
(description
|
||||
|
@ -383,14 +383,14 @@ Supported architectures are:
|
|||
(define-public xa
|
||||
(package
|
||||
(name "xa")
|
||||
(version "2.3.11")
|
||||
(version "2.3.12")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "https://www.floodgap.com/retrotech/xa"
|
||||
"/dists/xa-" version ".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"0b81r7mvzqxgnbbmhixcnrf9nc72v1nqaw19k67221g3k561dwij"))))
|
||||
"0107zdwc2rzlp26pyx7gns4lqmiyg68nmpgwrg36yrrd04v1bzgq"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
`(#:tests? #f ; TODO: custom test harness, not sure how it works
|
||||
|
@ -398,7 +398,7 @@ Supported architectures are:
|
|||
(modify-phases %standard-phases
|
||||
(delete 'configure)) ; no "configure" script
|
||||
#:make-flags (list (string-append "DESTDIR=" (assoc-ref %outputs "out")))))
|
||||
(native-inputs `(("perl" ,perl)))
|
||||
(native-inputs (list perl))
|
||||
(home-page "https://www.floodgap.com/retrotech/xa/")
|
||||
(synopsis "Two-pass portable cross-assembler")
|
||||
(description
|
||||
|
@ -445,19 +445,19 @@ sets, both THUMB and ARM mode.")
|
|||
(define-public intel-xed
|
||||
(package
|
||||
(name "intel-xed")
|
||||
(version "11.2.0")
|
||||
(version "12.0.1")
|
||||
(source
|
||||
(origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/intelxed/xed")
|
||||
(commit version)))
|
||||
(sha256 (base32 "1jffayski2gpd54vaska7fmiwnnia8v3cka4nfyzjgl8xsky9v2s"))
|
||||
(sha256 (base32 "07zfff8zf29c2n0wal87hiqfq3cwcjn80zz78mz0nyjfj09nd39f"))
|
||||
(file-name (git-file-name name version))
|
||||
(patches (search-patches "intel-xed-fix-nondeterminism.patch"))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs
|
||||
`(("python-wrapper" ,python-wrapper)
|
||||
`(("python" ,python-wrapper)
|
||||
("tcsh" ,tcsh)
|
||||
;; As of the time of writing this comment, mbuild does not exist in the
|
||||
;; Python Package Index and seems to only be used by intel-xed, so we
|
||||
|
@ -471,10 +471,10 @@ sets, both THUMB and ARM mode.")
|
|||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/intelxed/mbuild")
|
||||
(commit "5304b94361fccd830c0e2417535a866b79c1c297")))
|
||||
(commit "3de3f0d753c11dbe634bec611d4cc13f74768e4f")))
|
||||
(sha256
|
||||
(base32
|
||||
"0r3avc3035aklqxcnc14rlmmwpj3jp09vbcbwynhvvmcp8srl7dl"))
|
||||
"0z8hdhpmk8y5c9429p2yns9daswnffbprni9czkq3vij8f58lkg4"))
|
||||
(file-name (git-file-name name version)))))))
|
||||
(outputs '("out" "lib"))
|
||||
(arguments
|
||||
|
@ -489,8 +489,7 @@ sets, both THUMB and ARM mode.")
|
|||
(replace 'build
|
||||
(lambda* (#:key inputs #:allow-other-keys)
|
||||
(let ((mbuild (assoc-ref inputs "mbuild")))
|
||||
(setenv "PYTHONPATH" (string-append
|
||||
(getenv "PYTHONPATH") ":" mbuild))
|
||||
(setenv "PYTHONPATH" mbuild)
|
||||
(invoke "./mfile.py"
|
||||
(string-append "--build-dir=" build-dir)
|
||||
(string-append "--install-dir=" kit-dir)
|
||||
|
@ -517,8 +516,7 @@ sets, both THUMB and ARM mode.")
|
|||
(copy-recursively (string-append kit-dir "/include")
|
||||
(string-append lib "/include"))
|
||||
(copy-recursively (string-append kit-dir "/lib")
|
||||
(string-append lib "/lib"))
|
||||
#t)))))))
|
||||
(string-append lib "/lib")))))))))
|
||||
(home-page "https://intelxed.github.io/")
|
||||
(synopsis "Encoder and decoder for x86 (IA32 and Intel64) instructions")
|
||||
(description "The Intel X86 Encoder Decoder (XED) is a software library and
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
;;; Copyright © 2020 R Veera Kumar <vkor@vkten.in>
|
||||
;;; Copyright © 2020, 2021 Guillaume Le Vaillant <glv@posteo.net>
|
||||
;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
|
||||
;;; Copyright © 2021, 2022 Vinicius Monego <monego@posteo.net>
|
||||
;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
|
||||
;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -31,6 +34,7 @@
|
|||
#:use-module (gnu packages)
|
||||
#:use-module (gnu packages algebra)
|
||||
#:use-module (gnu packages autotools)
|
||||
#:use-module (gnu packages boost)
|
||||
#:use-module (gnu packages check)
|
||||
#:use-module (gnu packages compression)
|
||||
#:use-module (gnu packages curl)
|
||||
|
@ -51,11 +55,15 @@
|
|||
#:use-module (gnu packages python-check)
|
||||
#:use-module (gnu packages python-crypto)
|
||||
#:use-module (gnu packages python-science)
|
||||
#:use-module (gnu packages python-web)
|
||||
#:use-module (gnu packages python-xyz)
|
||||
#:use-module (gnu packages qt)
|
||||
#:use-module (gnu packages time)
|
||||
#:use-module (gnu packages version-control)
|
||||
#:use-module (gnu packages video)
|
||||
#:use-module (gnu packages wxwidgets)
|
||||
#:use-module (gnu packages xiph)
|
||||
#:use-module (gnu packages xml)
|
||||
#:use-module (gnu packages xorg)
|
||||
#:use-module (guix build-system cmake)
|
||||
#:use-module (guix build-system gnu)
|
||||
|
@ -96,6 +104,70 @@ in FITS files.")
|
|||
(license (license:non-copyleft "file://License.txt"
|
||||
"See License.txt in the distribution."))))
|
||||
|
||||
(define-public python-fitsio
|
||||
(package
|
||||
(name "python-fitsio")
|
||||
(version "1.1.5")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (pypi-uri "fitsio" version))
|
||||
(sha256
|
||||
(base32 "1llql2i6xr9lkdl81jx5nvz80kspamvira90546y32ldy551hq1l"))
|
||||
(modules '((guix build utils)))
|
||||
(snippet
|
||||
;; Remove the bundled cfitsio
|
||||
`(begin
|
||||
(delete-file-recursively "cfitsio3490")
|
||||
(substitute* "MANIFEST.in"
|
||||
(("recursive-include cfitsio3490.*$\n") ""))
|
||||
#t))))
|
||||
(build-system python-build-system)
|
||||
(arguments
|
||||
`(#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'unpack 'unbundle-cfitsio
|
||||
(lambda* (#:key inputs #:allow-other-keys)
|
||||
(let* ((cfitsio (assoc-ref inputs "cfitsio"))
|
||||
(includedir (string-append "\"" cfitsio "/include\""))
|
||||
(libdir (string-append "\"" cfitsio "/lib\"")))
|
||||
;; Use Guix' cfitsio instead of the bundled one
|
||||
(substitute* "setup.py"
|
||||
(("self.use_system_fitsio = False") "pass")
|
||||
(("self.system_fitsio_includedir = None") "pass")
|
||||
(("self.system_fitsio_libdir = None") "pass")
|
||||
(("self.use_system_fitsio") "True")
|
||||
(("self.system_fitsio_includedir") includedir)
|
||||
(("self.system_fitsio_libdir") libdir)))))
|
||||
(add-after 'unpack 'skip-bzip2-test
|
||||
(lambda* (#:key inputs #:allow-other-keys)
|
||||
;; The bzip2 test fails because Guix' cfitsio
|
||||
;; is built without bzip2 support.
|
||||
(substitute* "fitsio/test.py"
|
||||
(("'SKIP_BZIP_TEST' in os.environ") "True")))))))
|
||||
(propagated-inputs
|
||||
(list python-numpy cfitsio))
|
||||
(home-page "https://github.com/esheldon/fitsio")
|
||||
(synopsis
|
||||
"Python library to read from and write to FITS files")
|
||||
(description
|
||||
"This package provides a Python library for reading from and writing
|
||||
to @acronym{FITS, Flexible Image Transport System} files using the
|
||||
CFITSIO library. Among other things, it can
|
||||
|
||||
@itemize
|
||||
@item read and write image, binary, and ascii table extensions;
|
||||
|
||||
@item read arbitrary subsets of tables in a lazy manner;
|
||||
|
||||
@item query the rows and columns of a table;
|
||||
|
||||
@item read and write header keywords;
|
||||
|
||||
@item read and write Gzip files.
|
||||
@end itemize")
|
||||
(license license:gpl2+)))
|
||||
|
||||
(define-public qfits
|
||||
(package
|
||||
(name "qfits")
|
||||
|
@ -118,7 +190,7 @@ for reading and writing.")
|
|||
(define-public erfa
|
||||
(package
|
||||
(name "erfa")
|
||||
(version "1.7.3")
|
||||
(version "2.0.0")
|
||||
(source
|
||||
(origin
|
||||
(method git-fetch)
|
||||
|
@ -127,13 +199,10 @@ for reading and writing.")
|
|||
(commit (string-append "v" version))))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32 "0nh12dr7gk4ki55lz95pkm4fpf7kazirra3zax9pab6v4qql4hlw"))))
|
||||
(base32 "0s9dpj0jdkqcg552f00jhd722czji4pffabmpys5pgi6djckq4f4"))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs
|
||||
`(("automake" ,automake)
|
||||
("autoreconf" ,autoconf)
|
||||
("libtool" ,libtool)
|
||||
("pkg-config" ,pkg-config)))
|
||||
(list automake autoconf libtool pkg-config))
|
||||
(home-page "https://github.com/liberfa/erfa")
|
||||
(synopsis "Essential Routines for Fundamental Astronomy")
|
||||
(description
|
||||
|
@ -179,7 +248,7 @@ feature detection and cosmetic corrections.")
|
|||
(sha256
|
||||
(base32 "1536gmcpm6pckn9xrb6j8s4pm1vryjhzvhfaj9wx3jwxcpbdy0dw"))))
|
||||
(inputs
|
||||
`(("cfitsio" ,cfitsio)))
|
||||
(list cfitsio))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
`(#:configure-flags
|
||||
|
@ -228,7 +297,7 @@ astronomical image-processing packages like Drizzle, Swarp or SExtractor.")
|
|||
(define-public gnuastro
|
||||
(package
|
||||
(name "gnuastro")
|
||||
(version "0.15")
|
||||
(version "0.16")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
|
@ -236,7 +305,7 @@ astronomical image-processing packages like Drizzle, Swarp or SExtractor.")
|
|||
version ".tar.lz"))
|
||||
(sha256
|
||||
(base32
|
||||
"1jjr3ixxbpsr5m4s7ahh12ymcnlvjzwcp02ya16b1lvzrz1wmhy4"))))
|
||||
"07xr0r5dmjpnrz7ylf7k3vmjjna2jafi16lfvkqwxj9fyssmz207"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
'(#:configure-flags '("--disable-static")))
|
||||
|
@ -250,8 +319,7 @@ astronomical image-processing packages like Drizzle, Swarp or SExtractor.")
|
|||
("wcslib" ,wcslib)
|
||||
("zlib" ,zlib)))
|
||||
(native-inputs
|
||||
`(("libtool" ,libtool)
|
||||
("lzip" ,lzip)))
|
||||
(list libtool lzip))
|
||||
(home-page "https://www.gnu.org/software/gnuastro/")
|
||||
(synopsis "Astronomy utilities")
|
||||
(description "The GNU Astronomy Utilities (Gnuastro) is a suite of
|
||||
|
@ -289,9 +357,7 @@ programs for the manipulation and analysis of astronomical data.")
|
|||
(string-append
|
||||
"--with-fftw-incdir=" (assoc-ref %build-inputs "fftw") "/include"))))
|
||||
(native-inputs
|
||||
`(("autoconf" ,autoconf)
|
||||
("automake" ,automake)
|
||||
("libtool" ,libtool)))
|
||||
(list autoconf automake libtool))
|
||||
(inputs
|
||||
`(("openblas" ,openblas)
|
||||
("fftw" ,fftwf)))
|
||||
|
@ -383,11 +449,9 @@ astronomical fields. SkyMaker is part of the EFIGI
|
|||
(copy-recursively "lang" lang))
|
||||
#t)))))
|
||||
(native-inputs
|
||||
`(("pkg-config" ,pkg-config)))
|
||||
(list pkg-config))
|
||||
(inputs
|
||||
`(("gtkmm" ,gtkmm)
|
||||
("libskry" ,libskry)
|
||||
("ffmpeg" ,ffmpeg)))
|
||||
(list gtkmm-3 libskry ffmpeg))
|
||||
(home-page "https://github.com/GreatAttractor/stackistry")
|
||||
(synopsis "Astronomical lucky imaging/image stacking tool")
|
||||
(description
|
||||
|
@ -412,12 +476,12 @@ deconvolution). Such post-processing is not performed by Stackistry.")
|
|||
(base32 "049jlc8vx06pad5h2syrmf7f1l346yr5iraai0wkn8s8pk30j8q7"))))
|
||||
(build-system cmake-build-system)
|
||||
(inputs
|
||||
`(("qtbase" ,qtbase-5)
|
||||
("qtlocation" ,qtlocation)
|
||||
("qtmultimedia" ,qtmultimedia)
|
||||
("qtscript" ,qtscript)
|
||||
("qtserialport" ,qtserialport)
|
||||
("zlib" ,zlib)))
|
||||
(list qtbase-5
|
||||
qtlocation
|
||||
qtmultimedia
|
||||
qtscript
|
||||
qtserialport
|
||||
zlib))
|
||||
(native-inputs
|
||||
`(("gettext" ,gettext-minimal) ; xgettext is used at compile time
|
||||
("perl" ,perl) ; for pod2man
|
||||
|
@ -515,12 +579,12 @@ any arbitrary astrometric projection defined in the WCS standard.")
|
|||
;; maybe required?
|
||||
("mesa" ,mesa)
|
||||
;; optional: fmtlib, Eigen3;
|
||||
("fmt" ,fmt)
|
||||
("fmt" ,fmt-7)
|
||||
("eigen" ,eigen)
|
||||
;; glut: for glut interface
|
||||
("freeglut" ,freeglut)))
|
||||
(propagated-inputs
|
||||
`(("lua" ,lua)))
|
||||
(list lua))
|
||||
(arguments
|
||||
`(#:configure-flags '("-DENABLE_GLUT=ON" "-DENABLE_QT=OFF")
|
||||
#:tests? #f)) ;no tests
|
||||
|
@ -547,6 +611,321 @@ accurately in real time at any rate desired.")
|
|||
`(#:configure-flags '("-DENABLE_GTK=ON" "-DENABLE_QT=OFF")
|
||||
#:tests? #f))))
|
||||
|
||||
(define-public python-astropy
|
||||
(package
|
||||
(name "python-astropy")
|
||||
(version "5.0")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (pypi-uri "astropy" version))
|
||||
(sha256
|
||||
(base32 "09rr9z2kn5qw34fqpwxgcwsn9m5aw6f0dd0pm232aa8k3qakw83h"))
|
||||
(modules '((guix build utils)))
|
||||
(snippet
|
||||
'(begin
|
||||
;; Remove Python bundles.
|
||||
(with-directory-excursion "astropy/extern"
|
||||
(for-each delete-file-recursively '("ply" "configobj")))
|
||||
;; Remove cextern bundles and leave the wcslib bundle. Astropy
|
||||
;; upgrades to different versions of wcslib every few releases
|
||||
;; and tests break every upgrade.
|
||||
;; TODO: unbundle wcslib.
|
||||
(with-directory-excursion "cextern"
|
||||
(for-each delete-file-recursively '("cfitsio" "expat")))
|
||||
#t))))
|
||||
(build-system python-build-system)
|
||||
(arguments
|
||||
`(#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'unpack 'preparations
|
||||
(lambda _
|
||||
;; Use our own libraries in place of bundles, with the
|
||||
;; exception of wcslib.
|
||||
(setenv "ASTROPY_USE_SYSTEM_CFITSIO" "1")
|
||||
(setenv "ASTROPY_USE_SYSTEM_EXPAT" "1")
|
||||
;; Some tests require a writable home.
|
||||
(setenv "HOME" "/tmp")
|
||||
;; Relax xfail tests.
|
||||
(substitute* "setup.cfg"
|
||||
(("xfail_strict = true") "xfail_strict = false"))
|
||||
;; Replace all references to external ply.
|
||||
(let ((ply-files '("coordinates/angle_formats.py"
|
||||
"utils/parsing.py")))
|
||||
(with-directory-excursion "astropy"
|
||||
(map (lambda (file)
|
||||
(substitute* file (("astropy.extern.ply")
|
||||
"ply")))
|
||||
ply-files)))
|
||||
;; Replace reference to external configobj.
|
||||
(with-directory-excursion "astropy/config"
|
||||
(substitute* "configuration.py"
|
||||
(("from astropy.extern.configobj ") "")))))
|
||||
;; This file is opened in both install and check phases.
|
||||
(add-before 'install 'writable-compiler
|
||||
(lambda _ (make-file-writable "astropy/_compiler.c")))
|
||||
(add-before 'check 'writable-compiler
|
||||
(lambda _ (make-file-writable "astropy/_compiler.c")))
|
||||
(replace 'check
|
||||
(lambda* (#:key inputs outputs tests? #:allow-other-keys)
|
||||
(when tests?
|
||||
(add-installed-pythonpath inputs outputs)
|
||||
;; Extensions have to be rebuilt before running the tests.
|
||||
(invoke "python" "setup.py" "build_ext" "--inplace")
|
||||
(invoke "python" "-m" "pytest" "--pyargs" "astropy"
|
||||
;; Skip tests that need remote data.
|
||||
"-m" "not remote_data")))))))
|
||||
(native-inputs
|
||||
(list pkg-config
|
||||
python-coverage
|
||||
python-cython
|
||||
python-extension-helpers
|
||||
python-ipython
|
||||
python-jplephem
|
||||
python-objgraph
|
||||
python-pytest
|
||||
python-pytest-astropy
|
||||
python-pytest-xdist
|
||||
python-setuptools-scm
|
||||
python-sgp4
|
||||
python-skyfield))
|
||||
(inputs
|
||||
(list cfitsio expat))
|
||||
(propagated-inputs
|
||||
(list python-configobj
|
||||
python-numpy
|
||||
python-packaging
|
||||
python-ply
|
||||
python-pyerfa
|
||||
python-pyyaml))
|
||||
(home-page "https://www.astropy.org/")
|
||||
(synopsis "Core package for Astronomy in Python")
|
||||
(description
|
||||
"Astropy is a single core package for Astronomy in Python. It contains
|
||||
much of the core functionality and some common tools needed for performing
|
||||
astronomy and astrophysics.")
|
||||
(license license:bsd-3)))
|
||||
|
||||
(define-public python-astropy-healpix
|
||||
(package
|
||||
(name "python-astropy-healpix")
|
||||
(version "0.6")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (pypi-uri "astropy-healpix" version))
|
||||
(sha256
|
||||
(base32 "1436ml03xkmvx4afzbhfj67ab91418sz1w3lq1b18r43qchnd6j0"))))
|
||||
(build-system python-build-system)
|
||||
(arguments
|
||||
`(#:phases
|
||||
(modify-phases %standard-phases
|
||||
;; This file is opened in both install and check phases.
|
||||
(add-before 'install 'writable-compiler
|
||||
(lambda _ (make-file-writable "astropy_healpix/_compiler.c")))
|
||||
(add-before 'check 'writable-compiler
|
||||
(lambda _ (make-file-writable "astropy_healpix/_compiler.c")))
|
||||
(replace 'check
|
||||
(lambda* (#:key inputs outputs tests? #:allow-other-keys)
|
||||
(when tests?
|
||||
(add-installed-pythonpath inputs outputs)
|
||||
;; Extensions have to be rebuilt before running the tests.
|
||||
(invoke "python" "setup.py" "build_ext" "--inplace")
|
||||
(invoke "python" "-m" "pytest"
|
||||
"--pyargs" "astropy_healpix")))))))
|
||||
(native-inputs
|
||||
(list python-extension-helpers
|
||||
python-hypothesis
|
||||
python-pytest-astropy
|
||||
python-setuptools-scm))
|
||||
(propagated-inputs
|
||||
(list python-astropy python-numpy))
|
||||
(home-page "https://github.com/astropy/astropy-healpix")
|
||||
(synopsis "HEALPix for Astropy")
|
||||
(description "This package provides HEALPix to the Astropy project.")
|
||||
(license license:bsd-3)))
|
||||
|
||||
(define-public python-astroquery
|
||||
(package
|
||||
(name "python-astroquery")
|
||||
(version "0.4.5")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (pypi-uri "astroquery" version))
|
||||
(sha256
|
||||
(base32 "06xy0qzqmps6z5vwfkh5fkhr151p7g94r2j0mvp1rc8zns22y010"))))
|
||||
(build-system python-build-system)
|
||||
(arguments
|
||||
`(#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-before 'check 'writable-home
|
||||
(lambda _ ; some tests need a writable home
|
||||
(setenv "HOME" (getcwd))))
|
||||
(replace 'check
|
||||
(lambda* (#:key inputs outputs tests? #:allow-other-keys)
|
||||
(when tests?
|
||||
(add-installed-pythonpath inputs outputs)
|
||||
(invoke "python" "-m" "pytest" "--pyargs" "astroquery"
|
||||
;; Skip tests that require online data.
|
||||
"-m" "not remote_data")))))))
|
||||
(propagated-inputs
|
||||
(list python-astropy
|
||||
python-beautifulsoup4
|
||||
python-html5lib
|
||||
python-keyring
|
||||
python-numpy
|
||||
python-pyvo
|
||||
python-requests))
|
||||
(native-inputs
|
||||
(list python-flask
|
||||
python-jinja2
|
||||
python-matplotlib
|
||||
python-pytest-astropy
|
||||
python-pytest-dependency))
|
||||
(home-page "https://www.astropy.org/astroquery/")
|
||||
(synopsis "Access online astronomical data resources")
|
||||
(description "Astroquery is a package that contains a collection of tools
|
||||
to access online Astronomical data. Each web service has its own sub-package.")
|
||||
(license license:bsd-3)))
|
||||
|
||||
(define-public python-photutils
|
||||
(package
|
||||
(name "python-photutils")
|
||||
(version "1.3.0")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (pypi-uri "photutils" version))
|
||||
(sha256
|
||||
(base32 "1a8djakaya6w5iv9237gkcz39brqzgrfs2wqrl0izi1s85cfdymn"))))
|
||||
(build-system python-build-system)
|
||||
(arguments
|
||||
`(#:test-target "pytest"
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
;; This file is opened in both install and check phases.
|
||||
(add-before 'install 'writable-compiler
|
||||
(lambda _ (make-file-writable "photutils/_compiler.c")))
|
||||
(add-before 'check 'writable-compiler
|
||||
(lambda _ (make-file-writable "photutils/_compiler.c"))))))
|
||||
(propagated-inputs
|
||||
(list python-astropy python-numpy))
|
||||
(native-inputs
|
||||
(list python-cython
|
||||
python-extension-helpers
|
||||
python-pytest-astropy
|
||||
python-pytest-runner
|
||||
python-setuptools-scm))
|
||||
(home-page "https://github.com/astropy/photutils")
|
||||
(synopsis "Source detection and photometry")
|
||||
(description "Photutils is an Astropy package for detection and photometry
|
||||
of astronomical sources.")
|
||||
(license license:bsd-3)))
|
||||
|
||||
(define-public python-pyvo
|
||||
(package
|
||||
(name "python-pyvo")
|
||||
(version "1.2")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (pypi-uri "pyvo" version))
|
||||
(sha256
|
||||
(base32 "1lap703wxbyxqlbk85myirp4pkdnc6cg10xhfajfsvz5k0hm5ffw"))))
|
||||
(build-system python-build-system)
|
||||
(arguments
|
||||
`(#:phases
|
||||
(modify-phases %standard-phases
|
||||
(replace 'check
|
||||
(lambda* (#:key inputs outputs tests? #:allow-other-keys)
|
||||
(when tests?
|
||||
(add-installed-pythonpath inputs outputs)
|
||||
(invoke "python" "-m" "pytest" "--pyargs" "pyvo" "-k"
|
||||
(string-append ; these tests use the network
|
||||
"not test_access_with_string"
|
||||
" and not test_access_with_list"
|
||||
" and not test_access_with_expansion"))))))))
|
||||
(native-inputs
|
||||
(list python-pytest-astropy python-requests-mock))
|
||||
(propagated-inputs
|
||||
(list python-astropy python-mimeparse python-pillow python-requests))
|
||||
(home-page "https://github.com/astropy/pyvo")
|
||||
(synopsis "Access Virtual Observatory data and services")
|
||||
(description
|
||||
"PyVO is a package providing access to remote data and services of the
|
||||
Virtual observatory (VO) using Python.")
|
||||
(license license:bsd-3)))
|
||||
|
||||
(define-public python-regions
|
||||
(package
|
||||
(name "python-regions")
|
||||
(version "0.5")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (pypi-uri "regions" version))
|
||||
(sha256
|
||||
(base32 "1bjrcjchbw3xw1a26d5g198lh7vxpp9m5sal58r7f8mmr1d8g2dc"))))
|
||||
(build-system python-build-system)
|
||||
(arguments
|
||||
`(#:test-target "pytest"
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
;; This doctest requires online data.
|
||||
(add-after 'unpack 'delete-doctest
|
||||
(lambda _ (delete-file "docs/masks.rst")))
|
||||
;; This file is opened in both install and check phases.
|
||||
(add-before 'install 'writable-compiler
|
||||
(lambda _ (make-file-writable "regions/_compiler.c")))
|
||||
(add-before 'check 'writable-compiler
|
||||
(lambda _ (make-file-writable "regions/_compiler.c")))
|
||||
(add-before 'check 'writable-home
|
||||
(lambda _ (setenv "HOME" (getcwd)))))))
|
||||
(propagated-inputs
|
||||
(list python-astropy python-numpy))
|
||||
(native-inputs
|
||||
(list python-cython
|
||||
python-extension-helpers
|
||||
python-pytest-arraydiff
|
||||
python-pytest-astropy
|
||||
python-pytest-runner
|
||||
python-setuptools-scm))
|
||||
(home-page "https://github.com/astropy/regions")
|
||||
(synopsis "Package for region handling")
|
||||
(description "Regions is an Astropy package for region handling.")
|
||||
(license license:bsd-3)))
|
||||
|
||||
(define-public python-astral
|
||||
(package
|
||||
(name "python-astral")
|
||||
(version "2.2")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (pypi-uri "astral" version))
|
||||
(sha256
|
||||
(base32 "1gkggdibccmdy9glymw3kbrkzm6svvsg0lk56hhy92y4smkrj7g4"))))
|
||||
(build-system python-build-system)
|
||||
(arguments
|
||||
`(#:phases
|
||||
(modify-phases %standard-phases
|
||||
(replace 'check
|
||||
(lambda* (#:key inputs outputs tests? #:allow-other-keys)
|
||||
(when tests?
|
||||
(add-installed-pythonpath inputs outputs)
|
||||
(invoke "python" "-m" "pytest")))))))
|
||||
(native-inputs
|
||||
(list python-freezegun python-setuptools-scm))
|
||||
(propagated-inputs
|
||||
(list python-dataclasses python-pytest python-pytz))
|
||||
(home-page "https://github.com/sffjunkie/astral")
|
||||
(synopsis "Calculations for the position of the sun and moon")
|
||||
(description "Astral is a Python module that calculates times for various
|
||||
positions of the sun: dawn, sunrise, solar noon, sunset, dusk, solar
|
||||
elevation, solar azimuth, rahukaalam, and the phases of the moon.")
|
||||
(license license:asl2.0)))
|
||||
|
||||
(define-public libnova
|
||||
(package
|
||||
(name "libnova")
|
||||
|
@ -571,9 +950,7 @@ accurately in real time at any rate desired.")
|
|||
(("/bin/sh") (which "sh")))
|
||||
#t)))))
|
||||
(native-inputs
|
||||
`(("autoconf" ,autoconf)
|
||||
("automake" ,automake)
|
||||
("libtool" ,libtool)))
|
||||
(list autoconf automake libtool))
|
||||
(synopsis "Celestial mechanics, astrometry and astrodynamics library")
|
||||
(description "Libnova is a general purpose, double precision, Celestial
|
||||
Mechanics, Astrometry and Astrodynamics library.")
|
||||
|
@ -614,7 +991,7 @@ Mechanics, Astrometry and Astrodynamics library.")
|
|||
(copy-recursively "include" include))
|
||||
#t)))))
|
||||
(inputs
|
||||
`(("ffmpeg" ,ffmpeg)))
|
||||
(list ffmpeg))
|
||||
(home-page "https://github.com/GreatAttractor/libskry")
|
||||
(synopsis "Astronimical lucky imaging library")
|
||||
(description
|
||||
|
@ -720,7 +1097,7 @@ on FITS files:
|
|||
"xplanet-1.3.1-xpUtil-Add2017LeapSecond.cpp.patch"))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs
|
||||
`(("pkg-config" ,pkg-config)))
|
||||
(list pkg-config))
|
||||
(inputs
|
||||
`(("libx11" ,libx11)
|
||||
("libxscrnsaver" ,libxscrnsaver)
|
||||
|
@ -768,12 +1145,10 @@ Mercator, Mollweide, Peters, polyconic, orthographic and rectangular.")
|
|||
("gettext" ,gettext-minimal)
|
||||
("pkg-config" ,pkg-config)))
|
||||
(inputs
|
||||
`(("curl" ,curl)
|
||||
("glib" ,glib)
|
||||
("goocanvas" ,goocanvas)
|
||||
("gtk+" ,gtk+)))
|
||||
(list curl glib goocanvas gtk+))
|
||||
(arguments
|
||||
`(#:phases
|
||||
`(#:configure-flags '("CFLAGS=-O2 -g -fcommon")
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'unpack 'fix-tests
|
||||
(lambda _
|
||||
|
@ -825,10 +1200,57 @@ provide you with detailed information about each pass.")
|
|||
It can be used to calculate the trajectory of satellites.")
|
||||
(license license:asl2.0))))
|
||||
|
||||
(define-public imppg
|
||||
(package
|
||||
(name "imppg")
|
||||
(version "0.6.4")
|
||||
(source
|
||||
(origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/GreatAttractor/imppg")
|
||||
(commit (string-append "v" version))))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32 "04synbmyz0hkipl1cdc26nr42r57v494yjw8pi4jx0jrxrawgj9h"))))
|
||||
(build-system cmake-build-system)
|
||||
(arguments
|
||||
`(#:tests? #f ;no test provided
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(replace 'configure
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(mkdir-p "build")
|
||||
(chdir "build")
|
||||
(invoke
|
||||
"cmake"
|
||||
"-G" "Unix Makefiles"
|
||||
"-DCMAKE_BUILD_TYPE=Release"
|
||||
(string-append "-DCMAKE_INSTALL_PREFIX=" (assoc-ref outputs "out"))
|
||||
".."))))))
|
||||
(native-inputs
|
||||
(list boost pkg-config))
|
||||
(inputs
|
||||
(list cfitsio freeimage glew wxwidgets))
|
||||
(home-page "https://github.com/GreatAttractor/imppg")
|
||||
(synopsis "Astronomical Image Post-Proccessor (ImPPG)")
|
||||
(description
|
||||
"ImPPG performs Lucy-Richardson deconvolution, unsharp masking,
|
||||
brightness normalization and tone curve adjustment. It can also apply
|
||||
previously specified processing settings to multiple images. All operations
|
||||
are performed using 32-bit floating-point arithmetic.
|
||||
|
||||
Supported input formats: FITS, BMP, JPEG, PNG, TIFF (most of bit depths and
|
||||
compression methods), TGA and more. Images are processed in grayscale and can
|
||||
be saved as: BMP 8-bit; PNG 8-bit; TIFF 8-bit, 16-bit, 32-bit
|
||||
floating-point (no compression, LZW- or ZIP-compressed), FITS 8-bit, 16-bit,
|
||||
32-bit floating-point.")
|
||||
(license license:gpl3+)))
|
||||
|
||||
(define-public indi
|
||||
(package
|
||||
(name "indi")
|
||||
(version "1.9.1")
|
||||
(version "1.9.3")
|
||||
(source
|
||||
(origin
|
||||
(method git-fetch)
|
||||
|
@ -837,7 +1259,7 @@ It can be used to calculate the trajectory of satellites.")
|
|||
(commit (string-append "v" version))))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32 "0zhsm60hgnmy9lvwckijf6f6yikbvdbxy2qlgclv09p14lgr6wd9"))))
|
||||
(base32 "0c7md288d3g2vf0m1ai6x2l4j4rmlasc4rya92phvd4ynf8vcki2"))))
|
||||
(build-system cmake-build-system)
|
||||
(arguments
|
||||
`(#:configure-flags
|
||||
|
@ -859,17 +1281,17 @@ It can be used to calculate the trajectory of satellites.")
|
|||
(let ((out (assoc-ref outputs "out")))
|
||||
(mkdir-p (string-append out "/lib/udev/rules.d"))))))))
|
||||
(native-inputs
|
||||
`(("googletest" ,googletest)))
|
||||
(list googletest))
|
||||
(inputs
|
||||
`(("cfitsio" ,cfitsio)
|
||||
("curl" ,curl)
|
||||
("fftw" ,fftw)
|
||||
("gsl" ,gsl)
|
||||
("libjpeg-turbo" ,libjpeg-turbo)
|
||||
("libnova" ,libnova)
|
||||
("libtiff" ,libtiff)
|
||||
("libusb" ,libusb)
|
||||
("zlib" ,zlib)))
|
||||
(list cfitsio
|
||||
curl
|
||||
fftw
|
||||
gsl
|
||||
libjpeg-turbo
|
||||
libnova
|
||||
libtiff
|
||||
libusb
|
||||
zlib))
|
||||
(home-page "https://www.indilib.org")
|
||||
(synopsis "Library for astronimical intrumentation control")
|
||||
(description
|
||||
|
@ -883,31 +1305,88 @@ more.")
|
|||
license:lgpl2.0+
|
||||
license:lgpl2.1+))))
|
||||
|
||||
(define-public sunclock
|
||||
(let ((commit "f4106eb0a81f7594726d6b2859efd8fc64cc1225")
|
||||
(revision "1"))
|
||||
(package
|
||||
(name "sunclock")
|
||||
(version (git-version "3.57" revision commit))
|
||||
(source
|
||||
(origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/nongiach/Sunclock")
|
||||
(commit commit)))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32 "1rczdpmhvfw57b9r793vq8vqlbdhlkgj52fxwrdfl6cwj95a9kv2"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
`(#:make-flags
|
||||
(list (string-append "DESTDIR=" %output)
|
||||
;; Fix incorrect argument given to gcc. Error message:
|
||||
;; "gcc: error: DefaultGcc2AMD64Opt: No such file or directory"
|
||||
"CDEBUGFLAGS=")
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(replace 'configure
|
||||
(lambda _
|
||||
(chdir "sunclock-3.57")
|
||||
(substitute* "Imakefile"
|
||||
(("^MANDIR=/X11R6/man/man1")
|
||||
"MANDIR=/share/man/man1")
|
||||
(("^BINDIR=/X11R6/bin")
|
||||
"BINDIR=/bin")
|
||||
;; Disable ZLIB support for vmf files because zlib implements
|
||||
;; `gzgetc` as a macro instead of a function, which results in
|
||||
;; a compilation error.
|
||||
((" -DZLIB") "")
|
||||
((" -lz") "")
|
||||
(("cd \\$\\(DESTDIR\\)\\$\\(SHAREDIR\\)/earthmaps/vmf ; \
|
||||
gzip -f \\*.vmf")
|
||||
""))
|
||||
;; Generate Makefile.
|
||||
(invoke "xmkmf"))))
|
||||
#:tests? #f)) ; No check target.
|
||||
(inputs
|
||||
(list libjpeg-turbo libpng libx11 libxpm))
|
||||
(native-inputs
|
||||
(list imake))
|
||||
(home-page "https://github.com/nongiach/Sunclock")
|
||||
(synopsis
|
||||
"Map of the Earth that shows which portion is illuminated by the Sun")
|
||||
(description
|
||||
"Sunclock displays a map of the Earth and shows which portion is
|
||||
illuminated by the Sun. It can commute between two states, the \"clock window\"
|
||||
and the \"map window\". The clock window displays a small map of the Earth and
|
||||
therefore occupies little space on the screen, while the \"map window\" displays
|
||||
a large map and offers more advanced functions: local time of cities, Sun and
|
||||
Moon position, etc.")
|
||||
(license license:gpl2+))))
|
||||
|
||||
(define-public python-jplephem
|
||||
(package
|
||||
(name "python-jplephem")
|
||||
(version "2.15")
|
||||
(version "2.16")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (pypi-uri "jplephem" version))
|
||||
(sha256
|
||||
(base32 "1ca3dswsslij79qg6dcijjz4l0fj6nzmxld8z93v45ahlkhps0g0"))))
|
||||
(base32 "1xvivnsywjaf5lxn3kyg2jhhq393gcwkjrl634m8dn52ypidrcdb"))))
|
||||
(build-system python-build-system)
|
||||
(arguments
|
||||
`(#:phases
|
||||
(modify-phases %standard-phases
|
||||
(replace 'check
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let ((out (assoc-ref outputs "out")))
|
||||
(setenv "PYTHONPATH"
|
||||
(string-append "./build/lib:"
|
||||
(getenv "PYTHONPATH")))
|
||||
(setenv "PATH" (string-append out "/bin:"
|
||||
(getenv "PATH")))
|
||||
(invoke "python" "-m" "unittest" "discover" "-s" "test")))))))
|
||||
(lambda* (#:key tests? inputs outputs #:allow-other-keys)
|
||||
(when tests?
|
||||
(let ((out (assoc-ref outputs "out")))
|
||||
(add-installed-pythonpath inputs outputs)
|
||||
(setenv "PATH" (string-append out "/bin:" (getenv "PATH")))
|
||||
(invoke "python" "-m" "unittest" "discover" "-s" "test"))))))))
|
||||
(inputs
|
||||
`(("python-numpy" ,python-numpy)))
|
||||
(list python-numpy))
|
||||
(home-page "https://github.com/brandon-rhodes/python-jplephem")
|
||||
(synopsis "Python version of NASA DE4xx ephemerides")
|
||||
(description
|
||||
|
@ -918,13 +1397,13 @@ JPL ephemerides use to predict raw (x,y,z) planetary positions.")
|
|||
(define-public python-pyerfa
|
||||
(package
|
||||
(name "python-pyerfa")
|
||||
(version "1.7.3")
|
||||
(version "2.0.0.1")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (pypi-uri "pyerfa" version))
|
||||
(sha256
|
||||
(base32 "1jqqrxvrgly4r0br5f6dsy8nab2xmhz915vp6md5f31ysr2sdwvc"))
|
||||
(base32 "0c6y1rm51kj8ahbr1vwbswck3ix77dc3zhc2fkg6w7iczrzn7m1g"))
|
||||
(modules '((guix build utils)))
|
||||
(snippet
|
||||
'(begin
|
||||
|
@ -937,15 +1416,13 @@ JPL ephemerides use to predict raw (x,y,z) planetary positions.")
|
|||
(modify-phases %standard-phases
|
||||
(add-before 'build 'use-system-liberfa
|
||||
(lambda _
|
||||
(setenv "PYERFA_USE_SYSTEM_LIBERFA" "1")
|
||||
#t)))))
|
||||
(setenv "PYERFA_USE_SYSTEM_LIBERFA" "1"))))))
|
||||
(native-inputs
|
||||
`(("pytest" ,python-pytest)
|
||||
("setuptools-scm" ,python-setuptools-scm)
|
||||
("pytest-doctestplus" ,python-pytest-doctestplus)))
|
||||
(list python-pytest-doctestplus python-pytest python-setuptools-scm))
|
||||
(inputs
|
||||
`(("liberfa" ,erfa)
|
||||
("numpy" ,python-numpy)))
|
||||
(list erfa))
|
||||
(propagated-inputs
|
||||
(list python-numpy))
|
||||
(home-page "https://github.com/liberfa/pyerfa")
|
||||
(synopsis "Python bindings for ERFA")
|
||||
(description
|
||||
|
@ -968,10 +1445,9 @@ functions, so that they can be called with scalar or array inputs.")
|
|||
(base32 "0wxdqn92q1grv8k7xi7h88ac6wnznw4xh5bdlz1vz6za2dgsyj4m"))))
|
||||
(build-system python-build-system)
|
||||
(native-inputs
|
||||
`(("cython" ,python-cython)
|
||||
("pytest" ,python-pytest)))
|
||||
(list python-cython python-pytest))
|
||||
(inputs
|
||||
`(("numpy" ,python-numpy)))
|
||||
(list python-numpy))
|
||||
(home-page "https://github.com/kbarbary/sep")
|
||||
(synopsis "Astronomical source extraction and photometry library")
|
||||
(description
|
||||
|
@ -1055,10 +1531,7 @@ astronomical images, especially when there is no WCS information available.")
|
|||
;; framework https://github.com/brandon-rhodes/assay
|
||||
`(#:tests? #f))
|
||||
(inputs
|
||||
`(("python-certifi" ,python-certifi)
|
||||
("python-jplephem" ,python-jplephem)
|
||||
("python-numpy" ,python-numpy)
|
||||
("python-sgp4" ,python-sgp4)))
|
||||
(list python-certifi python-jplephem python-numpy python-sgp4))
|
||||
(home-page "https://rhodesmill.org/skyfield/")
|
||||
(synopsis "Astronomy for Python")
|
||||
(description
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
|
||||
;;; Copyright © 2012, 2013, 2016 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2012, 2013, 2016, 2021 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
|
||||
;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
|
||||
;;;
|
||||
|
@ -23,6 +23,7 @@
|
|||
#:use-module (guix licenses)
|
||||
#:use-module (gnu packages perl)
|
||||
#:use-module (gnu packages gettext)
|
||||
#:use-module (gnu packages hurd)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (guix download)
|
||||
#:use-module (guix build-system gnu))
|
||||
|
@ -30,18 +31,29 @@
|
|||
(define-public attr
|
||||
(package
|
||||
(name "attr")
|
||||
(version "2.4.48")
|
||||
(version "2.5.1")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "mirror://savannah/attr/attr-"
|
||||
version ".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"1rr4adzwax4bzr2c00f06zcsljv5y6p9wymz1g89ww7cb2rp5bay"))))
|
||||
"1y6sibbkrcjygv8naadnsg6xmsqwfh6cwrqk01l0v2i5kfacdqds"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
`(#:phases
|
||||
(modify-phases %standard-phases
|
||||
,@(if (hurd-target?)
|
||||
`((add-before 'configure 'skip-linux-syscalls
|
||||
(lambda _
|
||||
;; Starting from 2.5.1, libattr includes Linux-specific
|
||||
;; calls to syscall(2). Comment them out for GNU/Hurd
|
||||
;; and instead use the glibc-provided wrappers.
|
||||
(substitute* "Makefile.in"
|
||||
(("libattr/syscalls\\.c") "")
|
||||
(("\tlibattr/la-syscalls\\.lo") "")
|
||||
(("-Wl,[[:graph:]]+/libattr\\.lds") "")))))
|
||||
'())
|
||||
(replace 'check
|
||||
(lambda* (#:key target #:allow-other-keys)
|
||||
;; Use the right shell.
|
||||
|
@ -57,8 +69,7 @@
|
|||
;; extended attributes, and we wish to allow Guix to be built
|
||||
;; on such systems.
|
||||
(unless target
|
||||
(system* "make" "tests" "-C" "test"))
|
||||
#t)))))
|
||||
(system* "make" "tests" "-C" "test")))))))
|
||||
(inputs
|
||||
;; Perl is needed to run tests; remove it from cross builds.
|
||||
(if (%current-target-system)
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -44,11 +44,11 @@
|
|||
(build-system gnu-build-system)
|
||||
;; Marked as "required" in augeas.pc.
|
||||
(propagated-inputs
|
||||
`(("libxml2" ,libxml2)))
|
||||
(list libxml2))
|
||||
(inputs
|
||||
`(("readline" ,readline)))
|
||||
(list readline))
|
||||
(native-inputs
|
||||
`(("pkg-config" ,pkg-config)))
|
||||
(list pkg-config))
|
||||
(home-page "https://augeas.net")
|
||||
(synopsis "Edit configuration files programmatically")
|
||||
(description
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2018, 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||
;;; Copyright © 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
|
||||
;;; Copyright © 2019, 2020, 2022 Ricardo Wurmus <rekado@elephly.net>
|
||||
;;; Copyright © 2020 B. Wilson <elaexuotee@wilsonb.com>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -27,6 +28,7 @@
|
|||
#:use-module (gnu packages tls)
|
||||
#:use-module (gnu packages xml)
|
||||
#:use-module (guix build-system gnu)
|
||||
#:use-module (guix build-system go)
|
||||
#:use-module (guix download)
|
||||
#:use-module (guix git-download)
|
||||
#:use-module ((guix licenses) #:prefix license:)
|
||||
|
@ -59,14 +61,11 @@
|
|||
(for-each delete-file (find-files lib "\\.a$"))
|
||||
#t))))))
|
||||
(native-inputs
|
||||
`(("pkg-config" ,pkg-config)
|
||||
|
||||
;; XXX: Perhaps this should be propagated from xmlsec.
|
||||
("libltdl" ,libltdl)))
|
||||
(list pkg-config
|
||||
;; XXX: Perhaps this should be propagated from xmlsec.
|
||||
libltdl))
|
||||
(inputs
|
||||
`(("linux-pam" ,linux-pam)
|
||||
("openssl" ,openssl)
|
||||
("xmlsec-openssl" ,xmlsec-openssl)))
|
||||
(list linux-pam openssl xmlsec-openssl))
|
||||
(home-page "https://www.nongnu.org/oath-toolkit/")
|
||||
(synopsis "One-time password (OTP) components")
|
||||
(description
|
||||
|
@ -91,41 +90,58 @@ data.")
|
|||
(license (list license:lgpl2.1+ ; the libraries (liboath/ & libpskc/)
|
||||
license:gpl3+)))) ; the tools (everything else)
|
||||
|
||||
(define-public oauth2l
|
||||
(package
|
||||
(name "oauth2l")
|
||||
(version "1.2.2")
|
||||
(source
|
||||
(origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/google/oauth2l")
|
||||
(commit (string-append "v" version))))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32 "0a9x0b31ybyjg0k7923xw6zr6crm0kigcn8g6hyr228nbvw35r8w"))))
|
||||
(build-system go-build-system)
|
||||
(arguments
|
||||
'(#:import-path "github.com/google/oauth2l"))
|
||||
(home-page "https://github.com/google/oauth2l")
|
||||
(synopsis "Simple CLI for interacting with Google API authentication")
|
||||
(description
|
||||
"@code{oauth2l} (pronounced ``oauth tool'') is a simple command-line tool
|
||||
for working with @url{https://developers.google.com/identity/protocols/OAuth2,
|
||||
Google OAuth 2.0} written in Go. Its primary use is to fetch and print OAuth
|
||||
2.0 access tokens, which can be used with other command-line tools and
|
||||
scripts.")
|
||||
(license license:asl2.0)))
|
||||
|
||||
(define-public yubico-pam
|
||||
(let ((commit "b5bd00db81e0e0e0ecced65c684080bb56ddc35b")
|
||||
(revision "0"))
|
||||
(package
|
||||
(name "yubico-pam")
|
||||
(version (git-version "2.26" revision commit))
|
||||
(source (origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/Yubico/yubico-pam")
|
||||
(commit commit)))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32
|
||||
"10dq8dqi3jldllj6p8r9hldx9sank9n82c44w8akxrs1vli6nj3m"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
;; The pam_test fails because ykclient fails to build a Curl handle.
|
||||
'(#:make-flags '("TESTS=util_test")))
|
||||
(inputs
|
||||
`(("linux-pam" ,linux-pam)
|
||||
("libyubikey" ,libyubikey)
|
||||
("ykclient" ,ykclient)
|
||||
("yubikey-personalization" ,yubikey-personalization)))
|
||||
(native-inputs
|
||||
`(("autoconf" ,autoconf)
|
||||
("automake" ,automake)
|
||||
("libtool" ,libtool)
|
||||
("asciidoc" ,asciidoc)
|
||||
("pkg-config" ,pkg-config)))
|
||||
(home-page "https://developers.yubico.com/yubico-pam")
|
||||
(synopsis "Yubico pluggable authentication module")
|
||||
(description "The Yubico PAM module provides an easy way to integrate the
|
||||
(package
|
||||
(name "yubico-pam")
|
||||
(version "2.27")
|
||||
(source (origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/Yubico/yubico-pam")
|
||||
(commit version)))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32
|
||||
"0hb773zlf11xz4bwmsqv2mq5d4aq2g0crdr5cp9xwc4ivi5gd4kg"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
;; The pam_test fails because ykclient fails to build a Curl handle.
|
||||
'(#:make-flags '("TESTS=util_test")))
|
||||
(inputs
|
||||
(list linux-pam libyubikey ykclient yubikey-personalization))
|
||||
(native-inputs
|
||||
(list autoconf automake libtool asciidoc pkg-config))
|
||||
(home-page "https://developers.yubico.com/yubico-pam")
|
||||
(synopsis "Yubico pluggable authentication module")
|
||||
(description "The Yubico PAM module provides an easy way to integrate the
|
||||
YubiKey into your existing user authentication infrastructure.")
|
||||
(license license:bsd-2))))
|
||||
(license license:bsd-2)))
|
||||
|
||||
(define-public pamtester
|
||||
(package
|
||||
|
@ -141,9 +157,9 @@ YubiKey into your existing user authentication infrastructure.")
|
|||
(base32 "1mdj1wj0adcnx354fs17928yn2xfr1hj5mfraq282dagi873sqw3"))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs
|
||||
`(("pkg-config" ,pkg-config)))
|
||||
(list pkg-config))
|
||||
(inputs
|
||||
`(("linux-pam" ,linux-pam)))
|
||||
(list linux-pam))
|
||||
(home-page "http://pamtester.sourceforge.net/")
|
||||
(synopsis "Utility for testing pluggable authentication modules (PAM) facility")
|
||||
(description
|
||||
|
|
|
@ -42,10 +42,8 @@
|
|||
(sha256
|
||||
(base32 "16mlbdys8q4ckxlvxyhwkdnh1ay9f6g0cyp1kylkpalgnik398gq"))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs `(("pkg-config" ,pkg-config)
|
||||
("which" ,which)))
|
||||
(inputs `(("guile" ,guile-2.2)
|
||||
("perl" ,perl))) ; for doc generator mdoc
|
||||
(native-inputs (list pkg-config which))
|
||||
(inputs (list guile-2.2 perl)) ; for doc generator mdoc
|
||||
(arguments
|
||||
'(#:configure-flags
|
||||
;; XXX Needed to build 5.18.16. ./configure fails without it:
|
||||
|
|
|
@ -59,42 +59,47 @@
|
|||
"113nlmidxy9kjr45kg9x3ngar4951mvag1js2a3j8nxcz34wxsv4"))))
|
||||
(build-system gnu-build-system)
|
||||
(inputs
|
||||
;; TODO: remove `if' in the next rebuild cycle.
|
||||
(if (%current-target-system)
|
||||
`(("bash" ,bash-minimal)
|
||||
("perl" ,perl)
|
||||
("m4" ,m4))
|
||||
'()))
|
||||
(native-inputs
|
||||
`(("perl" ,perl)
|
||||
`(("bash" ,bash-minimal)
|
||||
("perl" ,perl)
|
||||
("m4" ,m4)))
|
||||
(native-inputs
|
||||
(list perl m4))
|
||||
(arguments
|
||||
`(;; XXX: testsuite: 209 and 279 failed. The latter is an impurity. It
|
||||
;; should use our own "cpp" instead of "/lib/cpp".
|
||||
#:tests? #f
|
||||
,@(if (%current-target-system)
|
||||
`(#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'install 'patch-non-shebang-references
|
||||
(lambda* (#:key build inputs outputs #:allow-other-keys)
|
||||
;; `patch-shebangs' patches shebangs only, and the Perl
|
||||
;; scripts use a re-exec feature that references the
|
||||
;; build hosts' perl. Also, BASH and M4 store references
|
||||
;; hide in the scripts.
|
||||
(let ((bash (assoc-ref inputs "bash"))
|
||||
(m4 (assoc-ref inputs "m4"))
|
||||
(perl (assoc-ref inputs "perl"))
|
||||
(out (assoc-ref outputs "out"))
|
||||
(store-directory (%store-directory)))
|
||||
(substitute* (find-files (string-append out "/bin"))
|
||||
(((string-append store-directory "/[^/]*-bash-[^/]*"))
|
||||
bash)
|
||||
(((string-append store-directory "/[^/]*-m4-[^/]*"))
|
||||
m4)
|
||||
(((string-append store-directory "/[^/]*-perl-[^/]*"))
|
||||
perl))
|
||||
#t)))))
|
||||
'())))
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
,@(if (%current-target-system)
|
||||
'((add-after 'install 'patch-non-shebang-references
|
||||
(lambda* (#:key build inputs outputs #:allow-other-keys)
|
||||
;; `patch-shebangs' patches shebangs only, and the Perl
|
||||
;; scripts use a re-exec feature that references the
|
||||
;; build hosts' perl. Also, BASH and M4 store references
|
||||
;; hide in the scripts.
|
||||
(let ((bash (assoc-ref inputs "bash"))
|
||||
(m4 (assoc-ref inputs "m4"))
|
||||
(perl (assoc-ref inputs "perl"))
|
||||
(out (assoc-ref outputs "out"))
|
||||
(store-directory (%store-directory)))
|
||||
(substitute* (find-files (string-append out "/bin"))
|
||||
(((string-append store-directory "/[^/]*-bash-[^/]*"))
|
||||
bash)
|
||||
(((string-append store-directory "/[^/]*-m4-[^/]*"))
|
||||
m4)
|
||||
(((string-append store-directory "/[^/]*-perl-[^/]*"))
|
||||
perl))))))
|
||||
'())
|
||||
(add-after 'install 'unpatch-shebangs
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
;; Scripts that "autoconf -i" installs (config.guess,
|
||||
;; config.sub, and install-sh) must use a regular shebang
|
||||
;; rather than a reference to the store. Restore it.
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(build-aux (string-append
|
||||
out "/share/autoconf/build-aux")))
|
||||
(substitute* (find-files build-aux)
|
||||
(("^#!.*/bin/sh") "#!/bin/sh"))))))))
|
||||
(home-page "https://www.gnu.org/software/autoconf/")
|
||||
(synopsis "Create source code configuration scripts")
|
||||
(description
|
||||
|
@ -134,19 +139,7 @@ know anything about Autoconf or M4.")
|
|||
(executable-file? file)))
|
||||
(find-files "bin"
|
||||
(lambda (file stat)
|
||||
(executable-file? file)))))
|
||||
#t))
|
||||
(add-after 'install 'unpatch-shebangs
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
;; Scripts that "autoconf -i" installs (config.guess,
|
||||
;; config.sub, and install-sh) must use a regular shebang
|
||||
;; rather than a reference to the store. Restore it.
|
||||
;; TODO: Move this phase to 'autoconf-2.69'.
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(build-aux (string-append
|
||||
out "/share/autoconf/build-aux")))
|
||||
(substitute* (find-files build-aux)
|
||||
(("^#!.*/bin/sh") "#!/bin/sh")))))))))))
|
||||
(executable-file? file)))))))))))))
|
||||
|
||||
(define-public autoconf autoconf-2.69)
|
||||
|
||||
|
@ -216,9 +209,9 @@ files with a system-specific shebang."
|
|||
(inputs `(("guile"
|
||||
;; XXX: Kludge to hide the circular dependency.
|
||||
,(module-ref (resolve-interface '(gnu packages guile))
|
||||
'guile-2.0))
|
||||
'guile-3.0/fixed))
|
||||
("autoconf" ,autoconf)
|
||||
("bash" ,bash)))
|
||||
("bash" ,bash-minimal)))
|
||||
(arguments
|
||||
'(#:modules ((guix build utils))
|
||||
#:builder
|
||||
|
@ -316,7 +309,7 @@ contributed as free software by the community.")
|
|||
(base32
|
||||
"0gv7g61ja9q9zg1m30k4snqwwy1kq7b4df6sb7d2qra7kbdq8af1"))))
|
||||
(build-system gnu-build-system)
|
||||
(inputs `(("perl" ,perl)))
|
||||
(inputs (list perl))
|
||||
(synopsis "Process generated build logs")
|
||||
(description "Autobuild is a package that processes build logs generated
|
||||
when building software. Autobuild is primarily focused on packages using
|
||||
|
@ -331,24 +324,21 @@ output is indexed in many ways to simplify browsing.")
|
|||
(define-public automake
|
||||
(package
|
||||
(name "automake")
|
||||
(version "1.16.2")
|
||||
(version "1.16.3")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "mirror://gnu/automake/automake-"
|
||||
version ".tar.xz"))
|
||||
(sha256
|
||||
(base32
|
||||
"1l7dkqbsmbf94ax29jj1jf6a0r6ikc8jybg1p5m0c3ki7pg5ki6c"))
|
||||
"0fmz2fhmzcpacnprl5msphvaflwiy0hvpgmqlgfny72ddijzfazz"))
|
||||
(patches
|
||||
(search-patches "automake-skip-amhello-tests.patch"))))
|
||||
(build-system gnu-build-system)
|
||||
(inputs
|
||||
;; TODO: remove `if' in the next rebuild cycle.
|
||||
(if (%current-target-system)
|
||||
`(("autoconf" ,autoconf-wrapper)
|
||||
("bash" ,bash-minimal)
|
||||
("perl" ,perl))
|
||||
'()))
|
||||
`(("autoconf" ,autoconf-wrapper)
|
||||
("bash" ,bash-minimal)
|
||||
("perl" ,perl)))
|
||||
(native-inputs
|
||||
`(("autoconf" ,autoconf-wrapper)
|
||||
("perl" ,perl)))
|
||||
|
@ -444,6 +434,20 @@ intuitive format and then Automake works with Autoconf to produce a robust
|
|||
Makefile, simplifying the entire process for the developer.")
|
||||
(license gpl2+))) ; some files are under GPLv3+
|
||||
|
||||
(define-public automake-1.16.5
|
||||
(package
|
||||
(inherit automake)
|
||||
(version "1.16.5")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "mirror://gnu/automake/automake-"
|
||||
version ".tar.xz"))
|
||||
(sha256
|
||||
(base32
|
||||
"0sdl32qxdy7m06iggmkkvf7j520rmmgbsjzbm7fgnxwxdp6mh7gh"))
|
||||
(patches
|
||||
(search-patches "automake-skip-amhello-tests.patch"))))))
|
||||
|
||||
(define-public libtool
|
||||
(package
|
||||
(name "libtool")
|
||||
|
@ -457,7 +461,7 @@ Makefile, simplifying the entire process for the developer.")
|
|||
"0vxj52zm709125gwv9qqlw02silj8bnjnh4y07arrz60r31ai1vw"))
|
||||
(patches (search-patches "libtool-skip-tests2.patch"))))
|
||||
(build-system gnu-build-system)
|
||||
(propagated-inputs `(("m4" ,m4)))
|
||||
(propagated-inputs (list m4))
|
||||
(native-inputs `(("m4" ,m4)
|
||||
("perl" ,perl)
|
||||
;; XXX: this shouldn't be necessary, but without it test
|
||||
|
@ -493,11 +497,19 @@ Makefile, simplifying the entire process for the developer.")
|
|||
(("/bin/sh")
|
||||
(string-append bash "/bin/sh")))
|
||||
#t)))
|
||||
(add-after 'patch-source-shebangs 'restore-ltmain-shebang
|
||||
(lambda* (#:key inputs #:allow-other-keys)
|
||||
(substitute* "build-aux/ltmain.in"
|
||||
(("^#!.*/bin/sh$") "#!/bin/sh"))
|
||||
#t)))))
|
||||
;; These files may be copied into source trees by libtoolize,
|
||||
;; therefore they must not point to store file names that would be
|
||||
;; leaked with tarballs generated by make dist.
|
||||
(add-after 'install 'restore-build-aux-shebang
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(dir (string-append out "/share/libtool/build-aux")))
|
||||
(for-each (lambda (file)
|
||||
(format #t "restoring shebang on `~a'~%" file)
|
||||
(substitute* file
|
||||
(("^#!.*/bin/sh") "#!/bin/sh")))
|
||||
(find-files dir ".*"))
|
||||
#t))))))
|
||||
|
||||
(synopsis "Generic shared library support tools")
|
||||
(description
|
||||
|
@ -546,7 +558,7 @@ complexity of working with shared libraries across platforms.")
|
|||
(install-file "doc/config.sub.1" man1)
|
||||
#t))))))
|
||||
(native-inputs
|
||||
`(("help2man" ,help2man)))
|
||||
(list help2man))
|
||||
(home-page "https://savannah.gnu.org/projects/config")
|
||||
(synopsis "Ubiquitous config.guess and config.sub scripts")
|
||||
(description "The `config.guess' script tries to guess a canonical system triple,
|
||||
|
@ -602,7 +614,7 @@ configuration in nearly all GNU packages (and many others).")
|
|||
(("/usr/bin/env python") (which "python3")))
|
||||
#t)))))
|
||||
(inputs
|
||||
`(("python" ,python-3)))
|
||||
(list python-3))
|
||||
(synopsis "@command{configure} interface for Python-based packages")
|
||||
(description
|
||||
"GNU pyconfigure provides template files for easily implementing
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
;;; Code:
|
||||
(require 'seq)
|
||||
(declare-function package-load-descriptor "package" (pkg-dir))
|
||||
|
||||
(defvar guix-emacs-autoloads-regexp
|
||||
(rx (* any) "-autoloads.el" (zero-or-one "c") string-end)
|
||||
|
@ -39,6 +40,12 @@ The files in the list do not have extensions (.el, .elc)."
|
|||
(directory-files directory 'full-name
|
||||
guix-emacs-autoloads-regexp))))
|
||||
|
||||
(defun guix-emacs--non-core-load-path ()
|
||||
;; Filter out core Elisp directories, which are already handled by Emacs.
|
||||
(seq-filter (lambda (dir)
|
||||
(string-match-p "/share/emacs/site-lisp" dir))
|
||||
load-path))
|
||||
|
||||
;;;###autoload
|
||||
(defun guix-emacs-autoload-packages ()
|
||||
"Autoload Emacs packages found in EMACSLOADPATH.
|
||||
|
@ -46,18 +53,29 @@ The files in the list do not have extensions (.el, .elc)."
|
|||
'Autoload' means to load the 'autoloads' files matching
|
||||
`guix-emacs-autoloads-regexp'."
|
||||
(interactive)
|
||||
(let* ((emacs-non-core-load-path-directories
|
||||
;; Filter out core Elisp directories, which are already autoloaded
|
||||
;; by Emacs.
|
||||
(seq-filter (lambda (dir)
|
||||
(string-match-p "/share/emacs/site-lisp" dir))
|
||||
load-path))
|
||||
(autoloads (mapcan #'guix-emacs-find-autoloads
|
||||
emacs-non-core-load-path-directories)))
|
||||
(let ((autoloads (mapcan #'guix-emacs-find-autoloads
|
||||
(guix-emacs--non-core-load-path))))
|
||||
(mapc (lambda (f)
|
||||
(load f 'noerror))
|
||||
autoloads)))
|
||||
|
||||
;;;###autoload
|
||||
(defun guix-emacs-load-package-descriptors ()
|
||||
"Load descriptors for packages found in EMACSLOADPATH via subdirs.el."
|
||||
(dolist (dir (guix-emacs--non-core-load-path))
|
||||
(let ((subdirs-file (expand-file-name "subdirs.el" dir)))
|
||||
(when (file-exists-p subdirs-file)
|
||||
(with-temp-buffer
|
||||
(insert-file-contents subdirs-file)
|
||||
(goto-char (point-min))
|
||||
(let ((subdirs (read (current-buffer))))
|
||||
(and (equal (car-safe subdirs) 'normal-top-level-add-to-load-path)
|
||||
(equal (car-safe (cadr subdirs)) 'list)
|
||||
(dolist (subdir (cdadr subdirs))
|
||||
(let ((pkg-dir (expand-file-name subdir dir)))
|
||||
(when (file-directory-p pkg-dir)
|
||||
(package-load-descriptor pkg-dir)))))))))))
|
||||
|
||||
(provide 'guix-emacs)
|
||||
|
||||
;;; guix-emacs.el ends here
|
||||
|
|
|
@ -82,10 +82,13 @@ main (int argc, char **argv)
|
|||
unsetenv ("GUILE_LOAD_PATH");
|
||||
unsetenv ("GUILE_LOAD_COMPILED_PATH");
|
||||
|
||||
/* XXX: Do not let GMP allocate via libgc as this can lead to memory
|
||||
corruption in GnuTLS/Nettle since Nettle also uses GMP:
|
||||
#if !SCM_ENABLE_MINI_GMP
|
||||
/* XXX: On Guile < 3.0.6 and Guile built without its bundled mini-GMP, do
|
||||
not let GMP allocate via libgc as this can lead to memory corruption in
|
||||
GnuTLS/Nettle since Nettle also uses GMP:
|
||||
<https://issues.guix.gnu.org/46330>. */
|
||||
scm_install_gmp_memory_functions = 0;
|
||||
#endif
|
||||
|
||||
scm_boot_guile (argc, argv, inner_main, 0);
|
||||
return 0; /* never reached */
|
||||
|
|
|
@ -938,7 +938,7 @@ CONFIG_RAPIDIO_CPS_XX=m
|
|||
CONFIG_RAPIDIO_TSI568=m
|
||||
CONFIG_RAPIDIO_CPS_GEN2=m
|
||||
CONFIG_RAPIDIO_RXS_GEN3=m
|
||||
# CONFIG_X86_SYSFB is not set
|
||||
CONFIG_X86_SYSFB=y
|
||||
|
||||
#
|
||||
# Executable file formats / Emulations
|
||||
|
@ -8495,7 +8495,13 @@ CONFIG_ISCSI_IBFT_FIND=y
|
|||
CONFIG_ISCSI_IBFT=m
|
||||
CONFIG_FW_CFG_SYSFS=m
|
||||
# CONFIG_FW_CFG_SYSFS_CMDLINE is not set
|
||||
# CONFIG_GOOGLE_FIRMWARE is not set
|
||||
CONFIG_GOOGLE_FIRMWARE=y
|
||||
# CONFIG_GOOGLE_SMI is not set
|
||||
CONFIG_GOOGLE_COREBOOT_TABLE=y
|
||||
# CONFIG_GOOGLE_MEMCONSOLE_X86_LEGACY is not set
|
||||
CONFIG_GOOGLE_FRAMEBUFFER_COREBOOT=m
|
||||
# CONFIG_GOOGLE_MEMCONSOLE_COREBOOT is not set
|
||||
# CONFIG_GOOGLE_VPD is not set
|
||||
|
||||
#
|
||||
# EFI (Extensible Firmware Interface) Support
|
||||
|
|
|
@ -928,7 +928,7 @@ CONFIG_RAPIDIO_CPS_XX=m
|
|||
CONFIG_RAPIDIO_TSI568=m
|
||||
CONFIG_RAPIDIO_CPS_GEN2=m
|
||||
CONFIG_RAPIDIO_RXS_GEN3=m
|
||||
# CONFIG_X86_SYSFB is not set
|
||||
CONFIG_X86_SYSFB=y
|
||||
|
||||
#
|
||||
# Executable file formats / Emulations
|
||||
|
@ -8332,7 +8332,13 @@ CONFIG_ISCSI_IBFT_FIND=y
|
|||
CONFIG_ISCSI_IBFT=m
|
||||
CONFIG_FW_CFG_SYSFS=m
|
||||
# CONFIG_FW_CFG_SYSFS_CMDLINE is not set
|
||||
# CONFIG_GOOGLE_FIRMWARE is not set
|
||||
CONFIG_GOOGLE_FIRMWARE=y
|
||||
# CONFIG_GOOGLE_SMI is not set
|
||||
CONFIG_GOOGLE_COREBOOT_TABLE=y
|
||||
# CONFIG_GOOGLE_MEMCONSOLE_X86_LEGACY is not set
|
||||
CONFIG_GOOGLE_FRAMEBUFFER_COREBOOT=m
|
||||
# CONFIG_GOOGLE_MEMCONSOLE_COREBOOT is not set
|
||||
# CONFIG_GOOGLE_VPD is not set
|
||||
|
||||
#
|
||||
# EFI (Extensible Firmware Interface) Support
|
||||
|
|
|
@ -713,7 +713,7 @@ CONFIG_RAPIDIO_CPS_XX=m
|
|||
CONFIG_RAPIDIO_TSI568=m
|
||||
CONFIG_RAPIDIO_CPS_GEN2=m
|
||||
CONFIG_RAPIDIO_RXS_GEN3=m
|
||||
# CONFIG_X86_SYSFB is not set
|
||||
CONFIG_X86_SYSFB=y
|
||||
|
||||
#
|
||||
# Binary Emulations
|
||||
|
@ -737,7 +737,13 @@ CONFIG_ISCSI_IBFT_FIND=y
|
|||
CONFIG_ISCSI_IBFT=m
|
||||
CONFIG_FW_CFG_SYSFS=m
|
||||
# CONFIG_FW_CFG_SYSFS_CMDLINE is not set
|
||||
# CONFIG_GOOGLE_FIRMWARE is not set
|
||||
CONFIG_GOOGLE_FIRMWARE=y
|
||||
# CONFIG_GOOGLE_SMI is not set
|
||||
CONFIG_GOOGLE_COREBOOT_TABLE=y
|
||||
# CONFIG_GOOGLE_MEMCONSOLE_X86_LEGACY is not set
|
||||
CONFIG_GOOGLE_FRAMEBUFFER_COREBOOT=m
|
||||
# CONFIG_GOOGLE_MEMCONSOLE_COREBOOT is not set
|
||||
# CONFIG_GOOGLE_VPD is not set
|
||||
|
||||
#
|
||||
# EFI (Extensible Firmware Interface) Support
|
||||
|
|
|
@ -684,7 +684,7 @@ CONFIG_RAPIDIO_CPS_XX=m
|
|||
CONFIG_RAPIDIO_TSI568=m
|
||||
CONFIG_RAPIDIO_CPS_GEN2=m
|
||||
CONFIG_RAPIDIO_RXS_GEN3=m
|
||||
# CONFIG_X86_SYSFB is not set
|
||||
CONFIG_X86_SYSFB=y
|
||||
|
||||
#
|
||||
# Binary Emulations
|
||||
|
@ -714,7 +714,13 @@ CONFIG_ISCSI_IBFT_FIND=y
|
|||
CONFIG_ISCSI_IBFT=m
|
||||
CONFIG_FW_CFG_SYSFS=m
|
||||
# CONFIG_FW_CFG_SYSFS_CMDLINE is not set
|
||||
# CONFIG_GOOGLE_FIRMWARE is not set
|
||||
CONFIG_GOOGLE_FIRMWARE=y
|
||||
# CONFIG_GOOGLE_SMI is not set
|
||||
CONFIG_GOOGLE_COREBOOT_TABLE=y
|
||||
# CONFIG_GOOGLE_MEMCONSOLE_X86_LEGACY is not set
|
||||
CONFIG_GOOGLE_FRAMEBUFFER_COREBOOT=m
|
||||
# CONFIG_GOOGLE_MEMCONSOLE_COREBOOT is not set
|
||||
# CONFIG_GOOGLE_VPD is not set
|
||||
|
||||
#
|
||||
# EFI (Extensible Firmware Interface) Support
|
||||
|
|
|
@ -825,7 +825,7 @@ CONFIG_RAPIDIO_TSI57X=m
|
|||
CONFIG_RAPIDIO_CPS_XX=m
|
||||
CONFIG_RAPIDIO_TSI568=m
|
||||
CONFIG_RAPIDIO_CPS_GEN2=m
|
||||
# CONFIG_X86_SYSFB is not set
|
||||
CONFIG_X86_SYSFB=y
|
||||
|
||||
#
|
||||
# Executable file formats / Emulations
|
||||
|
@ -7679,7 +7679,13 @@ CONFIG_DMI_SYSFS=m
|
|||
CONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK=y
|
||||
CONFIG_ISCSI_IBFT_FIND=y
|
||||
CONFIG_ISCSI_IBFT=m
|
||||
# CONFIG_GOOGLE_FIRMWARE is not set
|
||||
CONFIG_GOOGLE_FIRMWARE=y
|
||||
# CONFIG_GOOGLE_SMI is not set
|
||||
CONFIG_GOOGLE_COREBOOT_TABLE=y
|
||||
# CONFIG_GOOGLE_MEMCONSOLE_X86_LEGACY is not set
|
||||
CONFIG_GOOGLE_FRAMEBUFFER_COREBOOT=m
|
||||
# CONFIG_GOOGLE_MEMCONSOLE_COREBOOT is not set
|
||||
# CONFIG_GOOGLE_VPD is not set
|
||||
|
||||
#
|
||||
# EFI (Extensible Firmware Interface) Support
|
||||
|
|
|
@ -795,7 +795,7 @@ CONFIG_RAPIDIO_TSI57X=m
|
|||
CONFIG_RAPIDIO_CPS_XX=m
|
||||
CONFIG_RAPIDIO_TSI568=m
|
||||
CONFIG_RAPIDIO_CPS_GEN2=m
|
||||
# CONFIG_X86_SYSFB is not set
|
||||
CONFIG_X86_SYSFB=y
|
||||
|
||||
#
|
||||
# Executable file formats / Emulations
|
||||
|
@ -7461,7 +7461,13 @@ CONFIG_DMI_SYSFS=m
|
|||
CONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK=y
|
||||
CONFIG_ISCSI_IBFT_FIND=y
|
||||
CONFIG_ISCSI_IBFT=m
|
||||
# CONFIG_GOOGLE_FIRMWARE is not set
|
||||
CONFIG_GOOGLE_FIRMWARE=y
|
||||
# CONFIG_GOOGLE_SMI is not set
|
||||
CONFIG_GOOGLE_COREBOOT_TABLE=y
|
||||
# CONFIG_GOOGLE_MEMCONSOLE_X86_LEGACY is not set
|
||||
CONFIG_GOOGLE_FRAMEBUFFER_COREBOOT=m
|
||||
# CONFIG_GOOGLE_MEMCONSOLE_COREBOOT is not set
|
||||
# CONFIG_GOOGLE_VPD is not set
|
||||
|
||||
#
|
||||
# EFI (Extensible Firmware Interface) Support
|
||||
|
|
|
@ -650,7 +650,7 @@ CONFIG_ALIX=y
|
|||
CONFIG_NET5501=y
|
||||
CONFIG_GEOS=y
|
||||
CONFIG_AMD_NB=y
|
||||
# CONFIG_X86_SYSFB is not set
|
||||
CONFIG_X86_SYSFB=y
|
||||
# end of Bus options (PCI etc.)
|
||||
|
||||
#
|
||||
|
@ -674,7 +674,13 @@ CONFIG_ISCSI_IBFT_FIND=y
|
|||
CONFIG_ISCSI_IBFT=m
|
||||
CONFIG_FW_CFG_SYSFS=m
|
||||
# CONFIG_FW_CFG_SYSFS_CMDLINE is not set
|
||||
# CONFIG_GOOGLE_FIRMWARE is not set
|
||||
CONFIG_GOOGLE_FIRMWARE=y
|
||||
# CONFIG_GOOGLE_SMI is not set
|
||||
CONFIG_GOOGLE_COREBOOT_TABLE=y
|
||||
# CONFIG_GOOGLE_MEMCONSOLE_X86_LEGACY is not set
|
||||
CONFIG_GOOGLE_FRAMEBUFFER_COREBOOT=m
|
||||
# CONFIG_GOOGLE_MEMCONSOLE_COREBOOT is not set
|
||||
# CONFIG_GOOGLE_VPD is not set
|
||||
|
||||
#
|
||||
# EFI (Extensible Firmware Interface) Support
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Reference in a new issue