* fetchPipMetadata: set meta.mainProgram
* fetchPipMetadata: deduplicate test fixtures
* fetchPipMetadata: add is_direct to lock file
* devShell: proof of concept
* python-local-development: add editables example
* devshell: simplify editables interface
* buildPythonPackage: remove editable option again
* devshell: use findRoot for editables
* devshell: add support for .whl sources
* devshell: avoid polluting the shells environment
* devshell: make editable.nix flatter
because there's only 1 attr left now
* devshell: fix pyEnv by filtering editables
from the environment.
* devshell: skip existing editables
* devshell: remove patched pyEnv, rewrite sys.path
* devshell: add special case for root package
* python-local-development: improve editable example
* python-local-development: filter source
* devshell: reset site_dir on each load
* pip: don't ignoreCollisions in pyEnv
* pip: default to no sitecustomize.py...
and teach the devshell how to load it
* pip: rewrite editable in python
* editable: use shutil.copytree
* editable: refactor into functions
* editables: add suport for console_scripts
* improve pip editables interface
- change editables interface to use bool or path
- expose public.shellHook for composition
- use shellHook by default in public.devShell
- extend example to include a script
* improve edtiable support:
- remove dependency on root package build
- always set root package as editable by default
- compute dit-info dir by calling a packages build backend or extracting directly from the wheel
- only pass required sources to editables shell hook
- add build inputs of all editables to teh dev shell
- move editables state to .dream2nix/python to remove likelyhood of collision with other ecosystems state
- delete editables state if editables configuration changed
* refine python editable support:
- never copy dependency sources
- force user to specify a local path
---------
Co-authored-by: DavHau <hsngrmpf+github@gmail.com>
https://github.com/NixOS/nixpkgs/pull/271597 implemented a new format for python packages that is starting to get traction in nixpkgs/unstable (soon to become NixOS 24.05).
That is a progress towards https://github.com/NixOS/nixpkgs/issues/272178, which would be a massive improvement for dream2nix once completed.
This first step just makes sure that `buildPythonPackage` supports the new arguments properly. Without this change, many dream2nix python derivations fail to build on nixos-unstable right now.
Probably other python auto-builders should leverage these new options when available for the d2n user. That can be added later.
@moduon MT-1075
mkDerivation should be minimal, but currently it always pulls in modules like `lock` and `paths` etc. despite those not being needed for many instances, like when mkDerivation is imported by a dependency.
Modules like pip which do need some of these core modules, now need to directly depend on them.
This will remove a bunch of unneeded options which currently pollute the manual.
The remaining core dependencies of mkDerivation are now: deps, env, ui
The most important feature of the groups module was the overriding which is a separate module now. Therefore removing the fact that groups are used from the docs to decrease the API surface to maintain.
Instead render the override and overrideAll options in the manual of pdm correctly by setting `overrideType`.
Add options `overrides.${name}` and `overrideAll` to all language modules that manage a dependency tree.
This is done in a backward compatible fashion. Old options for overriding dependencies continue working, though those are not displayed in the manual anymore.
For the following modules the manual now suggest using the new unified override options:
- for pip: use `pip.overrides` and `pip.overrideAll` instead of `pip.drvs`
- for nodejs-granular-v3: use `nodejs-granular-v3.overrides` and `nodejs-granular-v3.overrideAll` instead of `nodejs-granular-v3.deps`
- `php-granular`: use `php-granular.override` and `php-granular.overrideAll` instead of `php-granular.deps`
Move some barely used modules to the experimental section to reduce surface.
Instead of the separate dev-shell module the nodejs package should have a devShell subattribute.
previously the options of other imported modules were not shown which gave an incomplete picture. For example the docs page for the `pip` module did not show the options prefixed with `mkDerivation` which are accepted and needed by the pip module.
It's better to have everything on one page for each module.
- don't import eval-cache and flags modules by default (those have never been used so far)
- mark options of package-func as internal. Those are for maintainers only and don't need to be rendered by default
- name example more consistently, eg. `{language}-packaging-{feature}` or `{language}-local-development-{feature}`
- move some examples to the modules integration tests directory instead as their purpose was mainly testing and they weren't good example
- module owned checks: import via flake if available
I always forget how to get going with dream2nix, and while this
page doesn't contain much more than you'd already find in the
examples, I do think it's a good starting point for allowing
people to start more confidently.