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

fix(tooling): Fix Nix buld for rustier sile #1871

Merged
merged 9 commits into from
Oct 6, 2023

Conversation

doronbehar
Copy link
Contributor

@doronbehar doronbehar commented Sep 12, 2023

Fixes #1865

Building sort of works now, only running sile fails with:

Error: runtime error: cannot open ./core/pathsetup.lua: No such file or directory
stack traceback:
        [C]: in ?
        [C]: in function 'dofile'
        [string "src/lib.rs:25:10"]:1: in main chunk

Use pkg.nix for most of sile's build Nix expression and document in
comments the small differences between pkg.nix and Nixpkgs'
`sile/default.nix` expression.
@alerque
Copy link
Member

alerque commented Sep 12, 2023

Thanks!

The runtime issue is #1870. It works run from the source directory but paths aren't worked out to run from the system—which is something I just discovered trying to spin up packaging for the develop branch. To date I'd been testing only from my devel environment. Working on that now.

@alerque alerque added this to the v0.15.0 milestone Sep 12, 2023
@alerque alerque added the tooling Build tooling, release management, and packaging processes label Sep 12, 2023
pkg.nix Outdated Show resolved Hide resolved
pkg.nix Outdated Show resolved Hide resolved
pkg.nix Outdated Show resolved Hide resolved
pkg.nix Outdated Show resolved Hide resolved
pkg.nix Outdated Show resolved Hide resolved
pkg.nix Outdated Show resolved Hide resolved
pkg.nix Outdated
'';

# remove forbidden references to $TMPDIR
preFixup = lib.optionalString stdenv.isLinux ''
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one on the other hand a rather common thing you see in Nixpkgs, but we should verify it is still needed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would I confirm if this is needed? Would the build fail with a warning about it if there was a problem? Because just dropping this block entirely seems to allow the Flake to continue running just fine. See #1941.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would I confirm if this is needed?

I'm pretty sure that if you remove it and the Nix build succeeds, it should be OK.

@doronbehar
Copy link
Contributor Author

I will also note I get a lot of failure CI emails.

pkg.nix Outdated Show resolved Hide resolved
@alerque alerque marked this pull request as ready for review October 6, 2023 19:31
@alerque
Copy link
Member

alerque commented Oct 6, 2023

Just in case anybody is following along and has no idea what is happening here, when this merges you'll be able to run the development version of SILE complete with Rusty CLI just by installing Nix on your system then running:

$ nix run github:sile-typesetter/sile/develop

LuaJIT is now the default, but you can run anything you want, e.g.:

$ nix run github:sile-typesetter/sile/develop#sile-lua5_3

Add -- followed by any arguments you want to pass to SILE.

@alerque
Copy link
Member

alerque commented Oct 6, 2023

Many many thanks @doronbehar.

@alerque alerque merged commit 86adf97 into sile-typesetter:develop Oct 6, 2023
5 of 16 checks passed
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