forked from mirrors/nixpkgs
pythonPackages.pylibftdi: init at 0.18.1 (#71286)
This commit is contained in:
parent
30fce6f31b
commit
92212a59df
38
pkgs/development/python-modules/pylibftdi/default.nix
Normal file
38
pkgs/development/python-modules/pylibftdi/default.nix
Normal 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 ];
|
||||
};
|
||||
}
|
|
@ -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 { };
|
||||
|
|
Loading…
Reference in a new issue