2018-07-21 02:44:44 +02:00
|
|
|
{ stdenv, fetchurl, fixDarwinDylibNames, oracle-instantclient, libaio }:
|
2018-06-01 10:30:55 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "odpic-${version}";
|
2018-07-10 19:54:27 +02:00
|
|
|
version = "2.4.2";
|
2018-06-01 10:30:55 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/oracle/odpi/archive/v${version}.tar.gz";
|
2018-07-10 19:54:27 +02:00
|
|
|
sha256 = "0hw6b38vnh0cgm1iwpgkqa2am86baal6irp9bglacblwh8sshqdi";
|
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 = [];
|
|
|
|
};
|
|
|
|
}
|