pythonPackages: set mainProgram to pname by default

Calling `nix run poetry` or another python package usually fails
because of the "pythonX" prefix in name.
Adjust mainProgram to ignore that prefix.
launchpad/nixpkgs/master
Matthieu Coudron 3 years ago committed by Matthieu Coudron
parent 38a0226d57
commit baf91ea7d9
  1. 2
      pkgs/development/interpreters/python/mk-python-derivation.nix

@ -176,6 +176,8 @@ let
# default to python's platforms
platforms = python.meta.platforms;
isBuildPythonPackage = python.meta.platforms;
} // lib.optionalAttrs (attrs?pname) {
mainProgram = attrs.pname;
} // meta;
} // lib.optionalAttrs (attrs?checkPhase) {
# If given use the specified checkPhase, otherwise use the setup hook.

Loading…
Cancel
Save