10 buildPythonPackage rec {
11 pname = "python-snap7";
15 disabled = pythonOlder "3.6";
17 src = fetchFromGitHub {
19 repo = "python-snap7";
20 rev = "refs/tags/${version}";
21 hash = "sha256-CqLG5/U2k7WdZL5LfcFAnV1Q8HcIU7l36gi51lgB39s=";
25 substituteInPlace snap7/common.py \
26 --replace "lib_location = None" "lib_location = '${snap7}/lib/libsnap7.so'"
29 build-system = [ setuptools ];
31 # Tests require root privileges to open privileged ports
34 pythonImportsCheck = [
40 description = "Python wrapper for the snap7 PLC communication library";
41 mainProgram = "snap7-server";
42 homepage = "https://github.com/gijzelaerr/python-snap7";
43 license = licenses.mit;
44 maintainers = with maintainers; [ freezeboy ];