How to specify a fixed version for a nix package
Is there a way to specify a fixed version for
nixPkgs
? something like this:
nixPkgs = ["...", "zlib", "cdo@2.1.1"]
At the moment I downgraded nixpacks altogether with nixpacksVersion
but not idealSolution:Jump to solution
The only way to install specific versions of packages is to change the nix archive version to one where that package version is used. It is far from ideal and something we are working towards improving. This is just a limitation of how Nix works
20 Replies
Project ID:
N/A
N/A
oh it's still Sunday, I'll tag jr in tomorrow
yep, no worries, for now downgrading to
nixpacksVersion = "1.15.0"
fix the problem@jr - I swore there was a way to pin individual nix packages to a specific version
Will come back to this thread in a few hours. Swamped atm
no problem, thanks!
A small bump for this, still curious to know if that's possible.
Imo, new update of nixpacks had some braking consequences lately (1.16.0, 1.17.0). Not directly because of nixpacks, but because the bump for other packages that it includes.
I would rather want to fix all the packages I am using and manually updating them one by one when I want. Similar to a package.json where I define fixed versions for each packages so I don't get some random breaking changes when updating a patch version
^0.0.x
That’s best practice! I believe you can set package versions using a nixpacks.toml. @Brody am I correct with this?
Configuration File Reference | Nixpacks
App source + Nix packages + Docker = Image
doesn’t say anything in the docs, but I believe if you do “packageName-x.x.x” where x is the version number it will work
I don't know the syntax either, jr definitely would, but if I had to guess it would be
packageName@x.x.x
So let’s say I want to fix node version. That would be
nodejs_20@20.5.1
I can give it a try, see what it does during build phase![No description](https://cdn.answeroverflow.com/1158792994837762078/IMG_8533.png)
it's really just a wild guess
it's a nope for
@
. I tried zlib@1.2.12
Trying out with a dash now, but very little hope on this syntax