Store the version of a derivation in the database #294

Closed
opened 2024-10-28 11:19:22 +00:00 by erictapen · 5 comments
erictapen commented 2024-10-28 11:19:22 +00:00 (Migrated from github.com)

Currently we only have the name attribute available in the db. Either provide a good utility function that works similar to builtins.parseDrvName or figure out the version while evaluating Nixpkgs and put it in the db right away.

Currently we only have the `name` attribute available in the db. Either provide a good utility function that works similar to `builtins.parseDrvName` or figure out the version while evaluating Nixpkgs and put it in the db right away.
RaitoBezarius commented 2024-10-28 11:35:52 +00:00 (Migrated from github.com)

This may require parsing the .drv file in the end, cc #58.

This may require parsing the `.drv` file in the end, cc #58.
fricklerhandwerk commented 2024-10-28 13:13:32 +00:00 (Migrated from github.com)

Why can't we take the version attribute from the evaluation?

Why can't we take the `version` attribute from the evaluation?
RaitoBezarius commented 2024-10-28 13:29:27 +00:00 (Migrated from github.com)

Because this doesn't guarantee you the version, you need to implement something like builtins.parseDrvName to inverse the concatenation.

Because this doesn't guarantee you the `version`, you need to implement something like `builtins.parseDrvName` to inverse the concatenation.
fricklerhandwerk commented 2024-10-28 14:04:03 +00:00 (Migrated from github.com)

We could have a Maybe Version as a stopgap though, no need to build the drv parser at this point (yet). Unless it's a quick fix, because of course it would be better to just have the parser.

We could have a `Maybe Version` as a stopgap though, no need to build the drv parser at this point (yet). Unless it's a quick fix, because of course it would be better to just have the parser.
fricklerhandwerk commented 2024-11-11 09:18:44 +00:00 (Migrated from github.com)

As discussed the week before last with @erictapen, we can also copy the implementation of nix-env version parsing, it's not that hard. This issue would be obviated by a "correct" implementation on our end.

As discussed the week before last with @erictapen, we can also copy the implementation of `nix-env` version parsing, it's not that hard. This issue would be obviated by a "correct" implementation on our end.
Sign in to join this conversation.
No description provided.