Merge pull request #99479 from JamieMagee/pyads

pythonPackages.pyads: init at 3.2.2
This commit is contained in:
Martin Weinelt 2020-10-03 22:01:01 +02:00 committed by GitHub
commit 98d2d8cfbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 60 additions and 1 deletions

View File

@ -0,0 +1,25 @@
{ lib, stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "adslib";
version = "unstable-2020-08-28";
src = fetchFromGitHub {
owner = "stlehmann";
repo = "ADS";
rev = "c457b60d61d73325837ca50be2cc997c4792d481";
sha256 = "11r86xa8fr4z957hd0abn8x7182nz30a198d02y7gzpbhpi3z43k";
};
installPhase = ''
mkdir -p $out/lib
cp adslib.so $out/lib/adslib.so
'';
meta = with lib; {
description = "Beckhoff protocol to communicate with TwinCAT devices";
homepage = "https://github.com/stlehmann/ADS";
license = licenses.mit;
maintainers = with maintainers; [ jamiemagee ];
};
}

View File

@ -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 ];
};
}

View File

@ -10,7 +10,7 @@
"acmeda" = ps: with ps; [ ]; # missing inputs: aiopulse
"actiontec" = ps: with ps; [ ];
"adguard" = ps: with ps; [ adguardhome ];
"ads" = ps: with ps; [ ]; # missing inputs: pyads
"ads" = ps: with ps; [ pyads ];
"aftership" = ps: with ps; [ ]; # missing inputs: pyaftership
"agent_dvr" = ps: with ps; [ ]; # missing inputs: agent-py
"air_quality" = ps: with ps; [ ];

View File

@ -11830,6 +11830,8 @@ in
adns = callPackage ../development/libraries/adns { };
adslib = callPackage ../development/libraries/adslib { };
afflib = callPackage ../development/libraries/afflib { };
aften = callPackage ../development/libraries/aften { };

View File

@ -4728,6 +4728,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 { };