Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 30fce6f31b6f
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 92212a59df51
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Apr 28, 2020

  1. Verified

    This commit was signed with the committer’s verified signature.
    Doctor-wu Doctor Wu
    Copy the full SHA
    92212a5 View commit details
Showing with 42 additions and 0 deletions.
  1. +38 −0 pkgs/development/python-modules/pylibftdi/default.nix
  2. +4 −0 pkgs/top-level/python-packages.nix
38 changes: 38 additions & 0 deletions pkgs/development/python-modules/pylibftdi/default.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
}
4 changes: 4 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
@@ -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 { };