Commit Graph

80 Commits

Author SHA1 Message Date
Ludovic Courtès 8970a886e6
self: Use #:guile-for-build in the shebang of the 'guix' executable.
* 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-02 15:28:35 +02:00
Ludovic Courtès 108015df6d
self: Add dependency on GnuTLS.
Fixes <https://bugs.gnu.org/31983>.
Reported by Fis Trivial <ybbs.daans@hotmail.com>.

* guix/self.scm (specification->package): Add "gnutls" and
"guile2.0-gnutls".
(compiled-guix)[gnutls]: New variable.
[dependencies]: Add it.
2018-06-27 23:30:44 +02:00
Ludovic Courtès 7af5c2a248
self: Define derived '-directory' variables in config.scm.
This is a followup to d6b5aa0b03.

* guix/self.scm (%config-variables): Remove %CONFIG-DIRECTORY,
%STATE-DIRECTORY, %STORE-DATABASE-DIRECTORY, and %STORE-DIRECTORY.
(make-config.scm): Define them here.
* build-aux/build-self.scm (%config-variables, make-config.scm):
Likewise.
2018-06-18 23:56:16 +02:00
Ludovic Courtès e8cb9c01c6
build: Remove checks for 'nix-instantiate'.
* guix/import/snix.scm (open-nixpkgs): Use "nix-instantiate"
unconditionally.
* configure.ac: Remove check for 'nix-instantiate'.
* guix/config.scm.in (%nix-instantiate): Remove.
* guix/self.scm (%dependency-variables): Remove '%nix-instantiate'.
(make-config.scm): Remove it from the generated "config.scm".
* build-aux/build-self.scm (%dependency-variables, make-config.scm):
Likewise.
2018-06-18 23:19:51 +02:00
Ludovic Courtès 45779fa676
self: Make (guix config) generation really stateless.
Previously the %CONFIG-VARIABLES list would be generated based on what
the current (guix config) contains.  Thus, it would include
'%guix-register-program', which we recently removed, because
existing (guix config) most likely contained that variable.  Since its
value could differ from machine to machine, the build farm could be
building a different config.scm, thereby preventing people from getting
substitutes.

* guix/self.scm (%config-variables): Turn into a white list instead of
taking all the remaining variables from the current (guix config).
* build-aux/build-self.scm (%config-variables): Likewise.
2018-06-18 23:19:51 +02:00
Ludovic Courtès a89faa3faa
self: Install .go files to 'lib/guile/X.Y/site-ccache'.
* guix/self.scm (guix-command): Add 'compiled-modules' parameter and
honor it.
(whole-package): Likewise.
(compiled-guix)[built-modules]: Turn into a procedure.
When PULL-VERSION is 1, use separate source and compiled modules.
When PULL-VERSION is 0, return a single directory containing both .scm
and .go files.
2018-06-17 01:40:14 +02:00
Ludovic Courtès baed923682
self: Add 'guix-daemon' to the result.
* gnu/packages/package-management.scm (guix-daemon): New variable.
* guix/self.scm (whole-package): Add #:daemon and honor it.
(compiled-guix): Pass #:daemon to 'whole-package'.
2018-06-14 23:34:59 +02:00
Ludovic Courtès ea0a06cee2
Remove 'guix-register' and its traces.
* Makefile.am (SH_TESTS): Remove tests/guix-register.sh.
* build-aux/pre-inst-env.in (GUIX_REGISTER): Remove.
* gnu/build/install.scm (directives): Remove outdated comment.
* gnu/build/vm.scm (root-partition-initializer): Update comment.
* gnu/packages/package-management.scm (guix-register): Remove.
* guix/config.scm.in (%sbindir, %guix-register-program): Remove.
* guix/scripts/system.scm (install): Adjust docstring.
* guix/self.scm (make-config.scm): Remove #:guix.  Do not generate
%sbindir and %guix-register-program.
(specification->package): Remove "guix".
* nix/guix-register/guix-register.cc: Remove.
* nix/libstore/store-api.cc (decodeValidPathInfo): Remove.
* nix/libstore/store-api.hh (decodeValidPathInfo): Remove declaration.
* nix/local.mk (sbin_PROGRAMS, guix_register_SOURCES)
(guix_register_CPPFLAGS, guix_register_LDFLAGS): Remove.
* tests/guix-register.sh: Remove.
2018-06-14 11:17:00 +02:00
Ludovic Courtès 3931c76154
database: 'with-database' can now initialize new databases.
* nix/libstore/schema.sql: Rename to...
* guix/store/schema.sql: ... this.
* Makefile.am (nobase_dist_guilemodule_DATA): Add it.
* nix/local.mk (%D%/libstore/schema.sql.hh): Adjust accordingly.
* guix/store/database.scm (sql-schema): New variable.
(sqlite-exec, initialize-database, call-with-database): New procedures.
(with-database): Rewrite in terms of 'call-with-database'.
* tests/store-database.scm ("new database"): New test.
* guix/self.scm (compiled-guix)[*core-modules*]: Add 'schema.sql' to
 #:extra-files.
2018-06-14 11:16:58 +02:00
Ludovic Courtès 4554d4c8a9
self: Build the Info manual.
* guix/self.scm (info-manual): New procedure.
(whole-package): Add #:info and honor it.
(compiled-guix): Pass #:info.
2018-06-09 12:02:28 +02:00
Ludovic Courtès 9f1c3559b0
self: Compute and use locale data.
* guix/self.scm (sub-directory, locale-data): New procedures.
(guix-command): Add SOURCE parameter.  Call 'locale-data' when SOURCE is
true and use it in staged 'bindtextdomain' calls.
(whole-package): Add #:command and honor it.
(compiled-guix): Pass #:command to 'whole-package'.
2018-06-09 12:02:27 +02:00
Ludovic Courtès 8a0d9bc8a3
self: Produce a complete package with the 'guix' command.
* guix/self.scm (guix-command): New procedure.
(compiled-guix): Add #:pull-version parameter.
[command, package]: New variables.
Honor PULL-VERSION.
(guix-derivation): Add #:pull-version and pass it to 'compiled-guix'.
* build-aux/build-self.scm (build-program): Add #:pull-version
parameter.  Pass it to 'guix-derivation'.
(build): Add #:pull-version and pass it to 'build-program'.
* build-aux/compile-as-derivation.scm: Pass #:pull-version to BUILD.
2018-06-09 12:02:27 +02:00
Ludovic Courtès 8292f5a9c5
self: Do not build (guix man-db).
* guix/self.scm (specification->package): Remove "guile-gdbm-ffi" and
"guile2.0-gdbm-ffi".
(compiled-guix)[guile-gdbm-ffi]: Remove.
[dependencies]: Remove it.
[*core-modules*]: Add "guix/man-db.scm" via #:extra-files.
[*extra-modules*]: Exclude "guix/man-db.scm".
2018-06-02 16:02:51 +02:00
Ludovic Courtès 1458f768c1
self: Include gnu/build/* in the result.
Previously, modules like gnu/build/cross-toolchain.scm or
gnu/build/svg.scm were missing from the result.

* guix/self.scm (compiled-guix)[*system-modules*]: Add gnu/build/* to
 #:extra-files.
(imported-files)[same-target?]: New procedure.
[build]: Call 'delete-duplicates' on FILES.
2018-06-02 00:43:49 +02:00
Ludovic Courtès 8031b3fa3c
self: 'compiled-files' builds the given list of files.
* guix/self.scm (compiled-files): Add 'module-files' parameter.
[build]: 'process-directory' now honors MODULE-FILES instead of
building any '.scm' file it sees.
(scheme-node): Adjust accordingly.
2018-06-02 00:43:49 +02:00
Ludovic Courtès e3a87d770f
self: Improve backtraces for 'imported-files'.
* guix/self.scm (imported-files): Pass #:env-vars.
2018-06-02 00:43:49 +02:00
Ludovic Courtès 54be2b4d75
self: Show backtraces on more columns.
* guix/self.scm (compiled-modules): Add "COLUMNS" to #:env-vars.
2018-06-01 18:41:45 +02:00
Ludovic Courtès 6d52844cd4
self: Add dependency on guile-gdbm-ffi.
Fixes a regression introduced in
331ac4cc23 whereby "guile-gdbm-ffi" would
now be mandatory.

* guix/self.scm (specification->package): Add "guile-gdbm-ffi" and
"guile2.0-gdbm-ffi".
(compiled-guix)[guile-gdbm-ffi]: New variables.
[dependencies]: Add it.
2018-06-01 18:41:45 +02:00
Ludovic Courtès d59e75f3b5
build: Check for Guile-SQLite3.
* m4/guix.m4 (GUIX_CHECK_GUILE_SQLITE3): New macro.
* configure.ac: Use it and define 'HAVE_GUILE_SQLITE3'.
* guix/self.scm (specification->package): Add "guile-sqlite3".
(compiled-guix)[guile-sqlite3]: New variable.
[dependencies]: Add it.
2018-06-01 15:35:15 +02:00
Ludovic Courtès e13240f598
self: Reduce the set of dependencies.
By mistake we were adding more dependencies than needed to the Scheme
derivations.

* guix/self.scm (compiled-guix)[dependencies]: Use
'package-transitive-propagated-inputs', not 'package-transitive-inputs'.
2018-05-31 18:13:08 +02:00
Ludovic Courtès f2e66663c2
self: Add "guix-packages-base" derivation.
This introduces an intermediate derivation, thereby reducing the amount
of rebuild that needs to happen when "leaf" package modules are
modified.

* guix/self.scm (compiled-guix)[*core-package-modules*]: New variable.
[*package-modules*, *system-modules*, *cli-modules*]: Depend on it.
Add it to the directory union.
2018-05-07 00:17:34 +02:00
Ludovic Courtès eb72cdf087
self: Produce a spliced (guix config) to placate Guile 2.0.
Fixes 'guix pull' with Guile 2.0.
See <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27284#153>.

* guix/self.scm (make-config.scm): Remove 'begin' in 'scheme-file'
argument and pass #:splice? #t.
2018-04-11 01:03:47 +02:00
Ludovic Courtès a1639ae9de
self: 'package-for-guile' really honors GUILE-VERSION.
* guix/self.scm (package-for-guile): Pass GUILE-VERSION to
'false-if-wrong-guile'.
2018-04-11 01:03:47 +02:00
Ludovic Courtès 63cab4182d
self: Remove 'eval-when' from in generated (guix config).
* guix/self.scm (make-config.scm): Remove unneeded 'eval-when'.
2018-04-11 01:03:47 +02:00
Ludovic Courtès 43176dd605
self: Don't use deprecated package names.
* guix/self.scm (compiled-guix)[guile-json, guile-ssh]: Don't refer t
"guile2.2-json" and "guile2.2-ssh", which are deprecated.
2018-04-10 17:44:27 +02:00
Ludovic Courtès 806ff35854
self: Export '%guix-register-program' in generated (guix config).
* guix/self.scm (make-config.scm): Export '%guix-register-program'.
2018-04-10 17:44:27 +02:00
Ludovic Courtès e69dd8443a
self: Fix package names for compilation with Guile 2.0.
Reported by Ricardo Wurmus.

* guix/self.scm (specification->package): Add guile2.0-{json,git,ssh}.
(guile-for-build): Use 'module-ref' for Guile 2.0.
2018-04-10 17:44:27 +02:00
Ludovic Courtès 69447b6393
self: Display a new line at the end of module compilation.
* guix/self.scm (compiled-modules)[build]: Add a 'newline' call at the
end.
2018-04-10 17:44:27 +02:00
Ludovic Courtès 14b392a8ad
self: Don't substitute the '-source' derivations.
With substitution enabled we would end up downloading 10+ MiB of source
that's already available locally on disk.

* guix/self.scm (imported-files): Pass #:options to 'computed-file'.
2018-04-10 17:44:27 +02:00
Ludovic Courtès eaae07ec28
Add (guix self).
* guix/self.scm: New file.
* Makefile.am (MODULES): Add it.
* gnu/packages.scm (%distro-root-directory): Rewrite to try different
directories.
* guix/discovery.scm (guix): Export 'scheme-files'.
2018-04-08 17:41:08 +02:00