-
Notifications
You must be signed in to change notification settings - Fork 371
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
Create and activate venv via Nix Flake #229
Conversation
This was finished prior to #149 being merged, which appears to have added a dep for libpulse and currently prevents the program from starting successfully via the flake. I'll create pr to fix that (and some other dep issues) soon, but this was bad timing on my part. Converting to draft |
39c10b1
to
ebd7f97
Compare
Now based on #244 |
ebd7f97
to
5628552
Compare
Same as my comment on #224, I've will follow up as soon as I've done a proper test and review, thank you! |
4f494c1
to
fbabb41
Compare
9bd72d1
to
9c2e2b3
Compare
Just a heads up, the instructions for running/building from source have been moved from the README to CONTRIBUTING.md |
9c2e2b3
to
32cb75b
Compare
Currently, everything related to the actual creation of the venv works. The main blocker I'm on right now is mypy always fails with |
Thanks for the hard work on this. I'll see if I can figure something out myself for mypy. |
Really couldn't figure out a way to get mypy to function without using from nixpkgs repos. For now the versions are the same as in the |
I have no experience with NixOS, so sorry if I'm missing something obvious, but why is installation of |
This is a dev shell for developers to use, on NixOS you cannot just clone a repo and expect that to work and libraries don't exist the same as on a traditional distribution. This dev shell provides the utilities and libraries needed for a working development environment to use on TagStudio. |
When using the nix flake to generate a development shell, the python virtual environment will now automatically be created and dependecies from both requirements.txt and requirements-dev.txt will be installed. This removes the need for using the setup script after entering the dev shell. Exec bash must be the last thing called, as any other commands past it will not get executed by the shell hook. Also removes some duplicate dependencies that I found.
Mostly as a fallback for xserver.
Moves the previous updated blurb from the README to the new CONTRIBUTING file. Also reworks some wording to link to the Flake nix wiki page for nix users who haven't enable flakes yet.
a2dad90
to
15ee13c
Compare
This totally got lost with other responsibilities and life events, for which I am at fault for for not giving this the attention it needed sooner. I am going to pull this as-is right now to give me a starting place for a dev shell using devenv which it appears is what the big thing in the Nix development ecosystem is. Be on the lookout for that being merged tonight or sometime tomorrow. |
When running
nix develop
to generate a development shell, the python virtual environment will now automatically be created and dependencies from requirements.txt will be installed (and the venv will be activated). Effectively, this moves the setup portion of the TagStudio.sh to the flake and means the setup script for Linux/Mac is no longer needed when using nix. The README has been updated to reflect the new process ofnix develop
thenpython3 tagstudio/tag_studio.py
.The python virtualenvironment package has been replaced with venvShellHook, which creates a virtual environment in the directory specified by $venvDir (in this case ./.venv). This also gives the postVenvCreation hook, where pip install is then executed. The previous shellHook needed to be moved to postShellHook to execute after the venv is created.
unset SOURCE_DATE_EPOCH
is probably not necessary, but is to solve a potential issue between pip and nix and appears in a lot of python flake examples.