Pinning flakes that provide packages that are not packaged on `nixpkgs` to be used on other flake projects

This thought arise when I was looking at nix-fast-build. The flake itself is not important for the issue, only the fact that is not yet packaged on nixpkgs.

Since its default package — packages."<system>".default — is not packaged on nixpkgs, one must set the installable to the git repo when using nix run like so:

nix run github:Mic92/nix-fast-build

However, by doing so, one would always get the latest commit at its main branch. To avoid this, a git ref could be added to the installable:

nix run github:Mic92/nix-fast-build/1ff0e1beb6ff70419a1269248325417eaae294a9 # latest commit at the time I've wrote this

But that ref would need to be manually updated, that is, one would not be able to use nix flake update. For it to be possible, the nix-fast-build flake would need to be added to the flake project’s inputs.

By doing that, the following options are possible:

  1. Make it available as either a package or an app. However, this causes a problem: if the flake project already provides packages or apps of its own, it will now also provide a nix-fast-build package or app.

  2. Add the package to one of the devShells packages attribute, invoking it as:

    nix develop ".#<respective-devShell>" --command nix-fast-build
    

Would there be any more straightforward ways of achieving what the presented solutions do, preferably, without the mismatch of packages or apps like in the second one?