1 { lib, buildPythonPackage, snap7, fetchFromGitHub, six, setuptools }:
3 buildPythonPackage rec {
4 pname = "python-snap7";
7 src = fetchFromGitHub {
10 rev = "899a94c6eeca76fb9b18afd5056e5003646d7f94";
11 sha256 = "169zd1nxq86nmi6132vxl1f6wxm9w3waihq2wn14kkmld1vkmvfd";
14 propagatedBuildInputs = [ setuptools six ];
17 substituteInPlace snap7/common.py \
18 --replace "lib_location = None" "lib_location = '${snap7}/lib/libsnap7.so'"
21 # Tests require root privileges to open privilaged ports
25 pythonImportsCheck = [
32 description = "Python wrapper for the snap7 PLC communication library ";
33 homepage = "https://github.com/gijzelaerr/python-snap7";
34 license = licenses.mit;
35 maintainers = with maintainers; [ freezeboy ];