summaryrefslogtreecommitdiff
path: root/guix/import
AgeCommit message (Expand)Author
2019-07-02import: pypi: Preserve package name case when forming pypi-uri....Fixes <https://bugs.gnu.org/33046>. * guix/build-system/python.scm (pypi-uri): Update the host URI to "files.pythonhosted.org". * guix/import/pypi.scm (make-pypi-sexp): Preserve the package name case when the source URL calls for it. Maxim Cournoyer
2019-07-02import: pypi: Include optional test inputs as native-inputs....* guix/import/pypi.scm (maybe-inputs): Add INPUT-TYPE argument, and use it. (test-section?): New predicate. (parse-requires.txt): Collect the optional test inputs, and return them as the second element of the returned list. (parse-wheel-metadata): Likewise. (guess-requirements): Adapt. (make-pypi-sexp): Likewise, and include the test inputs requirements as native inputs in the returned package expression. * tests/pypi.scm (test-requires.txt): Include a test section in the test-requires.txt data. (test-requires.txt-beaker): New variable. ("parse-requires.txt"): Adapt. ("parse-requires.txt - Beaker"): New test. ("parse-wheel-metadata, with extras"): Adapt. ("parse-wheel-metadata, with extras - Jedi"): Adapt. ("pypi->guix-package, no wheel"): Re-indent, and add the expected native-inputs. ("pypi->guix-package, wheels"): Likewise. Maxim Cournoyer
2019-07-02import: pypi: Completely mute the output of the "unzip" command....* guix/import/pypi.scm (guess-requirements): Completely mute the output of the "unzip" command. Maxim Cournoyer
2019-07-02import: pypi: Fix typo in docstring....* guix/import/pypi.scm (guess-requirements): Fix typo. Maxim Cournoyer
2019-07-02import: pypi: Parse wheel METADATA instead of metadata.json....With newer Wheel releases, there is no more metadata.json file; the METADATA file should be used instead (see: https://github.com/pypa/wheel/issues/195). This change updates our PyPI importer so that it uses the latter. * guix/import/pypi.scm (define-module): Remove unnecessary modules and export the PARSE-WHEEL-METADATA procedure. (parse-wheel-metadata): Add procedure. (guess-requirements): Use it. * tests/pypi.scm (test-metadata): Test it. Maxim Cournoyer
2019-07-02import: pypi: Support more types of archives....This change enables the PyPI importer to look for requirements in a source archive of a different type than "tar.gz" or "tar.bz2". Also, scan the source archive to find a requires.txt file. * guix/import/pypi.scm: (guess-requirements)[tarball-directory]: Remove procedure. [guess-requirements-from-source]: Use COMRESSED-FILE? to determine if an archive type is supported, and some file extension logic that chooses either "tar" or "unzip" as the extractor. Search for the requires.txt file in the archive instead of using a static, expected location. (guess-requirements): Rename the TARBALL argument to ARCHIVE, to denote the archive format is no longer bound specifically to the Tar format. (compute-inputs): Likewise. * tests/pypi.scm ("pypi->guix-package, no wheel"): Mock the requires.txt at a non-standard location. ("pypi->guix-package, no usable requirement file."): New test. Maxim Cournoyer
2019-07-02import: pypi: Deduplicate requirements....* guix/import/pypi.scm (parse-requires.txt): Remove potential duplicates. Maxim Cournoyer
2019-07-02import: pypi: Improve parsing of requirement specifications....The previous solution was fragile and could leave unwanted characters in a requirement name, such as '[' or ']'. Partially fixes <https://bugs.gnu.org/33047>. * guix/import/pypi.scm (use-modules): Export SPECIFICATION->REQUIREMENT-NAME (%requirement-name-regexp): New variable. (clean-requirement): Rename to... (specification->requirement-name): this, which now uses %requirement-name-regexp to select the requirement name from the requirement specification. (parse-requires.txt): Adapt. Maxim Cournoyer
2019-07-02import: pypi: Do not parse optional requirements from source....* guix/import/pypi.scm: Export PARSE-REQUIRES.TXT. (clean-requirement): Move procedure to the top level. (guess-requirements): Move the READ-REQUIREMENTS procedure to the top level, and rename it to PARSE-REQUIRES.TXT. Move the CLEAN-REQUIREMENT procedure to the top level. Move the COMMENT? functions inside the PARSE-REQUIRES.TXT procedure. (parse-requires.txt): Add a SECTION-HEADER? predicate, and use it to prevent parsing optional requirements. * tests/pypi.scm (test-requires-with-sections): New variable. ("parse-requires.txt, with sections"): New test. Maxim Cournoyer
2019-07-02import: pypi: Do not consider requirements.txt files....PyPI packages are mandated to have a setup.py file, which contains a listing of the required dependencies. The setuptools/distutils machinery embed metadata in the archives they produce, which contains this information. There is no need nor gain to collect the requirements from a "requirements.txt" file, as it is not the true record of dependencies for PyPI packages and may contain extraneous requirements or not exist at all. * guix/import/pypi.scm (guess-requirements): Update comment. [guess-requirements-from-source]: Do not attempt to parse the file requirements.txt. Streamline logic. * tests/pypi.scm (test-requires.txt): Rename from test-requirements, to hint at the file being tested. ("pypi->guix-package"): Adapt so that the fake package contains a requires.txt file rather than a requirements.txt file. ("pypi->guix-package, wheels"): Likewise. Maxim Cournoyer
2019-06-30guix: import: crate: fix redundant inputs list nesting...* guix/import/crate.scm (maybe-cargo-inputs): Remove one level of lists. * guix/import/crate.scm (maybe-cargo-development-inputs): Same. * tests/crate.scm: (crate->guix-package)[package]<#:arguments>: Remove one level of list nesting. Ivan Petkov
2019-06-13import: hackage: Handle Hackage revisions....Hackage packages can have metadata revisions (Cabal file only) that are not reflected in the source archive. The Haskell build system has support for this, but until now the Hackage importer would create a package based on the revised Cabal file which would then build using the old Cabal file. Fixes <https://bugs.gnu.org/35750>. * guix/import/cabal.scm (<cabal-package>): Add 'revision' field. (eval-cabal): Parse 'x-revision:' property. * guix/import/hackage.scm (read-cabal-and-hash): New procedure. (hackage-fetch-and-hash): New procedure. (hackage-fetch): Rewrite using 'hackage-fetch-and-hash'. (hackage-module->sexp): Add 'cabal-hash' argument and use it to populate the '#:cabal-revision' argument. (hackage->guix-package): Use the new '-and-hash' functions to get the hash of the Cabal file and pass it to 'hackage-module->sexp'. * guix/tests/hackage.scm: Test import of Cabal file revision. Signed-off-by: Timothy Sample <samplet@ngyro.com> Robert Vollmert
2019-06-11import: crate: Define dependencies as arguments....* guix/import/crate.scm: (crate-fetch)[input-crates]: Rename to dev-crates. [native-input-crates]: Rename to dev-dep-crates. [inputs]: Rename to cargo-inputs. [native-inputs]: Rename to cargo-development-inputs. (maybe-cargo-inputs, maybe-cargo-development-inputs, maybe-arguments): Add them. (make-crate-sexp)[inputs]: Rename to cargo-inputs. [native-inputs]: Rename to cargo-development-inputs. [maybe-native-inputs, maybe-inputs]: Replace with maybe-arguments. * guix/import/utils.scm: (package-names->package-inputs): Make public. Add docstring. * tests/crate.scm (crate->guix-package): Update the match pattern. Signed-off-by: Chris Marusich <cmmarusich@gmail.com> Ivan Petkov
2019-06-07import: utils: 'specs->package-lists' correctly matches "out"....* guix/import/utils.scm (specs->package-lists): Match "out", not ("out"). Ludovic Courtès
2019-06-07import: print: Honor the outputs of inputs (!)....Fixes <http://bugs.gnu.org/35893>. Reported by Jesse Gibbons <jgibbons2357@gmail.com>. * guix/import/print.scm (package->code)[package-lists->code]: Preserve OUT in the result. * tests/print.scm (define-with-source): New macro. (pkg): Use it. (pkg-source): New variable. (pkg-with-inputs, pkg-with-inputs-source): New variables. ("simple package"): Refer to 'pkg-source'. ("package with inputs"): New test. Ludovic Courtès
2019-06-03guix: import: simplify recursive import...This simplifies the logic of recursive-import, intending no major functional changes. The package import function is no longer called twice per package. Failed imports now make it to the package stream as '() instead of #f. * guix/import/utils.scm (recursive-import): Simplify. Signed-off-by: Oleg Pykhalov <go.wigust@gmail.com> Robert Vollmert
2019-06-02import: hackage: Parse braced properties....This adds partial support for Cabal properties that use curly braces instead of the layout rule. See for example https://hackage.haskell.org/package/cassava/ * guix/import/cabal.scm (read-braced-value): New procedure. (is-property): Remove. (is-layout-property, is-braced-property): New variables. (lex-property): Rename to... (lex-layout-property): ... this. (lex-braced-property, lex-property): New procedures. (lex-token): Add call to 'lex-property'. * guix/tests/hackage.scm: Test braced description import. * tests/hackage.scm (test-cabal-multiline-desc): Rename to... (test-cabal-multiline-layout): ... this. ("hackage->guix-package test multiline desc"): Rename to... ("hackage->guix-package test multiline desc (layout)"): ... this. (test-cabal-multiline-braced): New variable. ("hackage->guix-package test multiline desc (braced)"): New test. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Robert Vollmert
2019-06-01import: hackage: Update list of ghc-included packages....Update the list of excepted dependencies for current ghc-8.4, based on the release notes at https://downloads.haskell.org/~ghc/8.4.3/docs/html/users_guide/8.4.3-notes.html Particularly, this adds `text` to the list, which is a dependency of `parsec` which was already on the list before, causing build failures with updated versions of the `text` package. * guix/import/hackage.scm (ghc-standard-libraries): Update list. Signed-off-by: Ricardo Wurmus <rekado@elephly.net> Robert Vollmert
2019-05-28import: cran: Ignore invalid packages from the system requirements....* guix/import/cran.scm (description->package): Filter invalid packages from the list of system requirements. Ricardo Wurmus
2019-05-26import: hackage: Fix Cabal test....* guix/import/hackage.scm (hackage->guix-package): Remove call to 'memoize'. (hackage->guix-package/m): New procedure. (hackage-recursive-import): Use it. * tests/hackage.scm ("hackage->guix-package test 6"): Adjust. Co-authored-by: Robert Vollmert <rob@vllmrt.net> Ludovic Courtès
2019-05-26import: hackage: Recognize "BSD-3-Clause" and "PublicDomain"....* guix/import/hackage.scm (string->license): Add two licenses. Signed-off-by: Marius Bakke <mbakke@fastmail.com> Robert Vollmert
2019-05-23import: cran: Ignore invalid packages....* guix/import/cran.scm (invalid-packages): New variable. (description->package): Use it. Ricardo Wurmus
2019-05-15import: github: Sort releases before picking the latest one....* guix/import/github.scm (latest-released-version): Sort releases before picking the first one as the latest. Arun Isaac
2019-05-15import: github: Improve readability....* guix/import/github.scm (latest-released-version)[release->version]: Separate out release->version as a new function. Arun Isaac
2019-05-06guix: Update to Bioconductor 3.9....* guix/build-system/r.scm (bioconductor-uri): Use 3.9 archive URL. * guix/import/cran.scm (%bioconductor-version): Update to 3.9. Ricardo Wurmus
2019-04-10import: opam: Use dune-build-system when possible....* guix/import/opam.scm (opam->guix-package): Detect when dune can be used. Julien Lepiller
2019-04-10import: opam: Add more patterns to opam file parser....* guix/import/opam.scm: Add more patterns to peg parser. (choice-pat choice condition-not condition-paren): New patterns. (ground-value condition-content condition-var): Update patterns. Julien Lepiller
2019-03-23import: opam: Also update dune packages....* guix/import/opam.scm (opam-package?): Also accept packages that use the dune build system. Julien Lepiller
2019-03-18import: Add Launchpad updater....* guix/import/launchpad.scm: New file. * Makefile.am (MODULES): Register it. * doc/guix.texi (Invoking guix refresh): Mention the Launchpad updater. Arun Isaac
2019-03-18Correct name and email address for ng0....* .mailmap, Makefile.am, doc/guix.de.texi, doc/guix.fr.texi, doc/guix.texi, etc/completion/fish/guix.fish, gnu/packages/accessibility.scm, gnu/packages/admin.scm, gnu/packages/audio.scm, gnu/packages/autotools.scm, gnu/packages/cdrom.scm, gnu/packages/check.scm, gnu/packages/cinnamon.scm, gnu/packages/compression.scm, gnu/packages/crypto.scm, gnu/packages/databases.scm, gnu/packages/django.scm, gnu/packages/dns.scm, gnu/packages/elixir.scm, gnu/packages/emacs-xyz.scm, gnu/packages/emacs.scm, gnu/packages/enlightenment.scm, gnu/packages/erlang.scm, gnu/packages/fonts.scm, gnu/packages/fontutils.scm, gnu/packages/forth.scm, gnu/packages/fvwm.scm, gnu/packages/games.scm, gnu/packages/gl.scm, gnu/packages/gnome.scm, gnu/packages/gnunet.scm, gnu/packages/gnupg.scm, gnu/packages/gnuzilla.scm, gnu/packages/gtk.scm, gnu/packages/guile-wm.scm,gnu/packages/guile-xyz.scm, gnu/packages/haskell-check.scm, gnu/packages/haskell-crypto.scm, gnu/packages/haskell.scm, gnu/packages/image-viewers.scm, gnu/packages/image.scm, gnu/packages/irc.scm, gnu/packages/language.scm, gnu/packages/libcanberra.scm, gnu/packages/linux.scm, gnu/packages/lisp.scm, gnu/packages/lolcode.scm, gnu/packages/lxde.scm, gnu/packages/lxqt.scm, gnu/packages/mail.scm, gnu/packages/markup.scm, gnu/packages/mate.scm, gnu/packages/maths.scm, gnu/packages/mc.scm, gnu/packages/messaging.scm, gnu/packages/music.scm, gnu/packages/ncurses.scm, gnu/packages/networking.scm, gnu/packages/nickle.scm, gnu/packages/openbox.scm, gnu/packages/pdf.scm, gnu/packages/perl-check.scm, gnu/packages/perl.scm, gnu/packages/python-compression.scm, gnu/packages/python-crypto.scm, gnu/packages/python-web.scm, gnu/packages/python-xyz.scm, gnu/packages/python.scm, gnu/packages/qt.scm, gnu/packages/ruby.scm, gnu/packages/rust.scm, gnu/packages/scheme.scm, gnu/packages/serialization.scm, gnu/packages/shells.scm, gnu/packages/ssh.scm, gnu/packages/suckless.scm, gnu/packages/tbb.scm, gnu/packages/telephony.scm, gnu/packages/text-editors.scm, gnu/packages/textutils.scm, gnu/packages/time.scm, gnu/packages/tls.scm, gnu/packages/tor.scm, gnu/packages/version-control.scm, gnu/packages/video.scm, gnu/packages/vim.scm, gnu/packages/web.scm, gnu/packages/wm.scm, gnu/packages/xdisorg.scm, gnu/packages/xfce.scm, gnu/packages/xml.scm, gnu/packages/xorg.scm, gnu/services/certbot.scm, gnu/services/desktop.scm, gnu/services/version-control.scm, gnu/services/web.scm, guix/import/hackage.scm, guix/licenses.scm: Correct name and email address for ng0. Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr> ng0
2019-02-05import: opam: Work around janestreet version numbers....janestreet reversionned its packages and prefixed them with "v". Let the importer know about that and choose "v" versions first. * guix/import/opam.scm (find-latest-version): Work around version rewrite from janestreet. (opam->guix-package): Do not pass "v" to version number. Julien Lepiller
2019-02-05import: opam: Replace "_" with "-" in imported names....* guix/import/opam.scm (ocaml-name->guix-name): Replace "_" with "-". (opam->guix-packages): Add upstream name when we cannot guess it properly. Julien Lepiller
2019-02-05import: opam: Fix conditions....* guix/import/opam.scm (condition-eq, condition-neq): The first argument can be empty. * tests/opam.scm: Add test case. Julien Lepiller
2019-01-21import: github: Improve readability....* guix/import/github.scm (latest-released-version): Use any and cond instead of a recursive loop and an if-else ladder respectively. Arun Isaac
2019-01-21import: github: Use prereleases when package has no releases....* guix/import/github.scm (latest-released-version): Use preleases when package has no releases. Arun Isaac
2019-01-21import: github: Check if git URIs are GitHub URIs....This fixes a regression introduced in 9a5091d0c181453d0f31ce97f96a4e577a25e796 whereby packages with git origin URIs not hosted on GitHub would be wrongly detected as being covered under the github updater. Reported by Efraim Flashner <efraim@flashner.co.il>. * guix/import/github.scm (updated-github-url): Check if git URIs are GitHub URIs. Arun Isaac
2019-01-16import: github: Do not update URI for packages using git-fetch....* guix/import/github.scm (updated-github-url): Return the unchanged source URI for packages using git-fetch. [updated-url]: Do not handle URIs which end with ".git". Arun Isaac
2019-01-12import: cran: Suggest input changes....* guix/import/cran.scm (latest-cran-release, latest-bioconductor-release): Return input-changes. Ricardo Wurmus
2019-01-07import: opam: Parse comments....* guix/import/opam.scm: Add comment support in parser. Julien Lepiller
2019-01-07import: opam: Add updater....* guix/import/opam.scm (%opam-updater): New variable. Julien Lepiller
2019-01-07import: opam: Add recursive option....* guix/script/import/opam.scm: Add recursive option. * guix/import/opam.scm (opam->guix-package): return two values. (opam-recursive-import): New variable. Julien Lepiller
2019-01-03import: cran: Default to 'cran repo....* guix/import/cran.scm (cran-recursive-import): Default to 'cran repo. Ricardo Wurmus
2019-01-03import: cran: Abort if no description could be fetched....* guix/import/cran.scm (cran->guix-package): Only proceed if a valid description could be fetched. Ricardo Wurmus
2019-01-03import: cran: Use HTTPS....* guix/import/cran.scm (%cran-url): Use HTTPS. Ricardo Wurmus
2019-01-03import: cran: Download tarballs only once....* guix/import/cran.scm (download): New procedure. (fetch-description, description->package): Use it. Ricardo Wurmus
2018-12-31refresh: github: updates for origins using 'git-fetch'....* guix/import/github.scm (updated-github-url): Respond with the repository url for the 'git-fetch' fetch method. (github-package?): Simplify boolean expression. (github-repository, github-user-slash-repository): Strip trailing ".git" from project if present. (latest-release)<origin-github-uri>: Recognize a 'git-reference'. Eric Bavier
2018-12-20import: cran: Try import via CRAN if package is not on Bioconductor....* guix/import/cran.scm (fetch-description): Return #F on failure. (cran->guix-package): Retry from CRAN on failure to fetch description from bioconductor. Ricardo Wurmus
2018-12-17import: Update opam importer....* guix/import/opam.scm: Update importer for opam 2. * tests/opam.scm: Update tests for the opam 2 importer. Julien Lepiller
2018-11-06guix: Update to Bioconductor 3.8....* guix/import/cran.scm (%bioconductor-version): Update to 3.8. * guix/build-system/r.scm (bioconductor-uri): Update archive URL. Ricardo Wurmus
2018-10-28import: hackage: Do not repeat inputs in native-inputs....* guix/import/hackage.scm (hackage-module->sexp): Do not repeat inputs again in native-inputs. native-inputs should only contain packages that are not already listed in inputs. Arun Isaac