<feed xmlns='http://www.w3.org/2005/Atom'>
<title>guix/tests/hackage.scm, branch master</title>
<subtitle>Transactional package manager, declarative GNU/Linux distribution, reproducible deployment tool, and more! https://guix.gnu.org</subtitle>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/'/>
<entry>
<title>import: hackage: Move tests to tests/import/hackage.scm.</title>
<updated>2025-10-01T09:00:35+00:00</updated>
<author>
<name>Nicolas Graves</name>
<email>ngraves@ngraves.fr</email>
</author>
<published>2025-09-16T17:10:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=5cf0daa657a3f47879927cdc52c8597668e6129b'/>
<id>5cf0daa657a3f47879927cdc52c8597668e6129b</id>
<content type='text'>
* tests/hackage.scm: Move to tests/import/hackage.scm.
* Makefile.am: Refresh it.

Signed-off-by: Ludovic Courtès &lt;ludo@gnu.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* tests/hackage.scm: Move to tests/import/hackage.scm.
* Makefile.am: Refresh it.

Signed-off-by: Ludovic Courtès &lt;ludo@gnu.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>guix: import: Fix parsing Cabal files that import many stanzas</title>
<updated>2023-12-03T15:15:29+00:00</updated>
<author>
<name>Saku Laesvuori</name>
<email>saku@laesvuori.fi</email>
</author>
<published>2023-12-03T09:45:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=ab8612d99eca5c25ecbefe026b04ed9f00e3f8b5'/>
<id>ab8612d99eca5c25ecbefe026b04ed9f00e3f8b5</id>
<content type='text'>
* guix/import/cabal.scm (eval-cabal)[eval]: Split imports to a
normalized list before mapping over it.
* tests/hackage.scm: Test it.

Change-Id: I39ece019251b6a23a937c8562d2d4a545a6bc7df
Signed-off-by: Lars-Dominik Braun &lt;lars@6xq.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* guix/import/cabal.scm (eval-cabal)[eval]: Split imports to a
normalized list before mapping over it.
* tests/hackage.scm: Test it.

Change-Id: I39ece019251b6a23a937c8562d2d4a545a6bc7df
Signed-off-by: Lars-Dominik Braun &lt;lars@6xq.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>guix: import: Parse cabal layout blocks correctly</title>
<updated>2023-12-03T08:11:29+00:00</updated>
<author>
<name>Saku Laesvuori</name>
<email>saku@laesvuori.fi</email>
</author>
<published>2023-12-02T17:23:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=5bd00bb54235856dddd11e9f0d03481c5469ca63'/>
<id>5bd00bb54235856dddd11e9f0d03481c5469ca63</id>
<content type='text'>
Cabal consideres lines to be part of a layout block if they are indented
at least one space more than the field line the block belongs to.
Previously Guix considered lines to be a part of the block if they were
indented at least as much as the first line in it.

This also makes a workaround that enabled if statements to have multiple
elses redundant and removes it.

Fixes: https://issues.guix.gnu.org/35743

* guix/import/cabal.scm (current-indentation*): Renamed from
current-indentation.
(previous-indentation, current-indentation): New variables.
(make-cabal-parser): Remove outdated comment.
[open]: Use previous-indentation + 1 instead of
current-indentation.
[elif-else]: Split to elif and else to allow only one ELSE in an if
statement.
(read-cabal)[parameterize]: Use current-indentation* and previous-indentation.
* tests/hackage.scm (hackage-&gt;guix-package test mixed layout): Expect to
  pass.

Change-Id: I3a1495b1588a022fabbfe8dad9f3231e578af4f3
Signed-off-by: Lars-Dominik Braun &lt;lars@6xq.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Cabal consideres lines to be part of a layout block if they are indented
at least one space more than the field line the block belongs to.
Previously Guix considered lines to be a part of the block if they were
indented at least as much as the first line in it.

This also makes a workaround that enabled if statements to have multiple
elses redundant and removes it.

Fixes: https://issues.guix.gnu.org/35743

* guix/import/cabal.scm (current-indentation*): Renamed from
current-indentation.
(previous-indentation, current-indentation): New variables.
(make-cabal-parser): Remove outdated comment.
[open]: Use previous-indentation + 1 instead of
current-indentation.
[elif-else]: Split to elif and else to allow only one ELSE in an if
statement.
(read-cabal)[parameterize]: Use current-indentation* and previous-indentation.
* tests/hackage.scm (hackage-&gt;guix-package test mixed layout): Expect to
  pass.

Change-Id: I3a1495b1588a022fabbfe8dad9f3231e578af4f3
Signed-off-by: Lars-Dominik Braun &lt;lars@6xq.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>import: hackage: Add upstream-name property.</title>
<updated>2023-02-26T09:19:36+00:00</updated>
<author>
<name>Lars-Dominik Braun</name>
<email>lars@6xq.net</email>
</author>
<published>2023-01-04T08:37:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=84549dcf380b1ed7712816a1ff1bfe9688c1d9a7'/>
<id>84549dcf380b1ed7712816a1ff1bfe9688c1d9a7</id>
<content type='text'>
* guix/import/hackage.scm (hackage-module-&gt;sexp): Add property
upstream-name to imported package.
* tests/hackage.scm (match-ghc-foo): Add upstream-name property.
(match-ghc-foo-6): Ditto.
(match-ghc-elif): Ditto.
(match-ghc-foo-revision): Ditto.
(match-ghc-foo-import): Ditto.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* guix/import/hackage.scm (hackage-module-&gt;sexp): Add property
upstream-name to imported package.
* tests/hackage.scm (match-ghc-foo): Add upstream-name property.
(match-ghc-foo-6): Ditto.
(match-ghc-elif): Ditto.
(match-ghc-foo-revision): Ditto.
(match-ghc-foo-import): Ditto.
</pre>
</div>
</content>
</entry>
<entry>
<title>import: hackage: Filter upper/mixed case dependencies too.</title>
<updated>2022-06-06T11:26:51+00:00</updated>
<author>
<name>Lars-Dominik Braun</name>
<email>lars@6xq.net</email>
</author>
<published>2022-06-02T11:52:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=143141726e6c1b3f1170e9f4e971700e30d74375'/>
<id>143141726e6c1b3f1170e9f4e971700e30d74375</id>
<content type='text'>
* guix/import/hackage.scm (filter-dependencies): Convert OWN-NAMES
to lowercase before filtering.
(hackage-module-&gt;sexp): Remove #f from OWN-NAMES, which is used for
unnamed (default) libraries.
* tests/hackage.scm (test-cabal-internal-library-ignored): Add mismatched
uppercase letters.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* guix/import/hackage.scm (filter-dependencies): Convert OWN-NAMES
to lowercase before filtering.
(hackage-module-&gt;sexp): Remove #f from OWN-NAMES, which is used for
unnamed (default) libraries.
* tests/hackage.scm (test-cabal-internal-library-ignored): Add mismatched
uppercase letters.
</pre>
</div>
</content>
</entry>
<entry>
<title>import: hackage: Filter internal libraries from inputs and native-inputs.</title>
<updated>2022-06-06T11:26:45+00:00</updated>
<author>
<name>Lars-Dominik Braun</name>
<email>lars@6xq.net</email>
</author>
<published>2022-05-22T09:20:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=dedfcaa8e2b948124f76121b9062c827fe649e29'/>
<id>dedfcaa8e2b948124f76121b9062c827fe649e29</id>
<content type='text'>
Fixes &lt;https://issues.guix.gnu.org/54760&gt;.

* guix/import/hackage.scm (filter-dependencies): Support multiple
OWN-NAMES.
(hackage-module-&gt;sexp): Filter OWN-NAMES from HACKAGE-DEPENDENCIES and
HACKAGE-NATIVE-DEPENDENCIES.
* tests/hackage.scm (test-cabal-internal-library-ignored): New variable.
("hackage-&gt;guix-package test internal libraries are ignored"): New testcase.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes &lt;https://issues.guix.gnu.org/54760&gt;.

* guix/import/hackage.scm (filter-dependencies): Support multiple
OWN-NAMES.
(hackage-module-&gt;sexp): Filter OWN-NAMES from HACKAGE-DEPENDENCIES and
HACKAGE-NATIVE-DEPENDENCIES.
* tests/hackage.scm (test-cabal-internal-library-ignored): New variable.
("hackage-&gt;guix-package test internal libraries are ignored"): New testcase.
</pre>
</div>
</content>
</entry>
<entry>
<title>import: cabal: Support library names</title>
<updated>2022-06-06T11:26:45+00:00</updated>
<author>
<name>Lars-Dominik Braun</name>
<email>lars@6xq.net</email>
</author>
<published>2022-05-22T08:56:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=c3fbaee34548fbfb1617dc7fccc94c598efbd7a6'/>
<id>c3fbaee34548fbfb1617dc7fccc94c598efbd7a6</id>
<content type='text'>
* guix/import/cabal.scm (make-cabal-parser): Add name to section.
(is-lib): Add optional name to regular expression.
(lex-rx-res): Support selecting different substring.
(lex-lib): Match 2nd substring from IS-LIB.
(lex-line): Adapt to changes for lex-lib.
(cabal-library): Add name field and export CABAL-LIBRARY-NAME.
(eval): Remove special case for 'library, which is not required any more.
(make-cabal-section): Move special case for LIBRARY.
* tests/hackage.scm (test-read-cabal-library-name): New variable.
("read-cabal test 1"): Adapt testcase to changed internal structure.
("read-cabal test: library name"): New testcase.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* guix/import/cabal.scm (make-cabal-parser): Add name to section.
(is-lib): Add optional name to regular expression.
(lex-rx-res): Support selecting different substring.
(lex-lib): Match 2nd substring from IS-LIB.
(lex-line): Adapt to changes for lex-lib.
(cabal-library): Add name field and export CABAL-LIBRARY-NAME.
(eval): Remove special case for 'library, which is not required any more.
(make-cabal-section): Move special case for LIBRARY.
* tests/hackage.scm (test-read-cabal-library-name): New variable.
("read-cabal test 1"): Adapt testcase to changed internal structure.
("read-cabal test: library name"): New testcase.
</pre>
</div>
</content>
</entry>
<entry>
<title>import: cabal: Document failing syntax through tests.</title>
<updated>2022-06-06T11:26:45+00:00</updated>
<author>
<name>Lars-Dominik Braun</name>
<email>lars@6xq.net</email>
</author>
<published>2022-05-14T13:38:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=f4763ec37df1aa03569ceff30192f5bf4bd736a8'/>
<id>f4763ec37df1aa03569ceff30192f5bf4bd736a8</id>
<content type='text'>
* tests/hackage.scm (test-read-cabal-brackets-newline): New variable.
(test-cabal-no-final-newline): Likewise.
("hackage-&gt;guix-package test without final newline",
"read-cabal test: property brackets on new line"): New tests.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* tests/hackage.scm (test-read-cabal-brackets-newline): New variable.
(test-cabal-no-final-newline): Likewise.
("hackage-&gt;guix-package test without final newline",
"read-cabal test: property brackets on new line"): New tests.
</pre>
</div>
</content>
</entry>
<entry>
<title>import: cabal: Allow curly bracket before else statement.</title>
<updated>2022-06-06T11:26:45+00:00</updated>
<author>
<name>Lars-Dominik Braun</name>
<email>lars@6xq.net</email>
</author>
<published>2022-05-01T06:34:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=e3337f35afa83e746f0a66451fd4d2212c032b03'/>
<id>e3337f35afa83e746f0a66451fd4d2212c032b03</id>
<content type='text'>
* guix/import/cabal.scm (is-else): Turn into procedure.
(lex-line): Move IS-ELSE…
(lex-word): …here.
* tests/hackage.scm (test-cabal-elif-brackets): Extend testcase.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* guix/import/cabal.scm (is-else): Turn into procedure.
(lex-line): Move IS-ELSE…
(lex-word): …here.
* tests/hackage.scm (test-cabal-elif-brackets): Extend testcase.
</pre>
</div>
</content>
</entry>
<entry>
<title>import: cabal: Allow properties without space between key and value.</title>
<updated>2022-06-06T11:26:45+00:00</updated>
<author>
<name>Lars-Dominik Braun</name>
<email>lars@6xq.net</email>
</author>
<published>2022-04-30T13:39:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=001e0bac99c977d2ff04910295b154f91aa3d369'/>
<id>001e0bac99c977d2ff04910295b154f91aa3d369</id>
<content type='text'>
* guix/import/cabal.scm (lex-word): Add colon to delimiters.
* tests/hackage.scm (test-cabal-property-no-space): New variable.
("hackage-&gt;guix-package test properties without space"): New test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* guix/import/cabal.scm (lex-word): Add colon to delimiters.
* tests/hackage.scm (test-cabal-property-no-space): New variable.
("hackage-&gt;guix-package test properties without space"): New test.
</pre>
</div>
</content>
</entry>
</feed>
