9 buildPythonPackage rec {
10 pname = "python-snap7";
12 format = "setuptools";
14 disabled = pythonOlder "3.6";
16 src = fetchFromGitHub {
18 repo = "python-snap7";
19 rev = "refs/tags/${version}";
20 hash = "sha256-90WwgqPHsHbuQUY49cSQblN1jfoLydiG0dm1aMF/NCA=";
23 propagatedBuildInputs = [
28 substituteInPlace snap7/common.py \
29 --replace "lib_location = None" "lib_location = '${snap7}/lib/libsnap7.so'"
32 # Tests require root privileges to open privilaged ports
35 pythonImportsCheck = [
41 description = "Python wrapper for the snap7 PLC communication library";
42 homepage = "https://github.com/gijzelaerr/python-snap7";
43 license = licenses.mit;
44 maintainers = with maintainers; [ freezeboy ];