Commit Graph

271 Commits

Author SHA1 Message Date
DavHau
d639e70caf reference website: categorize into released/experimental/internal 2024-07-11 14:41:18 +00:00
Travis A. Everett
d887642ae7 pdm: support additional index/source URLs
pdm supports extra indexes in tool.pdm.source blocks and we can also
pass a list of urls to fetchFromLegacy, so this aggregates URLs from
the source blocks and passes them.

I think this will unblock simple cases like getting a package that is
not on pypi.org from some other index, but I imagine that there are
more complex cases that will require refining this support.
2024-07-09 15:58:14 +02:00
Paul Haerle
c674abab6d
Drop mitmproxy, pypiSnapshotDate (#1011)
* drop mitm-proxy & pypi snapshot date

* add warning if pypiSnapshotDate is used

* tree-wide: remove pypiSnapshotDate

* pip/tests/packages: support all platforms

* re-lock examples

* apache-airflow: fix override after re-lock

* pip/tests: remove other platforms again

...don't want to maintain 4 lock files per test
2024-07-09 15:51:13 +07:00
phaer
faf08c4c44 WIP-spago: fix build on darwin 2024-06-28 22:52:01 +02:00
phaer
72d2689551 WIP-spago: remove breakpointHook 2024-06-28 21:05:33 +02:00
phaer
42282329b0 tree-wide: make examples eval on all platforms...
all 4 default platforms of nixpkgs that is.
2024-06-28 21:05:33 +02:00
phaer
9c38c4fe41 fix default for format/pyproject in pip and pdm 2024-06-27 12:41:00 +02:00
phaer
1dda463e0b pdm: remove config.deps.python
because the default from buildPythonPackage already says
config.deps.python = pkgs.python3
2024-06-27 12:26:08 +02:00
phaer
97d181ccd8 treewide: format = "pyproject" -> pyproject = true
It's important to get the default in our PDM module fixed,
because upstream documentation recommends using pyproject = true;
and ships an assertion assertion '((pyproject != null) -> (format ==
null))' that fails with the current default in pdm.
2024-06-27 12:26:08 +02:00
Paul Haerle
5423ffd502
Merge branch 'main' into yorickvp/pkgs-fetchurl 2024-06-27 11:18:30 +02:00
DavHau
ef04683222 fix: nix flake show requiring IFD 2024-06-27 08:24:28 +00:00
phaer
35e13f912a docs/buildPythonPackage: reformat 2024-06-26 19:05:13 +02:00
phaer
00ccd3da76 docs/pip: Add intro to README 2024-06-26 19:05:13 +02:00
Paul Haerle
a7ebf95ad4
Merge branch 'main' into docs 2024-06-26 19:01:47 +02:00
purepani
cbe72c89ba
python-editables: Exports environment variables for python whether
.dream2nix needs updating or not (editables.py)
2024-06-23 15:20:56 -05:00
phaer
2bf5e20f23 docs: add note regarding upstream PR
for mkdocs-awesome-pages-plugin
2024-06-18 10:46:46 +02:00
phaer
361f402625 docs: s/reference(Docs)?/optionsReference/ 2024-06-14 14:27:49 +02:00
phaer
ea02037ba9 docs: force symlinks for src/reference 2024-06-14 13:40:08 +02:00
phaer
a35e43c84c docs: add missing readmes
(auto generated)
2024-06-13 15:47:32 +02:00
phaer
9dba824ae8 docs: add reference header 2024-06-13 15:47:07 +02:00
Yorick van Pelt
54f0cdc35d
pip: use pkgs.fetchurl instead of builtins.fetchurl
This resolves
error: store path 'nypj2b7h41zsrmyfsiww97zb6va445gn-torch-2.0.1%2Bcpu-cp310-cp310-linux_x86_64.whl' contains illegal character '%'
2024-06-13 14:32:07 +02:00
phaer
c67109b0f1 docs: add devShell hook 2024-06-13 13:37:45 +02:00
phaer
5c6e0e5e9a docs: add mkdocs-awesome-pages-plugin 2024-06-13 13:06:22 +02:00
phaer
6ff41abd61 docs: fix devshell 2024-06-13 11:54:11 +02:00
phaer
bb4b27886f add render_options hook 2024-06-11 19:08:00 +02:00
phaer
42ff2e8d4d move dreamDocs out of docs dir
to reduce unecessary rebuilds
2024-06-11 19:08:00 +02:00
phaer
7cb146701a add mkdocs-based docs site 2024-06-11 19:05:26 +02:00
purepani
478b26af7a
pdm: Adds editables to pdm 2024-06-11 11:12:03 -05:00
purepani
0a17d6a101
pip: Factors python editables into separate module 2024-06-11 11:11:20 -05:00
Paul Haerle
d872284158
Merge branch 'main' into python-pyproject-format 2024-05-23 11:48:48 +02:00
Paul Haerle
6a169a73bd
Python DevShells (for pip) (#951)
* 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>
2024-05-17 01:00:09 +02:00
Jairo Llopis
4cd8cbdb20 feat(buildPythonPackage): support new pyproject format
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
2024-05-13 09:40:15 +01:00
Peter Ferenczy
32aa32d397 fmt 2024-04-28 21:46:53 +07:00
Peter Ferenczy
62c6361657 mkDefault 2024-04-28 21:46:53 +07:00
Peter Ferenczy
3e4cd42a9f add rsync to nodejs-devshell-v3 2024-04-28 21:46:53 +07:00
purepani
babb6e3b69 python/pdm: Changes deps.python3 refs to deps.python 2024-04-28 13:18:00 +07:00
phaer
c5cfd416ab core.lock: Add missing coreutils dependency...
otherwise we implictly assume realpath to already
be in $PATH which isn't always the case, i.e. on older
macOS releases.
2024-04-15 19:30:05 +07:00
phaer
d3f8dbfc79 fix typo 2024-04-15 19:30:05 +07:00
shivaraj-bh
49f14262e3 WIP-python-pdm: add public.pyEnv; reuse public.pyEnv in public.devShell 2024-04-08 18:24:01 +07:00
DavHau
2fc4ef33cc docs: overhaul reference documentation pipeline
- use nixosOptionsDoc commonMark output
- simplify a lot of things
- redesign towards a future generic standalon nixosOptionsWebsite function
2024-04-05 19:42:14 +07:00
lbodor
26a6c3a340 WIP-haskell-cabal: fetch correct cabal revisions
Fetch cabal revisions from `https://hackage.haskell.org/package/{name}-{version}/revisions/`, rather
than `https://hackage.haskell.org/package/{name}/revisions/`, which fetches revisions for the latest
package version, not the version pinned in `./dist-newstyle/cache/plan.json`.
2024-03-29 03:56:14 +00:00
purepani
4710341e67 python/pdm: Fixes order of build inputs in devShell so that the path to
path to the interpreter is correct.
2024-03-29 02:50:26 +00:00
DavHau
6ddb9a7f5e override/python: fix devShells for nvidia packages 2024-03-26 05:53:26 +00:00
DavHau
306e5bff07 pythonEnv: init
Add experimental one-liner command to create python environments.

```command
$ nix run github:nix-community/dream2nix#__pythonEnv requests whisper-ctranslate2
...

$ python -c "import requests; print('imported requests')"
imported requests

$ whisper-ctranslate2 --version
whisper-ctranslate2 0.4.1
```
2024-03-26 05:03:45 +00:00
Robert Hensing
d623e6ec21 mkDerivation: fix typo in checkFlags 2024-03-22 21:02:23 +07:00
DavHau
f017de2de4 mkDerivation: stop depending on all core modules
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
2024-03-18 11:15:30 +00:00
DavHau
f15cc37662 mkDerivation/builtins-derivation: refactor: implementation.nix -> default.nix 2024-03-17 22:55:10 +07:00
DavHau
6bbac51494 python/pdm: hide groups as implementation detail
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`.
2024-03-17 15:48:07 +00:00
DavHau
41a1973ed3 groups: remove options overrides and overrideAll
...since those are now managed by the dedicated overrides module
2024-03-17 14:37:33 +00:00
DavHau
86e4b94689 docs/overrides: explain how to find options 2024-03-17 14:34:12 +00:00