From f2cb43449c4188f82ff6e172c85063ae6789fe1c Mon Sep 17 00:00:00 2001 From: Jamie Magee Date: Sat, 3 Oct 2020 16:11:13 +0200 Subject: [PATCH] pythonPackages.pyads: init at 3.2.2 --- .../python-modules/pyads/default.nix | 30 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/development/python-modules/pyads/default.nix diff --git a/pkgs/development/python-modules/pyads/default.nix b/pkgs/development/python-modules/pyads/default.nix new file mode 100644 index 000000000000..37d3b31a365c --- /dev/null +++ b/pkgs/development/python-modules/pyads/default.nix @@ -0,0 +1,30 @@ +{ adslib, buildPythonPackage, fetchFromGitHub, lib, pytestCheckHook, pytest +, pytestcov, pythonOlder }: + +buildPythonPackage rec { + pname = "pyads"; + version = "3.2.2"; + + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "stlehmann"; + repo = pname; + rev = version; + sha256 = "1jd727pw0z73y4xhrykqkfcz1acrpy3rks58lr1y4yilfv11p6jb"; + }; + + buildInputs = [ adslib ]; + patchPhase = '' + substituteInPlace pyads/pyads_ex.py \ + --replace "ctypes.CDLL(adslib)" "ctypes.CDLL(\"${adslib}/lib/adslib.so\")" + ''; + checkInputs = [ pytestCheckHook pytest pytestcov ]; + + meta = with lib; { + description = "Python wrapper for TwinCAT ADS library"; + homepage = "https://github.com/MrLeeh/pyads"; + license = licenses.mit; + maintainers = with maintainers; [ jamiemagee ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a3643200d1ee..6b757b20c3b4 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4722,6 +4722,8 @@ in { pyacoustid = callPackage ../development/python-modules/pyacoustid { }; + pyads = callPackage ../development/python-modules/pyads { }; + pyaes = callPackage ../development/python-modules/pyaes { }; pyairvisual = callPackage ../development/python-modules/pyairvisual { };