summaryrefslogtreecommitdiff
path: root/guix/build
Commit message (Collapse)AuthorAge
* Merge remote-tracking branch 'origin/master' into core-updatesEfraim Flashner2021-03-24
|\
| * syscalls: Fix RNDADDTOENTCNT on powerpc64le-linux.Chris Marusich2021-03-23
| | | | | | | | | | | | | | | | | | This fixes the failing test add-to-entropy-count in tests/syscalls.scm on powerpc64le-linux. * guix/build/syscalls.scm (RNDADDTOENTCNT): When %host-type starts with "powerpc64le", set this to #x80045201. Otherwise, set it to #x40045201 as before.
| * syscalls: Fix clone on powerpc64le-linux.Chris Marusich2021-03-23
| | | | | | | | | | | | | | This makes the clone procedure work correctly and fixes some test failures on powerpc64le-linux, including tests/containers.scm. * guix/build/syscalls.scm (clone): Add an entry for ppc64le.
| * download: 'tls-wrap' treats premature TLS termination as EOF.Ludovic Courtès2021-03-19
| | | | | | | | | | | | | | | | This is a backport of Guile commit 076276c4f580368b4106316a77752d69c8f1494a. * guix/build/download.scm (tls-wrap)[read!]: Wrap 'get-bytevector-n!' call in 'catch' and handle 'error/premature-termination' GnuTLS errors.
| * syscalls: mounts: Fix a matching bug.Chris Marusich2021-03-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some systems, the columns in /proc/self/mountinfo look like this: 23 28 0:21 / /proc rw,nosuid,nodev,noexec,relatime shared:11 - proc proc rw Before this change, the mounts procedure was written with the assumption that the type and source could always be found in columns 8 and 9, respectively. However, the proc(5) man page explains that there can be zero or more optional fields starting at column 7 (e.g., "shared:11" above), so this assumption is false in some situations. * guix/build/syscalls.scm (mounts): Update the match pattern to use ellipsis to match zero or more optional fields followed by a single hyphen. Remove the trailing ellipsis, since multiple ellipses are not allowed in the same level. The proc(5) man page indicates that there are no additional columns, so it is probably OK to match an exact number of columns at the end like this.
| * build-system/cargo: Don't clobber packaged crates while building.Efraim Flashner2021-03-15
| | | | | | | | | | | | | | | | This fixes an issue where two packages share a common dependent. * guix/build/cargo-build-system.scm (unpack-rust-crates): Only copy rust crates into the target directory if there isn't one already there with the same name.
| * build-system/cargo: Propagate crates across builds.Efraim Flashner2021-03-14
| | | | | | | | | | | | | | | | | | | | | | * guix/build-system/cargo.scm (cargo-build): Add cargo-package-flags, install-source flags. * guix/build/cargo-build-system.scm (unpack-rust-crates, package): New procedures. (install): Also install crate sources. (%standard-phases): Add new phases. * doc/guix.texi (Packaging-guidelines)[Rust Crates]: Adjust to changes in the cargo-build-system.
| * download: 'tls-wrap' returns an unbuffered custom port.Ludovic Courtès2021-03-11
| | | | | | | | | | | | | | | | Partly fixes <https://bugs.gnu.org/46967>. * guix/build/download.scm (tls-wrap)[unbuffered]: New procedure. Pass the result of 'make-custom-binary-input/output-port' to 'unbuffered'.
| * download: 'tls-wrap' avoids intermediate buffer.Ludovic Courtès2021-03-11
| | | | | | | | | | * guix/build/download.scm (tls-wrap)[read!]: Read straight into BV instead of calling 'get-bytevector-some' and 'unget-bytevector'.
| * syscalls: Define the ST_* constants and add 'statfs-flags->mount-flags'.Ludovic Courtès2021-03-10
| | | | | | | | | | | | | | | | | | * guix/build/syscalls.scm (linux?): New variable. (define-statfs-flags): New macro. (ST_RDONLY, ST_NOSUID, ST_NODEV, ST_NOEXEC, ST_SYNCHRONOUS) (ST_MANDLOCK, ST_WRITE, ST_APPEND, ST_IMMUTABLE, ST_NOATIME) (ST_NODIRATIME, ST_RELATIME): New variables. (statfs-flags->mount-flags): New procedure.
* | Merge branch 'master' into core-updatesChristopher Baines2021-03-06
|\|
| * syscalls: Add 'mounts' and the <mount> record type.Ludovic Courtès2021-02-25
| | | | | | | | | | | | | | | | * guix/build/syscalls.scm (<mount>): New record type. (option-string->mount-flags, mount-flags) (octal-decode, mounts): New procedures. (mount-points): Rewrite in terms of 'mount'. * tests/syscalls.scm ("mounts"): New test.
| * syscalls: Define MS_RELATIME.Ludovic Courtès2021-02-25
| | | | | | | | * guix/build/syscalls.scm (MS_RELATIME): New variable.
| * guix: renpy-build-system: Quote data directory.Leo Prikler2021-02-24
| | | | | | | | | | | | | | | | This prevents generated launchers and desktop files from inadvertently crashing if the directory name contains a space. * gnu/build/renpy-build-system.scm (install, install-desktop-file): Use ~s to format data directory.
| * profiles: Fix typo in manifest comment.Ludovic Courtès2021-02-22
| | | | | | | | * guix/build/profiles.scm (build-profile): Fix typo.
* | Merge branch 'master' into core-updatesDanny Milosavljevic2021-02-11
|\|
| * build-system: Add renpy-build-system.Leo Prikler2021-02-07
| | | | | | | | | | | | | | * guix/build/renpy-build-system.scm: New file. * guix/build-system/renpy.scm: New file. * Makefile.am (MODULES): Add them here. * doc/guix.texi (Build Systems): Document renpy-build-system.
* | build/gnu: Only make source checkout files writable.Maxim Cournoyer2021-02-04
| | | | | | | | | | | | | | | | | | | | | | | | | | This is a followup commit to 6129ebddbd. It was suggested by Ludovic in #guix that it's probably safer to leave files extracted from a tarball alone. While at it, guard against possible exceptions that can happen in the presence of dangling symbolic links, for example. * guix/build/gnu-build-system.scm (unpack): Wrap the make-file-writable call in a false-if-exception handler. Move the for-each loop under the file-is-directory? cond branch.
* | build/gnu: Ensure the files are writable after the unpack phase.Maxim Cournoyer2021-02-04
| | | | | | | | | | | | | | Fixes <https://issues.guix.gnu.org/43015>. * guix/build/gnu-build-system.scm (unpack): Call 'make-file-writable' on every source file.
* | build: python: Fix build phases ordering.Maxim Cournoyer2021-02-03
| | | | | | | | | | | | | | | | | | | | | | The wrap phase was happening before the installed site location was added to GUIX_PYTHONPATH, causing wrapped commands to not find their own Python libraries. * guix/build/python-build-system.scm (%standard-phases): Explicit the sequential ordering of phases using add-after directives, so that the wrap phase occurs after the add-install-to-pythonpath and add-install-to-path phases.
* | Merge branch 'master' into core-updatesChristopher Baines2021-02-03
|\|
| * guix package: Add '--export-manifest'.Ludovic Courtès2021-02-01
| | | | | | | | | | | | | | | | | | * guix/scripts/package.scm (export-manifest): New procedure. (show-help, %options): Add '--export-manifest'. (process-query): Honor it. * guix/build/profiles.scm (build-profile): Mention it. * tests/guix-package.sh: Test it. * doc/guix.texi (Invoking guix package): Document it.
| * build-system/julia: Don't rely on file name to set module name.nixo2021-01-30
| | | | | | | | | | | | | | | | | | * guix/build/julia-build-system.scm (project.toml->name): New procedure. (precompile, check, julia-build): Accept new key argument #:julia-package-name. * guix/build-system/julia.scm (julia-build): ... add it. * doc/guix.texi (julia-build-system): Update julia-package-name accordingly. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| * build-system/julia: Enable tests.nixo2021-01-30
| | | | | | | | | | | | | | | | | | | | * guix/build-system/julia.scm (julia-build): Set tests? default to #t. * guix/build/julia-build-system.scm (check): Respect tests? and fix julia invocation. (%standard-phases): Add check phase after install. * doc/guix.texi (julia-build-system): Update accordingly. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* | build/python: Add a sanity check phase.Lars-Dominik Braun2021-02-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new phase validating the usability of installed Python packages. * gnu/packages/aux-files/python/sanity-check.py: New file. * Makefile.am (AUX_FILES): Register it. * guix/build-system/python.scm (sanity-check.py): New variable. (lower): Add the script as an implicit input. * guix/build/python-build-system.scm: Remove trailing #t. (sanity-check): New phase. (%standard-phases): Use it. * tests/builders.scm: (make-python-dummy) (dummy-ok, dummy-dummy-nosetuptools, dummy-fail-requirements) (dummy-fail-import, dummy-fail-console-script): New variables. ("python-build-system: dummy-ok") ("python-build-system: dummy-dummy-nosetuptools") ("python-build-system: dummy-fail-requirements") ("python-build-system: dummy-fail-import") ("python-build-system: dummy-fail-console-script"): Add tests.
* | build/python: Adjust wrap phase to use the new GUIX_PYTHONPATH.Maxim Cournoyer2021-02-01
| | | | | | | | | | * guix/build/python-build-system.scm (wrap): Adjust to use the new GUIX_PYTHONPATH. Remove trailing #t.
* | build/python: Add the installation bin directory to PATH.Maxim Cournoyer2021-02-01
| | | | | | | | | | | | | | | | This also to reduce the need for boilerplate code found in check phase overrides. * guix/build/python-build-system.scm (add-install-to-path): New phase. (%standard-phases): Order it before the check phase.
* | build/python: Always add the install prefix to the Guix PYTHONPATH.Maxim Cournoyer2021-02-01
| | | | | | | | | | | | | | | | | | | | | | This is to remove the need for common boilerplate code in check phase overrides. * guix/build/python-build-system.scm (add-installed-pythonpath): Streamline. This phase depends on the presence of a "python" input; thus GUIX_PYTHONPATH is guaranteed to be defined. Update doc. (add-install-to-pythonpath): New phase. (%standard-phases): Order it before the check phase.
* | build/python: Replace PYTHONPATH by GUIX_PYTHONPATH.Maxim Cournoyer2021-02-01
| | | | | | | | | | * guix/build/python-build-system.scm (add-installed-pythonpath): Replace "PYTHONPATH" by "GUIX_PYTHONPATH".
* | gnu: python: Replace PYTHONPATH by GUIX_PYTHONPATH.Maxim Cournoyer2021-02-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using PYTHONPATH as a mean to discover the Python packages had the following issues: 1. It is not versioned, so different versions of Python would clash if installed in a shared profile. 2. It would interfere with the host Python site on foreign distributions, sometimes preventing a a user to login their GDM session (!). 3. It would take precedence over user installed Python packages installed through pip. 4. It would leak into Python virtualenvs, which are supposed to create isolated Python environments. This changes fixes the above issues by making use of a sitecustomize.py module. The newly introduced GUIX_PYTHONPATH environment variable is read from the environment, filtered for the current Python version of the interpreter, and spliced in 'sys.path' just before Python's own site location, which provides the expected behavior. * gnu/packages/aux-files/python/sitecustomize.py: New file. * Makefile.am: Register it. * gnu/packages/python.scm (customize-site) (guix-pythonpath-search-path): New procedures. (python-2.7)[phases]{install-sitecustomize.py}: New phase. [native-inputs]{sitecustomize.py}: New input. [native-search-paths]: Replace PYTHONPATH with GUIX_PYTHONPATH. (python-3.9)[native-search-paths]: Likewise. [phases]{install-sitecustomize}: Override with correct version. [native-search-paths]: Replace PYTHONPATH with GUIX_PYTHONPATH. * gnu/packages/commencement.scm (python-boot0): [phases]{install-sitecustomize}: Likewise. [native-inputs]{sitecustomize.py}: New input. [native-search-paths]: Replace PYTHONPATH with GUIX_PYTHONPATH. * guix/build/python-build-system.scm (site-packages): Do not add a trailing '/'. squash! gnu: python: Replace PYTHONPATH by GUIX_PYTHONPATH.
* | gnu: texlive-bin: Enable the use of multiple TeX Live trees.Maxim Cournoyer2021-01-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Attempting to compose multiple TeX Live trees (such as can happen when using a texlive-union generated package) proved problematic; only the texmf.cnf configuration file from the union would be honored, causing other TeX Live components to be ignored. This change does away with TeX Live unions, instead relying on the default texmf.cnf configuration file provided by the texlive-bin package to honor individual TeX Live trees referred to via the newly introduced GUIX_TEXMF variable, and replacing the texlive-union procedure by texlive-updmap.cfg, to explicit that generating the fonts map configuration is now its sole purpose. * gnu/packages/tex.scm (texlive-bin)[phases]{customize-texmf}: New phase. {postint}: Move the patching of the texmf.cnf file to the new above phase. Patch the updmap.pl script to find its Perl modules. [native-search-paths]: Rename the TEXMF variable to GUIX_TEXMF. Remove the TEXMFCNF variable. * guix/profiles.scm (texlive-configuration): Remove procedure. (%default-profile-hooks)[texlive-configuration]: Unregister hook. (texlive-union): Alias to what has moved to... (texlivke-updmap.cfg): ... here. Update doc. Do not provide a different texmf.cnf configuration. [inherit]: Do not inherit from texlive-base. [build-system]: Switch to the copy-build-system. [arguments]{install-plan}: New argument. [phases]{regenerate-updmap.cfg}: New phase, which keeps only the fonts map generating code from the previous builder code. [inputs]: Remove bash, and move to ... [propagated-inputs]: ... here. [native-inputs]: Remove field, and move the source of the base updmap.cfg file to... [source]: ... here. [synopsis]: Update. [description]: Likewise. [license]: Delete duplicates.
* | build-systems/gnu: Allow unpacking/repacking more kind of files.Maxim Cournoyer2021-01-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, only plain directories, tar or zip archives were supported as the source of a package for the GNU build system; anything else would cause the unpack phase to fail. Origins relying on snippets would suffer from the same problem. This change adds the support to use files of the following extensions: .gz, .Z, .bz2, .lz, and .xz, even when they are not tarballs. Files of unknown extensions are treated as uncompressed files and supported as well. * guix/packages.scm (patch-and-repack): Only add the compressor utility to the PATH when the file is compressed. Bind more inputs in the mlet, and use them for decompressing single files. Adjust the decompression and compression routines. [decompression-type]: Remove nested variable. * guix/build/utils.scm (compressor, tarball?): New procedures. Move %xz-parallel-args to the new 'compression helpers' section. * tests/packages.scm: Add tests. Add missing copyright year for Jan. * guix/build/gnu-build-system.scm (first-subdirectory): Return #f when no sub-directory was found. (unpack): Support more file types, including uncompressed plain files.
* | utils: Add NIX_STORE_DIR as a candidate for the value of the store directory.Maxim Cournoyer2021-01-26
| | | | | | | | | | | | | | | | | | | | | | | | | | On the daemon side, nixStore gets set to the environment variable NIX_STORE_DIR, else the environment variable NIX_STORE else the compile time macro NIX_STORE_DIR (see the Settings::processEnvironment method in nix/libstore/globals.cc). When creating a build environment, it sets NIX_STORE with the value computed as described above. Hence, it's safer to look for both NIX_STORE_DIR and NIX_STORE in (guix build utils), so that it works in any context (build context or external context). * guix/build/utils.scm (%store-directory): Consider both NIX_STORE_DIR and NIX_STORE as environment variables.
* | build-system/gnu: Really ignore the return value of phases.Ludovic Courtès2021-01-15
| | | | | | | | | | | | | | | | This is a followup to 04baa011e9122205009d6d5f15b8162bf6f3fb8a. * guix/build/gnu-build-system.scm (gnu-build): Really ignore the return value of PROC. Wrap PROC call in 'with-throw-handler'. Add 'end-of-phase' procedure and use it.
* | Merge branch 'staging' into 'core-updates'.Maxim Cournoyer2021-01-13
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: gnu/local.mk gnu/packages/cmake.scm gnu/packages/curl.scm gnu/packages/gl.scm gnu/packages/glib.scm gnu/packages/guile.scm gnu/packages/node.scm gnu/packages/openldap.scm gnu/packages/package-management.scm gnu/packages/python-xyz.scm gnu/packages/python.scm gnu/packages/tls.scm gnu/packages/vpn.scm gnu/packages/xorg.scm
| * build-system/cargo: Use argument "--no-track" in "cargo install".Zhu Zihao2020-12-31
| | | | | | | | | | | | | | | | * guix/build/cargo-build-system(install): Add argument "--no-track" in "cargo install". Remove stale hack. Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
| * guix system: 'init' copies, resets timestamps, and deduplicates at once.Ludovic Courtès2020-12-15
| | | | | | | | | | | | | | | | | | Partly fixes <https://bugs.gnu.org/44760>. * guix/build/store-copy.scm (copy-store-item): New procedure. (populate-store): Use it instead of the inline 'copy-recursively' call. * guix/scripts/system.scm (copy-item): Likewise. Pass #:reset-timestamps? and #:deduplicate? to 'register-path'.
| * store-copy: 'populate-store' can optionally deduplicate files.Ludovic Courtès2020-12-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now deduplication was performed as an additional pass after copying files, which involve re-traversing all the files that had just been copied. * guix/store/deduplication.scm (copy-file/deduplicate): New procedure. * tests/store-deduplication.scm ("copy-file/deduplicate"): New test. * guix/build/store-copy.scm (populate-store): Add #:deduplicate? parameter and honor it. * tests/gexp.scm ("gexp->derivation, store copy"): Pass #:deduplicate? #f to 'populate-store'. * gnu/build/image.scm (initialize-root-partition): Pass #:deduplicate? to 'populate-store'. Pass #:deduplicate? #f to 'register-closure'. * gnu/build/vm.scm (root-partition-initializer): Likewise. * gnu/build/install.scm (populate-single-profile-directory): Pass #:deduplicate? #f to 'populate-store'. * gnu/build/linux-initrd.scm (build-initrd): Likewise. * guix/scripts/pack.scm (self-contained-tarball)[import-module?]: New procedure. [build]: Pass it as an argument to 'source-module-closure'. * guix/scripts/pack.scm (squashfs-image)[build]: Wrap in 'with-extensions'. * gnu/system/linux-initrd.scm (expression->initrd)[import-module?]: New procedure. [builder]: Pass it to 'source-module-closure'. * gnu/system/install.scm (cow-store-service-type)[import-module?]: New procedure. Pass it to 'source-module-closure'.
| * store-copy: 'populate-store' resets timestamps.Ludovic Courtès2020-12-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now, 'populate-store' would reset permissions but not timestamps, so callers would resort to going through an extra directory traversal to reset timestamps. * guix/build/store-copy.scm (reset-permissions): Remove. (copy-recursively): New procedure. (populate-store): Pass #:keep-permissions? to 'copy-recursively'. Remove call to 'reset-permissions'. * tests/gexp.scm ("gexp->derivation, store copy"): In BUILD-DRV, check whether 'populate-store' canonicalizes permissions and timestamps. * gnu/build/image.scm (initialize-root-partition): Pass #:reset-timestamps? #f to 'register-closure'. * gnu/build/vm.scm (root-partition-initializer): Likewise.
| * build-system: Add chicken-build-system.raingloom2020-12-03
| | | | | | | | | | | | | | | | | | * guix/build-system/chicken.scm: New file. * guix/build/chicken-build-system.scm: New file. * Makefile.am: Add them. * doc/guix.texi: Document it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* | build-systems/emacs: No longer skip patching of files containing NULs.Maxim Cournoyer2021-01-08
| | | | | | | | | | | | | | | | This follows the fix to <https://bugs.gnu.org/30116>. * guix/build/emacs-build-system.scm (patch-el-files) [file-contains-nul-char]: Remove nested procedure. [el-file]: Do no filter out files containing NUL characters.
* | utils: Allow text substitution even in the presence of NUL characters.Mark H Weaver2021-01-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes <https://issues.guix.gnu.org/30116>. Before this change, the presence of a NUL character on a line meant that the (glibc) regexp engine used by Guile would either 1. stop scanning the string or 2. crash with the error "string contains #\\nul character", depending on the locale used. This change works around this limitation by first replacing the NUL character by an unused Unicode code point, doing the substitution, then reverting the replacement. * guix/build/utils.scm (unused-private-use-code-point) (replace-char): New procedures. (substitute): Make use of the above procedures to work around the NUL character regexp engine limitation. * tests/build-utils.scm: Add tests. Co-authored-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
* | build-systems/gnu: Add compressor file extension to symbolic links.Maxim Cournoyer2020-12-29
| | | | | | | | | | | | | | | | Otherwise man and info readers are not able to read their content as they rely on the file extension to detect if compression is used. * guix/build/gnu-build-system.scm (compress-documentation) [retarget-symlink]: Append the compressor file extension to the link file name.
* | build-system/gnu: Allow overriding of bootstrap scripts.Ricardo Wurmus2020-12-23
| | | | | | | | | | | | | | | | * guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Accept bootstrap-scripts keyword argument and pass it to gnu-build. (%bootstrap-scripts): New variable. * guix/build/gnu-build-system.scm (%bootstrap-scripts): Remove variable. (bootstrap): Remove default value for bootstrap-scripts argument.
* | utils: 'copy-recursively' keeps symlink mtime when #:keep-mtime? is true.Ludovic Courtès2020-12-13
| | | | | | | | | | * guix/build/utils.scm (copy-recursively): In the "leaf" procedure, call 'set-file-time' also on symlinks.
* | utils: 'set-file-time' passes AT_SYMLINK_NOFOLLOW.Ludovic Courtès2020-12-13
| | | | | | | | | | * guix/build/utils.scm (AT_SYMLINK_NOFOLLOW): New variable. (set-file-time): Use it.
* | build/python: Fix cythonize check phase.Efraim Flashner2020-12-13
| | | | | | | | | | * guix/build/python-build-system.scm (ensure-no-cythonized-files): Use format when printing the warning.
* | build/python: Check for cythonized files.Efraim Flashner2020-12-09
| | | | | | | | | | * guix/build/python-build-system.scm (ensure-no-cythonized-files): New procedure. (%standard-phases): Add it.
* | build-system/gnu: Remove the source directory from search paths.宋文武2020-12-07
| | | | | | | | | | | | | | Fixes <https://issues.guix.gnu.org/44924>. * guix/build/gnu-build-system.scm (set-paths): Delete 'source' from 'input-directories'.
* | build-system/gnu: Add 'make-dynamic-linker-cache' phase.Ludovic Courtès2020-12-01
| | | | | | | | | | | | | | | | * guix/build/gnu-build-system.scm (make-dynamic-linker-cache): New procedure. (%standard-phases): Add it. * guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Add #:make-dynamic-linker-cache? and honor it.