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: 500c13ed4650
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b24d5e48b9a3
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Jun 23, 2019

  1. Copy the full SHA
    2933681 View commit details

Commits on Jun 24, 2019

  1. Merge pull request #63695 from arcnmx/python-hidapi-darwin

    pythonPackages.hidapi: enable on darwin
    matthewbauer authored Jun 24, 2019
    Copy the full SHA
    b24d5e4 View commit details
Showing with 6 additions and 3 deletions.
  1. +6 −3 pkgs/development/python-modules/hidapi/default.nix
9 changes: 6 additions & 3 deletions pkgs/development/python-modules/hidapi/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, libusb1, udev, fetchPypi, buildPythonPackage, cython }:
{ stdenv, libusb1, udev, darwin, fetchPypi, buildPythonPackage, cython }:

buildPythonPackage rec {
pname = "hidapi";
@@ -9,10 +9,13 @@ buildPythonPackage rec {
sha256 = "e0be1aa6566979266a8fc845ab0e18613f4918cf2c977fe67050f5dc7e2a9a97";
};

propagatedBuildInputs = [ libusb1 udev cython ];
propagatedBuildInputs =
stdenv.lib.optionals stdenv.isLinux [ libusb1 udev ] ++
stdenv.lib.optionals stdenv.isDarwin [ darwin.IOKit darwin.apple_sdk.frameworks.CoreFoundation ] ++
[ cython ];

# Fix the USB backend library lookup
postPatch = ''
postPatch = stdenv.lib.optionalString stdenv.isLinux ''
libusb=${libusb1.dev}/include/libusb-1.0
test -d $libusb || { echo "ERROR: $libusb doesn't exist, please update/fix this build expression."; exit 1; }
sed -i -e "s|/usr/include/libusb-1.0|$libusb|" setup.py