diff options
author | Eric Bavier <bavier@member.fsf.org> | 2015-04-24 07:57:51 -0500 |
---|---|---|
committer | Eric Bavier <bavier@member.fsf.org> | 2015-05-02 23:15:40 -0500 |
commit | f77bcbc374bb94272c57508dc04fb8599b56a9d8 (patch) | |
tree | 0600ecce1018ce385941be46ec446fb4c04a305d /guix/tests.scm | |
parent | f4bdfe7381e91c4a7eb71ef31ca889e36574b889 (diff) | |
download | patches-f77bcbc374bb94272c57508dc04fb8599b56a9d8.tar patches-f77bcbc374bb94272c57508dc04fb8599b56a9d8.tar.gz |
guix: packages: Add package-direct-sources and package-transitive-sources.
* guix/tests.scm (dummy-origin): New syntax.
* guix/packages.scm (package-direct-sources)
(package-transitive-sources): New procedures.
* tests/packages.scm ("package-direct-sources, no source")
("package-direct-sources, #f source")
("package-direct-sources, not input source", "package-direct-sources")
("package-transitive-sources"): Test them.
Diffstat (limited to 'guix/tests.scm')
-rw-r--r-- | guix/tests.scm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/guix/tests.scm b/guix/tests.scm index 080ee9cc74..87e6cc2830 100644 --- a/guix/tests.scm +++ b/guix/tests.scm @@ -37,7 +37,8 @@ %substitute-directory with-derivation-narinfo with-derivation-substitute - dummy-package)) + dummy-package + dummy-origin)) ;;; Commentary: ;;; @@ -219,6 +220,13 @@ initialized with default values, and with EXTRA-FIELDS set as specified." (synopsis #f) (description #f) (home-page #f) (license #f))) +(define-syntax-rule (dummy-origin extra-fields ...) + "Return a \"dummy\" origin, with all its compulsory fields initialized with +default values, and with EXTRA-FIELDS set as specified." + (origin extra-fields ... + (method #f) (uri "http://www.example.com") + (sha256 (base32 (make-string 52 #\x))))) + ;; Local Variables: ;; eval: (put 'call-with-derivation-narinfo 'scheme-indent-function 1) ;; eval: (put 'call-with-derivation-substitute 'scheme-indent-function 2) |