Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(build): Get libtexpdf into build using flake inputs #1777

Merged
merged 4 commits into from
Apr 27, 2023

Conversation

doronbehar
Copy link
Contributor

After experimenting with building projects that depend on git submodules, I reached the conclusion that this is the most comfortable way of handling such dependencies. You may like this approach since updating libtexpdf for the flakes will only require:

nix flake update

and the above will also update libtexpdf to it's latest version. Using a specific version of libtexpdf is possible using:

nix build --override-input libtexpdf-src "github:sile-typesetter/libtexpdf/my_feature_branch"

You can also do the above while disabling changing the flake.lock file:

nix build --override-input libtexpdf-src "github:sile-typesetter/libtexpdf/my_feature_branch" --no-write-lock-file

@alerque alerque added this to the v0.14.10 milestone Apr 26, 2023
@alerque alerque added the tooling Build tooling, release management, and packaging processes label Apr 26, 2023
@alerque
Copy link
Member

alerque commented Apr 26, 2023

Thanks! This makes perfect sense and if Nix was the only thing in play here I'd be all for it. As it is I'm a bit unsure since this workflow now splits the workflows that update the upstream source build vs. the Nix flake. I am not sure I want it to be a separate action that could be out of sync. I'll probably fiddle with a way to get them both updated at the same time or otherwise kept in sync. Just triggering nix flake update at the same time seems a bit aggressive since it updates a whole bunch of other pinned things.

Makefile.am Outdated Show resolved Hide resolved
@doronbehar
Copy link
Contributor Author

There's also the option:

nix flake lock --commit-lock-file --override-input libtexpdf-src github:sile-typesetter/libtexpdf/$(git submodule status -- libtexpdf | awk '{print $1}')

@alerque alerque merged commit 45526d4 into sile-typesetter:master Apr 27, 2023
@doronbehar
Copy link
Contributor Author

doronbehar commented Apr 27, 2023 via email

@alerque
Copy link
Member

alerque commented Apr 28, 2023

Yes I put it through a few paces by downgrading libtexpdf and updating it again, it seemed to work as expected. The lock file definitely gets updated with the expected submodule update. I had to remove the --commit-lock-file because it didn't play nice with our commit message requirements, but also it is nice to have it be part of the same commit as the submodule anyway. Thanks for the help with this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tooling Build tooling, release management, and packaging processes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants