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

  • Paulemeister@feddit.org
    link
    fedilink
    English
    arrow-up
    1
    ·
    13 days 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