3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/odpic/default.nix
Vladimír Čunát 336bc8283b
Re-Revert "Merge #101508: libraw: 0.20.0 -> 0.20.2"
This reverts commit c778945806.

I believe this is exactly what brings the staging branch into
the right shape after the last merge from master (through staging-next);
otherwise part of staging changes would be lost
(due to being already reachable from master but reverted).
2020-10-26 08:19:17 +01:00

45 lines
1.4 KiB
Nix

{ stdenv, fetchFromGitHub, fixDarwinDylibNames, oracle-instantclient, libaio }:
let
version = "4.0.2";
libPath = stdenv.lib.makeLibraryPath [ oracle-instantclient.lib ];
in stdenv.mkDerivation {
inherit version;
pname = "odpic";
src = fetchFromGitHub {
owner = "oracle";
repo = "odpi";
rev = "v${version}";
sha256 = "1g2wdchlwdihqj0ynx58nwyrpncxanghlnykgir97p0wimg3hnxl";
};
nativeBuildInputs = stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
buildInputs = [ oracle-instantclient ]
++ stdenv.lib.optionals stdenv.isLinux [ libaio ];
dontPatchELF = true;
makeFlags = [ "PREFIX=$(out)" "CC=cc" "LD=cc"];
postFixup = ''
${stdenv.lib.optionalString (stdenv.isLinux) ''
patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $out/lib/libodpic${stdenv.hostPlatform.extensions.sharedLibrary})" $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}
''}
'';
meta = with stdenv.lib; {
description = "Oracle ODPI-C library";
homepage = "https://oracle.github.io/odpi/";
maintainers = with maintainers; [ mkazulak flokli ];
license = licenses.asl20;
platforms = [ "x86_64-linux" "x86_64-darwin" ];
hydraPlatforms = [];
};
}