Commit Graph

76 Commits

Author SHA1 Message Date
Maxim Cournoyer 6b9bebbb3d
.dir-locals.el: Specify indentation rule for with-shepherd-action.
* .dir-locals.el (scheme-mode) <with-shepherd-action>: New indentation rule.
2021-08-02 14:16:22 -04:00
Maxim Cournoyer 82daab4281
pack: Add support for the deb format.
* .dir-locals.el (scheme-mode)[gexp->derivation]: Define indentation rule.
* guix/scripts/pack.scm (debian-archive): New procedure.
(%formats): Register the new deb format.
(show-formats): Add it to the usage string.
* tests/pack.scm (%ar-bootstrap): New variable.
(deb archive with symlinks): New test.
* doc/guix.texi (Invoking guix pack): Document it.
* NEWS: Add news entry.
2021-06-29 14:53:21 -04:00
Ludovic Courtès 1574bd82bb
system: 'init' does not recompute the hash of each store item.
Fixes <https://bugs.gnu.org/44760>.

Previously, the 'register-path' call would re-traverse ITEM to compute
its nar hash, even though that hash is already known in the initial
store.  This patch also avoids repeated opening/closing of the
database.

* guix/store/database.scm (call-with-database): Export.
* guix/scripts/system.scm (copy-item): Add 'db' parameter.  Call
'sqlite-register' instead of 'register-path'.
(copy-closure): Remove redundant call to 'references*'.  Call
'call-with-database' and pass the database to 'copy-item'.
2020-12-15 17:32:11 +01:00
Maxim Cournoyer 129b9b16d9
Merge remote-tracking branch 'origin/version-1.2.0' into master
Conflicts:
	gnu/packages/bioinformatics.scm

The python-pysam package fixed in master was kept instead of the update done
in the version-1.2.0 branch.
2020-11-17 18:00:28 -05:00
Miguel Ángel Arruga Vivas 3428c66c5a
.dir-locals.el: Add upstream report link.
Follow up from 1d6e7732b1.

* .dir-locals.el: Modify comment to point at the report to bug-gnu-emacs.
2020-11-16 21:48:30 +01:00
Christopher Lemmer Webber a895eace11
.dir-locals.el: Use setq-local on guix-directory.
* .dir-locals.el: Use setq-local on guix-directory.  While a problem with
using setq hasn't been identified, this seems like good hygiene.
2020-11-16 13:06:27 -05:00
Christopher Lemmer Webber 1d6e7732b1
.dir-locals.el: Prevent errors if .dir-locals.el isn't found.
While this repo should presumably always have a .dir-locals.el
by the nature of this file itself, it seems that this behavior "leaks".
See added comment for more details on the fix to this strange bug,
which is likely an upstream emacs or vc-mode issue.

Thanks to Miguel Ángel Arruga Vivas and Maxim Cournoyer for helping
investigate this problem.

* .dir-locals.el: Don't error out if .dir-locals.el isn't found.
2020-11-16 13:04:38 -05:00
Maxim Cournoyer 3de898b43c
maint: update-guix-package: Optionally add sources to store.
Following discussions in <https://issues.guix.gnu.org/43893>, keeping a copy
of the updated package source is desirable when generating a release.

* build-aux/update-guix-package.scm (version-controlled?): Remove variable.
(call-with-temporary-git-worktree): Renamed from
'with-temporary-git-worktree'.  Update doc.  Do not change directory
implicitly.  Define as a procedure, not a syntax.
(keep-source-in-store): New procedure.
(main): Adjust to use with call-with-temporary-git-worktree.  Add the sources
to the store when GUIX_ALLOW_ME_TO_USE_PRIVATE_COMMIT is set.  Exit gracefully
when FIND-ORIGIN-REMOTE returns #f.
(%savannah-guix-git-repo-push-url-regexp): Adjust match for a potential colon
separator.
* Makefile.am (GUIX_ALLOW_ME_TO_USE_PRIVATE_COMMIT): Adjust.
* .dir-locals.el (scheme-mode): Remove entry for with-temporary-git-worktree.
* doc/contributing.texi (Updating the Guix Package): Update doc.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2020-11-12 09:23:27 -05:00
Miguel Ángel Arruga Vivas 96d0f0b138
.dir-locals.el: Require cl-lib at runtime.
* .dir-locals.el (nil)<Geiser>: Load cl-lib when needed.
2020-11-01 01:57:02 +01:00
Maxim Cournoyer 0e1b0958bd
.dir-locals.el: Automatically set the GEISER-GUILE-LOAD-PATH variable.
Thanks to Miguel Ángel Arruga Vivas and Pierre Neidhardt for their suggestions
and improvements.

* .dir-locals.el: Set the GUIX-DIRECTORY and GEISER-GUILE-LOAD-PATH Emacs
variables based on the location of the .dir-locals file.
2020-10-31 00:12:30 -04:00
Maxim Cournoyer 5800d2aae2
maint: update-guix-package: Prevent accidentally breaking guix pull.
Fixes <https://issues.guix.gnu.org/43893>.

This changes the 'update-guix-package' tool so that it:

1. Always uses a clean checkout to compute the hash of the updated 'guix'
package.
2. Ensures the commit used in the updated 'guix' package definition has already
been pushed upstream.

* build-aux/update-guix-package.scm (%savannah-guix-git-repo-push-url): New
variable.
(with-input-pipe-to-string, with-temporary-git-worktree): New syntaxes.
(find-origin-remote, git-add-worktree): New procedures.
(commit-already-pushed?): New predicate.
(main): Check the commit used has already been pushed upstream and compute the
hash from a clean checkout.
* doc/contributing.texi (Updating the Guix Package): Document it.
* .dir-locals.el (scheme-mode): Fix indentation of with-temporary-git-worktree.
2020-10-19 14:02:53 -04:00
Caleb Ristvedt 14c422c12c
deduplication: pass store directory to replace-with-link.
This causes with-writable-file to take into consideration the actual store
being used, as passed to 'deduplicate', rather than
whatever (%store-directory) may return.

* guix/store/deduplication.scm (replace-with-link): new keyword argument
  'store'.  Pass to with-writable-file.
  (with-writable-file, call-with-writable-file): new store argument.
  (deduplicate): pass store to replace-with-link.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-09-14 10:51:26 +02:00
Caleb Ristvedt 1d40e6fdd1
.dir-locals.el: fix call-with-{retrying-}transaction indenting.
* .dir-locals.el (call-with-transaction, call-with-retrying-transaction):
  change scheme-indent-function property from 2 to 1.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-09-14 10:51:26 +02:00
Ludovic Courtès 8d0e5c2655
.dir-locals.el: Add indentation rule for 'package/inherit'.
* .dir-locals.el (scheme-mode): Add 'package/inherit'.
2020-08-26 00:51:56 +02:00
Ludovic Courtès d52e16d3b6
deduplication: Use 'dynamic-wind' when changing permissions of the parent.
Suggested by Caleb Ristvedt <caleb.ristvedt@cune.org>.

* guix/store/deduplication.scm (call-with-writable-file): New procedure.
(with-writable-file): New macro.
(replace-with-link): Use it.
2020-06-25 12:29:22 +02:00
Ludovic Courtès 43badf261f
channels: 'latest-channel-instance' authenticates Git checkouts.
Fixes <https://bugs.gnu.org/22883>.

* guix/channels.scm (<channel>)[introduction]: New field.
(<channel-introduction>): New record type.
(%guix-channel-introduction): New variable.
(%default-channels): Use it.
(<channel-metadata>)[keyring-reference]: New field.
(%default-keyring-reference): New variable.
(read-channel-metadata, read-channel-metadata-from-source): Initialize
the 'keyring-reference' field.
(commit-short-id, verify-introductory-commit)
(authenticate-channel): New procedures.
(latest-channel-instance): Call 'authenticate-channel' when CHANNEL has
an introduction.
* tests/channels.scm (gpg+git-available?, commit-id-string): New
procedures.
("authenticate-channel, wrong first commit signer"):
("authenticate-channel, .guix-authorizations"): New tests.
* doc/guix.texi (Invoking guix pull): Mention authentication.
2020-06-16 16:10:47 +02:00
Caleb Ristvedt 8971f626f2
database: separate transaction-handling and retry-handling.
Previously call-with-transaction would both retry when SQLITE_BUSY errors were
thrown and do what its name suggested (start and rollback/commit a
transaction).  This changes it to do only what its name implies, which
simplifies its implementation.  Retrying is provided by the new
call-with-SQLITE_BUSY-retrying procedure.

* guix/store/database.scm (call-with-transaction): no longer restarts, new
  #:restartable? argument controls whether "begin" or "begin immediate" is
  used.
  (call-with-SQLITE_BUSY-retrying, call-with-retrying-transaction,
  call-with-retrying-savepoint): new procedures.
  (register-items): use call-with-retrying-transaction to preserve old
  behavior.

* .dir-locals.el (call-with-retrying-transaction,
  call-with-retrying-savepoint): add indentation information.
2020-06-10 21:54:35 -05:00
Caleb Ristvedt 37545de4a3
database: ensure update-or-insert is run within a transaction
update-or-insert can break if an insert occurs between when it decides whether
to update or insert and when it actually performs that operation.  Putting the
check and the update/insert operation in the same transaction ensures that the
update/insert will only succeed if no other write has occurred in the middle.

* guix/store/database.scm (call-with-savepoint): new procedure.
  (update-or-insert): use call-with-savepoint to ensure the read and the
  insert/update occur within the same transaction.
2020-06-10 21:54:35 -05:00
Caleb Ristvedt 5d6e225528
database: rewrite query procedures in terms of with-statement.
Most of our queries would fail to finalize their statements properly if sqlite
returned an error during their execution.  This resolves that, and also makes
them somewhat more concise as a side-effect.

This also makes some small changes to improve certain queries where behavior
was strange or overly verbose.

* guix/store/database.scm (call-with-statement): new procedure.
  (with-statement): new macro.
  (last-insert-row-id, path-id, update-or-insert, add-references): rewrite to
  use with-statement.
  (update-or-insert): factor last-insert-row-id out of the end of both
  branches.
  (add-references): remove pointless last-insert-row-id call.

* .dir-locals.el (with-statement): add indenting information.
2020-06-10 21:54:35 -05:00
Ludovic Courtès c39693d760
ui: 'display-search-results' automatically invokes the pager.
* guix/ui.scm (call-with-paginated-output-port): New procedure.
(with-paginated-output-port): New macro.
(display-search-results): Use it instead of displaying a hint.
2020-06-06 23:28:49 +02:00
Ludovic Courtès c83eedba23
git-authenticate: Add tests.
* guix/tests/git.scm (call-with-environment-variables)
(with-environment-variables): Remove.
* guix/tests/git.scm (populate-git-repository): Add clauses for signed
commits and signed merges.
* guix/tests/gnupg.scm: New file.
* tests/git-authenticate.scm: New file.
* tests/ed25519bis.key, tests/ed25519bis.sec: New files.
* Makefile.am (dist_noinst_DATA): Add 'guix/tests/gnupg.scm'.
(SCM_TESTS): Add 'tests/git-authenticate.scm'.
(EXTRA_DIST): Add tests/ed25519bis.{key,sec}.
2020-06-05 22:54:06 +02:00
Ludovic Courtès 644cb40cd8
gexp: Add 'let-system'.
* guix/gexp.scm (<system-binding>): New record type.
(let-system): New macro.
(system-binding-compiler): New procedure.
(default-expander): Add 'self-quoting?' case.
(self-quoting?): New procedure.
(lower-inputs): Add 'filterm'.  Pass the result of
'mapm/accumulate-builds' through FILTERM.
(gexp->sexp)[self-quoting?]: Remove.
* tests/gexp.scm ("let-system", "let-system, target")
("let-system, ungexp-native, target")
("let-system, nested"): New tests.
* doc/guix.texi (G-Expressions): Document it.
2020-05-16 00:34:41 +02:00
Ludovic Courtès 041b340da4
store: Add 'with-build-handler'.
* guix/store.scm (current-build-prompt): New variable.
(call-with-build-handler, invoke-build-handler): New procedures.
(with-build-handler): New macro.
* tests/store.scm ("with-build-handler"): New test.
2020-03-22 12:42:51 +01:00
Ludovic Courtès cf2ac04f13
gexp: Add 'with-parameters'.
* guix/gexp.scm (<parameterized>): New record type.
(with-parameters): New macro.
(compile-parameterized): New gexp compiler.
* tests/gexp.scm ("with-parameters for %current-system")
("with-parameters for %current-target-system")
("with-parameters + file-append"): New tests.
* doc/guix.texi (G-Expressions): Document it.
2020-03-12 18:32:15 +01:00
Ludovic Courtès 55e1dfa4dd
ui: Factorize 'with-profile-lock'.
* guix/ui.scm (profile-lock-handler, profile-lock-file): New
procedures.
(with-profile-lock): New macro.
* guix/scripts/package.scm (process-actions): Use 'with-profile-lock'
instead of 'with-file-lock/no-wait'.
* guix/scripts/pull.scm (guix-pull): Likewise.
2019-11-29 15:54:20 +01:00
Ludovic Courtès 6fbd8fde2f
pull: Acquire a lock for the target profile.
This is a followup to b1fb663404.

* guix/scripts/pull.scm (guix-pull): Wrap 'run-with-store' call in
'with-file-lock/no-wait'.
2019-11-19 10:51:52 +01:00
Ludovic Courtès 873f6f1334
git: Add 'commit-difference'.
* guix/git.scm (commit-closure, commit-difference): New procedures.
* guix/tests/git.scm, tests/git.scm: New files.
* Makefile.am (dist_noinst_DATA): Add guix/tests/git.scm.
(SCM_TESTS): Add tests/git.scm.
2019-09-23 10:38:43 +02:00
Ludovic Courtès b7178c22bf
syscalls: Add 'with-file-lock' macro.
* guix/scripts/offload.scm (lock-file, unlock-file, with-file-lock):
Move to...
* guix/build/syscalls.scm: ... here.
2019-06-05 23:10:36 +02:00
Ludovic Courtès 66229b04ae
publish: Add support for lzip.
* guix/scripts/publish.scm (show-help, %options): Support '-C METHOD'
and '-C METHOD:LEVEL'.
(default-compression): New procedure.
(bake-narinfo+nar): Add lzip.
(nar-response-port): Likewise.
(string->compression-type): New procedure.
(make-request-handler): Generalize /nar/gzip handler to handle /nar/lzip
as well.
* tests/publish.scm ("/nar/lzip/*"): New test.
("/*.narinfo with lzip compression"): New test.
* doc/guix.texi (Invoking guix publish): Document it.
(Requirements): Mention lzlib.
2019-05-27 22:47:24 +02:00
Caleb Ristvedt a4678c6ba1
database: Make 'register-items' transactional.
* guix/store/database.scm (SQLITE_BUSY, register-output-sql): New variables.
(add-references): Don't try finalizing after each use, only after all the
uses (otherwise a finalized statement would be used if #:cache? was #f).
(call-with-transaction): New procedure.
(register-items): Use call-with-transaction to prevent broken intermediate
states from being visible.

* .dir-locals.el (call-with-transaction): indent it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2019-03-07 00:00:18 +01:00
Ludovic Courtès 7804c45b9c
status: Add 'with-status-verbosity'.
* guix/status.scm (logger-for-level, call-with-status-verbosity): New
procedures.
(with-status-verbosity): New macro.
* guix/scripts/environment.scm (guix-environment): Use
'with-status-verbosity' instead of 'with-status-report'.
* guix/scripts/pack.scm (guix-pack): Likewise.
* guix/scripts/package.scm (guix-package): Likewise.
* guix/scripts/pull.scm (guix-pull): Likewise.
* guix/scripts/system.scm (guix-system): Likewise.
* build-aux/run-system-tests.scm (run-system-tests): Likewise.
2019-01-11 12:14:38 +01:00
Ludovic Courtès 19c924af4f
tests: Run 'guix pack' tests using the external store.
Fixes <https://bugs.gnu.org/32184>.

* guix/tests.scm (call-with-external-store): New procedure.
(with-external-store): New macro.
* tests/pack.scm (%store): Remove.
(test-assertm): Add 'store' parameter.
("self-contained-tarball"): Wrap in 'with-external-store'.
* tests/guix-pack.sh: Connect to the external store, if possible, by
setting NIX_STORE_DIR and GUIX_DAEMON_SOCKET.  Remove most uses of
'--bootstrap'.
2018-10-19 18:28:57 +02:00
Ludovic Courtès dc0f74e5fc
Add (guix status) and use it for pretty colored output.
* guix/progress.scm (progress-reporter/trace): New procedure.
(%progress-interval): New variable.
(progress-reporter/file): Use it.
* guix/scripts/build.scm (set-build-options-from-command-line): Pass
 #:print-extended-build-trace?.
(%default-options): Add 'print-extended-build-trace?'.
(guix-build): Parameterize CURRENT-TERMINAL-COLUMNS.  Use
'build-status-updater'.
* guix/scripts/environment.scm (%default-options): Add
'print-extended-build-trace?'.
(guix-environment): Wrap body in 'with-status-report'.
* guix/scripts/pack.scm (%default-options): Add 'print-build-trace?' and
'print-extended-build-trace?'.
(guix-pack): Wrap body in 'with-status-report'.
* guix/scripts/package.scm (%default-options, guix-package): Likewise.
* guix/scripts/system.scm (%default-options, guix-system): Likewise.
* guix/scripts/pull.scm (%default-options, guix-pull): Likewise.
* guix/scripts/substitute.scm (progress-report-port): Don't call STOP
when TOTAL is zero.
(process-substitution): Add #:print-build-trace? and honor it.
(guix-substitute)[print-build-trace?]: New variable.
Pass #:print-build-trace? to 'process-substitution'.
* guix/status.scm: New file.
* guix/store.scm (set-build-options): Add #:print-extended-build-trace?;
pass it into PAIRS.
(%protocol-version): Bump.
(protocol-version, nix-server-version): New procedures.
(current-store-protocol-version): New variable.
(with-store, build-things): Parameterize it.
* guix/ui.scm (build-output-port): Remove.
(colorize-string): Export.
* po/guix/POTFILES.in: Add guix/status.scm.
* tests/status.scm: New file.
* Makefile.am (SCM_TESTS): Add it.
* nix/libstore/worker-protocol.hh (PROTOCOL_VERSION): Bump to 0x162.
* nix/libstore/build.cc (DerivationGoal::registerOutputs)
(SubstitutionGoal::finished): Print a "@ hash-mismatch" trace before
throwing.
2018-09-27 23:21:53 +02:00
Caleb Ristvedt 7f9d184d9b
Add (gnu store database).
* guix/config.scm.in (%store-database-directory): New variable.
* guix/store/database.scm: New file.
* tests/store-database.scm: New file.
* Makefile.am (STORE_MODULES): New variable.
(MODULES, MODULES_NOT_COMPILED): Adjust accordingly.
(SCM_TESTS) [HAVE_GUILE_SQLITE3]: Add tests/store-database.scm.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2018-06-01 15:35:32 +02:00
Ludovic Courtès 838e17d805
gexp: Add 'with-extensions'.
* guix/gexp.scm (<gexp>)[extensions]: New field.
(gexp-attribute): New procedure.
(gexp-modules): Write in terms of 'gexp-attribute'.
(gexp-extensions): New procedure.
(gexp->derivation): Add #:effective-version.
[extension-flags]: New procedure.
Honor extensions of EXP.
(current-imported-extensions): New syntax parameter.
(with-extensions): New macro.
(gexp): Honor CURRENT-IMPORTED-EXTENSIONS.
(compiled-modules): Add #:extensions and honor it.
(load-path-expression): Likewise.
(gexp->script, gexp->file): Honor extensions.
* tests/gexp.scm (%extension-package): New variable.
("gexp-extensions & ungexp")
("gexp-extensions & ungexp-splicing")
("gexp-extensions and literal Scheme object")
("gexp->derivation & with-extensions")
("program-file & with-extensions"): New tests.
* doc/guix.texi (G-Expressions): Document 'with-extensions'.
2018-06-01 15:20:54 +02:00
Ludovic Courtès f4596f7630
services: guix: Add 'log-compression' option.
* gnu/services/base.scm (<guix-configuration>)[log-compression]: New
field.
(guix-shepherd-service): Use 'match-record' instead of 'match'.  Honor
'log-compression'.
* doc/guix.texi (Base Services): Document 'log-compression'.
2018-01-08 10:40:17 +01:00
Ludovic Courtès 1fafa2f587
weather: Use (guix progress) for progress report.
* guix/progress.scm (start-progress-reporter!, stop-progress-reporter!)
(progress-reporter-report!): New procedures.
* guix/scripts/weather.scm (call-with-progress-reporter): New procedure.
(package-outputs)[update-progress!]: Remove.
Use 'call-with-progress-reporter' instead.
(guix-weather): Parameterize 'current-terminal-columns'.
2017-12-01 16:00:14 +01:00
Ludovic Courtès 22ef06b801
union: Gracefully handle dangling symlinks in the input.
Fixes <http://bugs.gnu.org/26949>.
Reported by Pjotr Prins <pjotr.public12@thebird.nl>.

* guix/build/union.scm (file-is-directory?): Return #f when FILE does
not exist or is a dangling symlink.
(file=?): Pass #f as a second argument to 'stat'; return #f when both
ST1 or ST2 is #f.
* tests/profiles.scm (test-equalm): New macro.
("union vs. dangling symlink"): New test.
2017-05-18 11:38:48 +02:00
Alex Kost da99126ca2
dir-locals.el: Add 'modify-phases' keywords.
* .dir-locals.el: Add indentation rules for 'replace', 'add-before' and
'add-after'.
2017-05-04 22:45:53 +03:00
Ludovic Courtès 1563d6c79f
Add (guix workers).
* guix/workers.scm, tests/workers.scm: New files.
* Makefile.am (MODULES, SCM_TESTS): Add them.
* .dir-locals.el: Add rule for 'eventually'.
2017-04-18 23:17:17 +02:00
Ludovic Courtès f9704f179a
Add (guix memoization).
* guix/combinators.scm (memoize): Remove.
* guix/memoization.scm: New file.
* Makefile.am (MODULES): Add it.
* gnu/packages.scm, gnu/packages/bootstrap.scm,
guix/build-system/gnu.scm, guix/build-system/python.scm,
guix/derivations.scm, guix/gnu-maintenance.scm,
guix/import/cran.scm, guix/import/elpa.scm,
guix/modules.scm, guix/scripts/build.scm,
guix/scripts/graph.scm, guix/scripts/lint.scm,
guix/store.scm, guix/utils.scm: Adjust imports accordingly.
2017-01-28 18:55:20 +01:00
Hartmut Goebel afb325d842
Set Emacs config variable sentence-end-double-space.
Users using a non-English environment may have set this to `nil´, which
leads to fill-paragraph removing the second space.

* .dir-locals.el: Set sentence-end-double-space to true.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2016-10-04 16:37:59 +02:00
Ludovic Courtès 721539026d
Add (guix zlib).
* guix/zlib.scm, tests/zlib.scm: New files.
* Makefile.am (MODULES): Add guix/zlib.scm.
(SCM_TESTS): Add tests/zlib.scm.
* m4/guix.m4 (GUIX_LIBGCRYPT_LIBDIR): New macro.
* configure.ac (LIBGCRYPT_LIBDIR): Use it.  Define and substitute
'LIBZ'.
* guix/config.scm.in (%libz): New variable.
2016-07-19 00:07:12 +02:00
Ludovic Courtès 0bb9929eaa
gexp: Add 'with-imported-modules' macro.
* guix/gexp.scm (<gexp>)[modules]: New field.
(gexp-modules): New procedure.
(gexp->derivation): Use it and append the result to %MODULES.
Update docstring to mark #:modules as deprecated.
(current-imported-modules, with-imported-modules): New macros.
(gexp): Pass CURRENT-IMPORTED-MODULES as second argument to 'gexp'.
(gexp->script): Use and honor 'gexp-modules'; define '%modules'.
* tests/gexp.scm ("gexp->derivation & with-imported-modules")
("gexp->derivation & nested with-imported-modules")
("gexp-modules & ungexp", "gexp-modules & ungexp-splicing"):
New tests.
("program-file"): Use 'with-imported-modules'.  Remove #:modules
argument to 'program-file'.
* doc/guix.texi (G-Expressions): Document 'with-imported-modules'.
Mark #:modules of 'gexp->derivation' as deprecated.
* emacs/guix-devel.el: Add syntax for 'with-imported-modules'.
(guix-devel-keywords): Add it.
* .dir-locals.el: Likewise.
2016-07-12 22:47:08 +02:00
Ludovic Courtès cd6f6c22fb services: Add 'modify-services'.
* gnu/services.scm (%modify-service, modify-services): New macros.
* gnu/services/base.scm (mingetty-service-type, guix-service-type):
  Export.
* emacs/guix-devel.el (guix-devel-keywords): Add 'modify-services'.
  Ditto in 'guix-devel-scheme-indent' call.
* doc/guix.texi (Using the Configuration System): Give an example of
  'modify-services'.
  (Service Reference): Document it.
2015-10-28 21:58:25 +01:00
David Thompson c1f6a0c2ed gnu: build: Add Linux container module.
* gnu/build/linux-container.scm: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
* .dir-locals.el: Add Scheme indent rules for 'call-with-container', and
  'container-excursion'.
* tests/containers.scm: New file.
* Makefile.am (SCM_TESTS): Add it.
2015-07-09 08:23:03 -04:00
Ludovic Courtès c63d94035f store: Add 'verify-store' RPC.
* guix/store.scm (operation-id): Add 'verify-store'.
  (verify-store): New procedure.
  (set-build-options): Adjust comment.
* tests/store.scm ("verify-store", "verify-store + check-contents"): New
  tests.
2015-06-06 19:05:25 +02:00
Ludovic Courtès 2abcc97fd1 ui: Auto-compile user code, and improve error reporting.
Reported by Christian Grothoff.

* guix/ui.scm (load*): Add 'frame-with-source'.  Set
  %load-should-auto-compile.  Change error handle to just (exit 1).  Add
  pre-unwind handler to capture the stack and call 'report-load-error'.
  (report-load-error): Add optional 'frame' parameter and pass it to
  'display-error'.
* tests/guix-system.sh: Add "unbound variable" test.
2015-05-25 21:34:23 +02:00
Ludovic Courtès d664f1b431 profiles: Generate an 'etc/profile' file.
Suggested by 宋文武 <iyzsong@gmail.com>
in <http://bugs.gnu.org/20255>.

* guix/build/profiles.scm (abstract-profile,
  write-environment-variable-definition): New procedures.
  (build-profile): Add #:search-paths parameter.  Create
  OUTPUT/etc/profile.
* guix/profiles.scm (profile-derivation)[builder]: Add 'search-paths'
  variable and pass it to 'build-profile'.  Adjust #:modules argument.
* tests/profiles.scm ("etc/profile"): New test.
* doc/guix.texi (Invoking guix package): Mention etc/profile.
2015-05-06 18:26:54 +02:00
Ludovic Courtès 8ddc41e1f2 utils: Add 'modify-phases'.
* guix/build/utils.scm (modify-phases): New macro.
2015-02-26 22:48:39 +01:00