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

Nix devenv #969

Merged
merged 3 commits into from
Oct 4, 2024
Merged

Nix devenv #969

merged 3 commits into from
Oct 4, 2024

Conversation

vlaci
Copy link
Contributor

@vlaci vlaci commented Sep 30, 2024

Devenv1 is tool to create easily composable development
environments for nix.

Hooking it in to our nix flake gives us the following improvements:

  • more declarative python environment config
  • avoid the patchElf hack to pull in native dependencies
  • python packages updates won't undo the effect of patchElf
  • due to a long-standing bug2, a patched devenv version is needed

Footnotes

  1. https://devenv.sh/

  2. https://github.com/cachix/devenv-nixpkgs/issues/2

@vlaci vlaci force-pushed the nix-devenv branch 3 times, most recently from 8ab4525 to e40a5c9 Compare September 30, 2024 15:12
@kissgyorgy
Copy link
Contributor

Devenv[^1] is tool to create easily composable development
environments for nix.

Hooking it in to our nix flake gives us the following improvements:
 - more declarative python environment config
 - avoid the `patchElf` hack to pull in native dependencies
 - python packages updates won't undo the effect of `patchElf`
 - due to a long-standing bug[^2], a patched `devenv` version is needed

The `.devenv` directory is pre-created because of a quirk: it needs to
be present in the `src` derivation of `shell.nix`, otherwise it is
unable to create it due to a permission error.

[^1]: https://devenv.sh/
[^2]: cachix/devenv-nixpkgs#2
@vlaci vlaci force-pushed the nix-devenv branch 6 times, most recently from 1a0ded0 to 725c02d Compare October 4, 2024 11:11
@vlaci vlaci marked this pull request as ready for review October 4, 2024 11:50
Also needed to bump nix version for the build to pass
@vlaci vlaci marked this pull request as draft October 4, 2024 12:25
@kissgyorgy kissgyorgy marked this pull request as ready for review October 4, 2024 13:44
@vlaci vlaci merged commit e492f64 into main Oct 4, 2024
13 of 14 checks passed
@vlaci vlaci deleted the nix-devenv branch October 4, 2024 13:44
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