Samba with mDNS support requires a recompilation?

Hello folks, I’ve been setting up a samba share on NixOS and quickly I found out that the share was not discoverable and learnt from the official wiki that I was supposed to use package = pkgs.samba4Full to enable mDNS and make it discoverable.

However that triggered a big recompilation that even included unrelated packages like ceph, which I thought made no sense. I’ve managed to reduce it to just enable mDNS which still triggers a recompilation, but without lots of other dependencies.

Is this expected? It looks to me there should be a simpler path to enabling mDNS on the samba share, even if it were to have a separate package that would also be on the binary cache.

  1. Only directly accessible packages are cached so samba4Full is build and cached but pkgs.samba.override { enableMDNS = true; } would not be.
  2. pkgs.samba4Full does appear to be cached, could you share what revision of nixpkgs you are using?

I can test it again when I’m home, but this is my flake.lock.

Thanks, I didn’t know you could have a flake.nix/flake.lock in a subdirectory.

It’s not cached because Hydra (the nix build server) failed to build ceph (a dependency of samba4Full).

If you want to get updates on this issue you can follow this GitHub issue.

2 Likes