this build.nix provided by a saint was the fix where overrideAttrs is used to override the optional-dependencies and then using it as well as just skipping the build time dep check with pypaBuildFlags:
# this nix expression fetches the heckman feature branch but pulled onto the 0.14.1 release
{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/refs/tags/23.11.tar.gz") { }
}:
pkgs.python3Packages.buildPythonPackage {
pname = "statsmodels";
version = "0.14.1";
src = pkgs.fetchgit {
url = "https://codeberg.org/lotta/heckman.rebase.statsmodels.0_14_1";
# ref = "main";
rev = "f6a51a72558a51f5cb4dcbd8821c71b37a12941f";
deepClone = true;
sha256 = "sha256-pShKeZ3eQg1QKP3QlRZdjs4ITfZ2/JBqrlj43efrsMs=";
};
nativeBuildInputs = [ pkgs.python3Packages.pip pkgs.git ];
propagatedBuildInputs = with pkgs.python3Packages; [
setuptools
packaging
cython
numpy
scipy
setuptools-scm
(setuptools-scm.overrideAttrs (final: super: { passthru.optional-dependencies.toml = [tomli]; })).optional-dependencies.toml
oldest-supported-numpy
];
pypaBuildFlags = ["--skip-dependency-check"];
pyproject = true;
meta = with pkgs.lib; {
description = "rebase of the outstanding pr adding a heckman model on top of the 0.14.1 release of statsmodels.";
license = licenses.bsd3;
};
}