Use package from flake input, as build input in `nosys` flake

I’m writing a flake which uses nosys to abstract treatment of systems.

nosys ‘de-systemizes’ the nixpkgs input when passing it to the flake’s outputs; quoting the nosys README

Before desystemizing:

nixpkgs, # <---- This `nixpkgs` still has the `system` e.g. legacyPackages.${system}.zlib

After desystemizing:

nixpkgs, # <---- This `nixpkgs` has systems removed e.g. legacyPackages.zlib

This allows nixpkgs to be used without worrying about the system (pkgs.whatever in the following sample):

inherit (nixpkgs.legacyPackages) pkgs;
...
devShell = pkgs.mkShell {
    ...
    packages = [ pkgs.whatever ];
};

However, something is not quite right in my attempts to use a package from a flake input other than nixpkgs:

   packages = [ pkgs.whatever other_flake_input.packages.default ];

works, but

   packages = [ pkgs.whatever other_flake_input.packages.xxx ];

errors with attribute 'xxx' missing, even though in the outputs of other_flake_input (which is also defined using nosys)

packages.default = self.packages.xxx

What might I be doing wrong?

This looks to be related to caching of the input flake:

  • The problem disappears if the input flake is on the local filesystem.
  • The problem disappears if, every time I change the definition of the input flake, I push it to a new branch name, or use it’s full commit in the definition of the client flake’s inputs.

I’ve tried to overcome this with --tarball-ttl in various places, to no avail. Nuking ~/.cache/nix doesn’t seem to help, either.

Is there some other way of preventing the cache from getting in the way of iterative development on this?