mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-06 01:31:39 -05:00
overrides.cffi: Fix cross
This commit is contained in:
parent
ba1107f46b
commit
30e1dc364c
1 changed files with 9 additions and 1 deletions
|
@ -6,6 +6,7 @@
|
||||||
self: super:
|
self: super:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
inherit (self.python) stdenv;
|
||||||
|
|
||||||
addFlit =
|
addFlit =
|
||||||
{ drv
|
{ drv
|
||||||
|
@ -177,8 +178,15 @@ in
|
||||||
(
|
(
|
||||||
super.cffi.overridePythonAttrs (
|
super.cffi.overridePythonAttrs (
|
||||||
old: {
|
old: {
|
||||||
nativeBuildInputs = old.nativeBuildInputs or [ ] ++ [ pkgs.pkg-config ];
|
nativeBuildInputs = old.nativeBuildInputs or [ ] ++ [ pkgs.buildPackages.pkg-config ];
|
||||||
buildInputs = old.buildInputs or [ ] ++ [ pkgs.libffi ];
|
buildInputs = old.buildInputs or [ ] ++ [ pkgs.libffi ];
|
||||||
|
prePatch = (old.prePatch or "") + lib.optionalString stdenv.isDarwin ''
|
||||||
|
# Remove setup.py impurities
|
||||||
|
substituteInPlace setup.py --replace "'-iwithsysroot/usr/include/ffi'" ""
|
||||||
|
substituteInPlace setup.py --replace "'/usr/include/ffi'," ""
|
||||||
|
substituteInPlace setup.py --replace '/usr/include/libffi' '${lib.getDev pkgs.libffi}/include'
|
||||||
|
'';
|
||||||
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Reference in a new issue