Merge pull request #300 from purcell/overrides-for-qmk

Additional overrides for packages used by qmk
This commit is contained in:
adisbladis 2021-05-10 20:23:24 -05:00 committed by GitHub
commit 2d27d44397
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -369,6 +369,22 @@ self: super:
) else old ) else old
); );
hid = super.hid.overridePythonAttrs (
old: {
postPatch = ''
found=
for name in libhidapi-hidraw libhidapi-libusb libhidapi-iohidmanager libhidapi; do
full_path=${pkgs.hidapi.out}/lib/$name${pkgs.stdenv.hostPlatform.extensions.sharedLibrary}
if test -f $full_path; then
found=t
sed -i -e "s|'$name\..*'|'$full_path'|" hid/__init__.py
fi
done
test -n "$found" || { echo "ERROR: No known libraries found in ${pkgs.hidapi.out}/lib, please update/fix this build expression."; exit 1; }
'';
}
);
horovod = super.horovod.overridePythonAttrs ( horovod = super.horovod.overridePythonAttrs (
old: { old: {
propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ pkgs.mpi ]; propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ pkgs.mpi ];
@ -1286,6 +1302,16 @@ self: super:
} }
); );
pyusb = super.pyusb.overridePythonAttrs (
old: {
postPatch = ''
libusb=${pkgs.libusb1.out}/lib/libusb-1.0${pkgs.stdenv.hostPlatform.extensions.sharedLibrary}
test -f $libusb || { echo "ERROR: $libusb doesn't exist, please update/fix this build expression."; exit 1; }
sed -i -e "s|find_library=None|find_library=lambda _:\"$libusb\"|" usb/backend/libusb1.py
'';
}
);
pyzmq = super.pyzmq.overridePythonAttrs ( pyzmq = super.pyzmq.overridePythonAttrs (
old: { old: {
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.pkg-config ]; nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.pkg-config ];