dream2nix icon indicating copy to clipboard operation
dream2nix copied to clipboard

Replicate `mkDerivation` naming scheme

Open augustebaum opened this issue 2 years ago • 2 comments

Running nix flake show on this branch shows the package names to be <package>-<version>:

❯ nix flake show
├───checks
│   └───x86_64-linux
│       ├─── ...
│       ├───autobase: derivation 'autobase-1.0.0-alpha.9'
...

but the derivation itself will have the name <package>-<version>-<version>.

We understand that this is because we set the name to "<name>-${version}" in our work, and that it is reused as pname for the call to mkDerivation (as shown here).

How can we replicate the mkDerivation naming scheme of <package>-<version> without interfering with the implementation of dream2nix modules?

augustebaum avatar Oct 24 '23 15:10 augustebaum

Hello, con you just set name = "<name>" only without the version, and let dream2nix append the version?

DavHau avatar Oct 25 '23 06:10 DavHau

Thanks for the quick response! The issue is that the version isn't appended everywhere. For instance, we took the example flake from the dream2nix repo and ran nix flake show; this gives:

<flake>
└───packages
    └───x86_64-linux
        └───hello: package 'hello'

but we'd like it to show

<flake>
└───packages
    └───x86_64-linux
        └───hello: package 'hello-2.12'

Is there any way to achieve this?

augustebaum avatar Oct 25 '23 13:10 augustebaum