Skip to content

Commit

Permalink
fix: build poetry packages using proper poetry python
Browse files Browse the repository at this point in the history
  • Loading branch information
elikoga committed Jan 10, 2025
1 parent 1068f0e commit f66ac17
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
3 changes: 2 additions & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,8 @@ lib.makeScope pkgs.newScope (self: {
final: _prev:
{
mkPoetryDep = final.callPackage ./mk-poetry-dep.nix {
inherit lib python poetryLib pep508Env pyVersion;
inherit lib poetryLib pep508Env pyVersion;
python = py;
inherit pyproject-nix;
};

Expand Down
24 changes: 15 additions & 9 deletions overrides/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,7 @@ lib.composeManyExtensions [
inherit (final) buildPythonPackage flit-core tomli;
};

wheel = bootstrappingBase.wheel.override {
inherit (final) buildPythonPackage flit-core;
};


inherit (bootstrappingBase) cython cython_0;
#### END bootstrapping pkgs
Expand Down Expand Up @@ -915,12 +913,12 @@ lib.composeManyExtensions [

uvicorn = prev.uvicorn.overridePythonAttrs (old: {
optional-dependencies.standard = [
prev.httptools
prev.python-dotenv
prev.pyyaml
prev.uvloop
prev.watchfiles
prev.websockets
prev.httptools
prev.python-dotenv
prev.pyyaml
prev.uvloop
prev.watchfiles
prev.websockets
];
});

Expand Down Expand Up @@ -4322,6 +4320,14 @@ lib.composeManyExtensions [
'';
});

wheel = prev.wheel.overridePythonAttrs (old: rec {
version = "0.45.1";
src = old.src.override (oldSrc: {
rev = "refs/tags/${version}";
hash = "sha256-tgueGEWByS5owdA5rhXGn3qh1Vtf0HGYC6+BHfrnGAs=";
});
});

marisa-trie = prev.marisa-trie.overridePythonAttrs (
old: {
buildInputs = old.buildInputs or [ ] ++ [ final.pytest-runner ];
Expand Down
4 changes: 0 additions & 4 deletions tests/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ in
let
pkgs' = pkgs // {
inherit poetry2nix;

# At the time of writing 3.12 is causing issues.
python3 = pkgs.python311;
python = pkgs.python311;
};

poetry2nix = import ./.. { pkgs = pkgs'; };
Expand Down

0 comments on commit f66ac17

Please sign in to comment.