
This reverts commit 65a333600d5c88a98d674f637d092807cfc12253. This wasn't tested for correctness with something like fodwatch [0], and should not have been (self-)merged so quickly, especially without further review. It also resulted in the breakage of at least one package [1] (and that's the one we know of and was caught). A few packages that were updated in between this commit and this revert were not reverted back to using `rev`, but other than that, this is a 1:1 revert. [0]: https://codeberg.org/raphaelr/fodwatch [1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e4587d75882aebc21a04bee960418f8ce9
60 lines
1.5 KiB
Nix
60 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
fixDarwinDylibNames,
|
|
oracle-instantclient,
|
|
libaio,
|
|
}:
|
|
|
|
let
|
|
version = "5.4.1";
|
|
libPath = lib.makeLibraryPath [ oracle-instantclient.lib ];
|
|
|
|
in
|
|
stdenv.mkDerivation {
|
|
inherit version;
|
|
|
|
pname = "odpic";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "oracle";
|
|
repo = "odpi";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-CvsQ/w5r0d/l0m6wkgZtVBkX66Hcrz4U3b8qpHM0Dm8=";
|
|
};
|
|
|
|
nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
|
|
|
|
buildInputs = [ oracle-instantclient ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libaio ];
|
|
|
|
dontPatchELF = true;
|
|
makeFlags = [
|
|
"PREFIX=$(out)"
|
|
"CC=${stdenv.cc.targetPrefix}cc"
|
|
"LD=${stdenv.cc.targetPrefix}cc"
|
|
];
|
|
|
|
postFixup = ''
|
|
${lib.optionalString (stdenv.hostPlatform.isLinux) ''
|
|
patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $out/lib/libodpic${stdenv.hostPlatform.extensions.sharedLibrary})" $out/lib/libodpic${stdenv.hostPlatform.extensions.sharedLibrary}
|
|
''}
|
|
${lib.optionalString (stdenv.hostPlatform.isDarwin) ''
|
|
install_name_tool -add_rpath "${libPath}" $out/lib/libodpic${stdenv.hostPlatform.extensions.sharedLibrary}
|
|
''}
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Oracle ODPI-C library";
|
|
homepage = "https://oracle.github.io/odpi/";
|
|
maintainers = with maintainers; [ mkazulak ];
|
|
license = licenses.asl20;
|
|
platforms = [
|
|
"x86_64-linux"
|
|
"aarch64-linux"
|
|
"x86_64-darwin"
|
|
];
|
|
hydraPlatforms = [ ];
|
|
};
|
|
}
|