Skip to content

Commit

Permalink
Merge pull request #1836 from cheriimoya/master
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud authored Oct 28, 2024
2 parents 498ba8d + 1153461 commit 4af430d
Show file tree
Hide file tree
Showing 6 changed files with 689 additions and 4 deletions.
50 changes: 47 additions & 3 deletions overrides/build-systems.json
Original file line number Diff line number Diff line change
Expand Up @@ -2730,6 +2730,9 @@
"blebox-uniapi": [
"setuptools"
],
"blendmodes": [
"poetry-core"
],
"bless": [
"setuptools"
],
Expand Down Expand Up @@ -6745,6 +6748,10 @@
"facedancer": [
"setuptools"
],
"facexlib": [
"cython",
"setuptools-scm"
],
"factory-boy": [
"setuptools"
],
Expand Down Expand Up @@ -6958,7 +6965,11 @@
"setuptools"
],
"ffmpy": [
"setuptools"
"setuptools",
{
"buildSystem": "poetry-core",
"from": "0.4.0"
}
],
"fhconfparser": [
"poetry-core"
Expand Down Expand Up @@ -9197,6 +9208,9 @@
"huey": [
"setuptools"
],
"hug": [
"setuptools"
],
"huggingface-hub": [
"setuptools"
],
Expand Down Expand Up @@ -13799,6 +13813,9 @@
"setuptools",
"setuptools-scm"
],
"narwhals": [
"hatchling"
],
"nats-py": [
"setuptools"
],
Expand Down Expand Up @@ -15523,7 +15540,14 @@
],
"pdoc3": [
"setuptools",
"setuptools-scm"
"setuptools-scm",
{
"buildSystem": "setuptools-git",
"from": "0.5.0"
}
],
"pdocs": [
"poetry"
],
"pdunehd": [
"setuptools"
Expand Down Expand Up @@ -15750,6 +15774,9 @@
"pillow": [
"setuptools"
],
"pillow-avif-plugin": [
"setuptools"
],
"pillow-heif": [
"setuptools"
],
Expand Down Expand Up @@ -16113,6 +16140,9 @@
"portpicker": [
"setuptools"
],
"portray": [
"poetry"
],
"posix-ipc": [
"setuptools"
],
Expand Down Expand Up @@ -20585,7 +20615,15 @@
],
"pywavelets": [
"cython",
"setuptools"
"setuptools",
{
"buildSystem": "meson-python",
"from": "1.5.0"
},
{
"buildSystem": "ninja",
"from": "1.5.0"
}
],
"pywayland": [
"setuptools"
Expand Down Expand Up @@ -21309,6 +21347,9 @@
"reserved": [
"setuptools"
],
"resize-right": [
"setuptools"
],
"resolvelib": [
"setuptools"
],
Expand Down Expand Up @@ -24320,6 +24361,9 @@
"timing-asgi": [
"poetry-core"
],
"timm": [
"pdm-backend"
],
"tiny-cuda-nn": [
"setuptools"
],
Expand Down
38 changes: 37 additions & 1 deletion overrides/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1503,6 +1503,13 @@ lib.composeManyExtensions [
}
);

mariadb = prev.mariadb.overridePythonAttrs (
old: {
nativeBuildInputs = old.nativeBuildInputs or [ ] ++ [ pkg-config pkgs.libmysqlclient ];
buildInputs = old.buildInputs or [ ] ++ [ pkgs.libmysqlclient ];
}
);

markdown-it-py = prev.markdown-it-py.overridePythonAttrs (
old: {
propagatedBuildInputs = builtins.filter (i: i.pname != "mdit-py-plugins") old.propagatedBuildInputs;
Expand Down Expand Up @@ -1987,6 +1994,29 @@ lib.composeManyExtensions [
}
);

open-clip-torch = prev.open-clip-torch.overridePythonAttrs (
# The sdist from pypi doesn't contain the requirements.txt
old:
lib.optionalAttrs (!(old.src.isWheel or false)) (
let
githubHash =
{
"2.20.0" = "sha256-Ca4oi2LqleIFAGBJB7YIi4nXe2XhOP6ErDFXgXtJLxM=";
}.${old.version} or lib.fakeHash;

src = pkgs.fetchFromGitHub {
owner = "mlfoundations";
repo = "open_clip";
rev = "v${old.version}";
sha256 = githubHash;
};
in
{
inherit src;
}
)
);

orjson = prev.orjson.overridePythonAttrs (
old: lib.optionalAttrs (!(old.src.isWheel or false)) (
let
Expand Down Expand Up @@ -2194,6 +2224,12 @@ lib.composeManyExtensions [
}
);

pillow-avif-plugin = prev.pillow-avif-plugin.overridePythonAttrs (
old: {
buildInputs = old.buildInputs or [ ] ++ [ pkgs.libavif ];
}
);

pillow-heif = prev.pillow-heif.overridePythonAttrs (
old: {
nativeBuildInputs = old.nativeBuildInputs or [ ] ++ [ pkg-config ];
Expand Down Expand Up @@ -4293,7 +4329,7 @@ lib.composeManyExtensions [

mkdocs-material = prev.mkdocs-material.overridePythonAttrs (old: {
postPatch = old.postPatch or "" + ''
sed -i 's/"Framework :: MkDocs",//' pyproject.toml
substituteInPlace pyproject.toml --replace-warn 'filename = "requirements.txt"' ""
'';
});

Expand Down
1 change: 1 addition & 0 deletions tests/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ in
shapely-wheel = callTest ./shapely-wheel { };
cffi-pandas-wheel = callTest ./cffi-pandas-wheel { };
mkdocstrings-wheel = callTest ./mkdocstrings-wheel { };
mkdocs-material = callTest ./mkdocs-material { };
test-extras = callTest ./test-extras { };
test-no-extras = callTest ./test-no-extras { };
missing-iswheel = callTest ./missing-iswheel { };
Expand Down
14 changes: 14 additions & 0 deletions tests/mkdocs-material/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{ poetry2nix, python3, stdenv }:
let
env = poetry2nix.mkPoetryEnv {
python = python3;
pyproject = ./pyproject.toml;
poetrylock = ./poetry.lock;
overrides = poetry2nix.overrides.withDefaults (_: prev: {
watchdog = prev.watchdog.override {
preferWheel = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64;
};
});
};
in
env.python.pkgs.mkdocs-material
Loading

0 comments on commit 4af430d

Please sign in to comment.