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:
@@ -361,6 +361,19 @@ modifications.
|
||||
|
||||
Do pay attention to passing in the right Python version!
|
||||
|
||||
#### `mkPythonMetaPackage` function {#mkpythonmetapackage-function}
|
||||
|
||||
This will 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.
|
||||
In nixpkgs this is used to package Python packages with split binary/source distributions such as [psycopg2](https://pypi.org/project/psycopg2/)/[psycopg2-binary](https://pypi.org/project/psycopg2-binary/).
|
||||
|
||||
```nix
|
||||
mkPythonMetaPackage {
|
||||
pname = "pscycopg2-binary";
|
||||
inherit (psycopg2) optional-dependencies version meta;
|
||||
dependencies = [ psycopg2 ];
|
||||
}
|
||||
```
|
||||
|
||||
#### `python.buildEnv` function {#python.buildenv-function}
|
||||
|
||||
Python environments can be created using the low-level `pkgs.buildEnv` function.
|
||||
|
||||
Reference in New Issue
Block a user