aires,
@aires@tiggi.es avatar

Question for the smarter and people: is there an easy way to pin a package to a specific version? All I want to do is downgrade hugo from v0.124 to v0.123.8.

Right now I've got like a dozen tabs open with a bunch of convoluted answers involving overrides and custom builds. The most "straightforward" method I've seen so far is using builtins.fetchGit to reference a specific commit, but it's apparently cloning the entire nixpkgs repo, which seems excessive. Any suggestions? Thanks in advance!

astrid,
@astrid@fedi.astrid.tech avatar

@aires fetching an old version nixpkgs repo works -- remember that it's lazy and not eager so even though you're fetching the entire repo you are only evaluating the stuff you need.

AngryAnt,
@AngryAnt@mastodon.gamedev.place avatar

@astrid @aires This. For the case of pinning a version, this should absolutely be the way to go.

Overrides can work just as well, but as software develops, so does its dependencies, possibly build approach, etc - meaning not all version-pinning overrides are going to be simple.

That's where prior nixpkgs versions come with guarantees and the intent is clearly declared in your config.

emattiza,
@emattiza@hachyderm.io avatar

@aires An overlay with a custom pinned pull is your best bet here

emattiza,
@emattiza@hachyderm.io avatar

@aires Heres the pr on nixpkgs that made the update. You could lock your total nixpkgs to the parent of this one https://github.com/NixOS/nixpkgs/commit/254540aaf5d51db806783953628d497cc622e0dd

emattiza,
@emattiza@hachyderm.io avatar

@aires To find this stuff, i usually use search.nixos.org, and then click on the source to go to the github url for the derivation, then git blame the version line to find a nixpkgs rev that gets the job done. An overlay though is the only way to keep the single package pinned while the rest of the repo is current

  • All
  • Subscribed
  • Moderated
  • Favorites
  • NixOS
  • tacticalgear
  • DreamBathrooms
  • cisconetworking
  • magazineikmin
  • InstantRegret
  • Durango
  • thenastyranch
  • Youngstown
  • rosin
  • slotface
  • mdbf
  • khanakhh
  • kavyap
  • everett
  • JUstTest
  • modclub
  • Leos
  • cubers
  • ngwrru68w68
  • ethstaker
  • osvaldo12
  • GTA5RPClips
  • anitta
  • provamag3
  • normalnudes
  • tester
  • megavids
  • lostlight
  • All magazines