10 buildPythonPackage rec {
11 pname = "python-snap7";
13 format = "setuptools";
15 disabled = pythonOlder "3.6";
17 src = fetchFromGitHub {
19 repo = "python-snap7";
20 rev = "refs/tags/${version}";
21 hash = "sha256-90WwgqPHsHbuQUY49cSQblN1jfoLydiG0dm1aMF/NCA=";
24 propagatedBuildInputs = [ setuptools ];
27 substituteInPlace snap7/common.py \
28 --replace "lib_location = None" "lib_location = '${snap7}/lib/libsnap7.so'"
31 # Tests require root privileges to open privilaged 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 ];