NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18k stars 14.01k forks source link

Why was `safe-money` renamed to `safe-money_0_7`? #46467

Closed arianvp closed 6 years ago

arianvp commented 6 years ago

Issue description

In commit https://github.com/NixOS/nixpkgs/commit/cd35b1cc9c48d2c3b008d14e1bb32823980e4dcd#diff-e4ed6fefa9564bfd27ee249e42e145e2R177732 safe-money-0.7 was added to the hackage package set, which splits up safe-money into safe-money, safe-money-{aeson,cereal,serialise,xmlbf}

However, instead of updating the hash of the original safe-money derivation, a new derivation was introduced named safe-money_0_7 and all the packages safe-money-* now wrongly depend on safe-money instead of safe-money_0_7, breaking the builds.

I'm not very familiar with the whole hackage2nix tooling, so I'm wonderng why it created a new safe-money_0_7 package instead of updating the existing one? And how would I make hackage2nix update the original safe-money package, instead of creating a new derivation name?

CC @peti

This is currently blocking https://github.com/NixOS/nixpkgs/issues/45960

arianvp commented 6 years ago

I think I found out why. It's because of this line. https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/haskell-modules/configuration-hackage2nix.yaml#L1768 if I just change that file, will it work as expected again?

arianvp commented 6 years ago

safe-money-0.7 isn't in any Stackage LTS snapshot yet. so another option we could choose is to remove the safe-money-{aeson,ceral,serialise,xmlbf} packages for now.

mpickering commented 6 years ago

The whole package set is based on some Stackage LTS the 0.6 version remains the default and the 0.7 version is opt-in.

The way to fix this is to modify haskell-modules/configuration-common.nix and add something like

...
safe-money-aeson = super.safe-money-aeson.override { safe-money = safe-money_0_7; }
...