Open gschwim opened 1 month ago
So the quick fix is to add preferWheel (or preferWheels).
As for building it with poetry2nix, we need an override. I have gotten a half working one - but now it seems that the argminmax crate used by polars needs nightly rust, and well my time budget here is exceed, so I'm dropping this non working override here.
polars = prev.polars.overridePythonAttrs (
old: {
cargoDeps = let
unpacked_src = pkgs.runCommand "polars-cargo-lock" {} ''
mkdir -p $out
cd $out && tar xf ${old.src} ${old.pname}-${old.version}/Cargo.lock --strip-components=1
'';
in
pkgs.rustPlatform.importCargoLock {
lockFile = "${unpacked_src}/Cargo.lock";
};
buildAndTestSubdir = "py-polars";
nativeBuildInputs = old.nativeBuildInputs or [ ] ++ [
pkgs.rustPlatform.cargoSetupHook
pkgs.rustPlatform.maturinBuildHook ];
}
);
edit: Though I don't know how useful the wheels for polars are.. they only seem to be available for python 3.8? edit2: never mind, they are tagged 'cp38', but also 'abi3' which means they work on any python3 version.
Describe the issue
In testing poetry2nix as a potential upgrade to my current workflow, I developed a simply application in attempt to get it to build with nix. The build works fine in poetry, however when building with poetry2nix it fails with the error
ModuleNotFoundError: No module named 'maturin'
Additional context
Found information about
preferWheels
in the edgecases.md file. Implementing this in mydefault.nix
does allow the build to complete. I'm reporting this as the edgecases file suggests you'd like to be informed about this issue.shell.nix
:default.nix
pyproject.toml
:poetry.lock
:Full output of the build attempt:
Thanks! GS