nixpkgs-suyu/pkgs/development/libraries/odpic/default.nix

41 lines
1.3 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, fixDarwinDylibNames, oracle-instantclient, libaio }:
2018-06-01 10:30:55 +02:00
stdenv.mkDerivation rec {
name = "odpic-${version}";
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:01:06 +01:00
version = "3.1.0";
2018-06-01 10:30:55 +02:00
src = fetchurl {
url = "https://github.com/oracle/odpi/archive/v${version}.tar.gz";
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:01:06 +01:00
sha256 = "0m6g7lbvfir4amf2cnap9wz9fmqrihqpihd84igrd7fp076894c0";
2018-06-01 10:30:55 +02:00
};
2018-06-08 02:45:56 +02:00
nativeBuildInputs = stdenv.lib.optional stdenv.isDarwin [ fixDarwinDylibNames ];
buildInputs = [ oracle-instantclient ]
++ stdenv.lib.optionals stdenv.isLinux [ libaio ];
2018-06-01 10:30:55 +02:00
libPath = stdenv.lib.makeLibraryPath
[ oracle-instantclient ];
dontPatchELF = true;
2018-06-08 02:45:56 +02:00
makeFlags = [ "PREFIX=$(out)" "CC=cc" "LD=cc"];
2018-06-01 10:30:55 +02:00
2018-06-07 17:25:49 +02:00
postFixup = ''
2018-06-08 02:45:56 +02:00
${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}
''}
'';
2018-06-01 10:30:55 +02:00
meta = with stdenv.lib; {
description = "Oracle ODPI-C library";
homepage = "https://oracle.github.io/odpi/";
2018-06-08 02:45:56 +02:00
maintainers = with maintainers; [ mkazulak flokli ];
2018-06-04 23:33:06 +02:00
license = licenses.asl20;
2018-06-08 02:45:56 +02:00
platforms = [ "x86_64-linux" "x86_64-darwin" ];
2018-06-01 10:30:55 +02:00
hydraPlatforms = [];
};
}