buildFromSdist: deal with breakage of removeReferencesTo

Incidentally, `buildFromSdist` hasn't been changed since 2018:

https://github.com/NixOS/nixpkgs/pull/48699
This commit is contained in:
Sridhar Ratnakumar 2024-03-29 12:19:03 -04:00
parent 4aab279d0c
commit 01fb3da1c6

View File

@ -75,8 +75,10 @@ in
# HACK: buildFromSdist must apply *last*
# cf. https://github.com/srid/haskell-flake/pull/252
# In future, we can refactor this as part of https://github.com/srid/haskell-flake/issues/285
impl = lib.attrsets.removeAttrs cfg.impl [ "buildFromSdist" ];
fns = lib.attrValues impl ++ [ cfg.impl.buildFromSdist ];
# NOTE: removeReferencesTo must apply *before* buildFromSdist, because the
# later appears it fuck up the former otherwise.
impl = lib.attrsets.removeAttrs cfg.impl [ "buildFromSdist" "removeReferencesTo" ];
fns = lib.attrValues impl ++ [ cfg.impl.buildFromSdist cfg.impl.removeReferencesTo ];
in
lib.pipe super.${name} (
# TODO: Do we care about the *order* of overrides?