Conversation
4705276 to
b6793ef
Compare
f8e9a06 to
8d82c04
Compare
|
Don't know why the CI fails: $ nix build -L --show-trace --option keep-going true --max-silent-time 1200 --accept-flake-config --out-link result-x86_64-linux.packages/dnsvizor '/nix/store/y905dkcdgyh0fi08g44b59wckgm4zka6-dnsvizor-0-unstable-2026-01-21.drv^*'
in dir /var/lib/buildbot-worker/worker-004/ngi-nix_ngipkgs_nix-build/build (timeout 10800 secs)
watching logfiles {}
argv: [b'nix', b'build', b'-L', b'--show-trace', b'--option', b'keep-going', b'true', b'--max-silent-time', b'1200', b'--accept-flake-config', b'--out-link', b'result-x86_64-linux.packages/dnsvizor', b'/nix/store/y905dkcdgyh0fi08g44b59wckgm4zka6-dnsvizor-0-unstable-2026-01-21.drv^*']
using PTY: False
this derivation will be built:
/nix/store/y905dkcdgyh0fi08g44b59wckgm4zka6-dnsvizor-0-unstable-2026-01-21.drv
building '/nix/store/y905dkcdgyh0fi08g44b59wckgm4zka6-dnsvizor-0-unstable-2026-01-21.drv'...
dnsvizor> Running phase: installPhase
error: cannot create symlink '/var/lib/buildbot-worker/worker-004/ngi-nix_ngipkgs_nix-build/build/result-x86_64-linux.packages/dnsvizor'; already exists
program finished with exit code 1
elapsedTime=0.198748 |
|
Although I haven't looked much into details, Before: nix-repl> dnsvizor
{
hvt = «derivation /nix/store/9wd8z9v53c1gcpkb0py5if181qxsdxp7-mirage-dnsvizor-hvt-0-unstable-2026-01-21.drv»;
muen = «derivation /nix/store/46chvcldkab5k429qlkrf9qrdm68jfi8-mirage-dnsvizor-muen-0-unstable-2026-01-21.drv»;
override = { ... };
overrideDerivation = «lambda overrideDerivation @ /nix/store/vcd1brksxy9j2gxrsdmzph5hvq649pvr-source/lib/customisation.nix:203:32»;
qubes = «derivation /nix/store/g0wab6s9lcziazjiskv9qwfapzafi9ly-mirage-dnsvizor-qubes-0-unstable-2026-01-21.drv»;
recurseForDerivations = true;
spt = «derivation /nix/store/sy76q5i1knsh9byajdjafc79q0wv07xh-mirage-dnsvizor-spt-0-unstable-2026-01-21.drv»;
unix = «derivation /nix/store/8413m3bhzjx2z9p0ai9jlkk8y6v3ibff-mirage-dnsvizor-unix-0-unstable-2026-01-21.drv»;
updateScript = «derivation /nix/store/85wysys65g6vviq87ydmb737z1nxzzni-dnsvizor-update.drv»;
virtio = «derivation /nix/store/4nw88sf8nvicapn1z6mzd51612d9qybv-mirage-dnsvizor-virtio-0-unstable-2026-01-21.drv»;
xen = «derivation /nix/store/pbh5jx059xh2921l2ip8zz8xqmym8zq7-mirage-dnsvizor-xen-0-unstable-2026-01-21.drv»;
}After: nix-repl> dnsvizor
«derivation /nix/store/y905dkcdgyh0fi08g44b59wckgm4zka6-dnsvizor-0-unstable-2026-01-21.drv»With: $ nix-build -A dnsvizor && ls -l ./result
/nix/store/5p0k9anj1wfb00r5hn0nkfcrgqmq378f-dnsvizor-0-unstable-2026-01-21 |
Are you replying to #2063 (comment)? I CCed you in case you have some suggestion to fix the general issue of updateScript for package sets/scopes. IIUC, this PR tries to work around the package set updateScript issue by making dnsvizor not a package set. Hopefully, that won't slow down the build. |
|
@eljamm, yes, |
There was a problem hiding this comment.
I am not a fan of the unusual treatment of package set. I propose #2174 as an alternative to support updateScript. Reviews are welcome.
Other changes of this PR, such as using extendMkDerivation, looks good to me. Maybe it works better to merge other changes first and deal with updateScript later?
WDYT?
There was a problem hiding this comment.
#2174 is not stacked upon this PR, so either I or you will have to resolve the conflicts.
But if it were stacked then you'll have to rebase each time I push a new revision.
I suggest we organize like that:
- I continue to focus on
mirage.nix - You continue to focus on the underlying improvements in Allow running updateScript of package sets #2154 being merged, and then just ask me to remove the "unusual treatment" (that has the good property to solve problems you raised at a time where Allow running updateScript of package sets #2154 did not exist).
WDYT?
There was a problem hiding this comment.
This unusual treatment of package sets has some issues:
- damage discoverability: for example,
nix flake showonly showsdnsvizor, but not the actual ones such asdnsvizor.hvt - bad UX: the workaround for package build CI, i.e., building all targets when building
dnsvizor, can have bad UX
There was a problem hiding this comment.
on your first point I can try to:
- move the
targetsback in a package set, with a dummyupdateScriptnot doing anything. - add to that package set a
dnsvizor-udpatedummy package providing anupdateScriptupdating thetargetscorrectly.
on your second point: if it does not serve any purpose, I'll remove it.
There was a problem hiding this comment.
add to that package set a dnsvizor-udpate dummy package providing an updateScript updating the targets correctly.
Oh, this sounds much better!
I pushed b1d05e7 implementing it.
- use multiple outputs instead of multiple derivations - use a single materializedDir - use lib.extendMkDerivation - use camelCase - use nix eval to get materialization paths - use stripDebugFlags instead of stripAllList - use $out/share/mirageos (automatically stripped) instead of $out - use upstream's letter casing: "DNSvisor" in documentation
Warning: currently this does not update inputs pinned in flake.lock
…ditional update package
|
A second round on DNSvizor's packaging.
Done
dsnvizor.${target}to preserve a good UXdnsvizor.updatepackage in the set to updatesrcand alltargetscorrectly (ie. updatingsrconly once before materializing alltargets). Note that theopam-nix's input is not updated, as it will possibly be used by other packages in the future and that could invalidate their materialization. The correct place to update globally shared inputs is at the beginning of aupdate-all.opam-nixinstead of a ad-hoc fork to support non-IFD builds, now that MaterializebuildOpamMonorepotweag/opam-nix#149 has been mergedBuilding
Note the
dnsvizor-0-unstable-2026-01-21out path, corresponding todnsvizor.update, but thenameis set to match what is expected to be read when updating.Updating
update dnsvizor.update(!!! notupdate dnsvizor!!!)nix -L develop --impure --expr 'import <nixpkgs/maintainers/scripts/update.nix> { include-overlays = [ (final: prev: { inherit (import ./. {}) ngipkgs; }) ]; package = "ngipkgs.dnsvizor.update"; }'Discoverability
Alternative