3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/odpic/default.nix

46 lines
1.5 KiB
Nix
Raw Normal View History

2018-06-08 01:45:56 +01:00
{ stdenv, fetchurl, fetchpatch, fixDarwinDylibNames, oracle-instantclient, libaio }:
2018-06-01 09:30:55 +01:00
stdenv.mkDerivation rec {
name = "odpic-${version}";
2018-06-07 16:25:49 +01:00
version = "2.4.0";
2018-06-01 09:30:55 +01:00
src = fetchurl {
url = "https://github.com/oracle/odpi/archive/v${version}.tar.gz";
2018-06-07 16:25:49 +01:00
sha256 = "1z793mg8hmy067xhllip7ca84xy07ca1cqilnr35mbvhmydp03zz";
2018-06-01 09:30:55 +01:00
};
2018-06-08 01:45:56 +01:00
patches = [ (fetchpatch {
url = https://github.com/oracle/odpi/commit/31fdd70c06be711840a2668f572c7ee7c4434d18.patch;
sha256 = "1f00zp4w7l4vnkg0fmvnkga20ih8kjd5bxvr1nryziibjh1xp41j";
}) ];
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 = [];
};
}