3
0
Fork 0
forked from mirrors/nixpkgs

pythonPackages.pylibftdi: init at 0.18.1 (#71286)

This commit is contained in:
matthuszagh 2020-04-28 13:49:19 -07:00 committed by GitHub
parent 30fce6f31b
commit 92212a59df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 42 additions and 0 deletions

View file

@ -0,0 +1,38 @@
{ lib
, buildPythonPackage
, fetchPypi
, httpserver
, libftdi1
, libusb1
}:
buildPythonPackage rec {
pname = "pylibftdi";
version = "0.18.1";
src = fetchPypi {
inherit pname version;
sha256 = "17c5h4xz1grynbpffngjflk3dlw2g2zbhkwb7h5v4n9rjdv41l5x";
};
propagatedBuildInputs = [
httpserver
libftdi1
libusb1
];
postPatch = ''
substituteInPlace pylibftdi/driver.py \
--replace "self._load_library('libusb')" "cdll.LoadLibrary('${libusb1.out}/lib/libusb1.so')" \
--replace "self._load_library('libftdi')" "cdll.LoadLibrary('${libftdi1.out}/lib/libftdi1.so')"
'';
pythonImportsCheck = [ "pylibftdi" ];
meta = with lib; {
homepage = "https://bitbucket.org/codedstructure/pylibftdi/src/default/";
description = "Minimal pythonic wrapper to Intra2net's libftdi driver for FTDI's USB devices";
license = licenses.mit;
maintainers = with maintainers; [ matthuszagh ];
};
}

View file

@ -1222,6 +1222,10 @@ in {
pylev = callPackage ../development/python-modules/pylev { };
pylibftdi = callPackage ../development/python-modules/pylibftdi {
inherit (pkgs) libusb1;
};
pymatgen = callPackage ../development/python-modules/pymatgen { };
pymatgen-lammps = callPackage ../development/python-modules/pymatgen-lammps { };