Replies: 3 comments 7 replies
-
No strong opinion from me. Devbox looks cool, but I didn't take time to actually try it. I don't work a lot on Copier, but had a few issues with its Nix setup indeed. Anything that makes Copier's dev env easier to use and reason about is welcome 🙂 |
Beta Was this translation helpful? Give feedback.
-
I've been reading over it, but TBH it doesn't seem to add a lot if you're used to Nix, which I happen to be. I think that Nix, as a technology, is very awesome and the industry need for something like it is big. However, it is scary at the beginning, so it's just a matter of time that some projects pop up here and there simplifying the 1st encounters with it, just like this one. There's a similar project to the one you pointed out, https://devenv.sh/, which we are actually using in Copier. I just didn't go down its yaml path because I understand Nix and feel more comfortable writing it than YAML. But if you feel it would be less scary, I can translate some of its configs to YAML. The setup is rather simple right now. All you need is:
You can actually run linters without installing nix if you have podman or docker and run ˋpoe lintˋ. What are the pain points you encounter with this? 🤔 |
Beta Was this translation helpful? Give feedback.
-
Mypy is checked here:
https://github.com/copier-org/copier/blob/4ff30e8a98596a580bd5f8d788657204fca7fbf4/tests/test_tools.py#L14
Since pre-commit is handled by nix, it is also tested by nix:
https://github.com/copier-org/copier/blob/4ff30e8a98596a580bd5f8d788657204fca7fbf4/.github/workflows/ci.yml#L128
That line builds all derivations found inside the ˋchecksˋ nix flake
output. One of those is ˋdevenv-ciˋ, which is provided by devenv.sh (it's
called just ˋciˋ there) and inherited here:
https://github.com/copier-org/copier/blob/4ff30e8a98596a580bd5f8d788657204fca7fbf4/flake.nix#L132
More docs on devenv pre-commit integration:
https://devenv.sh/pre-commit-hooks/
The reason for having such old versions is that I don't have a job that
auto-updates [the nix lock](
https://github.com/copier-org/copier/blob/4ff30e8a98596a580bd5f8d788657204fca7fbf4/flake.lock).
I'll install https://github.com/marketplace/actions/update-nix-flake-lock
when I have time (it didn't exist when I included nix support).
Check here how nix totaly surpasses any other distro you can imagine in
amount of packages available and updated:
https://repology.org/repositories/statistics/newest
That is just because one simple reason: creating and maintaining packages
with nix is extremely simple and maintainable. But of course, you have to
know Nix. Just like you need to know Python to write Copier! :D
In any case, I don't expect Copier contributors to know how to write Nix.
It's a science apart and it'd be a big contribution barrier. I just want a
smooth as possible contribution experience. These days, if you don't have
Nix installed but you happen to have podman or docker installed, just run
ˋpoe lintˋ and it will just work.
However I'll try to improve the experience and docs just to make it
smoother for people that care about the gory details. For some reason,
Copier attracts a lot of those people (and I love that 🤎)!
El mié, 21 feb 2024, 16:05, danieleades ***@***.***> escribió:
… the current version of ruff in the nix environment is currently 0.1.6,
whereas the latest available version is 0.2.2, so it's lagging behind quite
a few releases.
I see a couple of couple of other issues-
- the flake8 config is totally redundant and contains no lint groups
not provided by ruff (except the C lint group, which i'm guessing is
meant to be the C90 complexity lint group. Ruff supports this but it's
not currently enabled). Flake8 can be removed entirely as far as i can tell
- formatting doesn't appear to be checked. There's a ruff check
pre-commit target, but no ruff format pre-commit target
- is there a mypy check somewhere or is it just installed into the dev
environment?
i've never worked with Nix, but all of this is utterly opaque to me.
—
Reply to this email directly, view it on GitHub
<#1468 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHNXDMCVGM2NIIAYTXD62LYUYLLHAVCNFSM6AAAAABBOZUM5SVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DKNBVG42TO>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
We're currently using Nix for two things:
Nix has a somewhat steep learning curve IMHO. I've stumbled over Devbox, which is an abstraction on top of Nix tailored to the dev environments use case, even with granular version pinning, all with only a simple JSON config file and apparently no need for being/becoming a Nix expert. There's no free lunch, but Nix is more than a dev environment solution, so we probably don't actually need its full power for this purpose. Also, aren't we mixing the two uses of Nix at the moment? I wonder what you think about Devbox, @yajo. From my non-expert perspective, it looks quite appealing.
/cc @pawamoy
Beta Was this translation helpful? Give feedback.
All reactions