|
41 | 41 |
|
42 | 42 | # Python dependencies that need special care, like non-python |
43 | 43 | # build dependencies |
44 | | - overrides = poetry2nix.overrides.withoutDefaults (self: super: { |
45 | | - python-lzo = super.python-lzo.overridePythonAttrs (_: { |
46 | | - buildInputs = [ |
47 | | - lzo |
48 | | - ]; |
49 | | - }); |
| 44 | + overrides = poetry2nix.overrides.withoutDefaults (self: super: |
| 45 | + let |
| 46 | + # Inject setuptools to dependencies that is required by many non-wheel distributed packages |
| 47 | + overrideWithSetuptools = drv: overrides: (drv.overridePythonAttrs overrides).overridePythonAttrs (prev: { |
| 48 | + buildInputs = prev.buildInputs or [ ] ++ [ |
| 49 | + self.setuptools |
| 50 | + ]; |
| 51 | + }); |
| 52 | + in |
| 53 | + { |
| 54 | + python-lzo = overrideWithSetuptools super.python-lzo (_: { |
| 55 | + buildInputs = [ |
| 56 | + lzo |
| 57 | + ]; |
| 58 | + }); |
50 | 59 |
|
51 | | - jefferson = super.jefferson.overridePythonAttrs (_: { |
52 | | - propagatedBuildInputs = [ |
53 | | - # Use the _same_ version as unblob |
54 | | - self.cstruct |
55 | | - self.python-lzo |
56 | | - ]; |
57 | | - }); |
| 60 | + jefferson = overrideWithSetuptools super.jefferson (_: { |
| 61 | + propagatedBuildInputs = [ |
| 62 | + # Use the _same_ version as unblob |
| 63 | + self.cstruct |
| 64 | + self.python-lzo |
| 65 | + ]; |
| 66 | + }); |
58 | 67 |
|
59 | | - ubi_reader = super.ubi_reader.ovveridePythonAttrs (_: { |
60 | | - propagatedBuildInputs = [ |
61 | | - # Use the _same_ version as unblob |
62 | | - self.python-lzo |
63 | | - ]; |
64 | | - }); |
| 68 | + python-magic = overrideWithSetuptools (super.python-magic.override { preferWheel = false; }) (_: { |
| 69 | + patchPhase = '' |
| 70 | + substituteInPlace magic/loader.py --replace "find_library('magic')" "'${file}/lib/libmagic.so'" |
| 71 | + ''; |
| 72 | + }); |
65 | 73 |
|
66 | | - python-magic = (super.python-magic.override { preferWheel = false; }).overridePythonAttrs (_: { |
67 | | - patchPhase = '' |
68 | | - substituteInPlace magic/loader.py --replace "find_library('magic')" "'${file}/lib/libmagic.so'" |
69 | | - ''; |
70 | | - }); |
| 74 | + hyperscan = super.hyperscan.overridePythonAttrs (_: { |
| 75 | + buildInputs = [ |
| 76 | + hyperscan |
| 77 | + ]; |
| 78 | + }); |
71 | 79 |
|
72 | | - hyperscan = super.hyperscan.overridePythonAttrs (_: { |
73 | | - buildInputs = [ |
74 | | - hyperscan |
75 | | - ]; |
| 80 | + arpy = overrideWithSetuptools super.arpy { }; |
| 81 | + yaffshiv = overrideWithSetuptools super.yaffshiv { }; |
| 82 | + ubi-reader = overrideWithSetuptools super.ubi-reader { }; |
76 | 83 | }); |
77 | | - }); |
78 | 84 |
|
79 | 85 | python = python3; |
80 | 86 |
|
|
0 commit comments