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}";
|
2019-02-01 14:01:06 +00:00
|
|
|
version = "3.1.0";
|
2018-06-01 09:30:55 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/oracle/odpi/archive/v${version}.tar.gz";
|
2019-02-01 14:01:06 +00:00
|
|
|
sha256 = "0m6g7lbvfir4amf2cnap9wz9fmqrihqpihd84igrd7fp076894c0";
|
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 = [];
|
|
|
|
};
|
|
|
|
}
|