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