packages: Add typst and dependencies #63

Manually merged
alxsim merged 0 commits from alxsim/guix-science:typst into master 2025-01-23 16:30:17 +01:00
Contributor

Hi,

If you don't know Typst, it is a typesetting system very similar to LaTeX.
(Having used LaTeX during a few years, it's really a good contender! It's great!)

Anyway, here is an attempt to package it. I think it fits well into guix-science as it is designed for scientific typesetting primarily. Additionally, I have to say I don't have the stamina to push this on main guix for now.

Happy to make changes if things are not looking proper.

Thanks

Hi, If you don't know [Typst](https://typst.app/), it is a typesetting system very similar to LaTeX. (Having used LaTeX during a few years, it's really a good contender! It's great!) Anyway, here is an attempt to package it. I think it fits well into guix-science as it is designed for scientific typesetting primarily. Additionally, I have to say I don't have the stamina to push this on main guix for now. Happy to make changes if things are not looking proper. Thanks
Owner

Hi @alxsim

Thanks, cool! Some months ago, I had a chat with colleagues and they convinced to try... but ouch the installation. So thanks!

Well, that's something to review. Because there is some packages... Heh!

I understand that you do not create one commit per package. :-) However, could you have the first commit that have the header (Copyright), the module declaration (define-module) and maybe one package, then a second commit that add all the rest. Is it doable on your side?

@civodul @rgarbage How can I check about the CI? About the substitutes? And about the failures if any?

Hi @alxsim Thanks, cool! Some months ago, I had a chat with colleagues and they convinced to try... but ouch the installation. So thanks! Well, that's something to review. Because there is some packages... Heh! I understand that you do not create one commit per package. :-) However, could you have the first commit that have the header (Copyright), the module declaration (`define-module`) and maybe one package, then a second commit that add all the rest. Is it doable on your side? @civodul @rgarbage How can I check about the CI? About the substitutes? And about the failures if any?
Owner

@civodul @rgarbage How can I check about the CI? About the substitutes? And about the failures if any?

Hi @zimoun ,

You'll find the CI result here:
https://guix.bordeaux.inria.fr/jobset/forgejo-pull-requests-guix-science-typst-63

> @civodul @rgarbage How can I check about the CI? About the substitutes? And about the failures if any? Hi @zimoun , You'll find the CI result here: https://guix.bordeaux.inria.fr/jobset/forgejo-pull-requests-guix-science-typst-63
Owner

Hello!

Nice work, @alxsim! The bad news (actually not necessarily that bad) is
that there’s another submission of Typst gathering dust at
https://issues.guix.gnu.org/72506.

I think it would make sense to have this sort of tool in Guix proper,
but it’s probably okay to have it in Guix-Science in the interim.

Everything successfully built.

Hello! Nice work, @alxsim! The bad news (actually not necessarily that bad) is that there’s another submission of Typst gathering dust at https://issues.guix.gnu.org/72506. I think it would make sense to have this sort of tool in Guix proper, but it’s probably okay to have it in Guix-Science in the interim. Everything [successfully built](https://guix.bordeaux.inria.fr/jobset/forgejo-pull-requests-guix-science-typst-63).
Author
Contributor

I understand that you do not create one commit per package. :-) However, could you have the first commit that have the header (Copyright), the module declaration (define-module) and maybe one package, then a second commit that add all the rest. Is it doable on your side?

@zimoun Yes that's doable I think, I'll try that maybe this week-end and push the changes.

> I understand that you do not create one commit per package. :-) However, could you have the first commit that have the header (Copyright), the module declaration (`define-module`) and maybe one package, then a second commit that add all the rest. Is it doable on your side? @zimoun Yes that's doable I think, I'll try that maybe this week-end and push the changes.
Owner

https://guix.bordeaux.inria.fr/jobset/forgejo-pull-requests-guix-science-typst-63

Cool, thanks! In order to learn fishing myself, my best luck is to go to https://guix.bordeaux.inria.fr and look for the MR number (here 63), right?

And if I already have guix.bordeaux.inria.fr configured for substitutes, all is fine, right?

> https://guix.bordeaux.inria.fr/jobset/forgejo-pull-requests-guix-science-typst-63 Cool, thanks! In order to learn fishing myself, my best luck is to go to https://guix.bordeaux.inria.fr and look for the MR number (here 63), right? And if I already have `guix.bordeaux.inria.fr` configured for substitutes, all is fine, right?
Author
Contributor

Nice work, @alxsim! The bad news (actually not necessarily that bad) is
that there’s another submission of Typst gathering dust at
https://issues.guix.gnu.org/72506.
Thanks @civodul
Ah I vaguely remembered something about that but didn't properly look, although it's already an outdated version.

I think it would make sense to have this sort of tool in Guix proper,
but it’s probably okay to have it in Guix-Science in the interim.

Yes maybe we can have that in guix-science, and when I get more motivation I can try working out a patch for guix above this issue.

> Nice work, @alxsim! The bad news (actually not necessarily that bad) is > that there’s another submission of Typst gathering dust at > https://issues.guix.gnu.org/72506. Thanks @civodul Ah I vaguely remembered something about that but didn't properly look, although it's already an outdated version. > > I think it would make sense to have this sort of tool in Guix proper, > but it’s probably okay to have it in Guix-Science in the interim. Yes maybe we can have that in guix-science, and when I get more motivation I can try working out a patch for guix above this issue.
Owner

@zimoun Yes that's doable I think, I'll try that maybe this week-end and push the changes.

@alxsim Feel free to give a look at https://issues.guix.gnu.org/72506 as @civodul mentioned; maybe it might provide inspiration. :-)

> @zimoun Yes that's doable I think, I'll try that maybe this week-end and push the changes. @alxsim Feel free to give a look at https://issues.guix.gnu.org/72506 as @civodul mentioned; maybe it might provide inspiration. :-)
Author
Contributor

Hi,
I modified the commits to add some things incrementally (the order is so that everything should build at each stage).
Feel free to edit or ask for modifications.

I thought about another argument to have typst in guix-science: it's not stable yet, and is expected to change relatively quickly. Maybe it's better to wait for it to reach 1.0 to add it to main guix and try it here in the meantime?

Hi, I modified the commits to add some things incrementally (the order is so that everything should build at each stage). Feel free to edit or ask for modifications. I thought about another argument to have typst in guix-science: it's not stable yet, and is expected to change relatively quickly. Maybe it's better to wait for it to reach 1.0 to add it to main guix and try it here in the meantime?
Owner

Hello @alxsim,

It looks good to me. One question though: when we'll want to upgrade it, I guess we'd rather regenerate the whole file. Can you confirm that there are no edits to what guix import produced, apart from the header? If so, you could add the command that you used at the top of the file? (Or, if there are edits, mention what one should pay attention to when upgrading.)

Thanks!

Ludo'.

Hello @alxsim, It looks good to me. One question though: when we'll want to upgrade it, I guess we'd rather regenerate the whole file. Can you confirm that there are no edits to what `guix import` produced, apart from the header? If so, you could add the command that you used at the top of the file? (Or, if there are edits, mention what one should pay attention to when upgrading.) Thanks! Ludo'.
Author
Contributor

@civodul good question. I didn't plan on upgrading this way.
There are some modifications to guix import output that I thought would ease upgrade, such as the top variable typst-version which is reused in all typst specific dependencies.
Additionally, rust-typst-cli-0.12 was renamed to simply typst as this is the entry point.
I've dropped the version in crate names that are typst specific dependencies (as rust-...-dyn) also for more strainghtforward update.

So on upgrade my game plan was 1. update version variable, 2. fix the dozen of sha, 3. fix the few rust dependencies that need updating for the upgrade.

But you're right it might be easier in the end to just not touch the guix import output. I don't have a good perspective on the best way forward.

@civodul good question. I didn't plan on upgrading this way. There are some modifications to `guix import` output that I thought would ease upgrade, such as the top variable `typst-version` which is reused in all typst specific dependencies. Additionally, `rust-typst-cli-0.12` was renamed to simply `typst` as this is the entry point. I've dropped the version in crate names that are typst specific dependencies (as rust-...-dyn) also for more strainghtforward update. So on upgrade my game plan was 1. update version variable, 2. fix the dozen of sha, 3. fix the few rust dependencies that need updating for the upgrade. But you're right it might be easier in the end to just not touch the `guix import` output. I don't have a good perspective on the best way forward.
Owner

Well, guix refresh should be able to do a decent job, but it might be even simpler to just re-run the importer.

Anyway, it might be hard to tell in the abstract which approach would work well. Perhaps we can start with what you’ve already done and see how it goes when “we” (you? :-)) try to upgrade it.

WDYT?

Well, `guix refresh` should be able to do a decent job, but it might be even simpler to just re-run the importer. Anyway, it might be hard to tell in the abstract which approach would work well. Perhaps we can start with what you’ve already done and see how it goes when “we” (you? :-)) try to upgrade it. WDYT?
Author
Contributor

I'd say leave as is, if I find it too painful on the first upgrade in a few months I'll change strategy and stay close to the guix import option.
I'm happy to keep track of the necessary upgrades/additions on everything related to typst yes.

I'd say leave as is, if I find it too painful on the first upgrade in a few months I'll change strategy and stay close to the `guix import` option. I'm happy to keep track of the necessary upgrades/additions on everything related to typst yes.
alxsim manually merged commit 85e684db27 into master 2025-01-23 16:30:17 +01:00
Owner

Alright, let's do that.

Merged, thanks, @alxsim!

Alright, let's do that. Merged, thanks, @alxsim!
alxsim deleted branch typst 2025-01-23 16:53:40 +01:00
Sign in to join this conversation.
No description provided.