summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAge
* derivations: 'derivation-build-plan' recurses on substituables.Ludovic Courtès2019-07-05
| | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a bug whereby "guix build texlive -n" would report: 0.0 MB would be downloaded: /gnu/store/…-texlive-20180414 instead of: The following derivation would be built: /gnu/store/…-texlive-texmf-20180414.drv 2,595.2 MB would be downloaded: /gnu/store/…-texlive-20180414-texmf.tar.xz /gnu/store/…-texlive-20180414 where 'texlive-texmf' is a non-substitutable dependency of 'texlive'. * guix/derivations.scm (dependencies-of-substitutables): New procedure. (derivation-build-plan): When 'input-substitutable-info' returns true, append the subset of DEPS that corresponds to SUBSTITUABLES to the first argument of 'loop'. * guix/ui.scm (show-what-to-build): Remove half-baked traversal of DOWNLOAD. * tests/derivations.scm ("derivation-build-plan and substitutes, non-substitutable dep"): New test.
* gexp: Add 'lower-gexp' and express 'gexp->derivation' in terms of it.Ludovic Courtès2019-07-04
| | | | | | | | | | | | | | | * guix/gexp.scm (gexp-input-thing, gexp-input-output) (gexp-input-native?): Export. (lower-inputs): Return <gexp-input> records instead of tuples. (lower-reference-graphs): Adjust accordingly. (<lowered-gexp>): New record type. (lower-gexp, gexp-input->tuple): New procedure. (gexp->derivation)[%modules]: Remove. [requested-graft?]: New variable. [add-modules]: New procedure. Rewrite in terms of 'lower-gexp'. (gexp-inputs): Add TODO comment. * tests/gexp.scm ("lower-gexp"): New test.
* import: pypi: Include optional test inputs as native-inputs.Maxim Cournoyer2019-07-02
| | | | | | | | | | | | | | | | | | | | | | * 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.
* import: pypi: Parse wheel METADATA instead of metadata.json.Maxim Cournoyer2019-07-02
| | | | | | | | | | | | | 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.
* import: pypi: Support more types of archives.Maxim Cournoyer2019-07-02
| | | | | | | | | | | | | | | | | | 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.
* import: pypi: Improve parsing of requirement specifications.Maxim Cournoyer2019-07-02
| | | | | | | | | | | | | | | 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.
* import: pypi: Do not parse optional requirements from source.Maxim Cournoyer2019-07-02
| | | | | | | | | | | | | | * 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.
* tests: pypi: Mute the output of tar.Maxim Cournoyer2019-07-02
| | | | | | | | The output of tar when creating archives for the purpose of tests is not useful, so we mute it. * tests/pypi.scm ("pypi->guix-package"): Mute the output of tar. ("pypi->guix-package, wheels"): Likewise.
* import: pypi: Do not consider requirements.txt files.Maxim Cournoyer2019-07-02
| | | | | | | | | | | | | | | | | | 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.
* guix: import: crate: fix redundant inputs list nestingIvan Petkov2019-06-30
| | | | | | | * 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.
* tests: Avoid TCP port collision between lint.scm and guix-daemon.sh.Ludovic Courtès2019-06-27
| | | | | | | | This could lead to random deadlocks in one of these two tests when running "make check -j5". * tests/guix-daemon.sh (tcp_socket): Change port to 9998 to avoid collision with tests/lint.scm.
* packages: 'specification->package+output' distinguishes "no output specified".Ludovic Courtès2019-06-27
| | | | | | | | | | | | | Until now the caller couldn't tell the different between a spec like "foo:out" and one like "foo". This change allows users to distinguish between these two cases. * gnu/packages.scm (specification->package+output): Disable output membership test when OUTPUT = #f and SUB-DRV = #f. * tests/packages.scm ("specification->package+output") ("specification->package+output invalid output") ("specification->package+output no default output") ("specification->package+output invalid output, no default"): New tests.
* derivations: 'build-derivations' can be passed derivation inputs.Ludovic Courtès2019-06-27
| | | | | | | * guix/derivations.scm (build-derivations): Accept <derivation-input> records among DERIVATIONS. * tests/derivations.scm ("build-derivations with specific output"): Test it.
* derivations: <derivation-input> now aggregates a <derivation>.Ludovic Courtès2019-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consequently, the whole graph of <derivation> object is readily available without having to go through 'read-derivation-from-file', which could have cache misses if the requested <derivation> object had been GC'd in the meantime. This is an important property for the performance of things like 'derivation-build-plan' that traverse the derivation graph. * guix/derivations.scm (<derivation-input>): Replace 'path' field by 'derivation'. (derivation-input-path): Adjust accordingly. (derivation-input-key): New procedure. (derivation-input-output-paths): Adjust accordingly. (coalesce-duplicate-inputs): Likewise. (derivation-prerequisites): Use 'derivation-input-key' to compute keys for INPUT-SET. (derivation-build-plan): Likewise. (read-derivation): Add optional 'read-derivation-from-file' parameter. [make-input-drvs]: Call it. (write-derivation)[write-input]: Adjust to new <derivation-input>. (derivation/masked-inputs): Likewise, and remove redundant 'coalesce-duplicate-inputs' call. (derivation)[input->derivation-input]: Change to consider only the derivation case. Update call to 'make-derivation-input'. [input->source]: New procedure. Separate sources from inputs. (map-derivation): Adjust to new <derivation-input>. * tests/derivations.scm ("parse & export"): Pass a second argument to 'read-derivation'. ("build-expression->derivation and derivation-prerequisites") ("derivation-prerequisites and valid-derivation-input?"): Adjust to new <derivation-input>.
* derivations: Rewrite and replace 'derivations-prerequisites-to-build'.Ludovic Courtès2019-06-27
| | | | | | | | | | | | The new 'derivation-build-plan' procedure has a more appropriate signature: it takes a list of <derivation-inputs> instead of taking one <derivation>. Its body is also much simpler. * guix/derivations.scm (derivation-build-plan): New procedure. (derivation-prerequisites-to-build): Express in terms of 'derivation-build-plan' and mark as deprecated. * tests/derivations.scm: Change 'derivation-prerequisites-to-build' tests to 'derivation-build-plan' and adjust accordingly.
* derivations: Add 'derivation-input'.Ludovic Courtès2019-06-27
| | | | | | | * guix/derivations.scm (derivation-input): New procedure. * tests/grafts.scm (make-derivation-input): Remove. ("graft-derivation, unused outputs not depended on"): Use 'derivation-input'.
* syscalls: Add 'terminal-rows'.Ludovic Courtès2019-06-27
| | | | | | | * guix/build/syscalls.scm (terminal-dimension): New procedure. (terminal-columns): Rewrite in terms of 'terminal-dimension'. (terminal-rows): New procedure. * tests/syscalls.scm ("terminal-rows"): New test.
* ui: 'relevance' considers regexps connected with a logical and.Ludovic Courtès2019-06-27
| | | | | | * guix/ui.scm (relevance)[score]: Change to return 0 when one of REGEXPS doesn't match. * tests/ui.scm ("package-relevance"): New test.
* import: hackage: Add two expected failing test cases.Robert Vollmert2019-06-20
| | | | | | | | | | | This adds failing test cases for two hackage import bugs: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25138 https://debbugs.gnu.org/cgi/bugreport.cgi?bug=35743 * tests/hackage.scm: Make comment style consistent. Add two cabal parsing tests, marked as expected failures. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* utils: canonical-newline-port: Fix handling of carriage return at buffer end.Robert Vollmert2019-06-20
| | | | | | | | | | | | | Prior to this change the added test fails for me locally at byte 1024. It might depend on some default buffer sizes. Fixes <https://bugs.gnu.org/35863>. * tests/utils.scm ("canonical-newline-port-1024"): Add test. * guix/utils.scm (canonical-newline-port): Correct comments on CR/LF. Remove CR even when they're at the end of the buffer. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* tests: Avoid 'delete-paths' calls for 'derivation-prerequisites-to-build'.Ludovic Courtès2019-06-18
| | | | | | | * tests/derivations.scm ("derivation-prerequisites-to-build when outputs already present"): Insert random text in BUILDER, and remove two calls to 'delete-paths'. Use 'derivation->output-path' for INPUT-PATH instead of an old idiom.
* import: hackage: Handle Hackage revisions.Robert Vollmert2019-06-13
| | | | | | | | | | | | | | | | | | | | | | | 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>
* 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>
* store: 'build-things' accepts derivation/output pairs.Ludovic Courtès2019-06-10
| | | | | | | | | | | | | | This allows callers to request the substitution of a single derivation output. * guix/store.scm (build-things): Accept derivation/output pairs among THINGS. * guix/derivations.scm (build-derivations): Likewise. * tests/store.scm ("substitute + build-things with specific output"): New test. * tests/derivations.scm ("build-derivations with specific output"): New test. * doc/guix.texi (The Store): Adjust accordingly.
* import: print: Honor the outputs of inputs (!).Ludovic Courtès2019-06-07
| | | | | | | | | | | | | | 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.
* import: hackage: Parse braced properties.Robert Vollmert2019-06-02
| | | | | | | | | | | | | | | | | | | | | | | 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>
* tests: hackage: Test multiline cabal description.Robert Vollmert2019-06-02
| | | | | | | * tests/hackage.scm (test-cabal-multiline-desc): New variable. ("hackage->guix-package test multiline desc"): New test. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* tests: Fix hackage tests.Robert Vollmert2019-06-02
| | | | | | | | This is a followup to 1cc12357a65e4479c2f4735e915941382ef82d94. * tests/hackage.scm: ghc-mtl is no longer added as an input. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* substitute: Select the best compression methods.Ludovic Courtès2019-06-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a server publishes several URLs with different compression methods, 'guix substitute' can now choose the best one among the compression methods that it supports. * guix/scripts/substitute.scm (<narinfo>)[uri]: Replace with... [uris]: ... this. [compression]: Replace with... [compressions]: ... this. [file-size]: Replace with... [file-sizes]: ... this. [file-hash]: Replace with... [file-hashes]: ... this. (narinfo-maker): Adjust accordingly. Ensure 'file-sizes' and 'file-hashes' have the right length. (assert-valid-signature, valid-narinfo?): Use the first element of 'narinfo-uris' in error messages. (read-narinfo): Expect "URL", "Compression", "FileSize", and "FileHash" to occur multiple times. (display-narinfo-data): Call 'select-uri' to determine the file size. (%compression-methods): New variable. (supported-compression?, compresses-better?, select-uri): New procedures. (process-substitution): Call 'select-uri' to select the URI and compression. * guix/scripts/weather.scm (report-server-coverage): Account for all the values returned by 'narinfo-file-sizes'. * tests/substitute.scm ("substitute, narinfo with several URLs"): New test.
* publish: '--compression' can be repeated.Ludovic Courtès2019-06-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows 'guix publish' to compress and advertise multiple compression methods from which users can choose. * guix/scripts/publish.scm (actual-compression): Rename to... (actual-compressions): ... this. Expect REQUESTED to be a list, and always return a list. (%default-options): Remove 'compression. (store-item->recutils): New procedure. (narinfo-string): Change #:compression to #:compressions (plural). Adjust accordingly. (render-narinfo, render-narinfo/cached): Likewise. (bake-narinfo+nar): Change #:compression to #:compressions. [compressed-nar-size]: New procedure. Call 'compress-nar' for each item returned by 'actual-compressions'. Create a narinfo for each compression. (effective-compression): New procedure. (make-request-handler): Change #:compression to #:compressions. Use 'effective-compression' to determine the applicable compression. (guix-publish): Adjust handling of '--compression'. Print a message for each compression that is enabled. * tests/publish.scm ("/*.narinfo"): Adjust to new narinfo field ordering. ("/*.narinfo with properly encoded '+' sign"): Likewise. ("/*.narinfo with lzip + gzip"): New test. ("with cache, lzip + gzip"): New test. * doc/guix.texi (Invoking guix publish): Document it.
* tests: Indent hackage testsRobert Vollmert2019-06-01
| | | | | | * tests/hackage.scm: Reindent using etc/indent-code.el. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* tests: hackage: Don't mock hackage-fetch.Robert Vollmert2019-06-01
| | | | | | | * tests/hackage.scm: Pass a string input port to tests instead of mocking hackage download. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* tests: hackage: Factor out package pattern.Robert Vollmert2019-06-01
| | | | | | * tests/hackage.scm: Import result pattern matching via helper. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* publish: Add support for lzip.Ludovic Courtès2019-05-27
| | | | | | | | | | | | | | | * guix/scripts/publish.scm (show-help, %options): Support '-C METHOD' and '-C METHOD:LEVEL'. (default-compression): New procedure. (bake-narinfo+nar): Add lzip. (nar-response-port): Likewise. (string->compression-type): New procedure. (make-request-handler): Generalize /nar/gzip handler to handle /nar/lzip as well. * tests/publish.scm ("/nar/lzip/*"): New test. ("/*.narinfo with lzip compression"): New test. * doc/guix.texi (Invoking guix publish): Document it. (Requirements): Mention lzlib.
* utils: Support compression and decompression with lzip.Ludovic Courtès2019-05-27
| | | | | | | | * guix/utils.scm (lzip-port): New procedure. (decompressed-port, compressed-port, compressed-output-port): Add 'lzip case. * tests/utils.scm <top level>: Call 'test-compression/decompression' for 'lzip as well.
* utils: Test 'compressed-port' and 'decompressed-port' for both gzip and xz.Ludovic Courtès2019-05-27
| | | | | * tests/utils.scm (test-compression/decompression): New procedure. <top level>: Call it for both 'xz and 'gzip.
* lzlib: Add 'make-lzip-input-port/compressed'.Ludovic Courtès2019-05-27
| | | | | | | * guix/lzlib.scm (lzwrite!, make-lzip-input-port/compressed): New procedures. * tests/lzlib.scm ("make-lzip-input-port/compressed"): New test. * guix/tests.scm (%seed): Export.
* import: hackage: Fix Cabal test.Ludovic Courtès2019-05-26
| | | | | | | | | * 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>
* discovery: 'all-modules' returns modules in path order.Robert Vollmert2019-05-26
| | | | | | | | | | | | | A particular effect of this is that if there are ambiguous packages in a directory specified with `-L module_dir` and the distribution, the version from `module_dir` will be loaded, which is usually what would be expected. (E.g. for `guix build` or `guix package -i`.) * guix/discovery.scm (all-modules): Return modules in path order. * tests/guix-package.sh: Test local definitions take precedence. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* publish: Maintain a hash-part-to-store-item mapping in cache.Ludovic Courtès2019-05-26
| | | | | | | | | | | Fixes <https://bugs.gnu.org/33897>. * guix/scripts/publish.scm (hash-part-mapping-cache-file) (hash-part->path*): New procedures. * guix/scripts/publish.scm (render-narinfo/cached)[delete-entry]: Delete the 'hash-part-mapping-cache-file'. Use 'hash-part->path*' instead of 'hash-part->path'. * tests/publish.scm ("with cache, vanishing item"): New test.
* pack: Add '--root'.Ludovic Courtès2019-05-22
| | | | | | | * guix/scripts/pack.scm (%options, show-help): Add "--root". (guix-pack): Honor it. * tests/guix-pack.sh: Test it. * doc/guix.texi (Invoking guix pack): Document it.
* pack: '--localstatedir' and '-R' tests gracefully handle missing /gnu/store.Ludovic Courtès2019-05-18
| | | | | | | | | Fixes <https://bugs.gnu.org/35776>. Reported by Ting-Wei Lan <lantw44@gmail.com>. * tests/guix-pack-localstatedir.sh: Set 'storedir' before 'NIX_STORE_DIR'. * tests/guix-pack-relocatable.sh: Likewise.
* gremlin: Adjust tests for foreign distros.Ting-Wei Lan2019-05-18
| | | | | | | | Fixes <https://bugs.gnu.org/35775>. * tests/gremlin.scm ("elf-dynamic-info-needed, executable"): Expect only libguile and libc among NEEDED. ("strip-runpath"): Pass '--enable-new-dtags' to get RUNPATH, not RPATH.
* tests: Fix guix-package.sh.Maxim Cournoyer2019-05-13
| | | | | | | GCC is now a hidden package, so cannot be installed. * tests/guix-package.sh: Replace 'gcc' by 'zile' in a test that install multiple packages.
* tests: Ensure 'unshare' works before relying on it.Ludovic Courtès2019-05-09
| | | | | | | | | Fixes <https://bugs.gnu.org/35642>. Reported by Josh Holland <josh@inv.alid.pw>. * tests/guix-pack-relocatable.sh: Before invoking 'unshare' at the bottom, add "if unshare -r true" condition. * tests/guix-pack.sh: Likewise.
* ui: Make package outputs searchable.Chris Marusich2019-05-09
| | | | | | | | | | | | * guix/ui.scm (relevance): Allow the "field" procedure of a metric to return a list, and handle that case appropriately. Update docstring. (%package-metrics): Add a metric for package outputs. * guix/scripts/package.scm (find-packages-by-description): Update docstring. * tests/guix-package.sh: Add a test case to verify that package outputs are included in search results. Co-authored-by: Tobias Geerinckx-Rice <me@tobias.gr>
* environment: Non ad-hoc mode also honors transformation options.Ludovic Courtès2019-05-07
| | | | | | | | | Fixes <https://bugs.gnu.org/35618>. Reported by Florent Pruvost <florent.pruvost@inria.fr>. * guix/scripts/environment.scm (options/resolve-packages): Add call to TRANSFORM in non "ad-hoc" case. * tests/guix-environment.sh: Add test.
* uuid: 'fat-uuid->string' preserves leading zeros.Ludovic Courtès2019-05-07
| | | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/35582>. Reported by sirgazil <sirgazil@zoho.com>. Previously, leading zeros would be removed, leading to an "invalid" UUID: (uuid->string (uuid "00CA-050E" 'fat32)) ⇒ "CA-50E" (string->uuid "CA-50E" 'fat32) ⇒ #f * gnu/system/uuid.scm (fat-uuid->string): Pad digits with zeros. * tests/uuid.scm ("uuid, FAT32, leading zeros preserved"): New test.
* Add (guix lzlib).Pierre Neidhardt2019-05-06
| | | | | | | | | | | | | * guix/lzlib.scm, tests/lzlib.scm: New files. * Makefile.am (MODULES): Add guix/lzlib.scm. (SCM_TESTS): Add tests/lzlib.scm. * m4/guix.m4 (GUIX_LIBLZ_LIBDIR): New macro. * configure.ac (LIBLZ_LIBDIR): Use it. Define and substitute 'LIBLZ'. * guix/config.scm.in (%liblz): New variable. * guix/self.scm (make-config.scm): Add TODO comment. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* tests: Adjust wildcard when testing OS examples.Ludovic Courtès2019-04-29
| | | | | * tests/guix-system.sh: Use *.tmpl instead of *, to avoid catching backup files, etc.