pythonPackages: ensure all derivations provide python modules
This adds a test to ensure no new uses of `buildPythonApplication` can be added to `python-packages.nix`. Python packages can be grouped into two groups: 1) applications and 2) packages providing importable modules. In `python-packages.nix` we only want to have 2). 1) should be in the top-level package set. To achieve this, all setup hooks need to be marked as being a setup hook. For the setup hooks in the Python packages set this is done by creating a new builder, `makePythonHook`. Because there were issues with splicing, the file importing all the hooks is converted to an extension. All non-packages were moved out of `python-packages.nix` into `python-packages-base.nix`. The `keep` argument to `makeScopeWithSplicing was cleaned up as well; there is no need to keep this one manually in sync reducing the risk of breaking cross-compilation.
This commit is contained in:
committed by
Frederik Rietdijk
parent
99bcead8dd
commit
33d12e5f0b
@@ -1,11 +1,11 @@
|
||||
{ lib
|
||||
, python
|
||||
, makeSetupHook
|
||||
, makePythonHook
|
||||
, makeWrapper }:
|
||||
|
||||
with lib;
|
||||
|
||||
makeSetupHook {
|
||||
makePythonHook {
|
||||
deps = makeWrapper;
|
||||
substitutions.sitePackages = python.sitePackages;
|
||||
substitutions.executable = python.interpreter;
|
||||
|
||||
Reference in New Issue
Block a user