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

Add nix-shell file for mdbook #285

Merged
merged 2 commits into from
Jan 27, 2025
Merged

Add nix-shell file for mdbook #285

merged 2 commits into from
Jan 27, 2025

Conversation

ahoneybun
Copy link
Member

This matches up with the docs repo where with Nix installed you can just enter nix-shell and have mdbook ready to go.

@ahoneybun ahoneybun requested a review from a team January 24, 2025 21:21
Copy link
Member

@jacobgkau jacobgkau left a comment

Choose a reason for hiding this comment

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

I still had to run mdbook serve inside of the Nix shell in order to start the web server, but this does appear to grab mdbook from the Nix repo instead of having to download it manually. (Note that since we update mdbook manually, the version may not always match with the version available from the Nix repo.)

@ahoneybun
Copy link
Member Author

That is expected and how the nix-shell works in the docs repo as well, you have to run npm ci and npm start to run the server locally. I can make the service start if we wanted to though.

@jacobgkau
Copy link
Member

jacobgkau commented Jan 24, 2025

I'm fine either way. Since mdbook is a single-file binary, using nix-shell to start it turns one command into two for me (the first command replacing the downloading of the binary, which normally only needs to be done once per version). But it sounds like it's doing what it's meant to be doing, avoiding having to manually download the file.

@jacobgkau
Copy link
Member

I'll just merge this as-is for now.

@jacobgkau jacobgkau merged commit e9237fb into master Jan 27, 2025
1 check passed
@jacobgkau jacobgkau deleted the add-nix-shell branch January 27, 2025 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants