Conversation
|
deejayem
left a comment
There was a problem hiding this comment.
This fixed the issue for me on aarch64-darwin, and I didn't find any issues when testing.
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
| 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="; | ||
| }; |
There was a problem hiding this comment.
Can we use our versions of those packages?
There was a problem hiding this comment.
@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.
There was a problem hiding this comment.
I'm not sure it would work though, as it also wants access to the C code for mpack and libb64.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Thank you for the comments. I'll have a look at it in a few days.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Yeah, can we have this in a different commit?
There was a problem hiding this comment.
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?
| 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="; | ||
| }; |
There was a problem hiding this comment.
fetchFromGitHub can be used.
There was a problem hiding this comment.
I've explained on the new PR why I don't think that's possible/optimal.
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
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.