python3Packages.mkPythonMetaPackage: init

This function exists create a meta package containing [metadata files](https://packaging.python.org/en/latest/specifications/recording-installed-packages/) to satisfy a dependency on a package, without it actually having been installed into the environment.
This commit is contained in:
adisbladis
2024-08-30 00:24:31 +12:00
parent ee2a36db7a
commit 8cd58c7e14
3 changed files with 74 additions and 0 deletions
@@ -61,6 +61,8 @@ let
removePythonPrefix = lib.removePrefix namePrefix;
mkPythonMetaPackage = callPackage ./meta-package.nix { };
# Convert derivation to a Python module.
toPythonModule = drv:
drv.overrideAttrs( oldAttrs: {
@@ -97,6 +99,7 @@ in {
inherit buildPythonPackage buildPythonApplication;
inherit hasPythonModule requiredPythonModules makePythonPath disabled disabledIf;
inherit toPythonModule toPythonApplication;
inherit mkPythonMetaPackage;
python = toPythonModule python;