python310Packages.unrardll: fix build on darwin
This commit is contained in:
parent
a989aa4619
commit
a6137e79b6
@ -1,4 +1,4 @@
|
||||
{ lib, buildPythonPackage, fetchPypi, unrar }:
|
||||
{ lib, stdenv, buildPythonPackage, fetchPypi, unrar }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "unrardll";
|
||||
@ -11,6 +11,13 @@ buildPythonPackage rec {
|
||||
|
||||
buildInputs = [ unrar ];
|
||||
|
||||
NIX_CFLAGS_LINK = lib.optionalString stdenv.isDarwin "-headerpad_max_install_names";
|
||||
|
||||
postInstall = lib.optionalString stdenv.isDarwin ''
|
||||
install_name_tool -change libunrar.so ${unrar}/lib/libunrar.so $out/lib/python*/site-packages/unrardll/unrar.*-darwin.so
|
||||
install_name_tool -change libunrar.so ${unrar}/lib/libunrar.so build/lib.*/unrardll/unrar.*-darwin.so
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "unrardll" ];
|
||||
|
||||
meta = with lib; {
|
||||
|
Loading…
Reference in New Issue
Block a user