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