Skip to content

Commit 95062c0

Browse files
László VaskóMarton ILLES
authored andcommitted
nix: try installing dependencies from wheels first
So that we can get rid of building native packages from source python-lzo is not available in wheel, so that it still needs to be built
1 parent 572faea commit 95062c0

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

default.nix

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
, unar
1717
, file
1818
, hyperscan
19-
, pkg-config
2019
}:
2120

2221
let
@@ -36,9 +35,11 @@ let
3635
self = mkPoetryApp {
3736
projectDir = ./.;
3837

38+
preferWheels = true;
39+
3940
# Python dependencies that need special care, like non-python
4041
# build dependencies
41-
overrides = poetry2nix.overrides.withDefaults (self: super: {
42+
overrides = poetry2nix.overrides.withoutDefaults (self: super: {
4243
python-lzo = super.python-lzo.overridePythonAttrs (_: {
4344
buildInputs = [
4445
lzo
@@ -60,20 +61,16 @@ let
6061
];
6162
});
6263

63-
file-magic = super.file-magic.overridePythonAttrs (_: {
64+
file-magic = (super.file-magic.override { preferWheel = false; }).overridePythonAttrs (_: {
6465
patchPhase = ''
6566
substituteInPlace magic.py --replace "find_library('magic')" "'${file}/lib/libmagic.so'"
6667
'';
6768
});
6869

6970
hyperscan = super.hyperscan.overridePythonAttrs (_: {
7071
buildInputs = [
71-
self.poetry
7272
hyperscan
7373
];
74-
nativeBuildInputs = [
75-
pkg-config
76-
];
7774
});
7875
});
7976

0 commit comments

Comments
 (0)