oracle-instantclient: turn into a multi-output derivation
This commit is contained in:
parent
d9617978fb
commit
6081611046
4 changed files with 22 additions and 13 deletions
|
@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
|
|||
++ stdenv.lib.optionals stdenv.isLinux [ libaio ];
|
||||
|
||||
libPath = stdenv.lib.makeLibraryPath
|
||||
[ oracle-instantclient ];
|
||||
[ oracle-instantclient.lib ];
|
||||
|
||||
dontPatchELF = true;
|
||||
makeFlags = [ "PREFIX=$(out)" "CC=cc" "LD=cc"];
|
||||
|
|
|
@ -47,18 +47,15 @@ in stdenv.mkDerivation rec {
|
|||
++ optional stdenv.isLinux autoPatchelfHook
|
||||
++ optional stdenv.isDarwin fixDarwinDylibNames;
|
||||
|
||||
outputs = [ "out" "dev" "lib"];
|
||||
|
||||
unpackCmd = "unzip $curSrc";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out/"{bin,include,lib,"share/java","share/${name}/demo/"}
|
||||
install -Dm755 {sqlplus,adrci,genezi} $out/bin
|
||||
${optionalString stdenv.isDarwin ''
|
||||
for exe in "$out/bin/"* ; do
|
||||
install_name_tool -add_rpath "$out/lib" "$exe"
|
||||
done
|
||||
''}
|
||||
ln -sfn $out/bin/sqlplus $out/bin/sqlplus64
|
||||
install -Dm644 *${extLib}* $out/lib
|
||||
mkdir -p "$out/"{bin,include,"share/java","share/${name}/demo/"} $lib/lib
|
||||
install -Dm755 {adrci,genezi,uidrvci,sqlplus} $out/bin
|
||||
install -Dm644 *${extLib}* $lib/lib
|
||||
|
||||
install -Dm644 *.jar $out/share/java
|
||||
install -Dm644 sdk/include/* $out/include
|
||||
install -Dm644 sdk/demo/* $out/share/${name}/demo
|
||||
|
@ -68,6 +65,15 @@ in stdenv.mkDerivation rec {
|
|||
ln -sfn $out/lib/libclntsh${extLib}.12.1 $out/lib/libclntsh${extLib}
|
||||
'';
|
||||
|
||||
postFixup = optionalString stdenv.isDarwin ''
|
||||
for exe in "$out/bin/"* ; do
|
||||
if [ ! -L "$exe" ]; then
|
||||
install_name_tool -add_rpath "$lib/lib" "$exe"
|
||||
fi
|
||||
done
|
||||
'';
|
||||
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Oracle instant client libraries and sqlplus CLI";
|
||||
longDescription = ''
|
||||
|
|
|
@ -9,7 +9,7 @@ buildPerlPackage {
|
|||
sha256 = "b6db7f43c6252179274cfe99c1950b93e248f8f0fe35b07e50388c85d814d5f3";
|
||||
};
|
||||
|
||||
ORACLE_HOME = "${oracle-instantclient}/lib";
|
||||
ORACLE_HOME = "${oracle-instantclient.lib}/lib";
|
||||
|
||||
buildInputs = [ TestNoWarnings oracle-instantclient ] ;
|
||||
propagatedBuildInputs = [ DBI ];
|
||||
|
|
|
@ -237,9 +237,12 @@ let
|
|||
pname = "oci8";
|
||||
|
||||
sha256 = "0jhivxj1nkkza4h23z33y7xhffii60d7dr51h1czjk10qywl7pyd";
|
||||
|
||||
buildInputs = [ pkgs.oracle-instantclient ];
|
||||
configureFlags = [ "--with-oci8=shared,instantclient,${pkgs.oracle-instantclient}/lib" ];
|
||||
configureFlags = [ "--with-oci8=shared,instantclient,${pkgs.oracle-instantclient.lib}/lib" ];
|
||||
|
||||
postPatch = ''
|
||||
sed -i -e 's|OCISDKMANINC=`.*$|OCISDKMANINC="${pkgs.oracle-instantclient.dev}/include"|' config.m4
|
||||
'';
|
||||
};
|
||||
|
||||
pcs = buildPecl rec {
|
||||
|
|
Loading…
Reference in a new issue