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 flake #237

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add Nix flake #237

wants to merge 1 commit into from

Conversation

jctemp
Copy link

@jctemp jctemp commented Oct 11, 2024

Nix Flake Integration

Motivation

A Nix flake is introduced to streamline the development and building process of the Typst project.

Key Changes

  1. Nix Flake Integration: Added a flake.nix file to define the development environment and build process. I adopted the Typst flake for that.
  2. Testing Adjustments: Disabled tests requiring network connections due to Nix purity constraints.
  3. Build Configuration: Updated to point to main.rs as specified in cargo.toml.

Testing and CSL Dependencies

  • Current testing cannot be fully included in the flake setup due to CSL dependencies which are pulled during test phase.
    • An include with Nix flakes input would lock the version of CSL.
  • So test requiring network connections are turned off to maintain flake purity and avoid lock.
  • All tests can still be run in the dev shell and CI environments.

Build Configurations Tested

  • x86_64-linux
  • aarch64-linux
  • x86_64-darwin (cannot test)
  • aarch64-darwin (cannot test)

Note: Darwin should build as the Typst/Typst project can build, which depends on this project.

@jctemp jctemp marked this pull request as ready for review October 11, 2024 20:39
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.

1 participant