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
binder and pybind11 packages #25065
binder and pybind11 packages #25065
Conversation
@copumpkin if I'm correct you're the llvm/clang expert here, so maybe you have a solution. I'm packaging # Create build dir
mkdir $HOME/prefix && cd $HOME/prefix
# Clone LLVM
git clone http://llvm.org/git/llvm.git llvm && cd llvm
git reset --hard origin/release_38
# Clone Clang
cd $HOME/prefix/llvm/tools
git clone http://llvm.org/git/clang.git clang
cd clang && git reset --hard origin/release_38
# Clone Clang extra tools
cd $HOME/prefix/llvm/tools/clang/tools
git clone http://llvm.org/git/clang-tools-extra.git extra
# Create symlink pointing to binder/src dir
ln -s $HOME/binder/binder $HOME/prefix/llvm/tools/clang/tools/extra/binder
# Create ``llvm/tools/clang/tools/extra/CMakeLists.txt`` file with content: ``add_subdirectory(binder)``
echo 'add_subdirectory(binder)' > $HOME/prefix/llvm/tools/clang/tools/extra/CMakeLists.txt
# Build Binder
mkdir $HOME/prefix/build && cd $HOME/prefix/build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_EH=1 -DLLVM_ENABLE_RTTI=ON .. && ninja
# At this point, if all above steps is succeseful, binder should be at
# $HOME/prefix/build/bin/binder Nixpkgs provides clang and llvm, and clang is also built with the extra tools if I am correct. If I just run
|
I wouldn't call myself an expert, but I've dealt with it a fair amount. Judging from their instructions, they might actually want the source to clang as opposed to a precompiled library/binary? It seems odd, but you could probably just make sure to drop the source files (i.e., just refer to |
Apparently building tooling for Clang is done like this according to the docs We need a Nix ninja :) I think the easiest solution here for me is to override |
I got binder to build, and it seems to be working. The next issue I have is having it find headers. One can pass -I for includes and such. Ideally, I would like it to support NIX_CFLAGS_COMPILE, making it more useful in a Nix expression. Therefore, I used wrapCC. Unfortunately, that seems to unset |
Closing because I'm not working on this anymore. |
Motivation for this change
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)