summaryrefslogtreecommitdiff
path: root/guix/import/utils.scm
Commit message (Collapse)AuthorAge
* import: utils: Harden beautify-description.Alice BRENON2022-02-08
| | | | | | | | | | | * guix/import/utils.scm (beautify-description): Handle non-string arguments. [use-modules]: Explicitly import G_ from (guix i18n) and make (guix ui) import explicit. * guix/import/opam.scm: [use-modules] Make imports explicit for module (guix import utils). Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* import: utils: Wrap lines in description.Xinglu Chen2021-12-17
| | | | | | | * guix/import/utils.scm (beautify-description): Use ‘fill-paragraph’; add optional ‘length’ argument. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* import: utils: Add more licenses and extend their detection.Attila Lendvai2021-11-12
| | | | | | | | | * guix/import/utils.scm (spdx-string->license): Identify more licenses (CC-BY-4.0, Freetype, HPND). * guix/licenses.scm: Add a comment that mentions "MIT" so that people who grep for MIT end up there. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* Revert the #51061 patch series for now.Tobias Geerinckx-Rice2021-10-08
| | | | | | | This reverts commits f63c79bf7674df012517f8e9148f94c611e35f32 ..f86f7e24b39928247729020df0134e2e1c4cde62 for more chillax reviewing. See <https://issues.guix.gnu.org/51061#32>.
* import: Add hex.pm importer.Hartmut Goebel2021-10-07
| | | | | | | | | | | | | hex.pm is a package repository for Erlang and Elixir. * guix/scripts/import.scm (importers): Add "hexpm". * guix/scripts/import/hexpm.scm, guix/import/hexpm.scm, guix/hexpm-download.scm: New files. * guix/import/utils.scm (source-spec->object): Add "hexpm-fetch" to list of fetch methods. * guix/upstream.scm (package-update/hexpm-fetch): New function. (%method-updates) Add it. * Makefile.am: Add them.
* import: utils: Skip not found packages.Sarah Morgensen2021-09-01
| | | | | | | | * guix/import/utils.scm (recursive-import): Skip packages when the package returned by 'repo->guix-package' is false. * tests/import-utils.scm: New tests. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* import/utils: Recognise GPL-3.0-or-later and friends.Maxime Devos2021-08-20
| | | | | | | * guix/import/utils.scm (spdx-string->license): Recognise GPL-N-only and GPL-N-or-later. Likewise for LGPL and AGPL. Signed-off-by: Leo Prikler <leo.prikler@student.tugraz.at>
* import: go: Append version to symbol name in the pinned version mode.Maxim Cournoyer2021-04-09
| | | | | | | | | | | | | | | | | | | This allows importing packages with complicated version specific dependency chains without the package symbol names colliding. * doc/guix.texi (Invoking guix import): Document the --pin-versions option. Mention that a specific version can be imported. Remove the experimental warning. * guix/import/go.scm (go-module->guix-package-name)[version]: Add optional argument. Rewrite the character translation in terms of string-map. (go-module->guix-package): Conditionally use dependencies whose symbol include their version, based no the value of the PIN-VERSIONS? argument. * guix/import/utils.scm (package->definition): Add a new case where the full version string is appended to the package symbol. * guix/scripts/import.scm (guix-import): Correctly print forms starting with '(define-public [...]'. * guix/scripts/import/go.scm (guix-import-go): Conditionally include the version in the package symbols defined.
* import: go: Improve synopsis and description parsing.Maxim Cournoyer2021-04-09
| | | | | | | | | | | | | | | | | | | | | | * guix/import/go.scm (%strict-tokenizer?): Set parameter to #t. (go-path-escape): Redefine to prevent inlining. (http-get*): Replace by ... (http-fetch*): this ... (json-fetch*): New procedure. (go.pkg.dev-info): Use http-fetch*. (go-package-licenses): Rewrite in terms of go.pkg.dev-info. (go-package-description): Likewise. (go-package-synopsis): Likewise. (fetch-go.mod): Use the memoized http-fetch*. (parse-go.mod): Adjust to receive content as a string. (fetch-module-meta-data): Adjust to use http-fetch*. (go-module->guix-package): Adjust to the modified fetch-go.mod return value. [inputs]: Use propagated inputs, which is the most common situations for Go libraries. [description]: Beautify description. [licenses]: Do no check for #f. The result of the license parsing is always a list. * tests/go.scm: Adjust following above changes.
* import: utils: Refactor maybe-inputs and add maybe-propagated-inputs.Maxim Cournoyer2021-04-09
| | | | | | | * guix/import/utils.scm (maybe-inputs)[type]: New argument. Update docstring. The argument is used to derive the input field name to use. (maybe-native-inputs): Adjust to use the above. (maybe-propagated-inputs): New procedure.
* licenses: Add Free Art License 1.3.Felix Gruber2021-03-29
| | | | | | | * guix/licenses.scm (lal1.3): New variable. * guix/import/utils.scm (spdx-string->license): Add LAL-1.3. Signed-off-by: Guillaume Le Vaillant <glv@posteo.net>
* licenses: Add Zero-Clause BSD License.Alexandros Theodotou2021-03-06
| | | | | | * guix/licenses.scm (bsd-0): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* import/utils: recursive-import: Fix typo.Ricardo Wurmus2020-12-31
| | | | * guix/import/utils.scm (recursive-import): Fix typo.
* import/utils: alist->package: Handle SPDX license names only as fallback.Ricardo Wurmus2020-12-27
| | | | | | | | | Fixes <https://bugs.gnu.org/45453>. * guix/import/utils.scm (alist->package): Find plain license names in (guix licenses) first, and only fall back to SPDX names on error. * tests/import-utils.scm ("alist->package with SPDX license name 1/2", "alist->package with SPDX license name 2/2"): New tests.
* import/utils: Fix conditional.Ricardo Wurmus2020-12-09
| | | | | | | This is a follow-up to commit 45584061a9ebe961e2be08ee94c3fe8ad74e2713. * guix/import/utils.scm (package->definition): Use EQ? instead of = to compare truthiness; use ELSE instead of (#T).
* import: crate: Trim version for names after left-most non-zero part.Hartmut Goebel2020-12-02
| | | | | | | | | | | | | | This complies to how versions are matched for caret requirements in crates: An update is allowed if the new version number does not modify the left-most non-zero digit in the major, minor, patch grouping. * guix/import/crate.scm (version->semver-prefix): New function. (make-crate-sexp)[format-inputs]: Use it. (make-crate-sexp): Use it to pass shorter version to package->definition. * guix/import/utils.scm (package->definition): Change optional parameter APPEND-VERSION? into APPEND-VERSION?/STRING. If it is a string, append its value to name. * tests/crate.scm: Adjust tests accordingly.
* import: utils: Trim patch version from names.Hartmut Goebel2020-12-02
| | | | | | | | | This remove the patch version from generated package names. For example 'rust-my-crate-1.1.2' now becomes 'rust-my-crate-1.1'. * guix/import/utils.scm (package->definition): Trim patch version from generated package names. * tests/crate.scm: (cargo>guix-package, cargo-recursive-import): Likewise.
* import: crate: Use guile-semver to resolve module versions.Martin Becze2020-12-02
| | | | | | | | | | | | | | | | | | * guix/import/crate.scm: Add guile-semver as a soft dependency. (make-crate-sexp): Don't allow other keys. Add '#:skip-build?' to build system args. Pass a VERSION argument to 'cargo-inputs'. (crate->guix-package): Use guile-semver to resolve the correct module versions. Treat "build" dependencies as normal dependencies. (crate-name->package-name): Reuse the procedure 'guix-name' instead of duplicating its logic. * guix/import/utils.scm (package-names->package-inputs): Implement handling of (name version) pairs. * guix/scripts/import/crate.scm (guix-import-crate): Use crate-recursive-import instead of duplicate code. * tests/crate.scm (recursive-import): Change test packages versions to be distinguishable. Add version data to the test. Check created symbols, too. Co-authored-by: Hartmut Goebel <h.goebel@crazy-compilers.com>
* import: utils: 'recursive-import' accepts an optional version parameter.Martin Becze2020-12-02
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds a key VERSION to 'recursive-import' and moves the parameter REPO to a key. This also changes all the places that rely on 'recursive-import'. * guix/import/utils.scm (recursive-import): Add the VERSION key. Make REPO a key. (package->definition): Add optional 'append-version?'. * guix/scripts/import/crate.scm (guix-import-crate): Add the VERSION key. * guix/import/crate.scm (crate->guix-package): Add the VERSION key. (crate-recursive-import): Pass VERSION to recursive-import, remove now unnecessary code. * guix/import/cran.scm (cran->guix-package, cran-recursive-import): Change the REPO parameter to a key. * guix/import/elpa.scm (elpa->guix-package, elpa-recursive-import): Likewise. * guix/import/gem.scm (gem->guix-package, recursive-import): Likewise. * guix/import/opam.scm (opam-recurive-import): Likewise. * guix/import/pypi.scm (pypi-recursive-import): Likewise. * guix/import/stackage.scm (stackage-recursive-import): Likewise. * guix/scripts/import/cran.scm (guix-import-cran): Likewise. * guix/scripts/import/elpa.scm (guix-import-elpa): Likewise. * tests/elpa.scm (eval-test-with-elpa): Likewise. * tests/import-utils.scm (recursive-import): Likewise. Co-authored-by: Hartmut Goebel <h.goebel@crazy-compilers.com>
* import: utils: Fix license name mismatches and define CUA-OPL-1.0.Helio Machado2020-10-17
| | | | | | | | * guix/licenses.scm (cua-opl1.0): New variable. * guix/import/utils.scm (spdx-string->license): Rename licenses to fit the internal names and add a notice pointing to guix/licenses.scm. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* packages: Introduce <content-hash> and use it in <origin>.Ludovic Courtès2020-05-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/packages.scm (<content-hash>): New record type. (define-content-hash-constructor, build-content-hash) (content-hash): New macros. (print-content-hash): New procedure. (<origin>): Rename constructor to '%origin'. [sha256]: Remove field. [hash]: New field. Adjust users. (origin-compatibility-helper, origin): New macros. (origin-sha256): New deprecated procedure. (origin->derivation): Adjust accordingly. * tests/packages.scm ("package-source-derivation, origin, sha512"): New test. * guix/tests.scm: Hide (gcrypt hash) 'sha256' for proper syntax matching. * tests/challenge.scm: Add #:prefix for (gcrypt hash) and adjust users. * tests/derivations.scm: Likewise. * tests/store.scm: Likewise. * tests/graph.scm ("bag DAG, including origins"): Provide 'sha256' field with the right length. * gnu/packages/aspell.scm (aspell-dictionary) (aspell-dict-ca, aspell-dict-it): Use 'hash' and 'content-hash' for proper syntax matching. * gnu/packages/bash.scm (bash-patch): Rename 'sha256' to 'sha256-bv'. * gnu/packages/bootstrap.scm (bootstrap-executable): Rename 'sha256' to 'bv'. * gnu/packages/readline.scm (readline-patch): Likewise. * gnu/packages/virtualization.scm (qemu-patch): Rename 'sha256' to 'sha256-bv'. * guix/import/utils.scm: Hide (gcrypt hash) 'sha256'.
* import/utils: alist->package: Include arguments.Ricardo Wurmus2020-04-16
| | | | | * guix/import/utils.scm (alist->package): Process arguments field in input data and include it in the generated package.
* import/utils: alist->package: Ignore known inputs.Ricardo Wurmus2020-04-16
| | | | | | | * guix/import/utils.scm (alist->package): Accept optional list of known inputs, which are excluded from the specification lookup. * guix/import/print.scm (package->code)[package-lists->code]: Handle inputs which are just symbols.
* import: utils: Remove 'assoc-ref*'.Ludovic Courtès2020-03-12
| | | | * guix/import/utils.scm (assoc-ref*): Remove.
* import: utils: Update docstring of 'recursive-import'.Ludovic Courtès2019-12-13
| | | | | | This is a followup to 70a8e13277d4a44b89dd9ee2290b98105f0235f1. * guix/import/utils.scm (recursive-import): Update docstring.
* import: utils: 'recursive-import' returns a list rather than a stream.Ludovic Courtès2019-12-11
| | | | | | | | | | | | | | | | | * guix/import/utils.scm (recursive-import): Remove 'list->stream' call. * guix/scripts/import/cran.scm (guix-import-cran): Remove 'stream->list' call. * guix/scripts/import/crate.scm (guix-import-crate): Likewise. * guix/scripts/import/elpa.scm (guix-import-elpa): Likewise. * guix/scripts/import/gem.scm (guix-import-gem): Likewise. * guix/scripts/import/hackage.scm (guix-import-hackage): Likewise. * guix/scripts/import/opam.scm (guix-import-opam): Likewise. * guix/scripts/import/pypi.scm (guix-import-pypi): Likewise. * guix/scripts/import/stackage.scm (guix-import-stackage): Likewise. * tests/gem.scm ("gem-recursive-import"): Likewise. * tests/import-utils.scm ("recursive-import"): Likewise. Co-authored-by: Brian Leung <bkleung89@gmail.com>
* import: utils: 'recursive-import' returns packages in topological order.Ludovic Courtès2019-12-11
| | | | | | | | | | | | | | | | | | * guix/import/utils.scm (topological-sort): New procedure. (recursive-import): Rewrite to use it. * tests/import-utils.scm ("recursive-import"): New test. * guix/import/cran.scm (cran->guix-package): Always return two values. * guix/scripts/import/cran.scm (guix-import-cran): Remove 'reverse' call on 'cran-recursive-import' result. * guix/scripts/import/crate.scm (guix-import-crate): Likewise. * guix/scripts/import/elpa.scm (guix-import-elpa): Likewise. * guix/scripts/import/gem.scm (guix-import-gem): Likewise. * guix/scripts/import/hackage.scm (guix-import-hackage): Likewise. * guix/scripts/import/opam.scm (guix-import-opam): Likewise. * guix/scripts/import/pypi.scm (guix-import-pypi): Likewise. * guix/scripts/import/stackage.scm (guix-import-stackage): Likewise. * tests/gem.scm ("gem-recursive-import"): Change the order of package expressions accordingly.
* import/utils: beautify-description: Recognize more fragments.Ricardo Wurmus2019-09-14
| | | | | * guix/import/utils.scm (beautify-description): Handle additional common initial sentence fragments in descriptions.
* import: cran: Add support for git repositories.Ricardo Wurmus2019-08-29
| | | | | | | | | | | | | | | | | | | * guix/import/cran.scm (vcs-file?): New procedure. (download): Support downloading from git. (fetch-description): Add a clause for the 'git repository type. (files-match-pattern?): New procedure. (tarball-files-match-pattern?): Implement in terms of FILES-MATCH-PATTERN?. (directory-needs-fortran?, directory-needs-zlib?, directory-needs-pkg-config?): New procedures. (needs-fortran?, needs-zlib?, needs-pkg-config?): Rename these procedures... (tarball-needs-fortran?, tarball-needs-zlib?, tarball-needs-pkg-config?): ...to this, and use them. (file-hash): New procedure. (description->package): Handle the 'git repository type. * guix/import/utils.scm (package->definition): Handle package expression inside of a let. * guix/scripts/import.scm (guix-import): Handle let expressions. * doc/guix.texi (Invoking guix import): Document it.
* Revert "import: utils: Add hash-ref*."Mark H Weaver2019-08-22
| | | | This reverts commit 8a3b11d1eb21e54b4f3a3cbceffed8ce2c11512e.
* import: utils: Add hash-ref*.Christopher Baines2019-08-21
| | | | | | | | With the change to guile-json version 3, JSON objects are represented as hash tables, rather than alists. The cpan importer uses assoc-ref* on a hash table, so add an equivalent function for hash tables. * guix/import/utils.scm (hash-ref*): New procedure.
* maint: Switch to Guile-JSON 3.x.Ludovic Courtès2019-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Guile-JSON 3.x is incompatible with Guile-JSON 1.x, which we relied on until now: it maps JSON dictionaries to alists (instead of hash tables), and JSON arrays to vectors (instead of lists). This commit is about adjusting all the existing code to this new mapping. * m4/guix.m4 (GUIX_CHECK_GUILE_JSON): New macro. * configure.ac: Use it. * doc/guix.texi (Requirements): Mention the Guile-JSON version. * guix/git-download.scm (git-fetch)[guile-json]: Use GUILE-JSON-3. * guix/import/cpan.scm (string->license): Expect vectors instead of lists. (module->dist-name): Use 'json-fetch' instead of 'json-fetch-alist'. (cpan-fetch): Likewise. * guix/import/crate.scm (crate-fetch): Likewise, and call 'vector->list' for DEPS. * guix/import/gem.scm (rubygems-fetch): Likewise. * guix/import/json.scm (json-fetch-alist): Remove. * guix/import/pypi.scm (pypi-fetch): Use 'json-fetch' instead of 'json-fetch-alist'. (latest-source-release, latest-wheel-release): Call 'vector->list' on RELEASES. * guix/import/stackage.scm (stackage-lts-info-fetch): Use 'json-fetch' instead of 'json-fetch-alist'. (lts-package-version): Use 'vector->list'. * guix/import/utils.scm (hash-table->alist): Remove. (alist->package): Pass 'vector->list' on the inputs fields, and default to the empty vector. * guix/scripts/import/json.scm (guix-import-json): Remove call to 'hash-table->alist'. * guix/swh.scm (define-json-reader): Expect pair? or null? instead of hash-table?. [extract-field]: Use 'assoc-ref' instead of 'hash-ref'. (json->branches): Use 'map' instead of 'hash-map->list'. (json->checksums): Likewise. (json->directory-entries, origin-visits): Call 'vector->list' on the result of 'json->scm'. * tests/import-utils.scm ("alist->package with dependencies"): New test. * gnu/installer.scm (build-compiled-file)[builder]: Use GUILE-JSON-3. * gnu/installer.scm (installer-program)[installer-builder]: Likewise. * gnu/installer/locale.scm (iso639->iso639-languages): Use 'assoc-ref' instead of 'hash-ref', and pass vectors through 'vector->list'. (iso3166->iso3166-territories): Likewise. * gnu/system/vm.scm (system-docker-image)[build]: Use GUILE-JSON-3. * guix/docker.scm (manifest, config): Adjust for Guile-JSON 3. * guix/scripts/pack.scm (docker-image)[build]: Use GUILE-JSON-3. * guix/import/github.scm (fetch-releases-or-tags): Update docstring. (latest-released-version): Use 'assoc-ref' instead of 'hash-ref'. Pass the result of 'fetch-releases-or-tags' to 'vector->list'. * guix/import/launchpad.scm (latest-released-version): Likewise.
* import: crate: Define dependencies as arguments.Ivan Petkov2019-06-11
| | | | | | | | | | | | | | | | | | * 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>
* import: utils: 'specs->package-lists' correctly matches "out".Ludovic Courtès2019-06-07
| | | | * guix/import/utils.scm (specs->package-lists): Match "out", not ("out").
* guix: import: simplify recursive importRobert Vollmert2019-06-03
| | | | | | | | | | | 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>
* Switch to Guile-Gcrypt.Ludovic Courtès2018-09-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes (guix hash) and (guix pk-crypto), which now live as part of Guile-Gcrypt (version 0.1.0.) * guix/gcrypt.scm, guix/hash.scm, guix/pk-crypto.scm, tests/hash.scm, tests/pk-crypto.scm: Remove. * configure.ac: Test for Guile-Gcrypt. Remove LIBGCRYPT and LIBGCRYPT_LIBDIR assignments. * m4/guix.m4 (GUIX_ASSERT_LIBGCRYPT_USABLE): Remove. * README: Add Guile-Gcrypt to the dependencies; move libgcrypt as "required unless --disable-daemon". * doc/guix.texi (Requirements): Likewise. * gnu/packages/bash.scm, guix/derivations.scm, guix/docker.scm, guix/git.scm, guix/http-client.scm, guix/import/cpan.scm, guix/import/cran.scm, guix/import/crate.scm, guix/import/elpa.scm, guix/import/gnu.scm, guix/import/hackage.scm, guix/import/texlive.scm, guix/import/utils.scm, guix/nar.scm, guix/pki.scm, guix/scripts/archive.scm, guix/scripts/authenticate.scm, guix/scripts/download.scm, guix/scripts/hash.scm, guix/scripts/pack.scm, guix/scripts/publish.scm, guix/scripts/refresh.scm, guix/scripts/substitute.scm, guix/store.scm, guix/store/deduplication.scm, guix/tests.scm, tests/base32.scm, tests/builders.scm, tests/challenge.scm, tests/cpan.scm, tests/crate.scm, tests/derivations.scm, tests/gem.scm, tests/nar.scm, tests/opam.scm, tests/pki.scm, tests/publish.scm, tests/pypi.scm, tests/store-deduplication.scm, tests/store.scm, tests/substitute.scm: Adjust imports. * gnu/system/vm.scm: Likewise. (guile-sqlite3&co): Rename to... (gcrypt-sqlite3&co): ... this. Add GUILE-GCRYPT. (expression->derivation-in-linux-vm)[config]: Remove. (iso9660-image)[config]: Remove. (qemu-image)[config]: Remove. (system-docker-image)[config]: Remove. * guix/scripts/pack.scm: Adjust imports. (guile-sqlite3&co): Rename to... (gcrypt-sqlite3&co): ... this. Add GUILE-GCRYPT. (self-contained-tarball)[build]: Call 'make-config.scm' without #:libgcrypt argument. (squashfs-image)[libgcrypt]: Remove. [build]: Call 'make-config.scm' without #:libgcrypt. (docker-image)[config, json]: Remove. [build]: Add GUILE-GCRYPT to the extensions Remove (guix config) from the imported modules. * guix/self.scm (specification->package): Remove "libgcrypt", add "guile-gcrypt". (compiled-guix): Remove #:libgcrypt. [guile-gcrypt]: New variable. [dependencies]: Add it. [*core-modules*]: Remove #:libgcrypt from 'make-config.scm' call. Add #:extensions. [*config*]: Remove #:libgcrypt from 'make-config.scm' call. (%dependency-variables): Remove %libgcrypt. (make-config.scm): Remove #:libgcrypt. * build-aux/build-self.scm (guile-gcrypt): New variable. (make-config.scm): Remove #:libgcrypt. (build-program)[fake-gcrypt-hash]: New variable. Add (gcrypt hash) to the imported modules. Adjust load path assignments. * gnu/packages/package-management.scm (guix)[propagated-inputs]: Add GUILE-GCRYPT. [arguments]: In 'wrap-program' phase, add GUILE-GCRYPT to the search path.
* import: utils: Import more dependencies.Oleg Pykhalov2018-06-12
| | | | * guix/import/utils.scm (recursive-import): Import more dependencies.
* import: utils: Add recursive-import.Oleg Pykhalov2018-06-08
| | | | | | | | | * guix/import/cran.scm (cran-guix-name, cran-recursive-import): New procedures. (recursive-import): Remove procedure. * guix/import/utils.scm (guix-name, recursive-import): New procedures. * guix/scripts/import/cran.scm (guix-import-cran): Use 'cran-recursive-import' procedure.
* import: utils: 'alist->package' allows false license.Ludovic Courtès2018-02-16
| | | | | | | | | | Reported by <pkill9@runbox.com>. Fixes <https://bugs.gnu.org/30470>. * guix/import/utils.scm (alist->package): Check whether 'license' is false and set the 'license' field to #f in this case. * tests/import-utils.scm ("alist->package with false license"): New test.
* import: utils: Add string helpers.Ricardo Wurmus2017-11-07
| | | | * guix/import/utils.scm (read-lines, chunk-lines): New procedures.
* import: Add generic data to package converter.Ricardo Wurmus2017-09-28
| | | | | | * guix/import/utils.scm (build-system-modules, lookup-build-system-by-name, specs->package-lists, source-spec->object, alist->package): New procedures. * tests/import-utils.scm: Add tests for alist->package.
* build-system: cargo: Handle Cargo.lock file not present.David Craven2017-01-01
| | | | | | | | | | | | | | | | | | * guix/build-system/cargo.scm (cargo-build): Add src output. (private-keywords): Add #:outputs. * guix/build/cargo-build-system.scm (configure): Use /share/rust-source when replacing inputs. (build, check): Don't do anything when there isn't a Cargo.lock file present. (install): Install sources to src output. When a Cargo.lock file is present use cargo install to install binaries to out. * guix/import/crate.scm (make-crate-sexp): Importer uses the src output for crate inputs by default. * guix/import/utils.scm (package-names->package-inputs, maybe-inputs, maybe-native-inputs): Take an optional output argument. * tests/crate.scm (crate->guix-package test): Update. Problem reported by Francisco Gómez García <espectalll@kydara.com>.
* import: utils: Add some utilities.David Craven2016-12-14
| | | | | * guix/import/utils.scm (maybe-inputs, maybe-native-inputs, package->definition): New variables.
* import: utils: Remove dependency on (json) module.Alex Kost2016-10-16
| | | | | | | This fixes a regression introduced by commit fbe9c1012820ab72f022a6ec958c35b431ae7a74. * guix/import/utils.scm: Remove unused (json) module.
* import: utils: Refactor license->symbol.David Craven2016-09-28
| | | | | * guix/import/utils.scm (license->symbol): Work for all licenses. * tests/import-utils.scm (license->symbol): Add test.
* import: utils: Add spdx-string->license.David Craven2016-09-28
| | | | | * guix/import/utils.scm (spdx-string->license): New variable. * guix/licenses.scm (agpl1, fdl1.2+): New variables.
* import: Move string->license to importers.David Craven2016-09-28
| | | | | * guix/import/gem.scm (string->license): Move from (guix import utils). * guix/import/pypi.scm (string->license): Move from (guix import utils).
* import: Reorder imports in (guix import utils).David Craven2016-09-28
| | | | * guix/import/utils.scm (define-module): Reorder imports alphabetically.
* import: Importers return prefixed licenses.David Craven2016-08-28
| | | | | | | | | * 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.
* import: cran: Move beautify-description to utils module.Ben Woodcroft2016-01-14
| | | | | * guix/import/cran.scm (beautify-description): Move from here... * guix/import/utils.scm: ... to here.