Skip to content

Project's flake is incomplete. #481

@2coffee2crab

Description

@2coffee2crab

Chore

Describe the chore

The flake provided on the repo does not produce a viable development environment.

Additional context

The project's README file mentions that one can use nix develop to set up a suitable environment. However, this environment is incomplete: trying to compile the codebase will fail for several reasons:

  • Compilation fails at pgt_query with a bindgen error, because libclang is not included in the environment.
  • bindgen also fails to find headers from the standard library unless LIBCLANG_PATH is properly set.1
  • Compilation of tikv-jemalloc-sys fails. This one is trickier, the issue comes from nixpkgs and their environment, because it adds the -Wall flag during compilation.23

In addition, the development environment is missing some packages: docker, docker-compose and docker-buildx. I think the latter may not be necessary, but Docker will issue a warning if it isn't present.

Finally, on the topic of unused packages: I'm not sure all the settings included on the flake are necessary, but I just started reading through the codebase, so I thought better not to remove anything.

I changed the flake.nix to address the above issues, and can confirm that it's working on NixOS. I'd be more than happy to open a PR if you want.

Cheers!


Relevant issues

Several have been reported multiple times, I added the ones that offered a solution.

Footnotes

  1. Unset LIBCLANG_PATH issue

  2. tikv-jemalloc-sys build fails on newer clang packages from nixpkgs: issue.

  3. Some versions of GCC on nixpkgs have unwanted flags: issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions