Skip to content

msgpack-tools: unbreak#436281

Closed
petrzjunior wants to merge 1 commit intoNixOS:masterfrom
petrzjunior:msgpack-tools
Closed

msgpack-tools: unbreak#436281
petrzjunior wants to merge 1 commit intoNixOS:masterfrom
petrzjunior:msgpack-tools

Conversation

@petrzjunior
Copy link
Contributor

Unbreak msgpack-tools by fixing dependency version as suggested in upstream issue. Also, modernize a bit. Tested the binaries and they work correctly.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 9.needs: reviewer This PR currently has no reviewers requested and needs attention. labels Aug 23, 2025
@petrzjunior
Copy link
Contributor Author

nixpkgs-review result for #436281

Generated using nixpkgs-review-gha

Command: nixpkgs-review pr 436281

Logs: https://github.com/petrzjunior/nixpkgs-review-gha/actions/runs/17179694676


x86_64-linux

✅ 1 package built:
  • msgpack-tools

aarch64-linux

✅ 1 package built:
  • msgpack-tools

x86_64-darwin (sandbox = true)

✅ 1 package built:
  • msgpack-tools

aarch64-darwin (sandbox = true)

✅ 1 package built:
  • msgpack-tools

@petrzjunior petrzjunior requested a review from winterqt August 23, 2025 20:27
@nixpkgs-ci nixpkgs-ci bot removed the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Aug 23, 2025
Copy link
Member

@deejayem deejayem left a comment

Choose a reason for hiding this comment

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

This fixed the issue for me on aarch64-darwin, and I didn't find any issues when testing.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/2573

@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Oct 3, 2025
Comment on lines +11 to +22
libb64 = fetchurl {
url = "mirror://sourceforge/libb64/libb64-1.2.1.zip";
hash = "sha256-IBBvC6lc/Zw1oTxxIGZD4/s+RlEt8+Lvsv2/hxFjFLI=";
};
rapidjson = fetchurl {
url = "https://github.com/miloyip/rapidjson/archive/9bd618f545ab647e2c3bcbf2f1d87423d6edf800.tar.gz";
hash = "sha256-O66yxOidLgLqk5+PAuP67H8eDxnVOK+3BQCQPjrPVxM=";
};
mpack = fetchurl {
url = "https://github.com/ludocode/mpack/archive/df17e83f0fa8571b9cd0d8ccf38144fa90e244d1.tar.gz";
hash = "sha256-hyiXygbAHnNgF4TIg+DemBvtdBnSgJ7fAhknVuL+T/c=";
};
Copy link
Member

Choose a reason for hiding this comment

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

Can we use our versions of those packages?

Copy link
Member

@deejayem deejayem Oct 3, 2025

Choose a reason for hiding this comment

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

@SuperSandro2000 maybe, but it's not straightforward. It expects those tarballs to exist in a certain location, and tries to fetch them if they don't. I was able to patch that out, but it fails to build, because our version of mpack doesn't copy the header files.

My attempt is here: https://gist.github.com/deejayem/51e843e46dbcb92982522074c0b5f0e5

So we can either go with the version on this PR, or we can look at updating mpack to copy the header files, if you think that approach is better.

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure it would work though, as it also wants access to the C code for mpack and libb64.

Copy link
Member

Choose a reason for hiding this comment

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

mpack in nixpkgs isn't the same mpack being used here (the one in nixpkgs isn't anything to do with msgpack). I did get this working with libb64 and rapidjson from nixpkgs, and mpack from the tarball. So that's another option. Since it's by the same author as msgpack-tools, this mpack library might not be used by anything else, so probably isn't worth adding to nixpkgs. This version works: https://gist.github.com/deejayem/7847d7f5e741ca42ac21a5d46f6dc05c

@SuperSandro2000 what do you think? Should we stick with the approach currently used, which matches more closely what the upstream build does, or should I raise a PR to use libb64 and rapidjson from nixpkgs, as in the gist?

Copy link
Member

Choose a reason for hiding this comment

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

You can do all of that in this PR, we don't need to open multiple ones.

As NixOS is a distribution, we should use the distribution packages everywhere possible. I say if we go with the packages that already exist and use them, we are good. We probably don't need to add the library only used by this project.

Copy link
Member

Choose a reason for hiding this comment

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

This PR was opened by @petrzjunior so I don't think I can push to his branch. If he wants to commit the changes from my gist (and add me as a coauthor on the commit), then that would work. Otherwise I think I'd need to raise a new one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the comments. I'll have a look at it in a few days.

Copy link
Member

Choose a reason for hiding this comment

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

With the latest nixpkgs, there's a new error:

       > CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
       >   Compatibility with CMake < 3.5 has been removed from CMake.
       >
       >   Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
       >   to tell CMake that the project requires at least <min> but has been updated
       >   to work with policies introduced by <max> or earlier.
       >
       >   Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.

Adding cmakeFlags = [ "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" ]; fixes it, so you might want to do that as well. I think this overrides cmake_minimum_required(VERSION 2.6) in CMakeLists.txt

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, can we have this in a different commit?

Copy link
Member

Choose a reason for hiding this comment

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

It'd be nice if we could get this into 25.11, so I've raised a new PR myself: #454597

@petrzjunior I hope you don't mind!

@JohnRTitor or @SuperSandro2000 would you mind reviewing that one please?

Comment on lines +15 to +22
rapidjson = fetchurl {
url = "https://github.com/miloyip/rapidjson/archive/9bd618f545ab647e2c3bcbf2f1d87423d6edf800.tar.gz";
hash = "sha256-O66yxOidLgLqk5+PAuP67H8eDxnVOK+3BQCQPjrPVxM=";
};
mpack = fetchurl {
url = "https://github.com/ludocode/mpack/archive/df17e83f0fa8571b9cd0d8ccf38144fa90e244d1.tar.gz";
hash = "sha256-hyiXygbAHnNgF4TIg+DemBvtdBnSgJ7fAhknVuL+T/c=";
};
Copy link
Member

Choose a reason for hiding this comment

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

fetchFromGitHub can be used.

Copy link
Member

Choose a reason for hiding this comment

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

I've explained on the new PR why I don't think that's possible/optimal.

@deejayem deejayem mentioned this pull request Oct 22, 2025
13 tasks
@JohnRTitor JohnRTitor closed this Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants