Flake: What happened to self.name?

In an early draft version of the flake spec there was a top-level name attribute which didn’t make it into the current implementation.

Anyone knows what happened?

I reckon:

  • the flake is fully qualified by the identifier part of its refspec
  • the common name identifier hence could be regarded identical with that of it’s repository

On the other hand a lot of tools require a (common) name attribute of some sort.

Examples are:

  • input-output-hk/haskell.nix
  • numtide/flake-utils
  • numtide/devshell

More than once I’ve found myself passing this name around, now.

Shouldn’t there be a self.name be back, so that those tools can spare on asking to put them the same name in place all over? (given their access to self)

I don’t see how this makes a difference between just let name = "..."; before inheriting name.

The tools won’t “spare on asking” even if self.name is included. They would need support for the attribute to even set the default which I’m not sure it’s a good idea (though I guess it is somewhat intuitive if it’s a single binary/project in a project).

Reducing the reach of my question to the impact on the generated output derivation falls a little short of the meaning I intended.

Expanding upon the goal to enable downstream UX improvements, I think providing for a richer context (that travels silently as part of the flake api) for the “80” portion of use cases in the “80/20” ratio is indeed a good idea.

That is, I only ever would propose defaulting on self.name for which it be reborn, as suggested.

Not to say 80/20 pretends to convey any accuracy in casu. :wink: