mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-06 20:48:32 +03:00
nrfutil: 6.1.3 -> 6.1.6
Version adds support for Python 3.10. Patch out the hardcoded libusb1 version. Upstream locked it due to pip pulling down libraries that had issues on the host system. That shouldn't be an issue here with libusb1 in nixpkgs.
This commit is contained in:
parent
467e45ea3d
commit
361072ab38
@ -1,41 +1,20 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, pkgs
|
||||
, python3
|
||||
, python3Packages
|
||||
}:
|
||||
let
|
||||
py = python3.override {
|
||||
packageOverrides = self: super: {
|
||||
|
||||
libusb1 = super.libusb1.overridePythonAttrs (oldAttrs: rec {
|
||||
version = "1.9.3";
|
||||
src = oldAttrs.src.override {
|
||||
inherit version;
|
||||
sha256 = "0j8p7jb7sibiiib18vyv3w5rrk0f4d2dl99bs18nwkq6pqvwxrk0";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace usb1/libusb1.py --replace \
|
||||
"ctypes.util.find_library(base_name)" \
|
||||
"'${pkgs.libusb1}/lib/libusb-1.0${stdenv.hostPlatform.extensions.sharedLibrary}'"
|
||||
'';
|
||||
});
|
||||
};
|
||||
};
|
||||
in
|
||||
with py.pkgs;
|
||||
with python3.pkgs;
|
||||
|
||||
buildPythonApplication rec {
|
||||
pname = "nrfutil";
|
||||
version = "6.1.3";
|
||||
version = "6.1.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "NordicSemiconductor";
|
||||
repo = "pc-nrfutil";
|
||||
rev = "v${version}";
|
||||
sha256 = "1gpxjdcjn4rjvk649vpkh563c7lx3rrfvamazb1qjii1pxrvvqa7";
|
||||
sha256 = "sha256-UiGNNJxNSpIzpeYMlzocLG2kuetl8xti5A3n6zz0lcY=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
@ -60,6 +39,7 @@ buildPythonApplication rec {
|
||||
|
||||
postPatch = ''
|
||||
mkdir test-reports
|
||||
substituteInPlace requirements.txt --replace "libusb1==1.9.3" "libusb1"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
@ -68,7 +48,5 @@ buildPythonApplication rec {
|
||||
license = licenses.unfreeRedistributable;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ gebner ];
|
||||
# libusb1 1.9.3 uses setuptools' 2to3 translation feature, which has been removed in setuptools 58
|
||||
broken = true;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user