-
Notifications
You must be signed in to change notification settings - Fork 267
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
Version pining doesn't work #681
Comments
i got the same results while trying to use this devenv.nix on a clean devenv repository also while trying to install both home.packages = [
(pkgs.terragrunt.overrideAttrs (attrs: {
version = "0.46.3";
}))
(pkgs.terraform.overrideAttrs (oldAttrs: rec {
version = "1.5.0";
})) I got the same results |
To properly override the version you need to also override
|
thanks for the try, unfortunately it's more complicated than this for a simple override as it depends on buildGoModules. I'll try to do it better later :) |
unfortunately it doesn't work like this for terraform, which depends on gomodules build, instead if used fixed nixpkgs version as it's golang it's not a big deal |
The "proper" way of depending on a given package version is to find the matching the nixpkgs commit ref that has it working. You can add that nixpkgs version to your Here is a very handy community website to find the correct Git commit: |
This isn't necessarily a related comment, but I'll try it anyway. It would be good to come to some sort of a consensus around how to handle versioning for different languages and services. For instance, I am really digging all the great work @bobvanderlinden has been doing around This effort, though excites me about the entire devenv ecosystem even more, is moot when we look at how this is handled in the I do appreciate how difficult it could be for different software. I can imagine Reading the comments above, I am also worried about the user experience. Nix is powerful for sure. But let's not kid ourselves - it's not the simplest thing to grasp. Us trying to make it simpler for the end user, should not hurt, right? I am looking at the two "proper" ways of managing versions of say, And yes, I do get the core idea of nix, but let's put the nerd aside... All I'm trying to do, is get on with my work. This is where Bob comes in to save us I think. Let the hash live in the lock file. Little rant or vent this turned out to be, and a long way around saying: Would it be possible if we enabled discussions on this repository, and started an RFC? I'm sure the community will enjoy another conversation in the realm of tabs versus spaces. |
The problem with solutions like
But we do not have one for every package. If we want different versions of terraform, then someone needs to put in the effort to package them, just like the above repositories are doing. There just isn't an automated way to do the same atm.
It isn't really needed for everyone of the team to do this if you already have done it 😅 The key here is that someone needs to package them. Currently it's no-one is doing that in a public way, so anyone in the team needs to do this privately. It sounds like there is an opportunity to set up something like a https://lazamar.co.uk/nix-versions/ is a really good 'next best thing'. It just doesn't expose its index in a way that is accessible from Nix. That means it's hard to improve the UX in devenv.sh for this in a clean maintainable way. In addition, the downside of using nixpkgs commits as the base for specific versions of packages is that it will fetch the whole dependency tree for that version of X: it'll be huge (in size) when using multiple versions. It'll also eventually run into incompatibilities when mixing package managers and library versions (pip and npm do not incorporate support for using specifically versioned native dependencies). I think this is however the method that is used in devbox and flox. Both support multiple versions of packages using their own 'mirror'/'adapter' repository for nixpkgs. Same downsides as using lazamar, but they have indexed nixpkgs in a way that their tool can refer to |
Yeah, absolutely :) I'm sure there is a lot of work involved - though, naively I believe my assumption was that the work is initial. I'd be keen to understand why it's not all that automatable 🤔
This prompts me with some ideas 🤔 It feels doable - though I don't want to commit myself to any promises 😅 Shame lazmar isn't easily identifiable with some sourcecode. I'm sure there's something I am overlooking that I wouldn't appreciate with my current way of thinking. I shall digest that further. Thanks for the clarification anyway! |
Hello
Describe the bug
i'm trying to pin some packages versions in order to be coherent with our CI/CD environment testing toolchain, and it seems devenv builds properly the packages, devenv info return the right version, but running command return upstream version.
To reproduce
Gist: https://gist.github.com/nerzhul/0efd6f1927a5756775004524efaca358
It builds properly the versions and devenv info returns the proper output i expect
but terraform -v and terragrunt -v returns the upstream versions
i'm on archlinux with nix, just FYI and here is the which return, proving it uses nix and devenv
Version
devenv: 0.6.2
The text was updated successfully, but these errors were encountered: