Skip to content

mariadb-connector-c: install my_config.h#146442

Merged
Artturin merged 1 commit intoNixOS:stagingfrom
Artturin:mariaconnectormyconfig
Nov 22, 2021
Merged

mariadb-connector-c: install my_config.h#146442
Artturin merged 1 commit intoNixOS:stagingfrom
Artturin:mariaconnectormyconfig

Conversation

@Artturin
Copy link
Member

https://github.com/bmwiedemann/openSUSE/blob/master/packages/m/mariadb-connector-c/mariadb-connector-c.spec#L152
Closes #146340

arch, however, packages it in their mariadb-libs package which provides
connector-c so a nixpkgs mariadb maintainer may want to look into that
https://archlinux.org/packages/extra/x86_64/mariadb-libs/files/

Motivation for this change
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 21.11 Release Notes (or backporting 21.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@Artturin Artturin requested a review from spease November 17, 2021 23:25
@ofborg ofborg bot requested a review from globin November 17, 2021 23:36
@ofborg ofborg bot added 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 1001-2500 This PR causes many rebuilds on Darwin and should most likely target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 2501-5000 This PR causes many rebuilds on Linux and should target the staging branches. labels Nov 17, 2021
@Artturin Artturin force-pushed the mariaconnectormyconfig branch from 0c9460f to e148f5f Compare November 18, 2021 00:03
@Artturin Artturin changed the base branch from master to staging November 18, 2021 00:03
@Artturin
Copy link
Member Author

@spease Please apply this to your local nixpkgs checkout git apply - <<< $(curl https://patch-diff.githubusercontent.com/raw/NixOS/nixpkgs/pull/146442.diff) and test if your issue is solved

@spease
Copy link
Contributor

spease commented Nov 18, 2021

Thanks!! That was fast! I can't get to this right away, but I should be able to by Monday.

@spease
Copy link
Contributor

spease commented Nov 20, 2021

Yes, that fixes the compiler error. I do still have to keep the PATH though, is that within the purview of this package?

This builds successfully now:

      (mach-nix.buildPythonPackage {
        pname = "mysql-python";
        version = "1.2.5";
        requirements = "";
        src = "https://github.com/farcepest/MySQLdb1/archive/refs/tags/MySQLdb-1.2.5.tar.gz";
        buildInputs = [ pkgs.mariadb.client pkgs.mariadb-connector-c ];
        preConfigure = ''
          sed '/if ( reconnect != -1 ) self->connection\.reconnect = reconnect;/d' ./_mysql.c -i.bkp
          export PATH="${pkgs.mariadb-connector-c.dev}/bin:$PATH"
        '';
      })

@Artturin
Copy link
Member Author

Yes, that fixes the compiler error. I do still have to keep the PATH though, is that within the purview of this package?

This builds successfully now:

      (mach-nix.buildPythonPackage {
        pname = "mysql-python";
        version = "1.2.5";
        requirements = "";
        src = "https://github.com/farcepest/MySQLdb1/archive/refs/tags/MySQLdb-1.2.5.tar.gz";
        buildInputs = [ pkgs.mariadb.client pkgs.mariadb-connector-c ];
        preConfigure = ''
          sed '/if ( reconnect != -1 ) self->connection\.reconnect = reconnect;/d' ./_mysql.c -i.bkp
          export PATH="${pkgs.mariadb-connector-c.dev}/bin:$PATH"
        '';
      })

if something from mariadb-connector-c needs to be run during the build then it should be in nativeBuildInputs and if libs from it are needed it should be in buildInputs. if both are needed then it should be in both

@Artturin Artturin merged commit 40d4334 into NixOS:staging Nov 22, 2021
@Artturin Artturin deleted the mariaconnectormyconfig branch November 22, 2021 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 1001-2500 This PR causes many rebuilds on Darwin and should most likely target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 2501-5000 This PR causes many rebuilds on Linux and should target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Software making use of mariadb-connector can't find my_config.h

3 participants