Browse Source

Rename 'guix substitute-binary' to 'guix substitute'.

* guix/scripts/substitute-binary.scm: Rename to...
* guix/scripts/substitute.scm: ... this.  Adjust module name, entry
  point, comments, and help string accordingly.
* nix/scripts/substitute-binary.in: Rename to...
* nix/scripts/substitute.in: ... this.
* pre-inst-env.in (NIX_SUBSTITUTERS): Adjust accordingly.
* tests/substitute-binary.scm: Rename to...
* tests/substitute.scm: ... this.  Adjust references to (guix scripts
  substitute) accordingly.
* guix/ui.scm (show-guix-help)[internal?]: Change "substitute-binary" to
  "substitute".
* Makefile.am (MODULES, SCM_TESTS): Adjust to file renames.
* daemon.am (nodist_pkglibexec_SCRIPTS): Likewise.
* config-daemon.ac: Likewise.
* guix/tests.scm (call-with-derivation-narinfo): Adjust comments and
  docstring.
gn-latest-20200428
Ludovic Courtès 6 years ago
parent
commit
2c74fde00e
12 changed files with 60 additions and 60 deletions
  1. +1
    -1
      .gitignore
  2. +2
    -2
      Makefile.am
  3. +2
    -2
      config-daemon.ac
  4. +1
    -1
      daemon.am
  5. +6
    -6
      guix/scripts/substitute.scm
  6. +2
    -2
      guix/tests.scm
  7. +1
    -1
      guix/ui.scm
  8. +0
    -11
      nix/scripts/substitute-binary.in
  9. +11
    -0
      nix/scripts/substitute.in
  10. +1
    -1
      pre-inst-env.in
  11. +5
    -5
      tests/store.scm
  12. +28
    -28
      tests/substitute.scm

+ 1
- 1
.gitignore View File

@ -96,7 +96,7 @@ stamp-h[0-9]
/doc/guix.tp
/doc/guix.vr
/doc/guix.vrs
/nix/scripts/substitute-binary
/nix/scripts/substitute
/doc/images/bootstrap-graph.png
/doc/images/bootstrap-graph.eps
/guix-register


+ 2
- 2
Makefile.am View File

@ -96,7 +96,7 @@ MODULES = \
guix/scripts/gc.scm \
guix/scripts/hash.scm \
guix/scripts/pull.scm \
guix/scripts/substitute-binary.scm \
guix/scripts/substitute.scm \
guix/scripts/authenticate.scm \
guix/scripts/refresh.scm \
guix/scripts/system.scm \
@ -162,7 +162,7 @@ SCM_TESTS = \
tests/pk-crypto.scm \
tests/pki.scm \
tests/sets.scm \
tests/substitute-binary.scm \
tests/substitute.scm \
tests/builders.scm \
tests/derivations.scm \
tests/ui.scm \


+ 2
- 2
config-daemon.ac View File

@ -133,8 +133,8 @@ if test "x$guix_build_daemon" = "xyes"; then
AC_CONFIG_FILES([nix/scripts/list-runtime-roots],
[chmod +x nix/scripts/list-runtime-roots])
AC_CONFIG_FILES([nix/scripts/substitute-binary],
[chmod +x nix/scripts/substitute-binary])
AC_CONFIG_FILES([nix/scripts/substitute],
[chmod +x nix/scripts/substitute])
AC_CONFIG_FILES([nix/scripts/guix-authenticate],
[chmod +x nix/scripts/guix-authenticate])
AC_CONFIG_FILES([nix/scripts/offload],


+ 1
- 1
daemon.am View File

@ -165,7 +165,7 @@ nix/libstore/schema.sql.hh: nix/libstore/schema.sql
nodist_pkglibexec_SCRIPTS = \
nix/scripts/list-runtime-roots \
nix/scripts/substitute-binary
nix/scripts/substitute
if BUILD_DAEMON_OFFLOAD


guix/scripts/substitute-binary.scm → guix/scripts/substitute.scm View File


+ 2
- 2
guix/tests.scm View File

@ -126,7 +126,7 @@ Deriver: ~a~%"
(define* (call-with-derivation-narinfo drv thunk
#:key (sha256 (make-bytevector 32 0)))
"Call THUNK in a context where fake substituter data, as read by 'guix
substitute-binary', has been installed for DRV. SHA256 is the hash of the
substitute', has been installed for DRV. SHA256 is the hash of the
expected output of DRV."
(let* ((output (derivation->output-path drv))
(dir (%substitute-directory))
@ -178,7 +178,7 @@ CONTENTS."
(lambda ()
(let ((hash (call-with-input-file (string-append dir "/example.nar")
port-sha256)))
;; Create fake substituter data, to be read by `substitute-binary'.
;; Create fake substituter data, to be read by 'guix substitute'.
(call-with-derivation-narinfo drv
thunk
#:sha256 (or sha256 hash))))


+ 1
- 1
guix/ui.scm View File

@ -815,7 +815,7 @@ parameter of 'args-fold'."
(define (show-guix-help)
(define (internal? command)
(member command '("substitute-binary" "authenticate" "offload")))
(member command '("substitute" "authenticate" "offload")))
(format #t (_ "Usage: guix COMMAND ARGS...
Run COMMAND with ARGS.\n"))


+ 0
- 11
nix/scripts/substitute-binary.in View File

@ -1,11 +0,0 @@
#!@SHELL@
# A shorthand for "guix substitute-binary", for use by the daemon.
if test "x$GUIX_UNINSTALLED" = "x"
then
prefix="@prefix@"
exec_prefix="@exec_prefix@"
exec "@bindir@/guix" substitute-binary "$@"
else
exec guix substitute-binary "$@"
fi

+ 11
- 0
nix/scripts/substitute.in View File

@ -0,0 +1,11 @@
#!@SHELL@
# A shorthand for "guix substitute", for use by the daemon.
if test "x$GUIX_UNINSTALLED" = "x"
then
prefix="@prefix@"
exec_prefix="@exec_prefix@"
exec "@bindir@/guix" substitute "$@"
else
exec guix substitute "$@"
fi

+ 1
- 1
pre-inst-env.in View File

@ -44,7 +44,7 @@ export PATH
# Daemon helpers.
NIX_ROOT_FINDER="$abs_top_builddir/nix/scripts/list-runtime-roots"
NIX_SUBSTITUTERS="$abs_top_builddir/nix/scripts/substitute-binary"
NIX_SUBSTITUTERS="$abs_top_builddir/nix/scripts/substitute"
NIX_BUILD_HOOK="$abs_top_builddir/nix/scripts/offload"
NIX_LIBEXEC_DIR="@abs_top_builddir@/nix/scripts" # for 'guix-authenticate'


+ 5
- 5
tests/store.scm View File

@ -367,7 +367,7 @@
(with-store s
(let* ((d (package-derivation s %bootstrap-guile (%current-system)))
(o (derivation->output-path d)))
;; Create fake substituter data, to be read by `substitute-binary'.
;; Create fake substituter data, to be read by 'guix substitute'.
(with-derivation-narinfo d
;; Remove entry from the local cache.
(false-if-exception
@ -375,7 +375,7 @@
"/guix/substitute-binary/"
(store-path-hash-part o))))
;; Make sure `substitute-binary' correctly communicates the above
;; Make sure 'guix substitute' correctly communicates the above
;; data.
(set-build-options s #:use-substitutes? #t)
(and (has-substitutes? s o)
@ -439,7 +439,7 @@
(with-derivation-substitute d c
(sha256 => (make-bytevector 32 0)) ;select a hash that doesn't match C
;; Make sure we use `substitute-binary'.
;; Make sure we use 'guix substitute'.
(set-build-options s
#:use-substitutes? #t
#:fallback? #f)
@ -464,9 +464,9 @@
#:guile-for-build
(package-derivation s %bootstrap-guile (%current-system))))
(o (derivation->output-path d)))
;; Create fake substituter data, to be read by `substitute-binary'.
;; Create fake substituter data, to be read by 'guix substitute'.
(with-derivation-narinfo d
;; Make sure we use `substitute-binary'.
;; Make sure we use 'guix substitute'.
(set-build-options s #:use-substitutes? #t)
(and (has-substitutes? s o)
(guard (c ((nix-protocol-error? c)


tests/substitute-binary.scm → tests/substitute.scm View File


Loading…
Cancel
Save