Skip to content

Commit

Permalink
Merge pull request nix-community#1330 from apeschar/mysqlclient-pkg-c…
Browse files Browse the repository at this point in the history
…onfig

Add pkg-config dependency for mysqlclient
  • Loading branch information
cpcloud authored Oct 5, 2023
2 parents 8420c5b + 2ec5fa6 commit aeec558
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 1 deletion.
2 changes: 1 addition & 1 deletion overrides/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1445,7 +1445,7 @@ lib.composeManyExtensions [

mysqlclient = super.mysqlclient.overridePythonAttrs (
old: {
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.libmysqlclient ];
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.pkg-config pkgs.libmysqlclient ];
buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.libmysqlclient ];
}
);
Expand Down
1 change: 1 addition & 0 deletions tests/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ in
bcrypt = callTest ./bcrypt { };
mk-poetry-packages = callTest ./mk-poetry-packages { };
markupsafe2 = callTest ./markupsafe2 { };
mysqlclient = callTest ./mysqlclient { };
# uwsgi = callTest ./uwsgi { }; # Commented out because build is flaky (unrelated to poetry2nix)
jq = callTest ./jq { };
ubersmith = callTest ./ubersmith { };
Expand Down
10 changes: 10 additions & 0 deletions tests/mysqlclient/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{ poetry2nix, runCommand }:
let
env = poetry2nix.mkPoetryEnv {
projectDir = ./.;
};
in
runCommand "mysqlclient-test" { } ''
${env}/bin/python -c 'import MySQLdb'
touch $out
''
23 changes: 23 additions & 0 deletions tests/mysqlclient/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions tests/mysqlclient/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[tool.poetry]
name = "mysqlclient-test"
version = "0.1.0"
description = ""
authors = ["Your Name <[email protected]>"]

[tool.poetry.dependencies]
python = "^3.10"
mysqlclient = "*"

[build-system]
requires = ["poetry-core>=1.1"]
build-backend = "poetry.core.masonry.api"

0 comments on commit aeec558

Please sign in to comment.