Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buildPython*: support fixed-point attributes #271387

Draft
wants to merge 15 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions doc/languages-frameworks/python.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,10 @@ are used in [`buildPythonPackage`](#buildpythonpackage-function).
with the `pipInstallHook`.
- `unittestCheckHook` will run tests with `python -m unittest discover`. See [example usage](#using-unittestcheckhook).

#### Overriding build helpers {#overriding-python-build-helpers}

Like most of the build helpers provided by Nixpkgs, most Python build helpers provide a `<function>.override` attributes. It works like [<pkg>.override](#sec-pkg-override), and can be used to override the dependencies of each build helper. Specifically, the `stdenv` used by `buildPythonPackage` and `buildPythonApplication`, which defaults to `python.stdenv`, can be overridden with `buildPythonPackage.override { stdenv = customStdenv; }` and `buildPythonApplication.override { stdenv = customStdenv; }`, respectively.

## User Guide {#user-guide}

### Using Python {#using-python}
Expand Down
3 changes: 3 additions & 0 deletions doc/redirects.json
Original file line number Diff line number Diff line change
Expand Up @@ -3406,6 +3406,9 @@
"buildpythonpackage-parameters": [
"index.html#buildpythonpackage-parameters"
],
"overriding-python-build-helpers": [
"index.html#overriding-python-build-helpers"
],
"overriding-python-packages": [
"index.html#overriding-python-packages"
],
Expand Down
19 changes: 9 additions & 10 deletions pkgs/by-name/py/pyspread/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,19 @@
}:

let
# get rid of rec
pname = "pyspread";
version = "2.3.1";
src = fetchPypi {
inherit pname version;
hash = "sha256-l6b02CIUqPnT16zqOWl6gDdAobkhiqBMFvT+R1Dvtek=";
};
inherit (libsForQt5)
qtsvg
wrapQtAppsHook
;
in
python3.pkgs.buildPythonApplication {
inherit pname version src;
python3.pkgs.buildPythonApplication (finalAttrs: {
pname = "pyspread";
version = "2.3.1";
src = fetchPypi {
pname = "pyspread";
inherit (finalAttrs) version;
hash = "sha256-vbBu/dMXQf14F7qWvyHX5T8/AkjeZhaQt1eQ6Nidpsc=";
};

nativeBuildInputs = [
copyDesktopItems
Expand Down Expand Up @@ -85,4 +84,4 @@ python3.pkgs.buildPythonApplication {
mainProgram = "pyspread";
maintainers = with lib.maintainers; [ AndersonTorres ];
};
}
})
Loading