summaryrefslogtreecommitdiff
path: root/guix
AgeCommit message (Collapse)Author
2018-07-15ruby-build-system: Error or return #t from all phases.Christopher Baines
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-13utils: Really clean up temporary directories.Leo Famulari
Fixes <https://bugs.gnu.org/32126>. * guix/utils.scm (call-with-temporary-directory): Use DELETE-FILE-RECURSIVELY instead of RMDIR.
2018-07-13pull: Display new/upgraded packages upon completion.Ludovic Courtès
* 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-13pull: Use (guix inferior) to display new and upgraded packages.Ludovic Courtès
* 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-13Add (guix inferior) and (guix scripts repl).Ludovic Courtès
* 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-13guix package: Use relative symlinks to generations.Ludovic Courtès
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-13git: Call 'url-cache-directory' outside 'update-cached-checkout'.Oleg Pykhalov
* guix/git.scm (update-cached-checkout): Call 'url-cache-directory' in 'cache-directory' key argument. (latest-repository-commit): Call 'url-cache-directory'.
2018-07-13import: hackage: Fix typo.Danny Milosavljevic
* guix/import/cabal.scm (cabal-custom-setuo-name): Rename to... (cabal-custom-setup-name): ...this.
2018-07-13Merge branch 'staging'Marius Bakke
2018-07-12import: hackage: Evaluate "-any" and "-none" version comparison operators.Danny Milosavljevic
* 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-12import: hackage: Support "-any" and "-none" version comparison operators.Danny Milosavljevic
* 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-12import: hackage: Support "custom-setup" field.Danny Milosavljevic
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-12gexp: Allow bytevector as content of `plain-file'.Jan Nieuwenhuizen
This allows for using a package source directly from git, doing something like (define (command->bytevector command) (let ((port (apply open-pipe* OPEN_READ command))) (let ((output (get-bytevector-all port))) (close-port port) output))) (define-public hello-git (package (name "hello") (version "git") (source (let* ((commit "stable-2.0") (content (command->bytevector `("git" "archive" "--format" "tar" "--prefix" ,(string-append commit "/") ,commit))) (file-name (string-append "hello-" commit))) (plain-file file-name content))) ... )) * guix/gexp.scm (<plain-file>): Also allow bytevector content. (plain-file-compiler): Handle bytevector content. * doc/guix.texi (G-Expressions): Describe plain-file now also taking bytevectors.
2018-07-12store: Add `binary-file'.Jan Nieuwenhuizen
* guix/store.scm (binary-file): New function. * doc/guix.texi (The Store Monad): Describe binary-file.
2018-07-11gnu-maintenance: Get GNU metadata from rec files.Ludovic Courtès
Suggested by Mike Gerwitz <mtg@gnu.org>. * guix/gnu-maintenance.scm (%package-list-url): Use the .rec file. (%package-description-url): Likewise. (official-gnu-packages)[read-records]: Skip record descriptors. Rename fields to use underscores instead of hyphens.
2018-07-11import: gem: Add recursive import.Oleg Pykhalov
* doc/guix.texi (Invoking guix import): Document gem recursive import. * guix/import/gem.scm (gem->guix-package): Return package and dependencies values. (gem-recursive-import): New procedure. * guix/scripts/import/gem.scm (show-help, %options): Add recursive option. (guix-import-gem): Use 'gem-recursive-import'. * tests/gem.scm (test-json): Rename to 'test-foo-json'. ("gem->guix-package"): Use 'test-foo-json'. (test-bar-json, test-bundler-json): New variables. ("gem-recursive-import"): New test.
2018-07-11build-system/haskell: Make phases fail on error.Danny Milosavljevic
* guix/build/haskell-build-system.scm (configure): Make it fail on error. (run-setuphs): Make it fail on error.
2018-07-11ui: Fix typo.Ludovic Courtès
* guix/ui.scm (display-profile-content-diff): Fix typo in docstring.
2018-07-11profiles: Introduce 'profile-search-paths' and use it.Ludovic Courtès
* guix/profiles.scm (profile-search-paths): New procedure. * guix/scripts/environment.scm (evaluate-search-paths): Remove. (create-environment): Replace 'paths' with 'manifest'. Use 'profile-search-paths' instead of 'evaluate-search-paths'. (show-search-paths): Likewise. (launch-environment): Replace 'paths' with 'manifest'. Make 'pure?' a keyword parameter. (launch-environment/fork, launch-environment/container): Likewise. (guix-environment): Remove 'paths' variable. Adjust callers of the above procedures accordingly.
2018-07-11environment: Simplify code by using manifests internally.Ludovic Courtès
* guix/scripts/environment.scm (strip-input-name) (package+propagated-inputs, package-or-package+output?) (compact): Remove. (inputs->profile-derivation): Rename to... (manifest->derivation): ... this. Replace 'inputs' parameter with 'manifest'. (input->manifest-entry): New procedure. (package-environment-inputs): Rewrite to return a list of manifest entries. (options/resolve-packages): Rewrite to return a manifest. (guix-environment): Remove 'inputs'. Define 'paths' in terms of 'manifest-search-paths'.
2018-07-11profiles: Factorize 'manifest-search-paths'.Ludovic Courtès
* guix/profiles.scm (manifest-search-paths): New procedure. (profile-derivation)[builder]: Use it. * guix/build/profiles.scm (build-etc/profile): Remove $PATH.
2018-07-10guix: Add opam importer.Julien Lepiller
* guix/scripts/import.scm (importers): Add opam. * guix/scripts/import/opam.scm: New file. * guix/import/opam.scm: New file. * tests/opam.scm: New file. * Makefile.am: Add them. * doc/guix.texi (Invoking guix import): Document it.
2018-07-08Merge branch 'master' into stagingMarius Bakke
2018-07-07ui: Add -V as short option for --version.Kyle Meyer
* guix/ui.scm (run-guix): Add -V as the short option for --version for consistency with most commands. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-07-07scripts: Add missing -V option to commands that document it.Kyle Meyer
* guix/scripts/container.scm (guix-container): * guix/scripts/import.scm (guix-import): * guix/scripts/substitute.scm (guix-substitute): Add -V as the short option for --version to match show-help's description. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-07-07weather: Fix pasto in --version output.Kyle Meyer
* guix/scripts/weather.scm (%options): Correct the command name passed to show-version-and-exit. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-07-05pack: Use guile-for-build for the target system.Ludovic Courtès
Until now, running "guix pack -s i686-linux" on an x86_64-linux machine, for instance, would use an x86_64 guile for module derivations. This was OK until now, but would break when passing "--localstatedir" due to the introduction of guile-sqlite3: we'd be using the i686 guile-sqlite3 along with the x86_64 guile. * guix/scripts/pack.scm (guix-pack): Pass the 'system option from OPTS to 'package-derivation'.
2018-07-04profiles: 'info-dir-file' hook now produces 'dir.LANG' files.Ludovic Courtès
Previously, entries for 'guix.fr.info' would end up in 'dir', above the 'guix.info' entries; consequently, running 'info guix' would actually open 'guix.fr.info', which was confusing for non-French readers. * guix/profiles.scm (info-dir-file)[glibc-utf8-locales]: New variable. [build](info-file-language): New procedure. (install-info): Use it, to create 'dir.LANG' files. Set GUIX_LOCPATH.
2018-07-03Revert "packages: Optimize 'package-transitive-supported-systems'."Ludovic Courtès
This reverts commit 24420f5ffabfbdbe913a5765e5c00e17de18fb4c. This broke 'package-transitive-supported-systems', which would return the union of supported systems instead of the intersection.
2018-07-03guix system: Make 'init' idempotent again.Ludovic Courtès
This fixes a regression introduced in df2f6400b1fbc282ef4d6dd7124ea1c17adc23c2: since the new 'register-path' (actually 'reset-timestamps') would make files read-only, 'delete-file-recursively' would fail to delete them. Thus, re-running 'guix system init' on an already-populated store would fail with a 'delete-file' EPERM. * guix/scripts/system.scm (copy-item): Use 'lstat' instead of 'file-exists?'. Call 'make-file-writable' on each directory below DEST.
2018-07-03ui: Report file names in 'system-error' exceptions from 'delete-file'.Ludovic Courtès
* guix/ui.scm (delete-file): New error-reporting wrapper.
2018-07-03database: 'reset-timestamps' now correctly handles symlinks.Ludovic Courtès
* guix/store/database.scm (reset-timestamps): Use 'utime' with AT_SYMLINK_NOFOLLOW for symlinks.
2018-07-03syscalls: Define AT_SYMLINK_NOFOLLOW et al.Ludovic Courtès
* guix/build/syscalls.scm (AT_FDCWD, AT_SYMLINK_NOFOLLOW, AT_REMOVEDIR) (AT_SYMLINK_FOLLOW, AT_NO_AUTOMOUNT, AT_EMPTY_PATH): New variables. * tests/syscalls.scm ("utime with AT_SYMLINK_NOFOLLOW"): New test.
2018-07-03deduplication: Remove 'false-if-system-error', now unused.Ludovic Courtès
* guix/store/deduplication.scm (false-if-system-error): Remove.
2018-07-03import: elpa: Check if 'fetch-elpa-package' rest argument is null.Oleg Pykhalov
* guix/import/elpa.scm (fetch-elpa-package): Check if 'rest' is null.
2018-07-03deduplication: Place link files under /gnu/store/.links.Ludovic Courtès
Previously they'd always be placed next to TO-REPLACE, which would lead to EPERM in some cases. * guix/store/deduplication.scm (replace-with-link): Add #:swap-directory parameter and honor it. Add call to 'make-file-writable'. Catch 'system-error' around 'rename-file'. (deduplicate): Pass #:swap-directory and remove uses of 'false-if-system-error'. * tests/store-deduplication.scm ("deduplicate"): Add 'chmod' call.
2018-07-03deduplication: Fix incorrect use of 'throw'.Ludovic Courtès
* guix/store/deduplication.scm (get-temp-link): In handler, fix call to 'throw'.
2018-07-03guix system: init: Check the available space before copying.Ludovic Courtès
* guix/scripts/system.scm (copy-closure): Call 'query-path-info*' on TO-COPY and REFS. Compute the total size. Call 'check-available-space'.
2018-07-03ui: Make 'check-available-space' public.Ludovic Courtès
* guix/ui.scm (check-available-space): Add optional 'directory' parameter, defaulting to (%store-prefix). Honor it. Make public.
2018-07-03store: Add 'query-path-info*'.Ludovic Courtès
* guix/scripts/size.scm (query-path-info*): Move to... * guix/store.scm (query-path-info*): ... here.
2018-07-03packages: Optimize 'package-transitive-supported-systems'.Ludovic Courtès
This version is 13% faster than the one above when timing: (fold-packages (lambda (p x) (package-transitive-supported-systems p)) '()) * guix/packages.scm (package-transitive-supported-systems): Make 'systems' a set instead of calling 'lset-intersection' repeatedly.
2018-07-02self: Build with Guile 2.2.4.Ludovic Courtès
* guix/self.scm (guile-for-build): In the "2.2" case, choose GUILE-2.2.4.
2018-07-02self: Use #:guile-for-build in the shebang of the 'guix' executable.Ludovic Courtès
* guix/self.scm (guix-command): Add #:guile and pass it to 'program-file'. (whole-package): Add #:guile and pass it to 'guix-command'. (compiled-guix): Pass #:guile to 'guix-command' and 'whole-package'.
2018-07-02utils: Micro-optimize 'source-properties->location'.Ludovic Courtès
* guix/utils.scm (source-properties->location): Destructure LOC with 'match', adding a fast path without 'assq-ref' calls.
2018-07-02utils: Disable memoization for 'location'.Ludovic Courtès
This was getting 25% hits, which did not quite justify the overhead. * guix/utils.scm (location): Remove 'mlambda'.
2018-07-02Merge branch 'master' into stagingMarius Bakke
2018-07-02build-system/meson: Really skip the 'fix-runpath' phase on armhf.Marius Bakke
This follows up commit d5b5a15a4046362377f1a45d466b43bb6e93d4f which doesn't work because %current-system etc expands before the actual build. Fixes <https://bugs.gnu.org/31719>. * guix/build-system/meson.scm (meson-build)[builder]: Compare against the already existing "system" variable rather than (%current-system).
2018-06-29ui: Increase relevance score for exact matches.Ludovic Courtès
Previously "guix package -s python" would have 'python2-zope-interface' as its first result (relevance: 10), followed by many other python-* packages with the same score, while 'python' itself would come later (relevance: 7). This change makes 'python' the first result (relevance: 27). Reported by Gábor Boskovits. * guix/ui.scm (relevance)[score]: Use 'fold-matches' instead of 'match:count' to counter the number of maches. Give more weight to exact matches.
2018-06-28gnu: java: Return #t from all phases and snippets.Mark H Weaver
* guix/build/java-utils.scm (ant-build-javadoc): Use invoke; return #t. * guix/build/ant-build-system.scm (generate-jar-indices): Return #t and remove vestigal plumbing. * gnu/packages/java.scm (classpath-bootstrap, ant-bootstrap, classpath-devel) (icedtea-6, icedtea-7, java-plexus-sec-dispatcher, ant/java8, clojure) (java-classpathx-servletapi, java-swt, java-qdox-1.12, java-hamcrest-core) (java-plexus-archiver, java-plexus-sec-dispatcher, java-modello-plugins-xml) (java-asm, java-commons-collections, java-commons-bsf, java-slf4j-api) (java-slf4j-api, java-slf4j-simple, java-stringtemplate-3) (java-stringtemplate, antlr3, antlr3-3.3, antlr3-3.1, java-ops4j-base-lang) (java-ops4j-pax-tinybundles, java-ops4j-pax-exam-core-spi) (java-fasterxml-jackson-core, java-fasterxml-jackson-databind) (java-fasterxml-jackson-modules-base-jaxb, java-ecj-3, java-ecj-3.5) (java-fasterxml-jackson-dataformat-yaml, java-woodstox-core) (java-fasterxml-jackson-dataformat-xml, java-testng, java-jnacl) (java-bouncycastle, java-powermock-core, java-powermock-modules-junit4) (java-jansi-native, java-jansi, java-commons-httpclient, java-commons-vfs) (java-apache-ivy, java-janino, java-logback-core): Return #t from all phases and snippets, use invoke where appropriate, and remove vestigial plumbing.
2018-06-28meson-build-system: Return #t from all phases.Mark H Weaver
* guix/build/meson-build-system.scm (configure, build, check, install): (fix-runpath): Use 'invoke' and return #t from all phases.