Commit Graph

3542 Commits (a5dae0c03c4a12f6b92c89c01f1d41b2aec398df)

Author SHA1 Message Date
Jelle Licht e6c4e41102
utils: Generate valid substitutions in 'wrap-program'.
* guix/build/utils.scm (wrap-program)[export-variable]: Generate valid bash
  substitutions when using custom separators.
2018-08-20 17:00:45 +02:00
Ricardo Wurmus b86c019efb
Merge branch 'staging' into core-updates 2018-08-13 20:39:32 +02:00
Marius Bakke 7b38f045c0
Merge branch 'master' into staging 2018-08-10 15:32:51 +02:00
Ricardo Wurmus a7e231a2a3
build-system/haskell: Let all phases return #T unconditionally.
* guix/build/haskell-build-system.scm (make-ghc-package-database, register,
check, haddock): Return #T unconditionally; use INVOKE.
2018-08-09 14:48:31 +02:00
Ricardo Wurmus f60784228a
import: cabal, hackage: Avoid error when custom setup section is missing.
Fixes <https://debbugs.gnu.org/32387>.

* guix/import/cabal.scm (eval-cabal): Avoid mis-match when the custom-setup
section cannot be created.
* guix/import/hackage.scm (cabal-custom-setup-dependencies->names): Do not
crash when cabal-package-custom-setup returns #F.
2018-08-07 20:39:12 +02:00
Mark H Weaver 82230603ce
build-system/gnu: If a phase returns #f, the build fails.
Fixes <https://bugs.gnu.org/31974>.
Introduced by commit d8a3b1b9e8.

* guix/build/gnu-build-system.scm (gnu-build): Use 'every' instead
of 'for-each'.
2018-08-03 23:12:33 -04:00
Marius Bakke 4214066d45
Merge branch 'master' into core-updates 2018-08-01 15:53:17 +02:00
Marius Bakke 869250809b
Merge branch 'master' into staging 2018-07-30 18:08:28 +02:00
Ludovic Courtès b90d97ec2e
ssh: Display the size of the store items being sent.
* guix/ssh.scm (send-files): Compute the size of MISSING and display
it.
2018-07-29 18:50:28 +02:00
Marius Bakke 1af575f04d
Merge branch 'master' into staging 2018-07-28 18:34:59 +02:00
Marius Bakke a1454169e0
gnu: python: Update to 3.7.0.
* gnu/packages/python.scm (python-3.6): Rename to ...
(python-3.7): ... this.  Update to 3.7.0.
[arguments]: Remove phase 'patch-timestamp-for-pyc-files' and related code.
Add phases to unset SOURCE_DATE_EPOCH during the check phase.
(python-3): Is now PYTHON-3.7.
* guix/build/python-build-system.scm (enable-bytecode-determinism): Don't set
DETERMINISTIC_BUILD.
2018-07-28 15:52:26 +02:00
Marius Bakke 94eb59fb4a
build-system/meson: Remove RUNPATH workarounds.
* guix/build-system/meson.scm (default-patchelf): Remove.
(lower)[build-inputs]: Remove PATCHELF.
(meson-build): Don't delete 'fix-runpath' phase on armhf.
* guix/build/meson-build-system.scm (configure): Add "--c_link_args" and
  "-cpp_link_args" instead of setting LDFLAGS.
(meson-build): Don't apply 'fix-runpath' phase.
2018-07-28 14:54:18 +02:00
Danny Milosavljevic d804d0b9ef
import: hackage: Emit native-inputs in the importer.
* guix/import/cabal.scm (cabal-custom-setup-dependencies): Export.
(cabal-package-custom-setup): Export.
(<cabal-package>): New field "custom-setup".
(make-cabal-package): Modify.
(eval-cabal): Modify.
* guix/import/hackage.scm (cabal-dependencies->names): Factor out...
(cabal-test-dependencies->names): ...this.
(cabal-custom-setup-dependencies->names): New procedure.
(hackage-module->sexp): Modify.
2018-07-27 11:42:53 +02:00
Ludovic Courtès 8bece84022
gnu: guile: Remove version 2.2.2.
* gnu/packages/guile.scm (guile-2.2.2): Remove.
* guix/self.scm (guile-for-build): Remove special case for "2.2.2".
(guix-derivation): Likewise.
* build-aux/build-self.scm (build): Likewise.
2018-07-27 11:28:15 +02:00
Ludovic Courtès 2abd76e8af
gnu: guile: Update to 2.2.4.
* gnu/packages/guile.scm (guile-2.2): Update to 2.2.4.
(guile-2.2.4): Remove.
* gnu/packages/package-management.scm (guix)[inputs]: Switch to
GUILE-2.2.
* guix/self.scm (guile-for-build): Likewise.
2018-07-27 11:22:12 +02:00
Ludovic Courtès 8afa18d6e7
gexp: Remove #:deprecation-warnings from 'imported-files'.
This is a followup to 30d722c392.

* guix/gexp.scm (imported-files/derivation): Remove
 #:deprecation-warnings.  Pass "GUILE_WARN_DEPRECATED=no"
unconditionally to #:env-vars of 'gexp->derivation'.  Adjust caller.
(imported-files): Remove #:deprecation-warnings and adjust callers.
(imported-modules): Likewise.
(compiled-modules, gexp->derivation): Adjust accordingly.
2018-07-27 00:09:52 +02:00
Ludovic Courtès 4a42abc52c
gexp: Inline bug-fix in 'compiled-modules'.
This is a followup to 5d669883ec.

* guix/gexp.scm (compiled-modules)[build-utils-hack?]: Remove.
Inline everything as if BUILD-UTILS-HACK? is true.
2018-07-27 00:02:00 +02:00
Ludovic Courtès 8c7bebd6ea
gexp: Remove backward compatibility hack for 'imported-files'.
* guix/gexp.scm (gexp->derivation): Remove #:import-creates-derivation?.
(imported-files): Remove #:derivation? and adjust callers.
(imported-modules), compiled-modules): Likewise.
* guix/packages.scm (patch-and-repack): Adjust 'gexp->derivation' call.
2018-07-26 22:59:49 +02:00
Ludovic Courtès 28c4905b12
packages: 'patch-and-repack' compresses tarballs again.
* guix/packages.scm (patch-and-repack): Add missing "a" in "tar cvfa".
Fixes a regression introduced in
3e95125e9b whereby we'd always create
uncompressed tarballs.
2018-07-26 22:58:30 +02:00
Ludovic Courtès ac46a1c8e4
Merge branch 'master' into core-updates 2018-07-26 18:15:13 +02:00
Danny Milosavljevic 8376f10a30
ruby-build-system: Make phase "replace-git-ls-files" handle more cases.
* guix/build/ruby-build-system.scm (replace-git-ls-files): Modify.
2018-07-24 22:55:38 +02:00
Marius Bakke 706ae8e15c
Merge branch 'master' into core-updates 2018-07-24 19:56:35 +02:00
Marius Bakke 8440db459a
import: PyPI: Update redirected URL.
* guix/import/pypi.scm (guix-package->pypi-name, pypi->guix-package): Update
docstrings.
(pypi-package?): Test for pypi.org, too.
(pypi-fetch): s/pypi.python.org/pypi.org/
* tests/pypi.scm ("guix-package->pypi-name, new URL style",
"pypi->guix-package", "pypi->guix-package, wheels"): Likewise.
2018-07-24 17:42:04 +02:00
Ludovic Courtès 2a3b1b3235
build-system: Add 'guile-build-system'.
* guix/build-system/guile.scm, guix/build/guile-build-system.scm: New
files.
* Makefile.am (MODULES): Add them.
* doc/guix.texi (Build Systems): Document 'guile-build-system'.
2018-07-23 12:25:31 +02:00
Marius Bakke e9be2c5409
Revert "guix: Compress and decompress xz archives in parallel."
Threaded compression makes archives non-deterministic: the result depends on
the number of threads used for compressing.  See <https://bugs.gnu.org/31015>.

This reverts commit 63102406f2.
2018-07-22 18:01:35 +02:00
Marius Bakke 3e95125e9b
Revert "packages: Enable threaded compression of source tarballs."
Threaded compression makes tarballs non-deterministic: the result depends on
the number of threads used for compressing.  See <https://bugs.gnu.org/31015>.

This reverts commit c8a3dea847.
2018-07-22 17:58:16 +02:00
Ludovic Courtès e475211869
database: Reset timestamps to one second after the Epoch.
Previously, store items registered in the database by this code (for
instance, store items retrieved by 'guix offload' and passed to
'restore-file-set') would have an mtime of 0 instead of 1.

This would cause problems for things like .go files: Guile would
consider them to be older than the corresponding .scm file, and
consequently it would ignore them and possibly use another (incorrect)
.go file.

Reported by Ricardo Wurmus.

* guix/store/database.scm (reset-timestamps): Pass 1, not 0, to
'utime'.
* tests/store-database.scm ("register-path"): Check the mtime of FILE
and REF.
2018-07-20 15:01:33 +02:00
Ludovic Courtès 4f89a8eec6
deduplication: Work around Guile bug in 'seek'.
Fixes <https://bugs.gnu.org/32161>.
Reported by Ricardo Wurmus <rekado@elephly.net>.

This mostly reverts 83099892e0.

* guix/store/deduplication.scm (counting-wrapper-port): New procedure.
(nar-sha256): Use it.
2018-07-20 15:01:33 +02:00
Leo Famulari 82549f2328
build-system/go: Use invoke instead of system*.
* guix/build/go-build-system.scm (unpack, build): Use invoke.
(install-source): Unconditionally return #t.
(check): Use invoke and unconditionally return #t.
2018-07-19 19:12:54 -04:00
Julien Lepiller 79d4d47b99
guix: ant-build-system: Reorder before generating INDEX.LIST.
* guix/build/ant-build-system.scm (%standard-phases): Add
reorder-jar-content phase.
2018-07-19 19:46:31 +02:00
Ludovic Courtès 83099892e0
deduplication: Remove 'counting-wrapper-port'.
* guix/store/deduplication.scm (counting-wrapper-port): Remove.
(nar-sha256): Call 'port-position' directly on PORT.
2018-07-19 17:12:48 +02:00
Ludovic Courtès c71cd4a61f
hash: sha256 port now implements 'port-position'.
* guix/hash.scm (open-sha256-port)[position]: New variable.
[get-position]: New procedure.
Pass it to 'make-custom-binary-output-port'.
* tests/hash.scm ("open-sha256-port, hello"): Test 'port-position'.
2018-07-19 17:08:53 +02:00
Ludovic Courtès f5db54eaa5
self: Use the new 'imported-files'.
That way, the source of most nodes is now a content-addressed store item
instead of a derivation.

* guix/self.scm (<file-mapping>): New record type.
(file-mapping-compiler): New procedure.
(scheme-node): Use 'file-mapping' instead of 'imported-files'.
(imported-files): Remove.
2018-07-19 11:48:04 +02:00
Ludovic Courtès e529d46828
gexp: 'imported-files/derivation' can copy files instead of symlinking.
* guix/gexp.scm (imported-files/derivation): Add #:symlink? and honor
it.
(imported-files): Pass #:symlink? to 'imported-files/derivation'.
* tests/gexp.scm ("imported-files with file-like objects"): Add 'file=?'
and use it instead of calling 'readlink'.
2018-07-19 11:48:04 +02:00
Ludovic Courtès 8df2eca6b0
gexp: 'imported-files' no longer creates a derivation by default.
* guix/gexp.scm (gexp->derivation): Add #:import-creates-derivation?.
Pass #:derivation? to 'imported-modules' and 'compiled-modules'.  In -L
argument, check whether MODULES is a derivation.
(%not-slash): New variable.
(file-mapping->tree): New procedure.
(imported-files): Rename to...
(imported-files/derivation): ... this.
(imported-files): New procedure.  Rewrite in terms of
'interned-file-tree' when possible; add #:derivation? parameter.
(imported-modules, compiled-modules): Add #:derivation? parameter and
pass it to 'imported-files'.
* guix/packages.scm (patch-and-repack): Pass
 #:import-creates-derivation? to 'gexp->derivation'.
* tests/gexp.scm ("imported-files"): Adjust to no longer expect a
derivation.
2018-07-19 11:48:04 +02:00
Ludovic Courtès 4d20d87b53
gexp: Remove unnecessary 'mlet'.
* guix/gexp.scm (imported-modules): Use 'let' instead of 'mlet'.
2018-07-19 11:48:04 +02:00
Ludovic Courtès 7f11efbac7
store: Add 'add-file-tree-to-store'.
* guix/store.scm (%not-slash): New variable.
(add-file-tree-to-store, interned-file-tree): New procedures.
* tests/store.scm ("add-file-tree-to-store"): New test.
2018-07-19 11:48:04 +02:00
Ludovic Courtès b94b698d4e
serialization: Add 'write-file-tree'.
* guix/serialization.scm (write-contents-from-port): New procedure.
(write-contents): Write in terms of 'write-contents-from-port'.
(filter/sort-directory-entries, write-file-tree): New procedures.
(write-file): Rewrite in terms of 'write-file-tree'.
* tests/nar.scm ("write-file-tree + restore-file"): New test.
2018-07-19 11:48:04 +02:00
Christopher Baines 0d354666d3
ruby-build-system: Error or return #t from all phases.
Previously, if the tests didn't pass, the check phase would evaluate to #f,
but the package would be built sucessfully. This changes all the phases to
raise exceptions if errors are encountered, and return #t otherwise.

This involves using invoke rather than system*, so that exceptions are raised
if the program exits with a status other than 0, and also returning #t at the
end of functions.

* gnu/build/ruby-build-system.scm (unpack): Use invoke rather than system*,
and return #t at the end.
(build, check): Use invoke rather than system*.
(install): Remove the use of "and", and rewrite the error handling to raise an
exception.
(wrap): Return #t.
2018-07-15 22:19:39 +01:00
Leo Famulari 27f7cbc91d
utils: Really clean up temporary directories.
Fixes <https://bugs.gnu.org/32126>.

* guix/utils.scm (call-with-temporary-directory): Use DELETE-FILE-RECURSIVELY
instead of RMDIR.
2018-07-13 17:33:45 -04:00
Ludovic Courtès bca302c67a
pull: Display new/upgraded packages upon completion.
* guix/scripts/pull.scm (display-profile-news): New procedure.
(build-and-install): Call it.
(display-new/upgraded-packages): Add #:heading and honor it.
2018-07-13 17:28:40 +02:00
Ludovic Courtès dc733e6a12
pull: Use (guix inferior) to display new and upgraded packages.
* guix/scripts/pull.scm (display-profile-content): Call
'display-generation'.
(display-new/upgraded-packages, display-profile-content-diff): New
procedures.
(process-query)[list-generation]: Remove.
[list-generations]: New procedure.
Adjust accordingly.
* doc/guix.texi (Invoking guix pull): Update example of '-l'.
2018-07-13 17:28:40 +02:00
Ludovic Courtès 2ca299caf6
Add (guix inferior) and (guix scripts repl).
* guix/inferior.scm, guix/scripts/repl.scm, tests/inferior.scm: New
files.
* Makefile.am (MODULES): Add 'guix/scripts/repl.scm' and
'guix/inferior.scm'.
(SCM_TESTS): Add 'tests/inferior.scm'.
* doc/guix.texi (Invoking guix repl): New node.
2018-07-13 17:28:39 +02:00
Ludovic Courtès bc6e291ef0
guix package: Use relative symlinks to generations.
Reported by Roel Janssen <roel@gnu.org>
at <https://lists.gnu.org/archive/html/guix-devel/2018-07/msg00036.html>.

* guix/profiles.scm (switch-to-generation): Use (basename generation) as
the symlink target.
* guix/scripts/package.scm (build-and-use-profile): Likewise,
use (basename name) as the symlink target.
* tests/guix-package.sh: Adjust --roll-back test accordingly.  Add
explicitly test with '-p foo/prof'.
2018-07-13 17:28:39 +02:00
Oleg Pykhalov ffc3fcade3
git: Call 'url-cache-directory' outside 'update-cached-checkout'.
* guix/git.scm (update-cached-checkout): Call 'url-cache-directory' in
'cache-directory' key argument.
(latest-repository-commit): Call 'url-cache-directory'.
2018-07-13 16:24:48 +03:00
Danny Milosavljevic e29067d22e
import: hackage: Fix typo.
* guix/import/cabal.scm (cabal-custom-setuo-name): Rename to...
(cabal-custom-setup-name): ...this.
2018-07-13 15:23:40 +02:00
Marius Bakke 49b6dc2b4e
Merge branch 'staging' 2018-07-13 00:25:45 +02:00
Danny Milosavljevic e39a44f340
import: hackage: Evaluate "-any" and "-none" version comparison operators.
* guix/import/cabal.scm (eval-cabal): Modify.
* tests/hackage.scm (test-cabal-4): New variable and test.
(test-cabal-5): New variable and test.
(test-cabal-6): New variable and test.
2018-07-12 20:35:04 +02:00
Danny Milosavljevic ecba50bb79
import: hackage: Support "-any" and "-none" version comparison operators.
* guix/import/cabal.scm (make-cabal-parser): Modify.
(is-any): New variable.
(is-none): New variable.
(lex-any): New procedure.
(lex-none): New procedure.
(lex-word): Modify.
(eval-cabal): Modify.
2018-07-12 09:06:48 +02:00
Danny Milosavljevic 314b63e0b4
import: hackage: Support "custom-setup" field.
Fixes <https://bugs.gnu.org/23961>.

* guix/import/cabal.scm (make-cabal-parser): Modify.
(is-custom-setup): New variable.
(lex-custom-setup): New procedure.
(is-id): Modify.
(lex-version): Modify.
(<cabal-custom-setup>): New record type.
(eval-cabal): Modify.
(dependencies): Add parameter.
2018-07-12 09:06:48 +02:00