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

Move from poetry to nixpkgs #505

Closed
2 tasks
yukiisbored opened this issue Apr 1, 2023 · 7 comments
Closed
2 tasks

Move from poetry to nixpkgs #505

yukiisbored opened this issue Apr 1, 2023 · 7 comments

Comments

@yukiisbored
Copy link
Member

yukiisbored commented Apr 1, 2023

I think poetry adds unnecessary complexity to the project and a learning curve to contributors who may not be familiar with it (especially considering that we plan to teach Nix/nixpkgs here, not poetry).

In addition, I believe it's not necessary as nix.dev isn't distributed as a Python package/project and the only thing that's needed to build the project is a shell environment with sphinx and additional libraries we use.

From what I see, one of the potential reasons why poetry is used is because it allows using dependabot but I don't think that's important for this project as we don't really need the latest software and the latest version of nixpkgs is sufficient for our needs.

In addition, doing this allow nix.dev to be used as an example by interested readers who wants to contribute to the project.

A couple things need to be done:

  • Verify every piece of dependency is on nixpkgs
    • If one isn't available, decide whether to submit a new package to nixpkgs or find an alternative that's already in nixpkgs.
  • Move from poetry to nixpkgs
@zmitchell
Copy link
Contributor

Under python310Packages we have:

  • livereload
  • myst-parser
  • sphinx
  • sphinx-book-theme
  • sphinx-copybutton
  • sphinx-design
  • black

I haven't checked that these all play well together or render properly (the pyproject.toml requires Python 3.7), but the dependencies are at least there.

@zmitchell
Copy link
Contributor

If we're getting rid of poetry would we just have a single mkDerivation that's essentially what nix-dev-html does?

@zmitchell
Copy link
Contributor

I've removed all of the poetry stuff but I've hit this error:

error: Package ‘python3.10-sphinx-book-theme-0.3.3’ in /nix/store/0acd255ca1v8m4xcg5wjhi9pgmx7q2s5-source/pkgs/development/python-modules/sphinx-book-theme/default.nix:35 is marked as broken, refusing to evaluate.

@zmitchell
Copy link
Contributor

Looks like there's a compatibility issue between this theme and sphinx. The version of sphinx in python310Packages is v5.1.1, but v0.3.3 of sphinx-book-theme isn't compatible with this version of sphinx. Luckily there's a later version of sphinx-book-theme, v1.0.1, that is compatible, I'm just not sure how to use it because I'm a Nix noob. Is this where I would use an overlay of some sort?

@fricklerhandwerk
Copy link
Collaborator

Please put up the change as a PR, then people can help you out on the concrete code.

@zmitchell
Copy link
Contributor

The PR is here: #515

@willbush
Copy link
Member

PR was merged. This can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

4 participants