pythonPackages: remove with lib;

This commit is contained in:
Sandro Jäckel 2022-03-29 19:31:06 +02:00
parent 72dab1fa30
commit 32263223db
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5

View File

@ -12,8 +12,6 @@
, python
}:
with lib;
self:
let
@ -40,12 +38,12 @@ let
}
else ff;
buildPythonPackage = makeOverridablePythonPackage ( makeOverridable (callPackage ../development/interpreters/python/mk-python-derivation.nix {
buildPythonPackage = makeOverridablePythonPackage (lib.makeOverridable (callPackage ../development/interpreters/python/mk-python-derivation.nix {
inherit namePrefix; # We want Python libraries to be named like e.g. "python3.6-${name}"
inherit toPythonModule; # Libraries provide modules
}));
buildPythonApplication = makeOverridablePythonPackage ( makeOverridable (callPackage ../development/interpreters/python/mk-python-derivation.nix {
buildPythonApplication = makeOverridablePythonPackage (lib.makeOverridable (callPackage ../development/interpreters/python/mk-python-derivation.nix {
namePrefix = ""; # Python applications should not have any prefix
toPythonModule = x: x; # Application does not provide modules.
}));
@ -60,8 +58,8 @@ let
# Get list of required Python modules given a list of derivations.
requiredPythonModules = drvs: let
modules = filter hasPythonModule drvs;
in unique ([python] ++ modules ++ concatLists (catAttrs "requiredPythonModules" modules));
modules = lib.filter hasPythonModule drvs;
in lib.unique ([python] ++ modules ++ lib.concatLists (lib.catAttrs "requiredPythonModules" modules));
# Create a PYTHONPATH from a list of derivations. This function recurses into the items to find derivations
# providing Python modules.
@ -4654,7 +4652,7 @@ in {
inherit (pkgs) lzfse;
};
libmodulemd = pipe pkgs.libmodulemd [
libmodulemd = lib.pipe pkgs.libmodulemd [
toPythonModule
(p:
p.overrideAttrs (super: {
@ -4679,7 +4677,7 @@ in {
libpyvivotek = callPackage ../development/python-modules/libpyvivotek { };
libpwquality = pipe pkgs.libpwquality [
libpwquality = lib.pipe pkgs.libpwquality [
toPythonModule
(p: p.overrideAttrs (super: { meta = super.meta // { outputsToInstall = [ "py" ]; }; }))
(p: p.override { enablePython = true; inherit python; })
@ -4691,7 +4689,7 @@ in {
inherit (self) python libxml2;
});
librepo = pipe pkgs.librepo [
librepo = lib.pipe pkgs.librepo [
toPythonModule
(p: p.overrideAttrs (super: { meta = super.meta // { outputsToInstall = [ "py" ]; }; }))
(p: p.override { inherit python; })
@ -4708,7 +4706,7 @@ in {
libsavitar = callPackage ../development/python-modules/libsavitar { };
libselinux = pipe pkgs.libselinux [
libselinux = lib.pipe pkgs.libselinux [
toPythonModule
(p:
p.overrideAttrs (super: {