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.
This commit is contained in:
parent
28c4905b12
commit
8c7bebd6ea
|
@ -601,12 +601,6 @@ names and file names suitable for the #:allowed-references argument to
|
||||||
allowed-references disallowed-references
|
allowed-references disallowed-references
|
||||||
leaked-env-vars
|
leaked-env-vars
|
||||||
local-build? (substitutable? #t)
|
local-build? (substitutable? #t)
|
||||||
|
|
||||||
;; TODO: This parameter is transitional; it's here
|
|
||||||
;; to avoid a full rebuild. Remove it on the next
|
|
||||||
;; rebuild cycle.
|
|
||||||
import-creates-derivation?
|
|
||||||
|
|
||||||
deprecation-warnings
|
deprecation-warnings
|
||||||
(script-name (string-append name "-builder")))
|
(script-name (string-append name "-builder")))
|
||||||
"Return a derivation NAME that runs EXP (a gexp) with GUILE-FOR-BUILD (a
|
"Return a derivation NAME that runs EXP (a gexp) with GUILE-FOR-BUILD (a
|
||||||
|
@ -701,8 +695,6 @@ The other arguments are as for 'derivation'."
|
||||||
extensions))
|
extensions))
|
||||||
(modules (if (pair? %modules)
|
(modules (if (pair? %modules)
|
||||||
(imported-modules %modules
|
(imported-modules %modules
|
||||||
#:derivation?
|
|
||||||
import-creates-derivation?
|
|
||||||
#:system system
|
#:system system
|
||||||
#:module-path module-path
|
#:module-path module-path
|
||||||
#:guile guile-for-build
|
#:guile guile-for-build
|
||||||
|
@ -711,8 +703,6 @@ The other arguments are as for 'derivation'."
|
||||||
(return #f)))
|
(return #f)))
|
||||||
(compiled (if (pair? %modules)
|
(compiled (if (pair? %modules)
|
||||||
(compiled-modules %modules
|
(compiled-modules %modules
|
||||||
#:derivation?
|
|
||||||
import-creates-derivation?
|
|
||||||
#:system system
|
#:system system
|
||||||
#:module-path module-path
|
#:module-path module-path
|
||||||
#:extensions extensions
|
#:extensions extensions
|
||||||
|
@ -1141,11 +1131,6 @@ to the source files instead of copying them."
|
||||||
|
|
||||||
(define* (imported-files files
|
(define* (imported-files files
|
||||||
#:key (name "file-import")
|
#:key (name "file-import")
|
||||||
|
|
||||||
;; TODO: Remove this parameter on the next rebuild
|
|
||||||
;; cycle.
|
|
||||||
(derivation? #f)
|
|
||||||
|
|
||||||
;; The following parameters make sense when creating
|
;; The following parameters make sense when creating
|
||||||
;; an actual derivation.
|
;; an actual derivation.
|
||||||
(system (%current-system))
|
(system (%current-system))
|
||||||
|
@ -1157,11 +1142,10 @@ file-like objects and not local file names.) FILES must be a list
|
||||||
of (FINAL-PATH . FILE) pairs. Each FILE is mapped to FINAL-PATH in the
|
of (FINAL-PATH . FILE) pairs. Each FILE is mapped to FINAL-PATH in the
|
||||||
resulting store path. FILE can be either a file name, or a file-like object,
|
resulting store path. FILE can be either a file name, or a file-like object,
|
||||||
as returned by 'local-file' for example."
|
as returned by 'local-file' for example."
|
||||||
(if (or derivation?
|
(if (any (match-lambda
|
||||||
(any (match-lambda
|
|
||||||
((_ . (? struct? source)) #t)
|
((_ . (? struct? source)) #t)
|
||||||
(_ #f))
|
(_ #f))
|
||||||
files))
|
files)
|
||||||
(imported-files/derivation files #:name name
|
(imported-files/derivation files #:name name
|
||||||
#:symlink? derivation?
|
#:symlink? derivation?
|
||||||
#:system system #:guile guile
|
#:system system #:guile guile
|
||||||
|
@ -1171,7 +1155,6 @@ as returned by 'local-file' for example."
|
||||||
|
|
||||||
(define* (imported-modules modules
|
(define* (imported-modules modules
|
||||||
#:key (name "module-import")
|
#:key (name "module-import")
|
||||||
(derivation? #f) ;TODO: remove on next rebuild
|
|
||||||
(system (%current-system))
|
(system (%current-system))
|
||||||
(guile (%guile-for-build))
|
(guile (%guile-for-build))
|
||||||
(module-path %load-path)
|
(module-path %load-path)
|
||||||
|
@ -1196,14 +1179,12 @@ last one is created from the given <scheme-file> object."
|
||||||
(cons f (search-path* module-path f)))))
|
(cons f (search-path* module-path f)))))
|
||||||
modules)))
|
modules)))
|
||||||
(imported-files files #:name name
|
(imported-files files #:name name
|
||||||
#:derivation? derivation?
|
|
||||||
#:system system
|
#:system system
|
||||||
#:guile guile
|
#:guile guile
|
||||||
#:deprecation-warnings deprecation-warnings)))
|
#:deprecation-warnings deprecation-warnings)))
|
||||||
|
|
||||||
(define* (compiled-modules modules
|
(define* (compiled-modules modules
|
||||||
#:key (name "module-import-compiled")
|
#:key (name "module-import-compiled")
|
||||||
(derivation? #f) ;TODO: remove on next rebuild
|
|
||||||
(system (%current-system))
|
(system (%current-system))
|
||||||
(guile (%guile-for-build))
|
(guile (%guile-for-build))
|
||||||
(module-path %load-path)
|
(module-path %load-path)
|
||||||
|
@ -1223,7 +1204,6 @@ they can refer to each other."
|
||||||
(not (equal? module-path %load-path))))
|
(not (equal? module-path %load-path))))
|
||||||
|
|
||||||
(mlet %store-monad ((modules (imported-modules modules
|
(mlet %store-monad ((modules (imported-modules modules
|
||||||
#:derivation? derivation?
|
|
||||||
#:system system
|
#:system system
|
||||||
#:guile guile
|
#:guile guile
|
||||||
#:module-path
|
#:module-path
|
||||||
|
|
|
@ -641,9 +641,6 @@ specifies modules in scope when evaluating SNIPPET."
|
||||||
|
|
||||||
(let ((name (tarxz-name original-file-name)))
|
(let ((name (tarxz-name original-file-name)))
|
||||||
(gexp->derivation name build
|
(gexp->derivation name build
|
||||||
;; TODO: Remove this on the next rebuild cycle.
|
|
||||||
#:import-creates-derivation? #t
|
|
||||||
|
|
||||||
#:graft? #f
|
#:graft? #f
|
||||||
#:system system
|
#:system system
|
||||||
#:deprecation-warnings #t ;to avoid a rebuild
|
#:deprecation-warnings #t ;to avoid a rebuild
|
||||||
|
|
|
@ -654,11 +654,11 @@
|
||||||
(drv (imported-files files)))
|
(drv (imported-files files)))
|
||||||
(define (file=? file1 file2)
|
(define (file=? file1 file2)
|
||||||
;; Assume deduplication is in place.
|
;; Assume deduplication is in place.
|
||||||
(= (stat:ino (lstat file1))
|
(= (stat:ino (stat file1))
|
||||||
(stat:ino (lstat file2))))
|
(stat:ino (stat file2))))
|
||||||
|
|
||||||
(mbegin %store-monad
|
(mbegin %store-monad
|
||||||
(built-derivations (list drv))
|
(built-derivations (list (pk 'drv drv)))
|
||||||
(mlet %store-monad ((dir -> (derivation->output-path drv))
|
(mlet %store-monad ((dir -> (derivation->output-path drv))
|
||||||
(plain* (text-file "foo" "bar!"))
|
(plain* (text-file "foo" "bar!"))
|
||||||
(q-scm* (interned-file q-scm "c")))
|
(q-scm* (interned-file q-scm "c")))
|
||||||
|
|
Loading…
Reference in New Issue