Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysql84: fix build for Darwin and llvm19 #373514

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rsynnest
Copy link
Contributor

@rsynnest rsynnest commented Jan 13, 2025

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • 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/)
  • 25.05 Release Notes (or backporting 24.11 and 25.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.

Add a 👍 reaction to pull requests you find important.

@rsynnest rsynnest changed the title mysql84: fix llvm19 build mysql84: fix Darwin and llvm19 build Jan 13, 2025
@rsynnest rsynnest changed the title mysql84: fix Darwin and llvm19 build mysql84: fix build for Darwin and llvm19 Jan 13, 2025
@nix-owners nix-owners bot requested a review from shyim January 13, 2025 18:29
Copy link
Member

@shyim shyim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! :)

@shyim shyim added 12.approvals: 1 This PR was reviewed and approved by one reputable person 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in the package labels Jan 13, 2025
@paparodeo
Copy link
Contributor

paparodeo commented Jan 27, 2025

can use the upstream patches with a minor modification

use upstream patches
diff --git a/pkgs/by-name/my/mysql84/package.nix b/pkgs/by-name/my/mysql84/package.nix
index 075c39763ae7..31195155dd1f 100644
--- a/pkgs/by-name/my/mysql84/package.nix
+++ b/pkgs/by-name/my/mysql84/package.nix
@@ -2,6 +2,8 @@
   lib,
   stdenv,
   fetchurl,
+  fetchpatch,
+  substitute,
   bison,
   cmake,
   pkg-config,
@@ -42,6 +44,23 @@ stdenv.mkDerivation (finalAttrs: {
 
   patches = [
     ./no-force-outline-atomics.patch # Do not force compilers to turn on -moutline-atomics switch
+    (substitute {
+      src = fetchpatch {
+        url = "https://github.com/mysql/mysql-server/commit/3a51d7fca76e02257f5c42b6a4fc0c5426bf0421.patch";
+        hash = "sha256-MFmY/HyDoMw3lD64qJkfdadXVkk+gukSs2f80Q/SKlY=";
+      };
+      substitutions = [
+        "--replace-fail" "/mysys/stream_cipher.h" "/sql/stream_cipher.h"
+      ];
+    })
+    (fetchpatch {
+      url = "https://github.com/mysql/mysql-server/commit/94691ac8f5156c7e6c16a954a10bce08bd9d4a7f.patch";
+      hash = "sha256-Jp5Nch1cIgjoYau9GeTQgTPwVvpFI8kMXRHN2w3CMaA=";
+    })
+    (fetchpatch {
+      url = "https://github.com/mysql/mysql-server/commit/4a5c00d26f95faa986ffed7a15ee15e868e9dcf2.patch";
+      hash = "sha256-MEl1lQlDYtFjHk0+S02RQFnxMr+YeFxAyNjpDtVHyeE=";
+    })
   ];
 
   ## NOTE: MySQL upstream frequently twiddles the invocations of libtool. When updating, you might proactively grep for libtool references.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10 12.approvals: 1 This PR was reviewed and approved by one reputable person 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in the package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build failure: mysql84 and mysql80 on ARM MacOS
3 participants