David Craven
8ac5298786
import: Add updater for rust crates.
...
* guix/import/crate.scm (crate-package?, latest-release,
%crate-updater): New variables.
* guix/scripts/refresh.scm (%updaters): Add crate updater.
* doc/guix.texi: Add crate updater to table.
2016-12-14 16:30:42 +01:00
David Craven
3e0c036584
import: Add importer for rust crates.
...
* guix/import/crate.scm: New file.
* guix/scripts/import/crate.scm: New file.
* guix/scripts/import.scm (importers): Add crate importer.
* tests/crate.scm: New file.
* doc/guix.texi: Add crate importer to table.
* Makefile.am (MODULES, SCM_TESTS): Add files.
2016-12-14 16:30:42 +01:00
David Craven
bb3f36ed4c
import: utils: Add some utilities.
...
* guix/import/utils.scm (maybe-inputs, maybe-native-inputs,
package->definition): New variables.
2016-12-14 16:30:42 +01:00
Eric Bavier
ff55fe5599
import: cpan: Add updater.
...
* guix/import/cpan.scm (module->dist-name): Fetch the field of interest.
(cpan-fetch): Accept release name rather than module name.
(fix-source-url): Rename to ...
(cpan-source-url): ... this. Take metadata as parameter.
(package->upstream-name, cpan-version, cpan-package?, latest-release):
New procedures.
(cpan-module->sexp): Use cpan-version and cpan-source-url.
(%cpan-updater): New variable.
* guix/scripts/refresh.scm (%updaters): Add %CPAN-UPDATER.
2016-12-12 22:22:33 -06:00
Eric Bavier
d391ad57d6
import: cpan: Move core-module? to top-level.
...
* guix/import/cpan.scm (cpan-module->sexp): Move local core-module?
procedure to ...
(core-module?): ... here.
2016-12-12 22:22:33 -06:00
Eric Bavier
63773200d7
import: json: Silence json-fetch output.
...
* guix/import/json.scm (json-fetch): Use http-fetch instead of url-fetch
to avoid writing to stdout and a temporary file for each invocation.
* guix/import/gem.scm (rubygems-fetch): Do not redirect json-fetch
output to /dev/null.
* guix/import/pypi.scm (pypi-fetch): Likewise.
2016-12-12 22:22:02 -06:00
Alex Sassmannshausen
c91b368e96
import/cpan: Maybe coerce version to string.
...
* guix/import/cpan.scm (cpan-module->sexp) <version>: Test if version in
meta is string or number. If it is number, coerce to string.
2016-11-14 00:06:09 +01:00
Ricardo Wurmus
e3100110ce
import: cran: Fix off-by-one error.
...
* guix/import/cran.scm (package->upstream-name): Do not include leading
slash in upstream name URL.
2016-11-03 16:03:28 +01:00
Ricardo Wurmus
a98470b5be
import cran: Use URL for Bioconductor 3.4.
...
* guix/import/cran.scm (%bioconductor-svn-url): Update to release URL
for version 3.4.
2016-10-26 09:28:06 +02:00
Hartmut Goebel
b5c347ad3d
import: pypi: All inputs are propagated-inputs by default.
...
* guix/import/pypi.scm (maybe-inputs): Return inputs as
"propagated-inputs".
2016-10-23 19:23:14 +02:00
Alex Kost
b37e1e6428
import: utils: Remove dependency on (json) module.
...
This fixes a regression introduced by commit
fbe9c10128
.
* guix/import/utils.scm: Remove unused (json) module.
2016-10-16 19:19:31 +03:00
Efraim Flashner
523b77faef
import: github: Add .love extension.
...
* guix/import/github.scm (find-extension): Add '.love' extension to the
list of extensions checked.
2016-10-10 11:52:03 +03:00
David Craven
11e296ef30
import: utils: Refactor license->symbol.
...
* guix/import/utils.scm (license->symbol): Work for all licenses.
* tests/import-utils.scm (license->symbol): Add test.
2016-09-28 13:17:15 +02:00
David Craven
59b2034787
import: utils: Add spdx-string->license.
...
* guix/import/utils.scm (spdx-string->license): New variable.
* guix/licenses.scm (agpl1, fdl1.2+): New variables.
2016-09-28 13:15:31 +02:00
David Craven
263ac57fc2
import: Move string->license to importers.
...
* guix/import/gem.scm (string->license): Move from (guix import utils).
* guix/import/pypi.scm (string->license): Move from (guix import utils).
2016-09-28 12:47:29 +02:00
David Craven
fbe9c10128
import: Reorder imports in (guix import utils).
...
* guix/import/utils.scm (define-module): Reorder imports alphabetically.
2016-09-28 12:47:10 +02:00
ng0
18f7473504
import: hackage: Default to https urls.
...
* guix/import/hackage.scm (hackage-source-url, hackage-cabal-url): Use https
for hackage.haskell.org.
2016-08-30 22:38:16 +03:00
ng0
7a62263ee5
import: cpan: Use tls to query api.metacpan.org.
...
* guix/import/cpan.scm (module->dist-name, cpan-fetch-module): Use tls
for api.metacpan.org.
Signed-off-by: Eric Bavier <bavier@member.fsf.org>
2016-08-30 13:21:07 -05:00
David Craven
a34b236c17
import: Importers return prefixed licenses.
...
* guix/import/utils.scm
(define-module): Import licenses with license: prefix.
(string->licenses): Use prefixed licenses.
(license->symbol): Return symbols with the prefix license:.
* guix/tests/pypi.scm (pypi->guix-package): Update test cases.
* guix/tests/gem.scm (gem->guix-package): Update test case.
2016-08-28 14:04:50 +02:00
Ludovic Courtès
8173ceee1f
import: pypi: Correctly handle new-style URLs.
...
Fixes <http://bugs.gnu.org/23997 >.
* guix/import/pypi.scm (guix-package->pypi-name): Rewrite using
'basename' and 'hyphen-package-name->name+version'.
* tests/pypi.scm ("guix-package->pypi-name, old URL style")
("guix-package->pypi-name, new URL style"): New tests.
2016-07-26 17:49:34 +02:00
Alex Sassmannshausen
5b8e564ccd
import: cpan: Use our mirrors for 'https' URLs.
...
* guix/import/cpan.scm (fix-source-url): New procedure.
(cpan-module->sexp): Use it to construct our source-url.
* tests/cpan.scm: Add tests for fix-source-url.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2016-07-03 23:58:29 +02:00
Cyril Roelandt
aebd383d04
import: pypi: do not fail when 'run_requires' is missing from the metadata.
...
* guix/import/pypi.scm (read-wheel-metadata): do not crash when 'run_requires'
is missing from the metadata.
2016-06-25 15:33:06 +02:00
Cyril Roelandt
266785d21e
import: pypi: read requirements from wheels.
...
* doc/guix.tex (Invoking guix import): Mention that the pypi importer
works better with "unzip".
* guix/import/pypi.scm (latest-wheel-release,
wheel-url->extracted-directory): New procedures.
* tests/pypi.scm (("pypi->guix-package, wheels"): New test.
2016-06-14 22:03:22 +02:00
Ludovic Courtès
dc794a7238
gnu-maintenance: Replace 'find-packages' with 'find-package' (singular).
...
Fixes <http://bugs.gnu.org/23718 >.
Reported by Efraim Flashner <efraim@flashner.co.il>.
* guix/gnu-maintenance.scm (find-packages): Remove.
(find-package): New procedure.
* guix/import/gnu.scm (gnu->guix-package): Use 'find-package' instead of
'find-packages' and adjust accordingly.
2016-06-08 19:07:58 +02:00
Ludovic Courtès
405d043ddd
import: github: Tiny cosmetic change.
...
* guix/import/github.scm (find-extension): Use a one-argument lambda.
2016-05-31 23:38:51 +02:00
Efraim Flashner
b93efac026
import github: Add to extension list.
...
* guix/import/github.scm (find-extension): Add '.tgz' extension.
2016-05-31 22:05:44 +03:00
Ludovic Courtès
149590380a
import: Gracefully report import failures.
...
Previously, something like 'guix import gnu which' would spit out a
backtrace if, say, the 'which' tarball could not be authenticated.
* guix/upstream.scm (download-tarball): Mention failure modes in
docstring.
* guix/import/gnu.scm (gnu-package->sexp): Return #f when
'download-tarball' returns #f.
* guix/scripts/import.scm (guix-import): Call 'leave' when IMPORTER does
not return a (package ...) sexp.
2016-05-17 14:02:48 +02:00
Ricardo Wurmus
9916ae15bb
import cran: latest-bioconductor-release: Wrap Bioconductor URL in list.
...
* guix/import/cran.scm (latest-bioconductor-release): Wrap Bioconductor
URL in list in the "urls" field of the "upstream-source" value.
2016-05-16 21:00:41 +02:00
Ricardo Wurmus
9583e07cae
import cran: Use URL for Bioconductor 3.3.
...
* guix/import/cran.scm (%bioconductor-svn-url): Update to release URL
for version 3.3.
2016-05-16 20:52:46 +02:00
Ludovic Courtès
958dd3ce68
utils: Move combinators to (guix combinators).
...
* guix/utils.scm (compile-time-value, memoize, fold2)
(fold-tree, fold-tree-leaves): Move to...
* guix/combinators: ... here. New file.
* tests/utils.scm ("fold2, 1 list", "fold2, 2 lists")
(fold-tree tests): Move to...
* tests/combinators.scm: ... here. New file.
* Makefile.am (MODULES, SCM_TESTS): Add them.
* gnu/packages.scm, gnu/packages/bootstrap.scm,
gnu/services/herd.scm, guix/build-system/gnu.scm,
guix/build-system/python.scm, guix/derivations.scm,
guix/gnu-maintenance.scm, guix/import/elpa.scm,
guix/scripts/archive.scm, guix/scripts/build.scm,
guix/scripts/graph.scm, guix/scripts/lint.scm,
guix/scripts/size.scm, guix/scripts/substitute.scm,
guix/serialization.scm, guix/store.scm, guix/ui.scm: Adjust imports
accordingly.
2016-05-04 23:35:55 +02:00
Eric Bavier
b77d17d023
import: cpan: check version bounds on core modules.
...
Modules may be removed from Perl's core, so we must check for a removal
version.
* guix/import/cpan.scm (cpan-module->sexp)[core-module?]: Also check
version upper bound.
2016-04-25 18:31:45 -05:00
Ludovic Courtès
7d27a0259b
upstream: Pass a package object to updaters.
...
* guix/upstream.scm (package-update-path): Pass PACKAGE to
'latest-release'.
* guix/gnu-maintenance.scm (latest-release*)
(latest-gnome-release, latest-xorg-release): Adjust accordingly.
* guix/import/cran.scm (latest-cran-release):
(latest-bioconductor-release): Likewise.
* guix/import/elpa.scm (latest-release): Likewise.
* guix/import/gem.scm (latest-release): Likewise.
* guix/import/github.scm (latest-release): Likewise.
* guix/import/hackage.scm (latest-release): Likewise.
* guix/import/pypi.scm (latest-release): Likewise.
2016-04-15 00:32:18 +02:00
Eric Bavier
42efe27a30
import: Add Hackage updater.
...
* guix/import/hackage.scm (guix-package->hackage-name, hackage-package?)
(latest-release): New procedures.
(%hackage-updater): New variable.
* guix/scripts/refresh.scm (%updaters): Add it.
* doc/guix.texi (Invoking guix refresh): Mention it.
2016-03-30 23:19:24 -05:00
Eric Bavier
2ae9c63f15
import: hackage: Silence download output.
...
* guix/import/hackage.scm (hackage-fetch): Use http-fetch to avoid
progress output from url-fetch.
2016-03-30 23:19:24 -05:00
Eric Bavier
f9ea74ad04
import: hackage: Factorize url synthesis.
...
* guix/import/hackage.scm (hackage-source-url, hackage-cabal-url): New
procedures.
(hackage-fetch, hackage-module->sexp): Use them.
2016-03-30 23:19:24 -05:00
Ricardo Wurmus
b98293ebed
import: cran: Accept single URL in addition to single URL.
...
* guix/import/cran.scm (package->upstream-name): Match single URL in
addition to list of URLs.
2016-03-22 17:57:40 +01:00
Ludovic Courtès
522773b700
import: pypi: Emit 'pypi-uri' only when it yields the right URL.
...
Fixes <http://bugs.gnu.org/23062 >.
Reported by Danny Milosavljevic <dannym@scratchpost.org>.
* guix/import/pypi.scm (make-pypi-sexp): Check whether 'pypi-uri'
returns SOURCE-URL and fall back to the full URL otherwise.
* tests/pypi.scm ("pypi->guix-package"): Adjust expected URI
accordingly.
Co-authored-by: Danny Milosavljevic <dannym@scratchpost.org>
2016-03-19 23:54:19 +01:00
Ludovic Courtès
322bb53c7a
import: snix: Use the right 'package-name->name+version'.
...
Fixes a regression introduced in
1b846da8c3
.
* guix/import/snix.scm: Use 'package-name->name+version' from (guix
build utils).
2016-03-06 23:16:35 +01:00
Ben Woodcroft
917a2a58ec
import: Add github-updater.
...
* guix/import/github.scm: New file.
* guix/scripts/refresh.scm (%updaters): Add %GITHUB-UPDATER.
* doc/guix.texi (Invoking guix refresh): Mention it.
* Makefile.am (MODULES): Add gnu/import/github.scm.
2016-02-26 22:06:34 -05:00
Ben Woodcroft
fbc5b815cc
import: gem: Add updater.
...
* guix/import/gem.scm (guix-package->gem-name,
gem-package?, latest-release): New procedures.
(%gem-updater): New variable.
(rubygems-fetch): Wrap body in
'call-with-output-file' and 'with-error-to-port'.
* guix/scripts/refresh.scm (%updaters): Add %GEM-UPDATER.
* doc/guix.texi (Invoking guix refresh): Mention RubyGems.
2016-02-20 20:46:10 +10:00
Mathieu Lirzin
74e667d149
packages: Use '@' in package record printers.
...
* guix/packages.scm <package>: Use '@' in record printer.
* guix/import/cabal.scm <cabal-package>: Likewise
* guix/import/elpa.scm <elpa-package>: Likewise.
* tests/packages.scm: Adapt to it.
2016-01-28 16:31:38 +01:00
Ben Woodcroft
e88d5fa9eb
import: gem: Beautify only the description, not the synopsis.
...
* guix/import/gem.scm (make-gem-sexp): Add synopsis argument.
(gem->guix-package): Pass unbeautified synopsis to make-gem-sexp.
* tests/gem.scm: Adapt it.
2016-01-20 21:52:52 +10:00
Ricardo Wurmus
d0bd632f89
import: Add Bioconductor importer and updater.
...
* guix/import/cran.scm (%bioconductor-updater,
latest-bioconductor-release, bioconductor-package?): New procedures.
(cran->guix-package): Support repositories other than CRAN.
(%bioconductor-url, %bioconductor-svn-url): New variables.
(description->package): Update signature to distinguish between packages
from different repositories.
(latest-release): Rename procedure ...
(latest-cran-release): ... to this.
(cran-package?): Do not assume all R packages are available on CRAN.
* tests/cran.scm: Update tests.
* guix/scripts/import/cran.scm: Add "--archive" option and default to
CRAN.
* guix/scripts/refresh.scm (%updaters): Add "%bioconductor-updater".
* doc/guix.texi: Document Bioconductor importer and updater.
2016-01-20 12:41:28 +01:00
Ben Woodcroft
869cda545d
import: gem: Beautify description field.
...
* guix/import/gem.scm (gem->guix-package): Use 'beautify-description'.
2016-01-14 19:44:40 +10:00
Ben Woodcroft
2028a2c960
import: cran: Move beautify-description to utils module.
...
* guix/import/cran.scm (beautify-description): Move from here...
* guix/import/utils.scm: ... to here.
2016-01-14 19:44:36 +10:00
Ricardo Wurmus
34a75d35bb
import: Rename "cran-fetch" to "fetch-description".
...
* guix/import/cran.scm (cran-fetch): Rename procedure ...
(fetch-description): ... to this.
2016-01-07 17:18:04 +01:00
Ricardo Wurmus
d1c116089b
import: Add package->upstream-name procedure.
...
* guix/import/cran.scm (package->upstream-name): New procedure.
2016-01-07 17:18:02 +01:00
Ricardo Wurmus
be036757bd
import: Drop empty list items.
...
* guix/import/cran.scm (listify): Remove empty strings from result list.
2015-12-21 15:24:54 +01:00
Ricardo Wurmus
0f6b9e9828
import: cran: Parse DESCRIPTION instead of HTML.
...
* guix/import/cran.scm (description->alist, listify,
beautify-description, description->package): New procedures.
(table-datum, downloads->url, nodes->text, cran-sxml->sexp): Remove
proceduces.
(latest-release): Use parsed DESCRIPTION instead of SXML.
* tests/cran.scm: Rewrite to match importer.
2015-12-11 15:35:07 +01:00
Ricardo Wurmus
b6a222757b
import: cran: Match more license strings.
...
* guix/import/cran.scm (string->license): Match more license strings to
license symbols.
2015-12-11 15:35:07 +01:00