aboutsummaryrefslogtreecommitdiff
path: root/tests/gem.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2018-07-24 19:56:35 +0200
committerMarius Bakke <mbakke@fastmail.com>2018-07-24 19:56:35 +0200
commit706ae8e15c8d36b0aee7c19c54c143d3e17f5784 (patch)
treee9fe8ebfb1417d30979b5413165599f066a1c504 /tests/gem.scm
parent3e95125e9bd0676d4a9add9105217ad3eaef3ff0 (diff)
parent8440db459a10daa24282038f35bc0b6771bd51ab (diff)
downloadguix-706ae8e15c8d36b0aee7c19c54c143d3e17f5784.tar.gz
guix-706ae8e15c8d36b0aee7c19c54c143d3e17f5784.zip
Merge branch 'master' into core-updates
Diffstat (limited to 'tests/gem.scm')
-rw-r--r--tests/gem.scm108
1 files changed, 105 insertions, 3 deletions
diff --git a/tests/gem.scm b/tests/gem.scm
index a39e8ba514..4220170ff0 100644
--- a/tests/gem.scm
+++ b/tests/gem.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 David Thompson <davet@gnu.org>
;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -23,10 +24,11 @@
#:use-module (guix hash)
#:use-module (guix tests)
#:use-module ((guix build utils) #:select (delete-file-recursively))
+ #:use-module (srfi srfi-41)
#:use-module (srfi srfi-64)
#:use-module (ice-9 match))
-(define test-json
+(define test-foo-json
"{
\"name\": \"foo\",
\"version\": \"1.0.0\",
@@ -42,6 +44,34 @@
\"licenses\": [\"MIT\", \"Apache 2.0\"]
}")
+(define test-bar-json
+ "{
+ \"name\": \"bar\",
+ \"version\": \"1.0.0\",
+ \"sha\": \"f3676eafca9987cb5fe263df1edf2538bf6dafc712b30e17be3543a9680547a8\",
+ \"info\": \"Another cool gem\",
+ \"homepage_uri\": \"https://example.com\",
+ \"dependencies\": {
+ \"runtime\": [
+ { \"name\": \"bundler\" },
+ ]
+ },
+ \"licenses\": [\"MIT\", \"Apache 2.0\"]
+}")
+
+(define test-bundler-json
+ "{
+ \"name\": \"bundler\",
+ \"version\": \"1.14.2\",
+ \"sha\": \"3bb53e03db0a8008161eb4c816ccd317120d3c415ba6fee6f90bbc7f7eec8690\",
+ \"info\": \"Ruby gem bundler\",
+ \"homepage_uri\": \"https://bundler.io/\",
+ \"dependencies\": {
+ \"runtime\": []
+ },
+ \"licenses\": [\"MIT\"]
+}")
+
(test-begin "gem")
(test-assert "gem->guix-package"
@@ -50,8 +80,8 @@
(lambda (url . rest)
(match url
("https://rubygems.org/api/v1/gems/foo.json"
- (values (open-input-string test-json)
- (string-length test-json)))
+ (values (open-input-string test-foo-json)
+ (string-length test-foo-json)))
(_ (error "Unexpected URL: " url)))))
(match (gem->guix-package "foo")
(('package
@@ -76,4 +106,76 @@
(x
(pk 'fail x #f)))))
+(test-assert "gem-recursive-import"
+ ;; Replace network resources with sample data.
+ (mock ((guix http-client) http-fetch
+ (lambda (url . rest)
+ (match url
+ ("https://rubygems.org/api/v1/gems/foo.json"
+ (values (open-input-string test-foo-json)
+ (string-length test-foo-json)))
+ ("https://rubygems.org/api/v1/gems/bar.json"
+ (values (open-input-string test-bar-json)
+ (string-length test-bar-json)))
+ ("https://rubygems.org/api/v1/gems/bundler.json"
+ (values (open-input-string test-bundler-json)
+ (string-length test-bundler-json)))
+ (_ (error "Unexpected URL: " url)))))
+ (match (stream->list (gem-recursive-import "foo"))
+ ((('package
+ ('name "ruby-foo")
+ ('version "1.0.0")
+ ('source
+ ('origin
+ ('method 'url-fetch)
+ ('uri ('rubygems-uri "foo" 'version))
+ ('sha256
+ ('base32
+ "1a270mlajhrmpqbhxcqjqypnvgrq4pgixpv3w9gwp1wrrapnwrzk"))))
+ ('build-system 'ruby-build-system)
+ ('propagated-inputs
+ ('quasiquote
+ (("bundler" ('unquote 'bundler))
+ ("ruby-bar" ('unquote 'ruby-bar)))))
+ ('synopsis "A cool gem")
+ ('description "This package provides a cool gem")
+ ('home-page "https://example.com")
+ ('license ('list 'license:expat 'license:asl2.0)))
+ ('package
+ ('name "ruby-bundler")
+ ('version "1.14.2")
+ ('source
+ ('origin
+ ('method 'url-fetch)
+ ('uri ('rubygems-uri "bundler" 'version))
+ ('sha256
+ ('base32
+ "1446xiz7zg0bz7kgx9jv84y0s4hpsg61dj5l3qb0i00avc1kxd9v"))))
+ ('build-system 'ruby-build-system)
+ ('synopsis "Ruby gem bundler")
+ ('description "Ruby gem bundler")
+ ('home-page "https://bundler.io/")
+ ('license 'license:expat))
+ ('package
+ ('name "ruby-bar")
+ ('version "1.0.0")
+ ('source
+ ('origin
+ ('method 'url-fetch)
+ ('uri ('rubygems-uri "bar" 'version))
+ ('sha256
+ ('base32
+ "1a270mlajhrmpqbhxcqjqypnvgrq4pgixpv3w9gwp1wrrapnwrzk"))))
+ ('build-system 'ruby-build-system)
+ ('propagated-inputs
+ ('quasiquote
+ (('"bundler" ('unquote 'bundler)))))
+ ('synopsis "Another cool gem")
+ ('description "Another cool gem")
+ ('home-page "https://example.com")
+ ('license ('list 'license:expat 'license:asl2.0))))
+ #t)
+ (x
+ (pk 'fail x #f)))))
+
(test-end "gem")
(podofo, qpdf, xournal, impressive)[home-page]: Likewise. * gnu/packages/perl.scm (perl-math-vecstat, perltidy)[home-page]: Likewise. * gnu/packages/photo.scm (libpano13, enblend-enfuse, hugin)[home-page]: Likewise. * gnu/packages/plan9.scm (drawterm)[home-page]: Likewise. * gnu/packages/plotutils.scm (guile-charting, ploticus)[home-page]: Likewise. * gnu/packages/popt.scm (argtable, popt)[home-page]: Likewise. * gnu/packages/profiling.scm (otf2)[home-page]: Likewise. * gnu/packages/pulseaudio.scm (pulseaudio)[home-page]: Likewise. * gnu/packages/python-check.scm (python-mypy)[home-page]: Likewise. * gnu/packages/python-web.scm (python-cssutils) (python-translationstring)[home-page]: Likewise. * gnu/packages/python-xyz.scm (python-diskcache, python-doxyqml) (python-docutils, python-pexpect, python-importlib-resources) (python-simplegeneric, python-urwid, python-xlrd, python-xlwt) (python-pyasn1, python-pythondialog, python-tftpy, python-random2) (python-arcp, python-pyopengl, python-sortedcollections) (python-sortedcontainers, python-yapsy, python-pydispatcher) (python-posix-ipc)[home-page]: Likewise. * gnu/packages/qt.scm (qwt, libqglviewer, signond)[home-page]: Likewise. * gnu/packages/radio.scm (unixcw, gnuais)[home-page]: Likewise. * gnu/packages/raspberry-pi.scm (bcm2835)[home-page]: Likewise. * gnu/packages/rdf.scm (clucene, rasqal, redland)[home-page]: Likewise. * gnu/packages/regex.scm (tre)[home-page]: Likewise. * gnu/packages/rsync.scm (librsync)[home-page]: Likewise. * gnu/packages/ruby.scm (ruby-packnga, ruby-nokogiri, ruby-oj, ruby-ox) (ruby-sinatra, ruby-citrus, ruby-cbor, ruby-roda)[home-page]: Likewise. * gnu/packages/scheme.scm (scheme48, tinyscheme)[home-page]: Likewise. * gnu/packages/screen.scm (dtach)[home-page]: Likewise. * gnu/packages/scsi.scm (sg3-utils)[home-page]: Likewise. * gnu/packages/sdl.scm (libmikmod, sdl-pango)[home-page]: Likewise. * gnu/packages/shellutils.scm (hstr, rig)[home-page]: Likewise. * gnu/packages/simulation.scm (python-dolfin-adjoint)[home-page]: Likewise. * gnu/packages/smalltalk.scm (smalltalk)[home-page]: Likewise. * gnu/packages/speech.scm (espeak)[home-page]: Likewise. * gnu/packages/stalonetray.scm (stalonetray)[home-page]: Likewise. * gnu/packages/statistics.scm (jags, r-mass, r-class, r-lattice) (r-matrix, r-nnet, r-spatial, r-bit, r-bit64, r-digest, r-xtable) (python-statsmodels, r-ade4, r-latticeextra, r-rcurl, r-xml, r-mvtnorm) (r-robustbase, r-minqa, r-fdrtool, java-jdistlib, xlispstat)[home-page]: Likewise. * gnu/packages/swig.scm (swig)[home-page]: Likewise. * gnu/packages/task-management.scm (wtime)[home-page]: Likewise. * gnu/packages/tcl.scm (itcl, tclxml, tclx)[home-page]: Likewise. * gnu/packages/terminals.scm (libtermkey, mlterm, libvterm) (libvterm)[home-page]: Likewise. * gnu/packages/tex.scm (texlive-lm, texlive-lm-math, texlive-cs) (texlive-csplain, biber, texmaker)[home-page]: Likewise. * gnu/packages/text-editors.scm (joe)[home-page]: Likewise. * gnu/packages/textutils.scm (drm-tools, docx2txt)[home-page]: Likewise. * gnu/packages/tv.scm (tvtime)[home-page]: Likewise. * gnu/packages/unicode.scm (libunibreak)[home-page]: Likewise. * gnu/packages/upnp.scm (libupnp)[home-page]: Likewise. * gnu/packages/version-control.scm (cvs)[home-page]: Likewise. * gnu/packages/video.scm (transcode, libquicktime, mjpegtools, aalib) (liba52, libmpeg2, x265, libdv, dvdauthor, aegisub, pitivi, gavl) (dvdbackup, guvcview, video-contact-sheet)[home-page]: Likewise. * gnu/packages/virtualization.scm (bochs)[home-page]: Likewise. * gnu/packages/w3m.scm (w3m)[home-page]: Likewise. * gnu/packages/web.scm (qjson, libquvi-scripts, libquvi, quvi) (tidy-html, htmlcxx)[home-page]: Likewise. * gnu/packages/wm.scm (evilwm, menumaker)[home-page]: Likewise. * gnu/packages/wv.scm (wv)[home-page]: Likewise. * gnu/packages/wxwidgets.scm (wxsvg)[home-page]: Likewise. * gnu/packages/xdisorg.scm (mtdev, xsel)[home-page]: Likewise. * gnu/packages/xfig.scm (xfig, transfig)[home-page]: Likewise. * gnu/packages/xml.scm (openjade, python-pyxb, xmlstarlet, xmlrpc-c) (opensp)[home-page]: Likewise. * gnu/packages/xorg.scm (xf86-video-qxl)[home-page]: Likewise. Tobias Geerinckx-Rice 2023-02-17gnu: Make nothing depend on QtWebKit....This is required for <https://issues.guix.gnu.org/53289>. * gnu/packages/qt.scm (python-pyqt)[inputs]: Remove qtwebkit. (python-pyqt-without-qtwebkit): Remove variable. (python-pyqtwebengine)[inputs]: Replace python-pyqt-without-qtwebkit with python-pyqt. * gnu/packages/backup.scm (vorta)[inputs]: Likewise. * gnu/packages/ebook.scm (calibre)[inputs]: Likewise. [arguments]: Adjust accordingly. * gnu/packages/education.scm (anki)[inputs]: Replace python-pyqt-without-qtwebkit with python-pyqt. * gnu/packages/kde-games.scm (kajongg)[inputs]: Likewise. * gnu/packages/maths.scm (veusz)[inputs]: Likewise. * gnu/packages/music.scm (frescobaldi)[inputs]: Likewise. (picard)[inputs]: Likewise. * gnu/packages/orange.scm (orange)[inputs]: Likewise. * gnu/packages/pdf.scm (flyer-composer)[inputs]: Likewise. * gnu/packages/python-check.scm (python-pytest-qt)[propagated-inputs]: Likewise. * gnu/packages/python-xyz.scm (python-qtconsole)[propagated-inputs]: Likewise. (python-pyqtgraph)[propagated-inputs]: Likewise. * gnu/packages/radio.scm (gnuradio)[inputs]: Likewise. * gnu/packages/video.scm (openshot)[inputs]: Likewise. * gnu/packages/vpn.scm (openconnect-sso)[inputs]: Likewise. * gnu/packages/web-browsers.scm (qutebrowser)[inputs]: Likewise. Leo Famulari 2023-01-04gnu: hunspell: Move hunspell and dictionaries to hunspell module....Consolidate hunspell and its dictionaries into the (gnu packages hunspell) module instead of having them scattered about. * gnu/packages/aspell.scm (aspell-word-list, define-word-list-dictionary, hunspell-dict-{en, en-au, en-gb, en-gb-ize, en-us}): Remove variables. * gnu/packages/libreoffice.scm (hunspell, dicollecte-french-dictionary, define-french-dictionary, hunspell-dict-fr-{classique, moderne, réforme, toutes-variantes}, hunspell-dict-pl, hunspell-dict-de, hunspell-dict-hu): Remove variables. * gnu/packages/hunspell.scm (hunspell, dicollecte-french-dictionary, define-french-dictionary, hunspell-dict-fr-{classique, moderne, réforme, toutes-variantes}, hunspell-dict-pl, hunspell-dict-de, hunspell-dict-hu, aspell-word-list, define-word-list-dictionary, hunspell-dict-{en, en-au, en-gb, en-gb-ize, en-us}): Add variables. (hunspell-dictionary): Explicitly declare upstream libreoffice version to prevent circular dependency. * gnu/packages/ebook.scm, gnu/packages/enchant.scm, gnu/packages/freedesktop.scm, gnu/packages/gnuzilla.scm, gnu/packages/kde-frameworks.scm, gnu/packages/messaging.scm, gnu/packages/scribus.scm, gnu/packages/task-management.scm, gnu/packages/telegram.scm, gnu/packages/tex.scm, gnu/packages/text-editors.scm, gnu/packages/video.scm: Adjust module imports. Brian Cully 2022-11-28gnu: calibre: Add missing python-pycryptodome dependency....* gnu/packages/ebook.scm (calibre)[inputs]: Add missing python-pycryptodome dependency. Andrew Tropin 2022-11-20gnu: inkbox: Fix build....* gnu/packages/ebook.scm (inkbox)[arguments]: Use G-expression. Marius Bakke 2022-11-20gnu: inkbox: Update home-page and source URI....* gnu/packages/ebook.scm (inkbox)[home-page]: Set to repository, as the previous was NXDOMAIN. [source](uri): Use HOME-PAGE. Marius Bakke