[Nix-dev] What about introducing deprecated or such an attr name?

Eelco Dolstra e.dolstra at tudelft.nl
Wed Nov 19 23:05:34 CET 2008


Marc Weber wrote:

> Eg there are some expressions which should be preferred over others.
> Examples:
> 
> tetex is discontinued, but you have to ask wikipedia to get to know
> that... 
> 
> cdrecord didn't build, so why did nobody complain? Maybe everyone is
> using cdrdao now? Why not  add this as well?
> 
> So what about adding something like
> 
> meta = {
>   depreceated = "use texLive instead, tetex is discontinued";
> };
> ?
> 
> Do you like this idea? Or is there already an alternative?

What would be the semantics of such an attribute?  Should nix-env print a
warning when you try to install a package with a deprecated attribute?  You
could also put such information in the description attribute.

While on the subject, we could have an attribute that specifies that one package
is a replacement of some other, removed package.  E.g. if we remove tetex, we
could say in texlive something like

  meta = {
    upgrades = ["tetex"];
  };

and then if you do a nix-env -u \*, tetex would be upgraded to texlive
automatically.

This could also be useful for handling package renames.  For instance, I want to
rename MPlayer to mplayer, but that's not really supported right now.

-- 
Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/



More information about the nix-dev mailing list