nixpkgs/pkgs/development/libraries/odpic/default.nix

45 lines
1.4 KiB
Nix
Raw Normal View History

2019-08-20 00:17:13 +02:00
{ stdenv, fetchFromGitHub, fixDarwinDylibNames, oracle-instantclient, libaio }:
2018-06-01 10:30:55 +02:00
2019-08-20 00:17:13 +02:00
let
2020-01-26 09:53:27 +01:00
version = "3.3.0";
2019-08-20 00:17:13 +02:00
libPath = stdenv.lib.makeLibraryPath [ oracle-instantclient.lib ];
2018-06-01 10:30:55 +02:00
2019-08-20 00:17:13 +02:00
in stdenv.mkDerivation {
inherit version;
pname = "odpic";
src = fetchFromGitHub {
owner = "oracle";
repo = "odpi";
rev = "v${version}";
2020-01-26 09:53:27 +01:00
sha256 = "0qyfpincifz2vgicjd4q3rk563sg7927xja53rz3l7zv54wp9k62";
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
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) ''
2019-08-21 02:56:18 +02:00
patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $out/lib/libodpic${stdenv.hostPlatform.extensions.sharedLibrary})" $out/lib/libodpic${stdenv.hostPlatform.extensions.sharedLibrary}
2018-06-08 02:45:56 +02:00
''}
${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 = [];
};
}