Loading pkgs/development/python-modules/pyads/default.nix +18 −5 Original line number Diff line number Diff line { lib, stdenv, adslib, buildPythonPackage, fetchFromGitHub, Loading @@ -9,27 +10,39 @@ buildPythonPackage rec { pname = "pyads"; version = "3.5.1"; version = "3.5.2"; pyproject = true; src = fetchFromGitHub { owner = "stlehmann"; repo = "pyads"; tag = version; hash = "sha256-Uh8QS9l0O1UCOM03eZ3Wo8aohgUxSbErRX2/zEUP10k="; hash = "sha256-mXWLVWzgdWIDpzfBLITLz5olhitkcp/QDrlFj2YMYLw="; }; build-system = [ setuptools ]; buildInputs = [ adslib ]; patchPhase = '' substituteInPlace pyads/pyads_ex.py \ --replace-fail "ctypes.CDLL(adslib)" "ctypes.CDLL(\"${adslib}/lib/adslib.so\")" postPatch = '' # Skip compilation of bundled adslib - we provide it as a separate nix package substituteInPlace setup.py \ --replace-fail \ 'return sys.platform.startswith("linux") or sys.platform.startswith("darwin")' \ 'return False' # Load adslib from nix store instead of searching sys.path substituteInPlace src/pyads/pyads_ex.py \ --replace-fail \ 'ctypes.CDLL(adslib_path)' \ 'ctypes.CDLL("${lib.getLib adslib}/lib/adslib.so")' ''; nativeCheckInputs = [ pytestCheckHook ]; # Test suite has port reuse races and UDP timing issues on darwin doCheck = !stdenv.hostPlatform.isDarwin; pythonImportsCheck = [ "pyads" ]; meta = { Loading Loading
pkgs/development/python-modules/pyads/default.nix +18 −5 Original line number Diff line number Diff line { lib, stdenv, adslib, buildPythonPackage, fetchFromGitHub, Loading @@ -9,27 +10,39 @@ buildPythonPackage rec { pname = "pyads"; version = "3.5.1"; version = "3.5.2"; pyproject = true; src = fetchFromGitHub { owner = "stlehmann"; repo = "pyads"; tag = version; hash = "sha256-Uh8QS9l0O1UCOM03eZ3Wo8aohgUxSbErRX2/zEUP10k="; hash = "sha256-mXWLVWzgdWIDpzfBLITLz5olhitkcp/QDrlFj2YMYLw="; }; build-system = [ setuptools ]; buildInputs = [ adslib ]; patchPhase = '' substituteInPlace pyads/pyads_ex.py \ --replace-fail "ctypes.CDLL(adslib)" "ctypes.CDLL(\"${adslib}/lib/adslib.so\")" postPatch = '' # Skip compilation of bundled adslib - we provide it as a separate nix package substituteInPlace setup.py \ --replace-fail \ 'return sys.platform.startswith("linux") or sys.platform.startswith("darwin")' \ 'return False' # Load adslib from nix store instead of searching sys.path substituteInPlace src/pyads/pyads_ex.py \ --replace-fail \ 'ctypes.CDLL(adslib_path)' \ 'ctypes.CDLL("${lib.getLib adslib}/lib/adslib.so")' ''; nativeCheckInputs = [ pytestCheckHook ]; # Test suite has port reuse races and UDP timing issues on darwin doCheck = !stdenv.hostPlatform.isDarwin; pythonImportsCheck = [ "pyads" ]; meta = { Loading