git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commitbaf91ea7d9ffab6d1f95395b7c2f724a2e349698 authorMatthieu Coudron <mcoudron@hotmail.com> dateWed 9 Jun 2021, 23:56 (5 years ago) parent38a0226
1 file changed+2
pkgs/development/interpreters/python/mk-python-derivation.nix+2
pkgs/development/interpreters/python/mk-python-derivation.nix+2
@@ -176,6 +176,8 @@ let
176176 # default to python's platforms
177177 platforms = python.meta.platforms;
178178 isBuildPythonPackage = python.meta.platforms;
179+ } // lib.optionalAttrs (attrs?pname) {
180+ mainProgram = attrs.pname;
179181 } // meta;
180182 } // lib.optionalAttrs (attrs?checkPhase) {
181183 # If given use the specified checkPhase, otherwise use the setup hook.