Commit bb3a41f3 authored by Yueh-Shun Li's avatar Yueh-Shun Li
Browse files

buildPython*: fix the disabled functionality for overrideAttrs-

parent 25c03bd7
Loading
Loading
Loading
Loading
+15 −5
Original line number Diff line number Diff line
@@ -452,11 +452,21 @@ let
  # This derivation transformation function must be independent to `attrs`
  # for fixed-point arguments support in the future.
  transformDrv =
    let
      # Workaround to make the `lib.extendDerivation`-based disabled functionality
      # respect `<pkg>.overrideAttrs`
      # It doesn't cover `<pkg>.<output>.overrideAttrs`.
      disablePythonPackage =
        drv:
        extendDerivation (
          drv.disabled
          -> throw "${removePrefix namePrefix drv.name} not supported for interpreter ${python.executable}"
    ) { } (toPythonModule drv);
        ) { } drv
        // {
          overrideAttrs = fdrv: disablePythonPackage (drv.overrideAttrs fdrv);
        };
    in
    drv: disablePythonPackage (toPythonModule drv);

in
transformDrv self