nixpkgs/pkgs/development/libraries/odpic/default.nix
Florian Klink 1bbad11da9 odpic: 2.4.2 -> 3.1.0
This bumps odpic to 3.1.0 - with the current version in unstable,
python*Packages.cx_oracle fails to compile due to some types missing in
our version of odpic:

```
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DCXO_BUILD_VERSION=7.0.0 -I/nix/store/43lwkzvxwcymshchqhhafr2rnw2kk8ll-odpic-2.4.2/include -I/nix/store/ydk0mfpvn9smcmn72wc9i20slv1d2b79-python3-3.7.2/include/python3.7m -c src/cxoBuffer.c -o build/temp.linux-x86_64-3.7/src/cxoBuffer.o
In file included from src/cxoBuffer.c:17:0:
src/cxoModule.h:372:5: error: unknown type name 'dpiSodaColl'
     dpiSodaColl *handle;
     ^~~~~~~~~~~
src/cxoModule.h:379:5: error: unknown type name 'dpiSodaDb'
     dpiSodaDb *handle;
     ^~~~~~~~~
src/cxoModule.h:386:5: error: unknown type name 'dpiSodaDoc'
     dpiSodaDoc *handle;
     ^~~~~~~~~~
src/cxoModule.h:392:5: error: unknown type name 'dpiSodaDocCursor'
     dpiSodaDocCursor *handle;
     ^~~~~~~~~~~~~~~~
src/cxoModule.h:398:5: error: unknown type name 'dpiSodaOperOptions'
     dpiSodaOperOptions options;
     ^~~~~~~~~~~~~~~~~~
src/cxoModule.h:492:9: error: unknown type name 'dpiSodaColl'; did you mean 'dpiPool'?
         dpiSodaColl *handle);
         ^~~~~~~~~~~
         dpiPool
src/cxoModule.h:496:49: error: unknown type name 'dpiSodaDoc'; did you mean 'cxoSodaDoc'?
 cxoSodaDoc *cxoSodaDoc_new(cxoSodaDatabase *db, dpiSodaDoc *handle);
                                                 ^~~~~~~~~~
                                                 cxoSodaDoc
src/cxoModule.h:499:9: error: unknown type name 'dpiSodaDocCursor'; did you mean 'cxoSodaDocCursor'?
         dpiSodaDocCursor *handle);
         ^~~~~~~~~~~~~~~~
         cxoSodaDocCursor
```
2019-02-01 15:11:56 +01:00

41 lines
1.3 KiB
Nix

{ stdenv, fetchurl, fixDarwinDylibNames, oracle-instantclient, libaio }:
stdenv.mkDerivation rec {
name = "odpic-${version}";
version = "3.1.0";
src = fetchurl {
url = "https://github.com/oracle/odpi/archive/v${version}.tar.gz";
sha256 = "0m6g7lbvfir4amf2cnap9wz9fmqrihqpihd84igrd7fp076894c0";
};
nativeBuildInputs = stdenv.lib.optional stdenv.isDarwin [ fixDarwinDylibNames ];
buildInputs = [ oracle-instantclient ]
++ stdenv.lib.optionals stdenv.isLinux [ libaio ];
libPath = stdenv.lib.makeLibraryPath
[ oracle-instantclient ];
dontPatchELF = true;
makeFlags = [ "PREFIX=$(out)" "CC=cc" "LD=cc"];
postFixup = ''
${stdenv.lib.optionalString (stdenv.isLinux) ''
patchelf --set-rpath "${libPath}" $out/lib/libodpic${stdenv.hostPlatform.extensions.sharedLibrary}
''}
${stdenv.lib.optionalString (stdenv.isDarwin) ''
install_name_tool -add_rpath "${libPath}" $out/lib/libodpic${stdenv.hostPlatform.extensions.sharedLibrary}
''}
'';
meta = with stdenv.lib; {
description = "Oracle ODPI-C library";
homepage = "https://oracle.github.io/odpi/";
maintainers = with maintainers; [ mkazulak flokli ];
license = licenses.asl20;
platforms = [ "x86_64-linux" "x86_64-darwin" ];
hydraPlatforms = [];
};
}