8

I've got a local unstable package and I want it to always be at the latest commit from its source's upstream. For that I added passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; }; in the package, but when I build the package/install it, it doesn't update.

I don't wanna have to manually update the source's rev and hash, maybe I'm just not using it right ?

This is the package: https://codeberg.org/claymorwan/dotfiles/src/commit/9ca46a651a16a5dc85f35d3c0d19bcd03d692fdd/NixOS/pkgs/fluxer/default.nix

And this is how I install it in my config: https://codeberg.org/claymorwan/dotfiles/src/commit/9ca46a651a16a5dc85f35d3c0d19bcd03d692fdd/NixOS/modules/home/Packages/default.nix#L41

top 2 comments
sorted by: hot top new old
[-] Paulemeister@feddit.org 1 points 5 months ago* (last edited 5 months ago)

You could add the source code of fluxer as a flake input (with flake=false) Then pass that down to the derivation with src=inputs.fluxer-src-name-you-chose.

Then everytime you update that flake input you get the latest version at that point in time. I did something similar here: pdfcat-nix (also works if you use a flake as input with your package in it, but overwrite the flake input to use the latest version without updating the flake lock of the input flake)

You can also check out the way I did automatic version generation based on last commit date and commit hash in bleeding-edge.nix

[-] claymorwan@lemmy.blahaj.zone 1 points 5 months ago

Well that does works, idk if it's the best way to do so tho, I did reuse ur timestamp function tho thanks

this post was submitted on 20 Mar 2026
8 points (100.0% liked)

Nix / NixOS

2860 readers
4 users here now

Main links

Videos

founded 3 years ago
MODERATORS