Merge pull request #127976 from AndersonTorres/quick-patch

python3Packages.milc: 1.3.0 -> 1.4.2; python3Packages.hid: init at 1.0.4
This commit is contained in:
Anderson Torres 2021-06-24 15:30:35 -03:00 committed by GitHub
commit 0c17239639
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 50 additions and 8 deletions

View File

@ -0,0 +1,34 @@
{ lib
, stdenv
, buildPythonPackage
, fetchPypi
, hidapi
, nose
}:
buildPythonPackage rec {
pname = "hid";
version = "1.0.4";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-9hsDgvN6M0vIuoYEvIS5SHXuT1lPu6+CssOz6CeIP8E=";
};
propagatedBuildInputs = [ hidapi ];
checkInputs = [ nose ];
postPatch = lib.optionalString stdenv.isLinux ''
hidapi=${hidapi}/lib/
test -d $hidapi || { echo "ERROR: $hidapi doesn't exist, please update/fix this build expression."; exit 1; }
sed -i -e "s|libhidapi|$hidapi/libhidapi|" hid/__init__.py
'';
meta = with lib; {
description = "hidapi bindings in ctypes";
homepage = "https://github.com/apmorton/pyhidapi";
license = with licenses; [ mit ];
maintainers = with maintainers; [ AndersonTorres ];
};
}

View File

@ -4,29 +4,33 @@
, appdirs , appdirs
, argcomplete , argcomplete
, colorama , colorama
, halo
, nose2 , nose2
, semver , semver
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "milc"; pname = "milc";
version = "1.3.0"; version = "1.4.2";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "clueboard"; owner = "clueboard";
repo = "milc"; repo = "milc";
rev = version; rev = version;
sha256 = "sha256-koyOBz+pB/vkTHOR1p77ACO11/ULDIBzqsszUUpnE88="; sha256 = "sha256-aX6cTpIN9+9xuEGYHVlM5SjTPLcudJFEuOI4CiN3byE=";
}; };
propagatedBuildInputs = [ appdirs argcomplete colorama ]; propagatedBuildInputs = [
appdirs
argcomplete
colorama
halo
];
checkInputs = [ nose2 semver ]; checkInputs = [
checkPhase = ''
patchShebangs example hello
nose2 nose2
''; semver
];
pythonImportsCheck = [ "milc" ]; pythonImportsCheck = [ "milc" ];

View File

@ -3230,6 +3230,10 @@ in {
hickle = callPackage ../development/python-modules/hickle { }; hickle = callPackage ../development/python-modules/hickle { };
hid = callPackage ../development/python-modules/hid {
inherit (pkgs) hidapi;
};
hidapi = callPackage ../development/python-modules/hidapi { hidapi = callPackage ../development/python-modules/hidapi {
inherit (pkgs) udev libusb1; inherit (pkgs) udev libusb1;
}; };