Commit Graph

7418 Commits

Author SHA1 Message Date
Ludovic Courtès
5652c2e147
system: Do not check initrd modules for pseudo file systems.
Reported by hako on #guix.

* gnu/machine/ssh.scm (machine-check-initrd-modules): Filter out pseudo
file systems from 'file-systems'.
* guix/scripts/system.scm (check-initrd-modules): Likewise.
2023-08-08 18:01:54 +02:00
Nicolas Goaziou
c173819c8e
guix: profiles: Fix auto-generated file deletion.
* guix/profiles.scm (texlive-font-maps): Make sure auto-generated file exists
before deleting it, which is not guaranteed when creating the initial texmf
tree union.

This is a followup to e43cbeafd1.
2023-07-30 10:57:41 +02:00
Nicolas Goaziou
e43cbeafd1
guix: profiles: Delete generated files.
* guix/profiles.scm (texlive-font-maps): Delete generated files.

Fixes <https://issues.guix.gnu.org/64906>.
2023-07-29 01:09:40 +02:00
Christopher Baines
3bb3fddb5c
download-nar: Improve output.
Report errors that occur, output the "Downloading from " line before starting
to report progress and end the output with a newline.
2023-07-28 18:08:17 +01:00
Hilton Chain
8874f2da2c
scripts: system: Remove duplicated "--target=TRIPLET" in help messages.
It's already included in (show-cross-build-options-help).

* guix/scripts/system.scm (show-help): Remove "--target=TRIPLET".

Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
2023-07-28 21:52:18 +08:00
Efraim Flashner
1fd4f544b3
transformations: Wrap go binary.
* guix/transformations.scm (tuning-compiler): Adjust to wrap the go
binary with the appropriate environment variable.
(build-system-with-tuning-compiler): Remove custom 'set-microarchitecture
phase.
2023-07-25 16:07:02 +03:00
Ricardo Wurmus
b9bd1bcce9
import/utils: beautify-description: Wrap class names in @code{...}.
* guix/import/utils.scm (beautify-description): Add procedure to wrap words in
@code{...} markup.
* tests/import-utils.scm: Add two tests.
2023-07-19 15:53:28 +02:00
Ricardo Wurmus
45bf1a9a6b
import/utils: Add more initial words to beautify-description.
* guix/import/utils.scm (beautify-description): Add "Classes" and "Tools" to
initial words to be prefixed with "This package provides".
2023-07-19 15:29:22 +02:00
Maxim Cournoyer
d5f8b50365
pack: Move common build code to (guix build pack).
The rationale is to reduce the number of derivations built per pack to ideally
one, to minimize storage requirements.  The number of derivations had gone up
with 68380db4 ("pack: Extract populate-profile-root from
self-contained-tarball/builder.") as a side effect to improving code reuse.

* guix/scripts/pack.scm (guix): Add commentary comment.
(populate-profile-root, self-contained-tarball/builder): Extract to...
* guix/build/pack.scm (populate-profile-root): ... this, and...
(build-self-contained-tarball): ... that, adjusting for use on the build side.
(assert-utf8-locale): New procedure.
(self-contained-tarball, debian-archive, rpm-archive): Adjust accordingly.

Reviewed-by: Ludovic Courtès <ludo@gnu.org>
2023-07-18 16:56:06 -04:00
Nicolas Goaziou
f832746ab6
guix: Fix license translation in texlive importer.
* guix/import/texlive.scm (string->license): Properly translate "artistic2"
into `artistic2.0'.
2023-07-18 18:19:02 +02:00
Nicolas Goaziou
1dc7971429
guix: texlive importer handles scripts with ".texlua" extension.
* guix/import/texlive.scm (linked-scripts): Also offer to link scripts with
a ".texlua" extension.
2023-07-18 18:18:24 +02:00
Nicolas Goaziou
985cf777b9
guix: texlive import ignores TeXworks.
* guix/import/texlive.scm (translate-depends): Ignore TeXworks files from TeX
Live, since they are Windows-only.
2023-07-18 18:18:24 +02:00
Nicolas Goaziou
b5d9ae22f5
guix: texlive importer ignores Asymptote package.
Asymptote is provided in `asymptote' Guix package.  OTOH, asy executable is
not built from TeX Live tree.  Therefore, Asymptote package from TeX Live can be ignored.

* guix/import/texlive.scm (translate-depends): Ignore Asymptote package.
2023-07-18 18:18:24 +02:00
Nicolas Goaziou
e7274a98d5
guix: licenses: Add Academic Free License 2.1.
* guix/licenses.scm (afl2.1): New variable.
2023-07-18 18:18:23 +02:00
Nicolas Goaziou
75677daa83
guix: import: texlive importer handles more licenses.
* guix/import/texlive.scm (string->license): Handle CC0 and ISC licenses.
2023-07-18 18:16:55 +02:00
Christopher Baines
c1f7156d55
svn-download: Handle the single file case when downloading a nar.
Delete the output so that download-nar doesn't error when trying to restore.

* guix/svn-download.scm (svn-multi-fetch): Delete the output if it exists
prior to calling download-nar.
2023-07-18 18:16:55 +02:00
Christopher Baines
32e48b8b43
svn-download: Use download-nar in svn-multi-fetch.
This should help if there are issues fetching from the source repository.

* guix/svn-download.scm (svn-multi-fetch): Use download-nar and adjust
accordingly.
2023-07-18 18:16:54 +02:00
Christopher Baines
a8d937d1bb
svn-download: Use download-nar.
This should help if there are issues fetching from the source repository.

* guix/svn-download.scm (svn-fetch): Use download-nar and adjust accordingly.
2023-07-18 18:16:54 +02:00
Nicolas Goaziou
026ed35ddb
guix: import: Handle texlua and TCL scripts.
* guix/import/texlive.scm (linked-scripts): Also generate scripts from files
with ".tlu" and ".tcl" extensions.
(tlpdb->package): Add appropriate inputs when providing a TCL script.
2023-07-18 18:16:53 +02:00
Nicolas Goaziou
29cc6b1cd6
gnu: Deprecate `texlive-tiny'.
At this point, there are three equivalent TeX Live sub-systems:
texlive-scheme-basic, texlive-tiny, and (texlive-updmap.cfg).  It is confusing
to keep so many around.

* doc/contributing.texi (Submitting Patches): Remove reference to
TEXLIVE-TINY.
* gnu/packages/algebra.scm (pari-gp)[native-inputs]:
(giac)[native-inputs]:
* gnu/packages/chez.scm (chez-sockets)[native-inputs]:
* gnu/packages/engineering.scm (fastcap)[native-inputs]:
* gnu/packages/gettext.scm (po4a)[native-inputs]:
* gnu/packages/maths.scm (cddlib)[native-inputs]:
(gnuplot)[native-inputs]:
(itpp)[native-inputs]:
* gnu/packages/ocaml.scm (unison)[native-inputs]:
* gnu/packages/pdf.scm (extractpdfmark)[native-inputs]:
* gnu/packages/photo.scm (enblend-enfuse): Replace TEXLIVE-TINY with a call to TEXLIVE-UPDMAP.CFG.
* gnu/packages/radio.scm (gnuradio)[native-inputs]: Remove unnecessary
TEXLIVE-TINY.
* gnu/packages/tex.scm (texlive-tiny): Deprecate it in favor of TEXLIVE-SCHEME-BASIC.
(texlive-makecmds)[native-inputs]:  Replace TEXLIVE-TINY with a call to TEXLIVE-UPDMAP.CFG.
* guix/lint.scm (check-inputs-should-be-native): Check only for
"texlive-updmap.cfg" input name.
2023-07-18 18:16:49 +02:00
Nicolas Goaziou
213cde14e3
guix: Add linter warning about texlive-updmap.cfg and texlive-tiny.
* guix/lint.scm (check-inputs-should-be-native): Warn when TEXLIVE-UPDMAP.CFG
and TEXLIVE-TINY are not native inputs.
2023-07-18 18:16:47 +02:00
Nicolas Goaziou
2e189e8863
guix: texlive importer: Do not pull all "scripts/context/" files.
* guix/import/texlive.scm (texlive-generic-locations): Add "scripts/context/"
since this location is split across multiple packages.
* guix/import/texlive.scm (files->locations): Only single out files from
generic locations, not their sub-directories.  E.g., generic location
"scripts/context/lua/" should not fetch "scripts/context/lua/third/" files.
2023-07-18 18:16:45 +02:00
Nicolas Goaziou
944ace7194
guix: Fix sub-directories in texlive importer locations.
* guix/import/texlive.scm (files->locations): When removing a sub-directory,
make sure to actually remove the sub-directory and not the parent.
2023-07-18 18:16:43 +02:00
Nicolas Goaziou
3f8b75b35c
gnu: Remove texlive-default-updmap.cfg.
* gnu/packages/tex.scm (texlive-scripts): Provide "updmap.cfg", along with
other similar files.
(texlive-default-updmap.cfg): Remove variable.
(texlive-updmap.cfg)[source]: Use TEXLIVE-SCRIPTS source.
[arguments]: Use G-expressions.  Adapt #:INSTALL-PLAN according to source change.
* guix/profiles.scm (texlive-font-maps): Use "updmap.cfg" provided by
TEXLIVE-SCRIPTS instead of now defunct TEXLIVE-DEFAULT-UPDMAP.CFG.
2023-07-18 18:16:08 +02:00
Nicolas Goaziou
19fd100413
gnu: Externalize libkpathsea in texlive and texlive-bin.
* gnu/packages/tex.scm (texlive-libkpathsea): New variable.
(texlive-bin): Inherit from above.
[arguments]<#:configure-flags>: Use "--disable-kpathsea",
"--with-system-kpathsea", "--with-kpathsea-includes" and
"--with-kpathsea-lib".
<#:phases>: Remove phases now handled by the package above.
[native-inputs]: Add GROFF-MINIMAL.
[propagated-inputs]: Add TEXLIVE-LIBKPATHSEA.
(texlive-bin-full): New variable.
(texlive-texmf)[build-system]: Use COPY-BUILD-SYSTEM.
[arguments]: Set #:INSTALL-PLAN accordingly.  Replace TEXLIVE-BIN with
TEXLIVE-BIN-FULL.
* guix/profiles.scm (texlive-font-maps): Fetch executables from
TEXLIVE-LIBKPATHSEA instead of TEXLIVE-BIN.
2023-07-18 18:16:08 +02:00
Nicolas Goaziou
4d171bf03f
guix: texlive importer ignores "-dev" packages in propagated inputs.
* guix/import/texlive.scm (translate-depends): Skip "-dev" packages.
2023-07-18 18:15:54 +02:00
Nicolas Goaziou
f3cdb6e203
guix: texlive importer allows meta-packages to build TeX formats.
* guix/import/texlive.scm (tlpdb->package): A package with no locations can
still build TeX format files, and therefore may use TEXLIVE-BUILD-SYSTEM.
2023-07-18 18:15:54 +02:00
Nicolas Goaziou
aea0d94bc1
guix: Handle asl2.0 license in texlive importer.
* guix/import/texlive.scm (string->license): Convert "apache2" to ASL2.0.
2023-07-18 18:15:50 +02:00
Nicolas Goaziou
b72c282d53
guix: Make "gfsl" an alias for gfl1.0 license in texlive importer.
* guix/import/texlive.scm (string->license): Make "gfsl" and alias for GFL1.0.
2023-07-18 18:15:46 +02:00
Nicolas Goaziou
7b45ead9ec
gnu: Update TeX Live packages to 2023.0 (rev 66594).
In addition to refreshing the hashes, updating includes removing spurious
propagated inputs, deprecating removed packages, adding missing dependencies,
and fixing build issues.

* guix/build-system/texlive.scm (%texlive-tag):
(%texlive-revision): Update to 2023.0 (rev 66594).
(%texlive-date): Remove unused variable.
* gnu/packages/tex.scm (texlive-hypdoc):
(texlive-lua-uni-algos):
(texlive-cyrillic-bin):
(texlive-epstopdf): New package.
(texlive-soulutf8): Deprecate variable.
(texlive-scripts):
(texlive-hyphen-complete):
(texlive-tex):
(texlive-latex):
(texlive-bidi):
(texlive-alphalph):
(texlive-docstrip):
(texlive-unicode-data):
(texlive-hopatch):
(texlive-hyphen-base):
(texlive-dvipdfmx):
(texlive-dvips):
(texlive-metafont):
(texlive-mfirstuc):
(texlive-mptopdf):
(texlive-fontinst):
(texlive-tex-gyre):
(texlive-lm):
(texlive-lwarp):
(texlive-mflogo-font):
(texlive-mfware):
(texlive-etex):
(texlive-hardwrap):
(texlive-kpathsea):
(texlive-kpfonts):
(texlive-latex-bin):
(texlive-atenddvi):
(texlive-attachfile):
(texlive-epstopdf-pkg):
(texlive-filehook):
(texlive-fancyvrb):
(texlive-gincltex):
(texlive-graphics-def):
(texlive-graphics):
(texlive-greek-fontenc):
(texlive-hycolor):
(texlive-xcolor):
(texlive-hyperref):
(texlive-pdftex):
(texlive-acronym):
(texlive-preview):
(texlive-ucs):
(texlive-varwidth):
(texlive-acmart):
(texlive-titlesec):
(texlive-metapost):
(texlive-dejavu):
(texlive-libertine):
(texlive-hyperxmp):
(texlive-oberdiek):
(texlive-rerunfilecheck):
(texlive-onedown):
(texlive-tools):
(texlive-l3kernel):
(texlive-l3backend):
(texlive-l3packages):
(texlive-fontspec):
(texlive-sansmathfonts):
(texlive-l3build):
(texlive-lualatex-math):
(texlive-lualibs):
(texlive-luatex):
(texlive-luatexbase):
(texlive-luahbtex):
(texlive-luaotfload):
(texlive-amsmath):
(texlive-manfnt-font):
(texlive-babel):
(texlive-csplain):
(texlive-babel-french):
(texlive-cyrillic):
(texlive-default-updmap.cfg):
(texlive-blindtext):
(texlive-environ):
(texlive-etoc):
(texlive-hanging):
(texlive-fira):
(texlive-firstaid):
(texlive-newfloat):
(texlive-newunicodechar):
(texlive-newverbs):
(texlive-seminar):
(texlive-stackengine):
(texlive-currfile):
(texlive-carlisle):
(texlive-geometry):
(texlive-makeindex):
(texlive-paralist):
(texlive-polyglossia):
(texlive-texinfo):
(texlive-textcase):
(texlive-bookmark):
(texlive-changebar):
(texlive-colortbl):
(texlive-fancyhdr):
(texlive-footmisc):
(texlive-lipsum):
(texlive-listings):
(texlive-kvoptions):
(texlive-incgraph):
(texlive-zref):
(texlive-enotez):
(texlive-pdfpages):
(texlive-stix2-otf):
(texlive-sidecap):
(texlive-stmaryrd):
(texlive-media9):
(texlive-ocgx2):
(texlive-needspace):
(texlive-changepage):
(texlive-pgf):
(texlive-koma-script):
(texlive-bitset):
(texlive-kvsetkeys):
(texlive-listofitems):
(texlive-readarray):
(texlive-examplep):
(texlive-xunicode):
(texlive-bibtex):
(texlive-context):
(texlive-beamer):
(texlive-xmpincl):
(texlive-ydoc):
(texlive-pstricks):
(texlive-iftex):
(texlive-tabu):
(texlive-xkeyval):
(texlive-standalone):
(texlive-siunitx):
(texlive-csquotes):
(texlive-logreq):
(texlive-biblatex):
(texlive-biblatex-apa):
(texlive-todonotes):
(texlive-microtype):
(texlive-minted):
(texlive-caption):
(texlive-symbol):
(texlive-fourier):
(texlive-cabin):
(texlive-newtx):
(texlive-xcharter):
(texlive-ly1):
(texlive-ifmtarg):
(texlive-ifoddpage):
(texlive-storebox):
(texlive-collectbox):
(texlive-collection-basic):
(texlive-adjustbox):
(texlive-tcolorbox):
(texlive-eurosym):
(texlive-translations):
(texlive-translator):
(texlive-textpos):
(texlive-unicode-math):
(texlive-xindy):
(texlive-floatflt):
(texlive-fvextra):
(texlive-was):
(texlive-lineno):
(texlive-babel-dutch):
(texlive-babel-polish):
(texlive-setspace):
(texlive-pdflscape):
(texlive-datetime2):
(texlive-tracklang):
(texlive-ragged2e):
(texlive-everysel):
(texlive-breqn):
(texlive-datatool):
(texlive-lastpage):
(texlive-xstring):
(texlive-xetex):
(texlive-soul):
(texlive-xstring):
(texlive-totcount):
(texlive-totpages):
(texlive-xdvi): Update to 2023.0.
2023-07-18 18:15:06 +02:00
Nicolas Goaziou
9fadbf759c
gnu: texlive-bin: Do not install all linked scripts.
* gnu/packages/tex.scm (texlive-scripts): Include only core scripts along with
their man pages and their dependencies.  Also patch them for use in Guix.
(texlive-bin): Simplify package.
[inputs]: Remove "texlive-extra-src" and "texlive-scripts" inputs.  Remove
labels from other inputs.
[propagated-inputs]: Add TEXLIVE-SCRIPTS.
[arguments]: Use G-expressions.
<#:configure-flags>: Add "--disable-linked-scripts".
<#:phases>: Remove phases relative to scripts.
* guix/profiles.scm (texlive-font-maps): Fetch executables from both
TEXLIVE-SCRIPTS and TEXLIVE-BIN.
* guix/import/texlive.scm (tlpdb-file): Grab file from TEXLIVE-SCRIPTS instead
of TEXLIVE-BIN.
2023-07-18 18:15:05 +02:00
Nicolas Goaziou
ec97cf1569
guix: Let texlive importer handle linked scripts.
* guix/import/texlive.scm (tlpdb): Also retrieve so-called binfiles.
(formats):
(linked-scripts): New functions.
(tlpdb->package): Use new functions to set #:LINK-SCRIPTS argument and
possibly INPUTS.
* tests/texlive.scm (%fake-tlpdb): Add test data.
("texlive->guix-package, single script, no extension"):
("texlive->guix-package, multiple scripts, with extensions"):
("texlive->guix-package, script with associated input"):  New tests.
2023-07-18 18:15:05 +02:00
Nicolas Goaziou
c8e75dfa24
guix: texlive-build-system: Add #:link-scripts argument.
* doc/guix.texi (Build Systems): Document argument.
* guix/build-system/texlive.scm (texlive-build): Add #:LINK-SCRIPTS argument.
* guix/build/texlive-build-system.scm (link-scripts):
(patch-shell-scripts): New function.
(%standard-phases): Add new functions as phases.
2023-07-18 18:15:05 +02:00
Nicolas Goaziou
ecc1c3af11
guix: texlive importer: Set #:texlive-latex-bin? when appropriate.
* guix/import/texlive.scm (latex-bin-dependency-tree): New function.
(tlpdb->package): Set #:TEXLIVE-LATEX-BIN? when appropriate.
* tests/texlive.scm ("texlive->guix-package, lonely `hyphen-base' dependency
and ARCH"): Update test.
2023-07-18 18:15:03 +02:00
Nicolas Goaziou
520551a596
gnu: Replace texlive-latex-base with texlive-latex-bin.
Although `latex-base' is clearly defined on CTAN, it isn't a proper TeX Live
package.  Since we're trying to follow as closely as possible this TeX
distribution, we replace the package with the closest one, which is
`texlive-latex-bin'.  As a consequence, the #:TEXLIVE-LATEX-BASE argument
becomes #:TEXLIVE-LATEX-BIN?, emphasizing the fact that the meaningful values
for it are booleans.

* gnu/packages/graphviz.scm (dot2tex)[propagated-inputs]: Remove
TEXLIVE-GRAPHICS, TEXLIVE-LATEX-BASE.  Add TEXLIVE-LATEX-BIN.
* gnu/packages/plotutils.scm (asymptote)[native-inputs]: Remove
TEXLIVE-LATEX-BASE, TEXLIVE-GRAPHICS, TEXLIVE-L3BACKEND.  Use
TEXLIVE-UPDMAP.CFG.
* gnu/packages/sphinx.scm (python-sphinx)[propagated-inputs]: Remove
TEXLIVE-GRAPHICS, TEXLIVE-LATEX-BASE.  Add TEXLIVE-LATEX-BIN.
* gnu/packages/tex.scm (texlive-latex-base): Deprecate variable.
(texlive-hyphen-complete):
(texlive-tex):
(texlive-latex):
(texlive-docstrip):
(texlive-unicode-data):
(texlive-hyphen-base):
(texlive-tex-ini-files):
(texlive-metafont):
(texlive-modes):
(texlive-knuth-lib):
(texlive-latex-fonts):
(texlive-etex):
(texlive-plain):
(texlive-kpathsea):
(texlive-latexconfig):
(texlive-latex-bin):
(texlive-l3kernel):
(texlive-l3backend):
(texlive-l3packages):
(texlive-luatex):
(texlive-luahbtex):
(texlive-babel):
(texlive-cyrillic):
(texlive-pdftex):
(texlive-cm)[arguments]: Replace #:TEXLIVE-LATEX-BASE with #:TEXLIVE-LATEX-BIN?.
(texlive-lm):
(texlive-lua-alt-getopt):
(texlive-luaotfload):
(texlive-graphics-def):
(texlive-graphics-cfg): Set #:TEXLIVE-LATEX-BIN? to #F.
(texlive-graphics):
(texlive-lualibs):
(texlive-firstaid):
(texlive-atveryend)[arguments]: Set #:TEXLIVE-LATEX-BIN? to #F.
[native-inputs]: Add TEXLIVE-DOCSTRIP, TEXLIVE-PDFTEX.
(texlive-updmap.cfg): Remove TEXLIVE-CM, TEXLIVE-GRAPHICS,
TEXLIVE-LATEX-BASE.  Add TEXLIVE-LATEX-BIN.
(texlive-atbegshi)[arguments]: Set #:TEXLIVE-LATEX-BIN? to #F.
[native-inputs]: Add TEXLIVE-DOCSTRIP, TEXLIVE-PDFTEX.
[propagated-inputs]: Remove TEXLIVE-IFTEX, TEXLIVE-INFWARERR and
TEXLIVE-LTXCMDS.
(texlive-everyshi)[arguments]: Build package with a temporary "latex.fmt"
file.
(texlive-cyrillic): Set #:TEXLIVE-LATEX-BIN? to #T.
* guix/build-system/texlive.scm (default-texlive-latex-base): Rename to
TEXLIVE-LATEX-BIN.
(lower): Set default value for TEXLIVE-LATEX-BIN? to #TRUE.
* gnu/packages/statistics.scm (r-with-tests): Remove TEXLIVE-LATEX-BASE and
TEXLIVE-GRAPHICS.
* doc/guix.texi (Build Systems): Document #:TEXLIVE-LATEX-BIN? argument.
Remove reference to #:TEXLIVE-LATEX-BASE.
2023-07-18 18:15:03 +02:00
Nicolas Goaziou
0d7e2380b6
gnu: Simplify texlive-default-updmap.cfg.
* gnu/packages/tex.scm (texlive-default-updmap.cfg): Use TEXLIVE-ORIGIN.
(texlive-updmap.cfg):
* guix/profiles.scm (texlive-font-maps): Update accordingly.
2023-07-18 18:15:03 +02:00
Nicolas Goaziou
36d7acf003
gnu: Deprecate texlive-base in favor of texlive-scheme-basic.
* gnu/packages/tex.scm (texlive-base): Deprecate variable.
(texlive-updmap.cfg): Use default packages from now deprecated TEXLIVE-BASE.
Also remove already implemented TODO.
* doc/build.scm (pdf-manual):
* gnu/packages/statistics.scm: Replace TEXLIVE-BASE with call to
TEXLIVE-UPDMAP.CFG.
* guix/profiles.scm (texlive-font-maps): Trigger TeX Live hook whenever
a texlive package is included in the manifest.
2023-07-18 18:15:02 +02:00
Nicolas Goaziou
0224a8f400
guix: texlive importer: Fix build system and arguments for meta-packages.
* guix/import/texlive.scm (tlpdb->package): Meta packages should use trivial
build system and an appropriate builder.
* tests/texlive.scm ("texlive->guix-package, meta-package"):
("texlive->guix-package, translate dependencies"): Update tests.
2023-07-18 18:12:55 +02:00
Nicolas Goaziou
5f51601bd9
guix: texlive importer ignores dependencies unnecessary in Guix.
* guix/import/texlive.scm (translate-depends): New function.
(tlpdb->package): Use new function.
* tests/texlive.scm (%fake-tlpdb): Add test data.
("texlive->guix-package, translate dependencies"):
("texlive->guix-package, lonely `hyphen-base' dependency and ARCH"): New tests.
2023-07-18 18:12:55 +02:00
Nicolas Goaziou
47913ab452
guix: Let texlive importer suggest format creation.
* guix/import/texlive.scm (tlpdb): Store "execute" entries.
(tlpdb->package): Add #:CREATE-FORMATS argument when there is an AddFormat
execute action.
* tests/texlive.scm (%fake-tlpdb): Add test data.
("texlive->guix-package, with TeX format"):
("texlive->guix-package, execute but no TeX format"): New tests.
2023-07-18 18:12:49 +02:00
Nicolas Goaziou
7ce20143a7
guix: texlive-build-system: Generate TeX formats.
* guix/build-system/texlive.scm (texlive-build): Add #:CREATE-FORMATS argument.
* doc/guix.texi (Build Systems): Document it.
* guix/build/texlive-build-system.scm (texlive-input?): New function.
(generate-font-metrics): Use new function above.
(create-formats): New function.
(%standard-phases): Add function above to phases.
2023-07-18 18:12:49 +02:00
Nicolas Goaziou
d62b35bbe9
guix: import: Improve importing texlive meta packages.
* guix/import/texlive.scm (tlpdb->package): Generate more appropriate source,
home page and license fields when importing meta packages, i.e., TeX Live
collections and schemes.
* tests/texlive.scm (%fake-tlpdb): Add test data.
("texlive->guix-package, meta-package"): New test.
2023-07-18 18:12:47 +02:00
Nicolas Goaziou
293abb4c4e
guix: texlive-build-system: Handle doc-only packages gracefully.
* guix/build/texlive-build-system.scm (install): Always create #$output, even
if it is empty.
2023-07-18 18:12:46 +02:00
Nicolas Goaziou
a91171ad63
guix: import: Fix Creative Common licenses in texlive importer.
* guix/import/texlive.scm (string->license): Fix symbol used for some CC-BY
licenses.  Add version 4.0 for CC-BY and CC-BY-SA.
2023-07-18 18:12:46 +02:00
Nicolas Goaziou
31cd9a5040
guix: import: Handle native inputs in texlive importer.
* guix/import/texlive.scm (tlpdb->package): Add TEXLIVE-METAFONT as a native
input whenever font metrics are to be generated.
* tests/texlive.scm (%fake-tlpdb): Add test data.
("texlive->guix-package, with METAFONT files"): New test.
2023-07-18 18:12:39 +02:00
Nicolas Goaziou
c09a05d06c
guix: texlive-build-system: Generate font metrics.
* guix/build/texlive-build-system.scm (install-as-runfiles):
(generate-font-metrics): New function.
(build): Use INSTALL-AS-RUNFILES.
(%standard-phases): Add new phase.
2023-07-18 18:12:38 +02:00
Nicolas Goaziou
3fc925aa84
guix: import: Fix multiple licenses output in texlive importer.
* guix/import/texlive.scm (string->license): Add missing case and try first to
split license strings before giving up.
* tests/texlive.scm (%fake-tlpdb): Add test data.
("texlive->guix-package, multiple licenses"): New test.
2023-07-18 18:10:25 +02:00
Nicolas Goaziou
308b3e83c3
guix: import: texlive use full file names for generic directories.
Generic directories, such as "doc/info/" or "doc/man" are shared by multiple
packages.  With this change, the texlive importer specifies the full file name
of package-specific files there, making sure only them are downloaded.

* guix/import/texlive.scm (texlive-generic-locations): New variable.
(files->locations): Renamed from files->directories.
Provide full file names when necessary.
(tlpdb->package): Apply renaming.
2023-07-18 18:10:25 +02:00
Nicolas Goaziou
7a6da1e22a
guix: import: Improve home-page generation in texlive importer.
* guix/import/texlive.scm (tlpdb): Also register `catalogue' key.
(tlpdb->package): First try to use catalogue for the home-page, then the
name.
* tests/texlive.scm (%fake-tlpdb): Add tests data.
("texlive->guix-package, with catalogue entry, no inputs"): New test.
2023-07-18 18:10:25 +02:00
Nicolas Goaziou
4a245129ff
guix: import: Update texlive importer according to new build system.
* guix/import/texlive.scm (tlpdb->package): Generate a package that doesn't
need SIMPLE-TEXLIVE-PACKAGE.
* guix/import/utils.scm (package->definition): Remove special case for
`simple-texlive-package'.
* tests/texlive.scm (%fake-tlpdb): Add test data.
("texlive->guix-package"): Update test.
("texlive->guix-package, no docfiles"): New test.
2023-07-18 18:10:25 +02:00
Nicolas Goaziou
3f22dabc2a
guix: texlive-build-system: Improvements on non-trivial packages.
* guix/build/texlive-build-system.scm (build): Ignore temporary build files
when moving runfiles around.  Remove ".drv" source files prior to compiling
files.  Remove need for #:TEX-DIRECTORY keyword.  Handle ".ins" and ".dtx"
files in different directories.
(install): Install docfiles in "doc" output when available.
* guix/build-system/texlive.scm (texlive-build): Remove #:TEX-DIRECTORY.
* doc/guix.texi (Build Systems): Remove reference to #:TEX-DIRECTORY in
TEXLIVE-BUILD-SYSTEM documentation.  Also mention it now tries to compile
".dtx" files when there is no ".ins" file.
2023-07-18 18:10:24 +02:00
Ricardo Wurmus
eda2c23874
scripts/refresh: Remove column from spec line before sorting.
We want to sort by file and line number, but the column number messes
everything up.

This is a follow-up to commit b43841c124.

* guix/scripts/refresh.scm (guix-refresh): Trim the digits on the right of the
location string before comparing them.
2023-07-17 13:51:54 +02:00
Tobias Geerinckx-Rice
4920d11ec1
download: Remove stale Yandex GNOME mirror.
* guix/download.scm (%mirrors): Remove mirror.yandex.ru from gnome.
2023-07-09 02:00:01 +02:00
Tobias Geerinckx-Rice
c2c13e3225
download: Remove broken X.org mirrors.
These are still at <https://www.x.org/wiki/Releases/Download>, but
then that page hasn't been updated since 2018.

* guix/download.scm (%mirrors): Remove mirror.us.leaseweb.net and
x.cs.pu.edu.tw.
2023-07-09 02:00:01 +02:00
Tobias Geerinckx-Rice
158a218dea
download: Remove obsolete kernel.org mirrors.
* guix/download.scm (%mirrors): Remove kernel.osuosl.org and
mirror.linux.org.au.
2023-07-09 02:00:11 +02:00
Tobias Geerinckx-Rice
75c7f790b0
download: Remove obsolete Savannah subdirectory.
* guix/download.scm (%mirrors): Remove ‘releases-noredirect’ URL.
2023-07-09 02:00:02 +02:00
Josselin Poiret
d17879cd0d
guix: platform: Use srfi-34's raise instead of raise-exception.
* guix/platform.scm (lookup-platform-by-system)
(lookup-platform-by-target)
(lookup-platform-by-target-or-system): Use srfi-34's raise instead of
raise-exception.
2023-07-13 19:00:14 +02:00
Josselin Poiret
0dd293b4d9
gnu: Add libc-for-target and glibc/hurd.
* gnu/packages/patches/glibc-2.37-hurd-clock_t_centiseconds.patch
* gnu/packages/patches/glibc-2.37-hurd-local-clock_gettime_MONOTONIC.patch
* gnu/packages/patches/glibc-2.37-versioned-locpath.patch: New patches.
* gnu/local.mk (dist_patch_DATA): Register them.

* gnu/packages/base.scm (glibc/hurd, libc-for-target): New variables.
(glibc/hurd-headers): Use glibc/hurd.
* gnu/packages/commencement.scm (glibc-final-with-bootstrap-bash)[outputs,
source, arguments]
(glibc-final)[source]: Use libc-for-target instead of glibc.
* gnu/packages/cross-base.scm (cross-libc/deprecated, cross-libc*): Use
libc-for-target.

This part fixes

    https://issues.guix.gnu.org/63641#25

* gnu/packages/commencement.scm (%final-inputs): Change to memoized lambda
taking "system".
* gnu/packages/commencement.scm (canonical-package): Likewise, and update
user, passing (%current-system).
(make-gcc-toolchain): Update user, passing (%current-system).
* gnu/packages/base.scm (%final-inputs): Likewise.
* guix/scripts/refresh.scm (options->update-specs): Likewise.
* guix/build-system/gnu.scm (standard-packages): Add optional "system"
parameter.
(lower): Update caller.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
Co-authored-by: Janneke Nieuwenhuizen <janneke@gnu.org>
2023-07-13 18:20:05 +02:00
Ludovic Courtès
9c51330315
shell: Really take system into account in the cache key.
Fixes <https://issues.guix.gnu.org/63230>.

Previously, when running "guix shell -s X ...", OPTS would contain
something like '((system . "X") ... (system . "DEFAULT")).  Thus, since
'profile-cached-gc-root' would iterate over it in this order, "DEFAULT"
would be passed to 'profile-file-cache-key' and 'profile-spec-cache-key'
instead of "X".

* guix/scripts/shell.scm (profile-cached-gc-root): Reverse OPTS before
entering 'loop'.
2023-07-13 17:20:02 +02:00
Efraim Flashner
691b97aed9
transformations: Allow tuning go packages.
* guix/transformations.scm (build-system-with-tuning-compiler): When
checking if a microarchitecture is supported by the compiler, also check
if it is a go compiler which supports that psabi.  Add a phase after
'setup-go-environment to set the go microarchitecture.
2023-07-12 16:48:28 +03:00
Efraim Flashner
1701b1244d
guix: cpu: Add gcc-architecture->micro-architecture-level mapping.
* guix/cpu.scm (gcc-architecture->micro-architecture-level): New
variable.
2023-07-12 16:48:28 +03:00
Efraim Flashner
4dd5fa9e76
guix: cpu: Refactor cpu->gcc-architecture.
* guix/cpu.scm (cpu->gcc-architecture): Refactor to wrap all the x86_64
options inside a common letrec-syntax.
2023-07-12 16:48:28 +03:00
Efraim Flashner
b93057256f
guix: cpu: Rewrite fallback for x86_64 cpu->gcc-architecture.
* guix/cpu.scm (cpu->gcc-architecture): Adjust the fallback case to use
cpu->micro-architecture-level.
2023-07-12 16:48:28 +03:00
Efraim Flashner
cb0cab2db0
guix: cpu: Add generalized CPU matching.
* guix/cpu.scm (cpu->micro-architecture-level): New variable.
2023-07-12 16:48:27 +03:00
Ricardo Wurmus
febe08ee8a
import/cran: Add one more package name transformation.
* guix/import/cran.scm (transform-sysname): Add entry for "zlib-devel".
2023-07-12 14:29:02 +02:00
Ricardo Wurmus
b43841c124
refresh: Sort update specs by package location.
Fixes <https://issues.guix.gnu.org/64358>.

* guix/scripts/refresh.scm (guix-refresh): Sort update specs by location from
bottom to top before updating packages.
2023-07-12 14:29:01 +02:00
nathan
9cf2f08852
avahi: Fix exception when #:timeout is #f.
* guix/avahi.scm (avahi-publish-service-thread): Fixes crash when timeout is
  #f, which is the default for "guix publish --advertise"

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-07-11 15:47:56 +02:00
Ludovic Courtès
fe3321f91a
cache: 'file-expiration-time' uses 'lstat', not 'stat'.
Fixes a bug whereby 'cached-channel-instance' would potentially consider
cache entries obsolete too early because they refer to items in the
store, which is mounted as 'noatime' on Guix System.

* guix/cache.scm (file-expiration-time): Use 'lstat' and
'false-if-exception' rather than 'stat'.  This matches what (guix
scripts shell) does.
2023-07-11 15:47:56 +02:00
Ludovic Courtès
e1c2c2f042
locate: Ignore unreadable manifests.
Fixes <https://issues.guix.gnu.org/64187>.

* guix/scripts/locate.scm (profiles->manifest-entries): Wrap
'profile-manifest' in 'false-if-exception'.

Reported-by: Ricardo Wurmus <rekado@elephly.net>
2023-07-11 15:47:55 +02:00
Ludovic Courtès
0ae419877c
avahi: Poll less.
* guix/avahi.scm (avahi-publish-service-thread): Have #:timeout default
to #f when 'stop-loop?' is NEVER, or 500ms.
(avahi-browse-service-thread): #:timeout defaults to 500ms when
'stop-loop?' is provided.
2023-07-07 15:30:21 +02:00
Efraim Flashner
c7eed71681
guix: git: Set initial branch name for git-fetch.
This removes the 'hint' about choosing a branch name when creating a new
git repository.

* guix/build/git.scm (git-fetch): When running 'git init' add an initial
branch name.
2023-07-05 18:57:29 +03:00
Lars-Dominik Braun
37c2e94cec
guix: node-build-system: Delete from peerDependencies too.
The current version of npm in Guix installs peerDependencies by default,
whereas previously it would just warn about missing/wrong packages.

Fixes <https://issues.guix.gnu.org/issue/64203>.

* guix/build/node-build-system.scm (delete-dependencies): Remove supplied
dependencies from peerDependencies field too.
2023-06-22 12:54:19 +02:00
Ludovic Courtès
1b7aabbc79
Add 'guix locate'.
* guix/scripts/locate.scm, tests/guix-locate.sh: New files.
* Makefile.am (MODULES): Add 'guix/scripts/locate.scm'.
(SH_TESTS): Add 'tests/guix-locate.sh'.
* po/guix/POTFILES.in: Add it.
* doc/guix.texi (Invoking guix locate): New node.

Co-authored-by: Antoine R. Dumont <antoine.romain.dumont@gmail.com>
2023-06-18 23:44:29 +02:00
Ludovic Courtès
1261ce1523
store: Tolerate non-existent GC root directories.
* guix/store/roots.scm (gc-roots): Wrap 'scandir*' call in 'catch'.
* tests/store-roots.scm ("gc-roots, initial"): New test.  Move
'open-connection' call below.
2023-06-18 23:36:25 +02:00
Janneke Nieuwenhuizen
ff690faf66
gnu: Use target-hurd?, system-hurd? instead of hurd-target?, hurd-system?.
* gnu/packages/hurd.scm (hurd-target?): Remove.
(hurd-system?): Move to...
* guix/utils.scm (system-hurd?): ...here.
* gnu/packages/*: Update all users, removing (gnu packages hurd) include where
now unused.
2023-06-17 14:38:32 +02:00
Ludovic Courtès
248cf06149
avahi: Resolve hosts for which name resolution fails.
This avoids attempts to connect to hosts that went off-line.  This is
particularly important for 'guix-daemon --discover', which would so far
keep attempting to talk to LAN hosts after they vanished just because
their mDNS record hasn't expired, leading to significant delays when
fetching narinfos and substitutes.

* guix/avahi.scm (avahi-browse-service-thread)[service-resolver-callback]:
Add handler to RESOLVER-EVENT/FAILURE.
2023-06-16 00:14:52 +02:00
Ludovic Courtès
99a27d361e
guix home: Add missing SRFI-34 import for 'raise'.
Reported at <https://issues.guix.gnu.org/64031>.

* guix/scripts/home.scm: Use (srfi srfi-34), expected by
'list-generations'.

Reported-by: Steven Roose <steven@roose.io>
2023-06-16 00:14:52 +02:00
Ludovic Courtès
a3beb8d741
pull: Preserve channel ordering when using '--commit', '--url', etc.
Previously using '--url', '--commit', or '--branch' would move the
'guix' channel to the front.  This is okay in itself but it gratuitously
leads to a different cache key in 'cached-channel-instance'--IOW, 'guix
time-machine --commit=X' where X is already in cache would gratuitously
recompute the channel derivations.

* guix/scripts/pull.scm (channel-list): Use 'map' instead of 'find' +
'remove' + 'cons'.
2023-06-16 00:14:52 +02:00
Ludovic Courtès
e4259d4e9e
packages: 'package-transitive-supported-systems' detects cycles.
With this change, commands such as 'guix build' or 'guix package' report
obvious package-level cycles upfront.  Derivation-level cycles are not
detected.

* guix/packages.scm (&package-cyclic-dependency-error): New condition
type.
(package-transitive-supported-systems): Define 'visited', check it, and
parameterize it.
* guix/ui.scm (call-with-error-handling): Handle
'&package-cyclic-dependency-error'.
* tests/packages.scm ("package-transitive-supported-systems detects
cycles"): Add test.
2023-06-14 22:54:30 +02:00
Ricardo Wurmus
4699de59ff
import/cran: Add another clause for ASL 2.0.
* guix/import/cran.scm (string->license): Add clause for >= 2.0.
2023-06-14 14:09:35 +02:00
Timothy Sample
e6da6e3152
svn-download: Do not expand keywords.
Subversion keyword expansion is potentially non-reproducible as some of
them expand time strings relative to the local time zone:

  https://issues.guix.gnu.org/43442#18

In practice this is not a problem in Guix since Subversion checkouts
happen in an isolated environment using the "default timezone" (UTC).

However, Software Heritage disables keyword expansion for this very
reason.  By following suit, we make sure content can be retrieved from
there.

* guix/build/svn.scm (svn-fecth): Pass "--ignore-keywords" to
Subversion.
* guix/build-system/texlive.scm (%texlive-date): New variable.
* gnu/packages/java.scm (java-geronimo-xbean-reflect)
(java-geronimo-genesis-2.1): Update the source hash.
* gnu/packages/machine-learning.scm (ghmm): Likewise.
* gnu/packages/video.scm (libsmpeg, libsmpeg-with-sdl1): Likewise.
* gnu/packages/tex.scm (texlive-bin): Update the hash of the
"texlive-scripts" input, and a add a new phase that imitates
Subversion keyword expansion for scripts that need it.
(texlive-latex-base): Update the hash of the "texlive-luatexconfig"
native input.
(texlive-hyphen-base, texlive-dvipdfmx, texlive-dvips, texlive-cm)
(texlive-tex-plain, texlive-kpathsea, texlive-latexconfig)
(texlive-tetex, texlive-pdftex, texlive-xetex): Update the source
hash.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2023-06-11 18:13:44 +02:00
Ludovic Courtès
1c9e992e8c
records: Remove "guix" from error message.
* guix/records.scm (map-fields): Tweak error message.
2023-06-09 14:19:14 +02:00
Ludovic Courtès
53bf9fba0c
tests: Ensure 'elpa' test does not access the network.
Previously it would try to access the real elpa.gnu.org.  This would
succeed when network is available because "taxy-magit-section" is an
existing package.

* guix/import/elpa.scm (elpa-repository)
(package-from-elpa-repository?): Recognize 'gnu/http.
* tests/elpa.scm ("package-latest-release"): Use 'http' instead of
'https'.  Change "taxy-magit-section" to "fake-taxy-magit-section".
2023-06-09 14:19:14 +02:00
Ludovic Courtès
df8b3821a8
import: stackage: Updater resolves inputs lazily.
Fixes the "haskell-stackage" test in 'tests/lint.scm', which started
failing with e6223017d9 because the extra
HTTP GETs induced by the 'haskell-fetch' calls would fail.

* guix/import/stackage.scm (latest-lts-release): Call 'hackage-fetch'
and its continuation from within 'inputs', which is delayed.  Pass it
NAME-VERSION instead of HACKAGE-NAME-VERSION.
2023-06-09 14:19:14 +02:00
Ludovic Courtès
885d524f79
substitute: Gracefully retry after failed partial downloads.
Fixes <https://issues.guix.gnu.org/63443>.
Reported by Attila Lendvai <attila@lendvai.name>.

* guix/scripts/substitute.scm (catch-system-error): New macro.
(download-nar): Add call to 'delete-file-recursively'.
* tests/substitute.scm ("substitute, previous partial download around"):
New test.
2023-06-08 22:54:58 +02:00
Ludovic Courtès
3f5e141829
substitute: Delete cached narinfos more than two-month old.
This allows 'guix substitute' to shrink the cache a bit more, which
saves space and improves performance of cache-cleanup phases since fewer
entries need to be traversed.

* guix/scripts/substitute.scm (cached-narinfo-expiration-time): Define
'max-ttl' and use it as an upper bound.
2023-06-08 22:27:20 +02:00
Ludovic Courtès
92ee0fd5eb
import: Gracefully handle EPIPE.
Previously, "guix import pypi f3 | head -3" would print a backtrace.

* guix/scripts/import.scm (guix-import): Wrap
'pretty-print-with-comments' call in 'leave-on-EPIPE'.
2023-06-08 22:06:00 +02:00
Ludovic Courtès
dc0c5d56ee
records: Use SRFI-11 instead of SRFI-71, for Guile 2.0 compatibility.
This fixes a failure of 'tests/packages.scm' introduced in
b88e38d4b5: some of the tests import (guix
records) on the build side, which uses '%bootstrap-guile' (Guile 2.0)
where SRFI-71 is unavailable.

* guix/records.scm (match-record-inner): Use SRFI-11 instead of SRFI-71.
2023-06-06 11:54:39 +02:00
Ricardo Wurmus
a025d8fee6
import/cran: Ensure current package is not among inputs.
* guix/import/cran.scm (cran-package-inputs): Remove the current package from
the result.
2023-06-05 18:55:11 +02:00
Josselin Poiret
cacc0cb6ab
channels: Raise an error if dependency's introduction is malformed
* guix/channels.scm (sexp->channel-introduction): Do it.
2023-06-04 11:30:18 +02:00
Josselin Poiret
80d1228321
build-system: New agda-build-system.
* guix/build-system/agda.scm: New file.
* guix/build/agda-build-system.scm: New file.
* Makefile.am (MODULES): Register them.
* doc/guix.texi (Build Systems): Add documentation for agda-build-system.
2023-06-04 10:59:34 +02:00
Josselin Poiret
0769a9b3c5
build-system/haskell: Export default-haskell.
* guix/build-system/haskell.scm: Export default-haskell.
2023-06-04 10:59:33 +02:00
Josselin Poiret
f045c7ac80
records: match-record: Do not show internal form.
* guix/records.scm (lookup-field+wrapper): Attach source properties to the
field syntax object instead.
2023-06-04 10:59:28 +02:00
(unmatched-parenthesis ew syntax
4cd5293621
records: Add MATCH-RECORD-LAMBDA.
* guix/records.scm (match-record-lambda): New syntax.
* tests/records.scm ("match-record-lambda"): New test.

Signed-off-by: Josselin Poiret <dev@jpoiret.xyz>
2023-06-04 10:59:25 +02:00
(unmatched-parenthesis d
b88e38d4b5
records: match-record: Support thunked and delayed fields.
* guix/records.scm (match-record): Unwrap matched thunked and delayed fields.
* tests/records.scm ("match-record, thunked field",
"match-record, delayed field"): New tests.

Signed-off-by: Josselin Poiret <dev@jpoiret.xyz>
2023-06-04 10:34:35 +02:00
(unmatched-parenthesis
1a4aace3af
records: match-record: Raise a syntax error if TYPE is nonexistent.
* guix/records.scm (match-record): Raise a human-compherensible syntax error
  if the given record type identifier is unbound.

Co-authored-by: Josselin Poiret <dev@jpoiret.xyz>
Signed-off-by: Josselin Poiret <dev@jpoiret.xyz>
2023-06-04 10:34:33 +02:00
Ludovic Courtès
69dfdb7bd1
environment: Fix unbound-variable bug with '--symlink'.
Fixes <https://issues.guix.gnu.org/63845>.
Reported by Maxim Cournoyer <maxim.cournoyer@gmail.com>.

* guix/scripts/environment.scm (launch-environment/container): Reference
'evaluate-populate-directive' before calling 'call-with-container'.
2023-06-02 16:57:17 +02:00
Ludovic Courtès
0a8f53d61b
read-print: Add 'package/inherit' special form.
* guix/read-print.scm (%special-forms): Add 'package/inherit'.
2023-06-02 15:47:27 +02:00
Ludovic Courtès
acef4cecf9
ci: Reify the timestamps of evaluations.
* guix/ci.scm (<evaluation>)[start-time, checkout-time,
completion-time]: New fields.
2023-06-02 15:47:27 +02:00
Ricardo Wurmus
c2f0ce73a7
import/cran: string->license: Add another case for GPLv3+.
* guix/import/cran.scm (string->license): Translate "GPL (>=3)" to gpl3+.
2023-06-02 12:52:22 +02:00
Ricardo Wurmus
cbbb619ddb
import/cran: Libraries should not use CRAN-GUIX-NAME.
* guix/import/cran.scm (source-dir->dependencies): Do not use CRAN-GUIX-NAME
when processing result of NEEDED-LIBRARIES-IN-DIRECTORY.
2023-06-02 12:49:25 +02:00
Ricardo Wurmus
67183e25ad
import/cran: Also search Makevars file for libraries.
* guix/import/cran.scm (needed-libraries-in-directory): Look at Makevars in
addition to Makevars.in for libraries.
2023-06-02 12:48:42 +02:00
Ludovic Courtès
57ceb64e34
upstream: Honor package properties for ignored and extra inputs.
* guix/upstream.scm (update-package-inputs)[filtered-inputs]
[regular-inputs, native-inputs, propagated-inputs]: New procedures.
Use them in 'update-field' calls.
* tests/guix-refresh.sh (GUIX_TEST_UPDATER_TARGETS): Add "libreoffice"
to the dependencies of "the-test-package".  Add 'updater-ignored-inputs'
property to "the-test-package".
* doc/guix.texi (Invoking guix refresh): Document it.
2023-05-31 23:25:26 +02:00
Ludovic Courtès
9e237fe0bd
import: gem: Updater provides input list.
* guix/import/gem.scm (import-release): Add 'inputs' field.
* tests/gem.scm ("package-latest-release"): New test.
2023-05-31 23:25:26 +02:00
Ludovic Courtès
e6f82fcd5f
import: gem: Factorize "bundler" special case for name mapping.
* guix/import/gem.scm (ruby-package-name): Add "bundler" special case.
(gem->guix-package): Adjust accordingly.
* tests/gem.scm ("gem-recursive-import")
("gem-recursive-import with a specific version"): Remove "ruby-bundler"
from the expected packages.
2023-05-31 23:25:26 +02:00
Ludovic Courtès
d46d1bee1e
import: elpa: Updater provides input list.
* guix/import/elpa.scm (elpa-dependency->upstream-input): New
procedure.
(latest-release): Add 'inputs' field.
* tests/elpa.scm ("package-latest-release"): New test.
2023-05-31 23:25:26 +02:00
Ludovic Courtès
a738c1a0c7
import: cpan: Updater provides input list.
* guix/import/cpan.scm (latest-release): Add 'inputs' field.
* tests/cpan.scm ("package-latest-release"): New test.
2023-05-31 23:25:25 +02:00
Ludovic Courtès
c4fe4e7eb8
import: cpan: Represent dependencies as <upstream-input> records.
* guix/import/cpan.scm (cpan-name->downstream-name)
(cran-dependency->upstream-input, cran-module-inputs): New procedures.
(cpan-module->sexp)[guix-name, convert-inputs]: Remove.
[maybe-inputs]: Adjust to deal with <upstream-input>.
Use 'cpan-name->downstream-name' instead of 'guix-name'.  Add call to
'cpan-module-inputs' and adjust calls to 'maybe-inputs'.  No longer emit
input labels.
* tests/cpan.scm ("cpan->guix-package"): Adjust test accordingly.
2023-05-31 23:25:25 +02:00
Ludovic Courtès
f13e73df10
import: cpan: Remove unary 'string-append' call.
* guix/import/cpan.scm (package->upstream-name): Remove useless
'string-append'.
2023-05-31 23:25:25 +02:00
Ludovic Courtès
cd262c403f
upstream: Remove <upstream-input-change> and related code.
* guix/upstream.scm (<upstream-input-change>): Remove.
(changed-inputs): Remove.
* tests/upstream.scm (test-package, test-new-package)
("changed-inputs returns no changes")
("changed-inputs returns changes to plain input list")
("changed-inputs returns changes to all plain input lists"): Remove.
2023-05-31 23:25:25 +02:00
Ludovic Courtès
ec0a2fc87b
upstream: 'update-package-source' edits input fields.
Previously, 'guix refresh r-ggplot2 -u' and similar commands would print
of list of input changes that would have to be made manually.  With this
change, 'guix refresh -u' takes care of updating input fields
automatically.

* guix/upstream.scm (update-package-inputs): New procedure.
(update-package-source): Call it when 'upstream-source-inputs' returns
true.
* guix/scripts/refresh.scm (update-package): Remove iteration over the
result of 'changed-inputs'.
* guix/import/test.scm (available-updates): Add support for input
lists.
* tests/guix-refresh.sh (GUIX_TEST_UPDATER_TARGETS): Add input list for
"the-test-package".
Make sure 'guix refresh -u' updates 'inputs' accordingly.
* doc/guix.texi (Invoking guix refresh): Mention it.
2023-05-31 23:25:25 +02:00
Ludovic Courtès
9f3ea03516
diagnostics: Factorize 'absolute-location'.
* guix/scripts/style.scm (absolute-location): Move to...
* guix/diagnostics.scm (absolute-location): ... here.
* guix/upstream.scm (update-package-source): Use it.
2023-05-31 23:25:25 +02:00
Ludovic Courtès
e6223017d9
upstream: Replace 'input-changes' field by 'inputs'.
Returning the expected list of inputs rather than changes relative to
the current package definition is less ambiguous and offers more
possibilities for further processing.

* guix/upstream.scm (<upstream-source>)[input-changes]: Remove.
[inputs]: New field.
(<upstream-input>): New record type.
* guix/upstream.scm (upstream-input-type-predicate)
(input-type-filter, upstream-source-regular-inputs)
(upstream-source-native-inputs, upstream-source-propagated-inputs): New
procedures.
(changed-inputs): Expect an <upstream-source> as its second argument.
Adjust accordingly.
* guix/import/pypi.scm (distribution-sha256): New procedure.
(maybe-inputs): Expect a list of <upstream-input>.
(compute-inputs): Rewrite to return a list of <upstream-input>.
(pypi-package-inputs, pypi-package->upstream-source): New procedures.
(make-pypi-sexp): Use it.
* guix/import/stackage.scm (latest-lts-release): Define 'cabal'.
Replace 'input-changes' field by 'inputs'.
* guix/scripts/refresh.scm (update-package): Use 'changed-inputs'
instead of 'upstream-source-input-changes'.
* tests/cran.scm ("description->package"): Adjust order of inputs.
* tests/pypi.scm (default-sha256, default-sha256/base32): New variables.
(foo-json): Add 'digests' entry.
("pypi->guix-package, no wheel"): Check HASH against DEFAULT-SHA256/BASE32.
("pypi->guix-package, wheels"): Likewise.
("pypi->guix-package, no usable requirement file."): Likewise.
("pypi->guix-package, package name contains \"-\" followed by digits"):
Likewise.
("package-latest-release"): New test.
* tests/upstream.scm (test-package-sexp): Remove.
("changed-inputs returns no changes"): Rewrite to use <upstream-source>.
(test-new-package-sexp): Remove.
("changed-inputs returns changes to plain input list"): Rewrite.
("changed-inputs returns changes to all plain input lists"): Likewise.
("changed-inputs returns changes to labelled input list")
("changed-inputs returns changes to all labelled input lists"): Remove.
* guix/import/cran.scm (maybe-inputs): Expect PACKAGE-INPUTS to be a
list of <upstream-input>.
(source-dir->dependencies): Return a list of <upstream-input>.
(vignette-builders): Likewise.
(uri-helper, cran-package-source-url)
(cran-package-propagated-inputs, cran-package-inputs): New procedures.
(description->package): Use them instead of local definitions.
(latest-cran-release): Replace 'input-changes' field by 'inputs'.
(latest-bioconductor-release): Likewise.
(format-inputs): Remove.
* guix/import/hackage.scm (cabal-package-inputs): New procedure.
(hackage-module->sexp): Use it.
[maybe-inputs]: Expect a list of <upstream-input>.
2023-05-31 23:25:24 +02:00
Ludovic Courtès
e7910f4882
import: json: Add #:timeout to 'json-fetch'.
* guix/import/json.scm (json-fetch): Add #:timeout and pass it to
'http-fetch'.
2023-05-31 23:25:24 +02:00
Ludovic Courtès
4663cfd381
import: utils: 'call-with-networking-exception-handler' doesn't unwind.
That way backtraces show where the error actually originates from.

* guix/import/utils.scm (call-with-networking-exception-handler):
Rewrite using 'with-exception-handler'.
2023-05-31 23:25:24 +02:00
Ludovic Courtès
d2f36abd02
tests: pypi: Rewrite tests using a local HTTP server.
* guix/import/pypi.scm (%pypi-base-url): New variable.
(pypi-fetch): Use it.
* tests/pypi.scm (foo-json): Compute URLs relative to '%local-url'.
(test-json-1, test-json-2, test-source-hash): Remove.
(file-dump): New procedure.
(with-pypi): New macro.
("pypi->guix-package, no wheel")
("pypi->guix-package, wheels")
("pypi->guix-package, no usable requirement file.")
("pypi->guix-package, package name contains \"-\" followed by digits"):
Rewrite using 'with-pypi'.
2023-05-31 23:25:24 +02:00
Ludovic Courtès
09526da78f
tests: http: Allow responses to specify a path.
* guix/tests/http.scm (%local-url): Add #:path parameter and honor it.
(call-with-http-server)[responses]: Add extra clause with 'path'.
[bad-request]: New variable.
[server-body]: Handle three-element clauses.
Wrap 'run-server' call in 'parameterize'.
2023-05-31 23:25:24 +02:00
Ludovic Courtès
d0be53d03e
transformations: Add "--tune" to "--help-transform".
* guix/transformations.scm (show-transformation-options-help/detailed):
Add '--tune'.
2023-05-31 23:24:33 +02:00
Remco van 't Veer
782d806c3a
guix gc: Round MiBs in user feedback.
* guix/scripts/gc.scm (guix-gc): Round MiBs in user feedback.

Signed-off-by: Florian Pelz <pelzflorian@pelzflorian.de>
2023-05-31 22:45:35 +02:00
Ludovic Courtès
8af9a2aa5f
substitute: If a server's nar URL is 404, try the next one(s).
If a substitute server advertises in its narinfo, for example, both a
/zstd and a /lzip URL but the /zstd URL is unreachable, try the /lzip
URL.

Fixes <https://issues.guix.gnu.org/63634>.

* guix/narinfo.scm (narinfo-preferred-uris): New procedure.
(narinfo-best-uri): Rebase on top of it.
* guix/scripts/substitute.scm (download-nar)[try-fetch]: New procedure.
Use 'narinfo-preferred-uris' and 'try-fetch' to attempt all the URLs of
NARINFO.
* tests/substitute.scm (request-substitution): Remove 'parameterize'.
Delete DESTINATION.
("substitute, preferred nar URL is 404, other is 200"): New test.
2023-05-30 00:15:29 +02:00
Ludovic Courtès
ca1ea6373a
self: Install 'guix-daemon.cil'.
* guix/self.scm (selinux-policy): New procedure.
(miscellaneous-files): Add 'daemon' parameter.  Add 'guix-daemon.cil'.
(compiled-guix): Adjust call to 'miscellaneous-files'.
2023-05-25 12:51:16 +02:00
Ludovic Courtès
9fa92acbf0
self: Build against "graphviz-minimal".
Fixes <https://issues.guix.gnu.org/63050>.
Reported by Andreas Enge <andreas@enge.fr>.

* guix/self.scm (%packages): Change "graphviz" to refer to
"graphviz-minimal".  Add "font-ghostscript".
(info-manual): Define 'font-ghostscript'.
[build]: Set XDG_DATA_DIRS.
2023-05-24 15:04:00 +02:00
Ludovic Courtès
3f59fd6d11
substitute: Rethrow with 'raise-exception', not 'throw'.
Rethrowing with 'throw' doesn't work as intended when the exception
being rethrown is a SRFI-34 exception.

Fixes <https://issues.guix.gnu.org/55820>.

* guix/scripts/substitute.scm (kind-and-args-exception?): New variable.
(call-with-cached-connection): Rewrite using 'guard' instead of 'catch'
and 'raise' instead of 'throw'.
(system-error?): Use 'kind-and-args-exception?' instead of local
definition.
2023-05-22 17:05:22 +02:00
Ludovic Courtès
ba5da5125a
style: Add 'arguments' styling rule.
* guix/scripts/style.scm (unquote->ungexp, gexpify-argument-value)
(quote-argument-value, gexpify-argument-tail)
(gexpify-package-arguments): New procedures.
(%gexp-keywords): New variable.
(%options): Add "arguments" case for 'styling-procedure.
(show-stylings): Update.
* tests/style.scm ("gexpify arguments, already gexpified")
("gexpify arguments, non-gexp arguments, margin comment")
("gexpify arguments, phases and flags")
("gexpify arguments, append arguments")
("gexpify arguments, substitute-keyword-arguments")
("gexpify arguments, append substitute-keyword-arguments"): New tests.
* doc/guix.texi (package Reference): For 'arguments', add compatibility
note and link to 'guix style'.
(Invoking guix style): Document the 'arguments' styling rule.
2023-05-18 20:01:32 +02:00
Ludovic Courtès
cd08d64b3a
refresh: Honor '--key-server'.
Previously, the '--key-server' option would be ignored in an invocation
like:

  ./pre-inst-env guix refresh python-scipy=1.8.1 -t pypi -u \
     --key-server=pgp.mit.edu

* guix/upstream.scm (download-tarball): Add #:key-server parameter and
pass it to 'gnupg-verify*'.
(package-update/url-fetch, package-update/git-fetch)
(package-update): Likewise.
* guix/scripts/refresh.scm (update-package): Add #:key-server and pass
it down to 'package-update'.
(guix-refresh): Pass #:key-server to 'update-package'.
2023-05-18 19:20:58 +02:00
Simon Tournier
d81701a85a
scripts: import: elpa: Return consistent error code.
Fixes <https://bug.gnu.org/58308>.
Reported by Ricardo Wurmus.

* guix/scripts/import/elpa.scm (guix-import-elpa): Return consistent error
code independently of the 'recursive' option.

Signed-off-by: Josselin Poiret <dev@jpoiret.xyz>
2023-05-17 22:22:22 +02:00
Simon Tournier
b89ab866bc
scripts: import: elpa: Warn when version is specified.
* guix/scripts/import/elpa.scm (guix-import-elpa): Warn when version is
specified.

Signed-off-by: Josselin Poiret <dev@jpoiret.xyz>
2023-05-17 22:22:21 +02:00
Ludovic Courtès
3186a52e11
download: Refer to the 'guile-gnutls' package and not 'gnutls'.
This reinstates c625e5b64d, which was
reverted due to a circular dependency:

  https://issues.guix.gnu.org/63331

This is a followup to 305794762c, which
removed Guile bindings from 'gnutls'.

* guix/android-repo-download.scm (android-repo-fetch): Refer to
'guile-gnutls instead of 'gnutls.
* guix/cvs-download.scm (cvs-fetch): Likewise.
* guix/git-download.scm (git-fetch): Likewise.
* guix/hg-download.scm (hg-fetch): Likewise.
2023-05-11 13:23:08 +02:00
Efraim Flashner
649ce7b433
Merge branch 'rust-team' 2023-05-09 09:56:33 +03:00
Efraim Flashner
1bb29cd49c
gnu: gcc: Update cpu tuning architectures.
* gnu/packages/gcc.scm (%gcc-7.5-armhf-micro-architectures): Add missing
micro-architecture.
(%gcc-10-armhf-micro-architectures): Adjust accordingly.
(%gcc-11-aarch64-micro-architectures): Add missing micro-architecture.
(%gcc-12-aarch64-micro-architectures, %gcc-12-armhf-micro-architectures,
%gcc-12-x86_64-micro-architectures, %gcc-13-aarch64-micro-architectures,
%gcc-13-armhf-micro-architectures, %gcc-13-x86_64-micro-architectures):
New variables.
(gcc-12)[properties]: Use new compiler-cpu-architectures.
* guix/cpu.scm (cpu->gcc-architecture): Update entries for Intel, AMD,
x86_64 fallback and aarch64.
2023-05-09 09:52:24 +03:00
Efraim Flashner
f4c3f2be94
gnu: rust: Update to 1.67.
* gnu/packages/rust.scm (rust): Update to 1.67.
[arguments]: Add a phase to skip tests requiring mercurial. Extend the
custom 'patch-process-tests phase.
(rust-1.64)[arguments]: Adjust 'patch-cargo-checksums phase to patch
another file.
* guix/build/cargo-build-system.scm (package): Adjust to remove
Cargo.toml.orig file if it exists.
2023-05-07 19:28:57 +03:00
Efraim Flashner
1963daf94c
build: cargo-build-system: Don't try to package when skipping build.
* guix/build/cargo-build-system.scm (package): If the package isn't
going to be built then use the source instead.
2023-05-07 19:28:57 +03:00
Ludovic Courtès
c3d7c09b9f
Revert "download: Refer to the 'guile-gnutls' package and not 'gnutls'."
This reverts commit c625e5b64d, which
introduced a circular dependency: the origin of guile-gnutls relies on
'git-download', which would now depend on guile-gnutls.
2023-05-06 19:12:16 +02:00
Ludovic Courtès
c625e5b64d
download: Refer to the 'guile-gnutls' package and not 'gnutls'.
This is a followup to 305794762c, which
removed Guile bindings from 'gnutls'.

* guix/android-repo-download.scm (android-repo-fetch): Refer to
'guile-gnutls instead of 'gnutls.
* guix/cvs-download.scm (cvs-fetch): Likewise.
* guix/git-download.scm (git-fetch): Likewise.
* guix/hg-download.scm (hg-fetch): Likewise.
2023-05-06 18:19:13 +02:00
Ludovic Courtès
71fd35c1d5
lint: archival: Warn against non-origin package sources.
Suggested by Maxim Cournoyer <maxim.cournoyer@gmail.com>
and Simon Tournier <zimon.toutoune@gmail.com>.

* guix/lint.scm (check-archival): Add 'local-file?' clause.  Clarify
message in case (package-source package) is not an origin.
* tests/lint.scm ("archival: not an origin"): New test.
2023-05-06 17:12:45 +02:00
Jelle Licht
d8ce5e3297
build-system: node: Use --install-links' with npm install'.
Later versions of npm need to explicitly install a copy of local dependencies,
instead of only a symlink.

* guix/build/node-build-system.scm (configure): Add `--install-links' to npm
install invocation.
(install): Ditto.
2023-05-06 13:53:21 +02:00
Ludovic Courtès
75a25d9c2a
read-print: Recognize 'wrap-program' and 'wrap-script' as special forms.
* guix/read-print.scm (%special-forms): Add 'wrap-program' and
'wrap-script'.
2023-05-05 23:47:48 +02:00
Ludovic Courtès
8749f31485
read-print: Correctly read "(. x)".
* guix/read-print.scm (read-with-comments): Check whether REST is a pair
before calling 'set-cdr!'.
* tests/read-print.scm ("read-with-comments: half dot notation"): New test.
2023-05-05 23:47:48 +02:00
Sarthak Shah
ae11fcb84a
transformations: Add '--with-configure-flag'.
* guix/transformations.scm (transform-package-configure-flag): New
procedure.
(%transformation-options, %transformation-options)
(show-transformation-options-help/detailed): Add it.
* tests/transformations.scm ("options->transformation,
with-configure-flag"): New test.
* doc/guix.texi (Package Transformation Options): Document it.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2023-05-04 17:06:44 +02:00
Ludovic Courtès
68fa28b3c3
style: Make 'safe' policy less conservative.
Previously, a mere (arguments '(#:tests? #f)) would lead

  guix style -S inputs --input-simplification=safe

to bail out.  It now recognizes such trivial argument lists and
proceeds.

* guix/scripts/style.scm (trivial-package-arguments?): New procedure.
(simplify-package-inputs): Use it in the 'safe case instead of 'null?'.
* tests/style.scm ("input labels, 'safe' policy, trivial arguments"):
New test.
2023-05-04 17:06:43 +02:00
Ludovic Courtès
916c6e5716
profiles: 'texlive-font-maps' gracefully handles lack of texlive inputs.
Fixes <https://issues.guix.gnu.org/63043>.

* guix/profiles.scm (texlive-font-maps): Define 'texlive-inputs'.
[build]: Use it.
Return #f when TEXLIVE-INPUTS is empty.
2023-05-04 13:09:00 +02:00
Ludovic Courtès
25f04945d9
import: elpa: Standardize warning message.
* guix/import/elpa.scm (melpa-recipe->origin): Standardize warning
message.
2023-05-04 13:09:00 +02:00
Ludovic Courtès
124b921a5e
import: Cosmetic tweaks to 'recursive-import'.
* guix/import/utils.scm (recursive-import): Tweak docstring.  Simplify
'apply' call.
2023-05-04 13:09:00 +02:00
Ludovic Courtès
39eb9b5a5c
import: elpa: Use the expected repo in recursive imports.
* guix/import/elpa.scm (elpa-recursive-import): Pass REPO in calls to
'elpa->guix-package'.
2023-05-04 13:09:00 +02:00
Ludovic Courtès
8e065692c2
import: elpa: 'elpa->guix-package' accepts other keyword arguments.
This is a followup to 3c24da4260.

* guix/import/elpa.scm (elpa->guix-package): Add #:allow-other-keys.
2023-05-04 13:09:00 +02:00
Ludovic Courtès
fc6c96c88a
ftp-client: 'connect*' retries until the timeout has expired.
Partly fixes <https://issues.guix.gnu.org/63024>.
Reported by Greg Hogan <code@greghogan.com>
and Timo Wilken <guix@twilken.net>.

* guix/ftp-client.scm (connect*): When 'select' returns an empty set,
try again until TIMEOUT has expired.
2023-05-04 13:08:59 +02:00
Simon Tournier
03856dce4e
scripts: import: crate: Handle non-existent package.
Fixes <https://bugs/gnu.org/63020>.

* guix/scripts/import/crate.scm (guix-import-crate): Handle non-existent
package input.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-04-30 23:08:06 +02:00
Simon Tournier
7304694f51
guix: import: crate: Fix incorrect returned values.
* guix/import/crate.scm (crate->guix-package): Return compatible values with
'recursive-import'.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-04-30 23:07:58 +02:00
Leo Famulari
3b5b668303
build-system/cmake: Add support for the #:disallowed-references key.
* guix/build-system/cmake.scm (cmake-build, cmake-cross-build):
Add #:disallowed-references.
2023-04-30 04:47:18 -04:00
Ricardo Wurmus
90f67705f5
import/cran: Translate from xml2 to libxml2.
* guix/import/cran.scm (transform-sysname): Add translation from xml2 to
libxml2.
2023-04-29 20:09:30 +02:00
Ricardo Wurmus
2f53d9cce9
import/cran: Add "unix" to list of invalid packages.
* guix/import/cran.scm (invalid-packages): Add "unix".
2023-04-29 20:09:30 +02:00
Ricardo Wurmus
ec52655ce6
guix: Upgrade to Bioconductor 3.16.
* guix/build-system/r.scm (bioconductor-uri): Bump Bioconductor version to
3.17.
* guix/import/cran.scm (%bioconductor-version): Same.
2023-04-29 20:09:30 +02:00
Ricardo Wurmus
cb8d080349
import/pypi: Generate packages using pyproject-build-system.
* guix/import/pypi.scm (make-pypi-sexp): Generate PACKAGE expression where the
value for the BUILD-SYSTEM field is PYPROJECT-BUILD-SYSTEM instead of
PYTHON-BUILD-SYSTEM.
2023-04-29 20:09:30 +02:00
Andreas Enge
92dd588b81
Merge remote-tracking branch 'origin/master' into core-updates 2023-04-24 20:43:01 +02:00
Ludovic Courtès
7931ac810b
read-print: 'pretty-print-with-comments' keeps newlines on long strings.
* guix/read-print.scm (printed-string)[preserve-newlines?]: New
procedure.
Use it to preserve newlines on long strings.
* tests/read-print.scm: Add test.
2023-04-24 10:27:13 +02:00
Andreas Enge
d7ec2805fb
Merge remote-tracking branch 'origin/master' into core-updates 2023-04-23 22:21:00 +02:00
宋文武
4502de61f2
refresh: Support select packages SUBSET by module name.
* guix/scripts/refresh.scm (%options): Support '--select module:NAME'.
(show-help): Adjust accordingly.
(options->update-specs): Honor the module passed by '--select'.
* doc/guix.texi (Invoking guix refresh): Document it.
2023-04-23 15:28:46 +08:00
Andreas Enge
d1252b597d
Merge remote-tracking branch 'origin/master' into core-updates 2023-04-22 09:21:22 +02:00
Ludovic Courtès
1df54ceab3
packages: 'package-direct-sources' correctly handles non-origin sources.
Previously 'package-direct-sources' would trigger a wrong-type-arg error
when passed a package whose 'source' is not an origin, such as
'ruby-sorbet-runtime'.

* guix/packages.scm (package-direct-sources): Call 'expand' if and only
if (package-source package) is an origin.
2023-04-21 17:09:50 +02:00
Ludovic Courtès
6d6add5f8f
ssh: Silence remote daemon messages when sending store items.
Fixes <https://issues.guix.gnu.org/61839>.

Previously, when running 'guix-daemon --debug' on the remote machine,
lots of debugging outputs would be printed to stderr; since the client
wouldn't read it, we could eventually reach a deadlock where the 'guix
repl' process would be stuck writing to stderr while the client is
stuck waiting on its stdout.

* guix/ssh.scm (store-import-channel)[import]: Parameterize
'current-build-output-port'.
2023-04-19 20:12:20 -04:00
Ludovic Courtès
e95e65541a
substitute: Download nar from another server upon ETIMEDOUT.
Previously, 'guix substitute' would fail abruptly with something like:

  guix substitute: warning: while fetching https://ci.guix.gnu.org/nar/lzip/…-example: server is somewhat slow
  guix substitute: warning: try `--no-substitutes' if the problem persists
  guix substitute: error: connect*: Connection timed out
  substitution of /gnu/store/…-example failed

* guix/scripts/substitute.scm (network-error?): Add ETIMEDOUT.
2023-04-19 20:12:20 -04:00
Ludovic Courtès
abdf812acc
environment: Really auto-load (guix scripts pack).
Fixes a performance regression on cache hits introduced in
b31ea797ed, whereby (guix scripts pack)
would be loaded eagerly during startup, leading hundreds of (gnu
packages *) modules to be loaded.

Fixes <https://issues.guix.gnu.org/62899>.

* guix/scripts/environment.scm: Autoload (gnu build install).
(%options): Add indirection when calling 'symlink-spec-option-parser' so
that (guix scripts pack) is auto-loaded only when needed.
2023-04-19 20:12:19 -04:00
Ludovic Courtès
166a3e3fde
ssh: Silence remote daemon messages when sending store items.
Fixes <https://issues.guix.gnu.org/61839>.

Previously, when running 'guix-daemon --debug' on the remote machine,
lots of debugging outputs would be printed to stderr; since the client
wouldn't read it, we could eventually reach a deadlock where the 'guix
repl' process would be stuck writing to stderr while the client is
stuck waiting on its stdout.

* guix/ssh.scm (store-import-channel)[import]: Parameterize
'current-build-output-port'.
2023-04-17 23:50:42 +02:00
Ludovic Courtès
8136c1578e
substitute: Download nar from another server upon ETIMEDOUT.
Previously, 'guix substitute' would fail abruptly with something like:

  guix substitute: warning: while fetching https://ci.guix.gnu.org/nar/lzip/…-example: server is somewhat slow
  guix substitute: warning: try `--no-substitutes' if the problem persists
  guix substitute: error: connect*: Connection timed out
  substitution of /gnu/store/…-example failed

* guix/scripts/substitute.scm (network-error?): Add ETIMEDOUT.
2023-04-17 23:50:42 +02:00
Ludovic Courtès
9fad6067d9
environment: Really auto-load (guix scripts pack).
Fixes a performance regression on cache hits introduced in
b31ea797ed, whereby (guix scripts pack)
would be loaded eagerly during startup, leading hundreds of (gnu
packages *) modules to be loaded.

Fixes <https://issues.guix.gnu.org/62899>.

* guix/scripts/environment.scm: Autoload (gnu build install).
(%options): Add indirection when calling 'symlink-spec-option-parser' so
that (guix scripts pack) is auto-loaded only when needed.
2023-04-17 23:50:41 +02:00
Andreas Enge
216d7bdb73
Merge remote-tracking branch 'origin/master' into core-updates 2023-04-17 19:17:39 +02:00
Christopher Baines
e5c33837cb
self: Restructure accessing packages.
Both for consistency (always use specification->package as defined in this
module) and so that all the packages that are used can be accessed (which
comes in useful when applying grafts).

* guix/self.scm (%packages): New variable.
(specification->package): Use %packages.
(locale-data, translate-texi-manuals, info-manual, guix-command,
compiled-guix): Use specification->package.

Signed-off-by: Christopher Baines <mail@cbaines.net>
2023-04-17 15:39:42 +01:00
Christopher Baines
095754ea88
packages: Export guile-for-grafts.
So this can be used in (guix self).

* guix/packages.scm (guile-for-grafts): Export.

Signed-off-by: Christopher Baines <mail@cbaines.net>
2023-04-17 15:39:40 +01:00
Maxim Cournoyer
3c8a4d64ff
maint: Merge sanity-check-next.py into sanity-check.py.
* gnu/packages/aux-files/python/sanity-check-next.py: Rename to...
* gnu/packages/aux-files/python/sanity-check.py: ... this.
* guix/build-system/pyproject.scm (sanity-check.py): Adjust file name.
* Makefile.am (AUX_FILES): De-register sanity-check-next.py.
2023-04-14 21:01:34 -04:00
Maxim Cournoyer
3bacd3c76a
Merge branch 'master' into core-updates.
Conflicts:
	gnu/local.mk
	gnu/packages/build-tools.scm
	gnu/packages/certs.scm
	gnu/packages/check.scm
	gnu/packages/compression.scm
	gnu/packages/cups.scm
	gnu/packages/fontutils.scm
	gnu/packages/gnuzilla.scm
	gnu/packages/guile.scm
	gnu/packages/ibus.scm
	gnu/packages/image-processing.scm
	gnu/packages/linux.scm
	gnu/packages/music.scm
	gnu/packages/nss.scm
	gnu/packages/pdf.scm
	gnu/packages/python-xyz.scm
	gnu/packages/qt.scm
	gnu/packages/ruby.scm
	gnu/packages/shells.scm
	gnu/packages/tex.scm
	gnu/packages/video.scm
	gnu/packages/vulkan.scm
	gnu/packages/web.scm
	gnu/packages/webkit.scm
	gnu/packages/wm.scm
2023-04-14 17:15:08 -04:00
Maxim Cournoyer
6de7e0e54c
build/glib-or-gtk: Avoid duplicate entries in gdk-pixbuf loaders cache.
* guix/build/glib-or-gtk-build-system.scm (generate-gdk-pixbuf-loaders-cache):
Delete duplicate directories passed as input.
2023-04-14 15:35:36 -04:00
Maxim Cournoyer
cc3dc58f2b
build: qt-utils: Revert setting QT_PLUGIN_PATH exactly.
Fixes <https://issues.guix.gnu.org/57742>.

The documentation of Qt states that it is a supported use case to mix Qt 5 and
Qt 6 plugins in QT_PLUGIN_PATH [0].  This reverts the change to QT_PLUGIN_PATH
introduced in 1f466ed6be ("build: qt: Add qtbase argument and wrap Qt
environment variables exactly.").

[0]  https://doc.qt.io/qt-6.2/deployment-plugins.html#loading-and-verifying-plugins-dynamically

* guix/build/qt-utils.scm (variables-for-wrapping): Wrap QT_PLUGIN_PATH using
the prefix method.
2023-04-14 15:11:39 -04:00
Maxim Cournoyer
7747da6aed
status: Guard against a numerical overflow condition.
Fixes <https://issues.guix.gnu.org/62766>.

* guix/status.scm (update-build): Use 0 as progress when an exception occurs
while computing it.
2023-04-12 08:29:37 -04:00
Ludovic Courtès
671cd78c7a
import: opam: Tweak doc for '--repo' option.
* guix/scripts/import/opam.scm (show-help): Tweak doc for. '--repo'.
2023-04-12 08:29:27 -04:00
Csepp
571907c362
import: opam: opam->guix-package: Fix default repo argument.
* guix/import/opam.scm (opam->guix-package): Make default repo a list of
strings.  Update docstring.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2023-04-12 08:29:27 -04:00
Ludovic Courtès
29e2e7135d
svn-download: Default to non-recursive checkouts.
As it turns out, all packages that fetch code from Subversion expect it
to be non-recursive by default.  Clarify that.

Reported by Timothy Sample <samplet@ngyro.com>.

* guix/svn-download.scm (<svn-reference>)[recursive?]: Default to #f.
(<svn-multi-reference>)[recursive?]: Likewise.
2023-04-12 08:29:26 -04:00
Ludovic Courtès
ea4a66b2af
import: Properly report "no specific version" errors.
* guix/import/cpan.scm (latest-release): Use 'raise' instead of
'error'.
* guix/import/elpa.scm (latest-release): Likewise.
* guix/import/hackage.scm (latest-release): Likewise.
* guix/import/minetest.scm (latest-minetest-release): Likewise.
* guix/import/opam.scm (latest-release): Likewise.
* guix/import/stackage.scm (latest-lts-release): Likewise.
2023-04-12 08:29:26 -04:00
Bruno Victal
0141e00b14
packages: Remove 'origin-sha256' procedure.
* guix/packages.scm (origin-sha256): Remove procedure.
* tests/import-utils.scm (test-import-utils)
[alist->package with explicit source]: Use content-hash-value.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-04-12 08:29:21 -04:00
Florian Pelz
83ee4dcf87
po: Do not auto-translate cross-references to other manuals.
Reported by Gottfried at
<https://lists.gnu.org/archive/html/help-guix/2023-04/msg00000.html>.

* guix/build/po.scm (xref-regexp): Dispatch on the number of
arguments.  Ensure there is no info-manual argument or it is empty.
(translate-cross-references): Adapt to changed regexp.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-04-12 08:29:18 -04:00
Ludovic Courtès
4cc93a8d18
environment: Add '--nesting'.
* guix/scripts/environment.scm (show-environment-options-help)
(%options): Add '--nesting'.
(options/resolve-packages): Handle it.
(launch-environment/container): Add #:nesting? and honor it.
[nesting-mappings]: New procedure.
(guix-environment*): Add support for '--nesting'.
* guix/scripts/shell.scm (profile-cached-gc-root): Special-case
'nesting?'.
* tests/guix-environment-container.sh: Test it.
* doc/guix.texi (Invoking guix shell): Document it.
2023-04-12 08:29:16 -04:00
Maxim Cournoyer
756e1483c8
status: Guard against a numerical overflow condition.
Fixes <https://issues.guix.gnu.org/62766>.

* guix/status.scm (update-build): Use 0 as progress when an exception occurs
while computing it.
2023-04-10 22:20:21 -04:00
Maxim Cournoyer
3bc9082523
status: Guard against a numerical overflow condition.
Fixes <https://issues.guix.gnu.org/62766>.

* guix/status.scm (update-build): Use 0 as progress when an exception occurs
while computing it.
2023-04-10 22:18:29 -04:00
Maxim Cournoyer
22491ed9c5
build: meson: Explicitly invoke "meson setup" instead of just "meson".
* guix/build/meson-build-system.scm (configure): Invoke the setup command to
avoid a deprecation warning.
2023-04-09 12:55:46 -04:00
Maxim Cournoyer
9bf0a6e4a8
build: meson: Honor bindir, libdir and includedir.
This brings our meson-build-system closer to our gnu-build-system in terms of
using different installation prefixes based on the presence of outputs such as
"bin", "lib" or "include".

* guix/build/meson-build-system.scm (configure): Add --bindir, --libdir and
--includedir according to the presence of the "bin", "lib" and "include"
outputs, as done in gnu-build-system.
2023-04-09 12:55:45 -04:00
Ludovic Courtès
0f567d55de
import: opam: Tweak doc for '--repo' option.
* guix/scripts/import/opam.scm (show-help): Tweak doc for. '--repo'.
2023-04-08 23:48:00 +02:00
Csepp
ba88f0414b
import: opam: opam->guix-package: Fix default repo argument.
* guix/import/opam.scm (opam->guix-package): Make default repo a list of
strings.  Update docstring.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2023-04-08 23:47:21 +02:00
Ludovic Courtès
d036e1c544
svn-download: Default to non-recursive checkouts.
As it turns out, all packages that fetch code from Subversion expect it
to be non-recursive by default.  Clarify that.

Reported by Timothy Sample <samplet@ngyro.com>.

* guix/svn-download.scm (<svn-reference>)[recursive?]: Default to #f.
(<svn-multi-reference>)[recursive?]: Likewise.
2023-04-08 23:19:13 +02:00
Ludovic Courtès
adf95a810d
import: Properly report "no specific version" errors.
* guix/import/cpan.scm (latest-release): Use 'raise' instead of
'error'.
* guix/import/elpa.scm (latest-release): Likewise.
* guix/import/hackage.scm (latest-release): Likewise.
* guix/import/minetest.scm (latest-minetest-release): Likewise.
* guix/import/opam.scm (latest-release): Likewise.
* guix/import/stackage.scm (latest-lts-release): Likewise.
2023-04-08 22:54:53 +02:00
Bruno Victal
5481aaacb5
packages: Remove 'origin-sha256' procedure.
* guix/packages.scm (origin-sha256): Remove procedure.
* tests/import-utils.scm (test-import-utils)
[alist->package with explicit source]: Use content-hash-value.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-04-07 18:00:08 +02:00
Florian Pelz
89c536775d
po: Do not auto-translate cross-references to other manuals.
Reported by Gottfried at
<https://lists.gnu.org/archive/html/help-guix/2023-04/msg00000.html>.

* guix/build/po.scm (xref-regexp): Dispatch on the number of
arguments.  Ensure there is no info-manual argument or it is empty.
(translate-cross-references): Adapt to changed regexp.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-04-07 17:38:42 +02:00
Ludovic Courtès
57db09aae7
environment: Add '--nesting'.
* guix/scripts/environment.scm (show-environment-options-help)
(%options): Add '--nesting'.
(options/resolve-packages): Handle it.
(launch-environment/container): Add #:nesting? and honor it.
[nesting-mappings]: New procedure.
(guix-environment*): Add support for '--nesting'.
* guix/scripts/shell.scm (profile-cached-gc-root): Special-case
'nesting?'.
* tests/guix-environment-container.sh: Test it.
* doc/guix.texi (Invoking guix shell): Document it.
2023-04-06 18:34:15 +02:00
Ludovic Courtès
01d9859821
build-system/gnu: Add missing module import.
This import was removed in ae587c2ef0 on
'master'; it was inappropriate on 'core-updates'.

Reported by Christopher Baines.

* guix/build-system/dune.scm: Import (guix build-system gnu).
2023-04-06 11:45:30 +02:00
Maxim Cournoyer
99b25b1313
Merge branch 'master' into staging 2023-03-31 10:48:54 -04:00
Nicolas Goaziou
1dcaa0fc30
guix: Shorten home page URL in texlive importer.
* guix/import/texlive.scm (tlpdb->package): Use short URL for home page.
2023-03-30 18:16:31 +02:00
Ricardo Wurmus
739c257378
import/texlive: tlpdb->package: Ignore files outside of texmf-dist.
* guix/import/texlive.scm (tlpdb->package): Ignore files outside of texmf-dist
because the code assumes that this is the prefix for all files.
2023-03-29 21:07:39 +02:00
Ricardo Wurmus
b849a47bdb
import/texlive: Process license field only when it exists.
* guix/import/texlive.scm (tlpdb->package): Check "catalogue-license" field
before using string->license.
2023-03-29 21:07:39 +02:00
Ricardo Wurmus
03a83c2906
import/texlive: Only process description if it exists.
* guix/import/texlive.scm (tlpdb->package): Run beautify-description only when
the "longdesc" field exists.
2023-03-29 21:07:39 +02:00
Ricardo Wurmus
36f78676e5
import/texlive: Ignore architecture-dependent packages.
* guix/import/texlive.scm (tlpdb->package): Filter "depend" field to exclude
package names ending on ".ARCH".
2023-03-29 21:07:39 +02:00
Maxim Cournoyer
438a0de332
Merge remote-tracking branch 'origin/master' into staging 2023-03-28 22:40:32 -04:00
Maxim Cournoyer
cc7a79a8ad
Revert "lint: Append "/info/refs" to git-reference-url."
This reverts commit c9af27d4ca.

The change causes 'guix lint' to print URI not reachable (403) errors for
GitHub every URLs.
2023-03-28 22:22:50 -04:00