ofBorg PR error: path '...' is not valid

ofBorg says:

This PR does not cleanly list package outputs after merging.

And gives this error:

  error: path '/nix/store/n6h5ydm9akf58mfmafrh8x8p2908v7ih-source.drv' is not valid

I tried to search but I can’t figure out what it means. What am I doing wrong here?

The PR: kimai: init at 2.10.0 by Sleepful · Pull Request #296049 · NixOS/nixpkgs · GitHub
The ofBorg gist: Output path comparison · GitHub

maybe related? IDK "error: path '/nix/store/...' is not valid" when saving a reference to a store path in $out in a fixed output derivation · Issue #5509 · NixOS/nix · GitHub

Hm piecing together some things:

okay so what should I do? should I not filter the source from github?

Oh, this ofBorg error message is sooooo confusing.

Anyway turns out I was using one of the filtering functions, such as builtins.path, builtins.filterSource and lib.cleanSource. All of these create derivations and thus breach the “IFD not allowed” rule.

If you are adding a package and you want to check that your package is not breaching IFD, then you would test like this:

nix-build --no-allow-import-from-derivation -A <package>

Perhaps this should go into the pkgs contribution readme