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
odpic: init at 2.3.2 #41354
odpic: init at 2.3.2 #41354
Conversation
@pesterhazy @flokli As maintainers of oracle-instantclient you may also be interested in this. |
@mulderr funny thing, odpi also comes as a submodule of cx_python (IIRC). Maybe you want to apply the patch from there here as well, or even use this separate odpi drv for everything. |
This one right? Documentation says that ODPI-C can be used in two different ways. As a shared library or by including the source directly in another project. I think The patch is just fixing the path to Hm, while I don't have immediate use for it (other than to make Luckily, correct me if I'm wrong, this shouldn't break cx_Oracle in any way? So any project that was using odpic directly can keep using a version independent of the one in nixpkgs - for example via git submodules as cx_Oracle does. |
Overriding rpath is also possible, and probably cleaner than maintaining a patch in nixpkgs. Agreed :-) Since oracle/python-cx_Oracle@9baa55b, it's possible to build Could you cherry-pick that on top of your PR? |
Sure! Some checks are apparently failing though. Looking into it now. Edit: my bad. A typo in the metadata which I thought I already fixed before. Should be ok. |
[ oracle-instantclient ]; | ||
|
||
dontPatchELF = true; | ||
installPhase = '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be able to reuse the "install" phase by setting prefix correctly:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to point out that 2.3.2 didn't even have an install target ;) Good call though. I'll update this to 2.4.0.
makeFlags = [ "PREFIX=$(out)" ]; | ||
|
||
postFixup = '' | ||
patchelf --set-rpath "${libPath}" $out/lib/libodpic.so |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stdenv.hostPlatform.extensions.sharedLibrary
instead of so
speaking of Took the opportunity to wire darwin support into the oracle-instantclient and odpic drvs in 620c574 and 3ebfb98490f. Whats your opinion on the makefile patch for odpi, and what about Anyways, with this PR plus above mentioned two commits, I was able to use sqlalchemy to connect to oracle databases from a Mac with Nix installed, too :-) |
@mulderr patches for odpic were upstreamed (oracle/odpi#65), Would you mind cherry-picking my commits in here? |
@flokli Done. Fair warning though, I don't use Macs or have one handy to test so it's impossible for me to verify. If it works for you then cool. Might as well take care of this right away. |
Umm, forgot to drop `0001-Makefile-fix-dylib-names.patch` from my commit, sorry :-/
If you want to test, you can try the AndrewDryga vagrant-box-osx.
|
No worries. Patch removed. |
LGTM. @matthewbauer, @FRidh, merge? |
Thanks for all the input and for merging! Awesome. |
Motivation for this change
Adds Oracle Database Programming Interface for C (ODPI-C) library.
Should also allow to fix build of odpic-raw (Haskell bindings) which is currently failing due to missing dependency:
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)