From 80b336fc3a2347e892222df13549514a5b92ac63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Czy=C5=BC?= Date: Mon, 9 Dec 2024 00:02:14 +0100 Subject: [PATCH] README.md: be more specific withDefaults application order --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4c4acf797..b15f4764b 100644 --- a/README.md +++ b/README.md @@ -142,7 +142,7 @@ The _poetry2nix_ public API consists of the following attributes: - [mkPoetryScriptsPackage](#mkpoetryscriptspackage): Creates a package containing the scripts from `tool.poetry.scripts` of the `pyproject.toml`. - [mkPoetryEditablePackage](#mkpoetryeditablepackage): Creates a package containing editable sources. Changes in the specified paths will be reflected in an interactive nix-shell session without the need to restart it. - [defaultPoetryOverrides](#defaultpoetryoverrides): A set of bundled overrides fixing problems with Python packages. -- [overrides.withDefaults](#overrideswithdefaults): A convenience function for specifying overrides on top of the defaults. +- [overrides.withDefaults](#overrideswithdefaults): A convenience function for specifying overrides on top of the defaults (it applies user overrides and then applies defaults after). - [overrides.withoutDefaults](#overrideswithoutdefaults): A convenience function for specifying overrides without defaults. - [cleanPythonSources](#cleanpythonsources): A function to create a source filter for python projects. @@ -592,6 +592,15 @@ poetry2nix.mkPoetryApplication { } ``` +Please remember that `withDefaults` function, applies user overrides first, and than applies `defaults`. If you want to change package +that already is overriden by `defaults` you may need to do +``` + overrides = [ poetry2nix.defaultPoetryOverrides (self: super: { + # ... package overrides here ... + }) ]; +``` +which put your changes on top of defaults. + **Q.** I'm experiencing one of the following errors, what do I do? - ModuleNotFoundError: No module named 'setuptools'