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

python2Packages.buildPythonPackage: handle passthru with mkDerivation

Port to python2/mk-python-derivation.nix commit 21a1cf96
("mkPythonPackage, mkPythonApplication:
handle passthru with mkDerivation").
parent 18ab0dce
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -272,6 +272,15 @@ let

        outputs = outputs ++ lib.optional withDistOutput "dist";

        passthru.updateScript =
          let
            filename = builtins.head (lib.splitString ":" self.meta.position);
          in
          attrs.passthru.updateScript or [
            update-python-libraries
            filename
          ];

        meta = {
          # default to python's platforms
          platforms = python.meta.platforms;
@@ -289,16 +298,7 @@ let
      }
    )
  );

  passthru.updateScript =
    let
      filename = builtins.head (lib.splitString ":" self.meta.position);
    in
    attrs.passthru.updateScript or [
      update-python-libraries
      filename
    ];
in
lib.extendDerivation (
  disabled -> throw "${name} not supported for interpreter ${python.executable}"
) passthru self
) { } self