diff options
author | aszlig <aszlig@redmoonstudios.org> | 2013-03-07 07:49:26 +0100 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2013-03-07 10:24:18 +0100 |
commit | 7d273f07ea7e27e0c4525443a9383fae3b1784c2 (patch) | |
tree | 7e13d3300f8b90281b0926cb7546bea715e2520c /pkgs/servers/sql | |
parent | 536db80abf0d72cd9da7f8a40d6bf2bb7f8cbac7 (diff) | |
download | nixlib-7d273f07ea7e27e0c4525443a9383fae3b1784c2.tar nixlib-7d273f07ea7e27e0c4525443a9383fae3b1784c2.tar.gz nixlib-7d273f07ea7e27e0c4525443a9383fae3b1784c2.tar.bz2 nixlib-7d273f07ea7e27e0c4525443a9383fae3b1784c2.tar.lz nixlib-7d273f07ea7e27e0c4525443a9383fae3b1784c2.tar.xz nixlib-7d273f07ea7e27e0c4525443a9383fae3b1784c2.tar.zst nixlib-7d273f07ea7e27e0c4525443a9383fae3b1784c2.zip |
oracle-xe: Add new package, version 11.2.0.
This is the Oracle Database which they give out for free, therefore it's called Express Edition. Well, I pretty much packaged this in vain as I finally found out that i don't need that Oracle Database stuff at all. And my original purpose was to do SQL query/constraint testing. So before I'm going to throw this away (forever, oh no!), maybe someone else might have a use case for this. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'pkgs/servers/sql')
-rw-r--r-- | pkgs/servers/sql/oracle-xe/default.nix | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/pkgs/servers/sql/oracle-xe/default.nix b/pkgs/servers/sql/oracle-xe/default.nix new file mode 100644 index 000000000000..940e57ab8fb1 --- /dev/null +++ b/pkgs/servers/sql/oracle-xe/default.nix @@ -0,0 +1,83 @@ +{ stdenv, makeWrapper, requireFile, patchelf, rpm, cpio, libaio }: + +assert stdenv.system == "x86_64-linux"; + +with stdenv.lib; + +stdenv.mkDerivation rec { + name = "oracle-xe-${version}"; + version = "11.2.0"; + + src = requireFile { + name = "${name}-1.0.x86_64.rpm"; + sha256 = "0s2jj2xn56v5ys6hxb7l7045hw9c1mm1lhj4p2fvqbs02kqchab6"; + + url = "http://www.oracle.com/technetwork/" + + "products/express-edition/downloads/"; + }; + + buildInputs = [ makeWrapper ]; + + unpackCmd = '' + (mkdir -p "${name}" && cd "${name}" && + ${rpm}/bin/rpm2cpio "$curSrc" | ${cpio}/bin/cpio -id) + ''; + + buildPhase = let + libs = makeLibraryPath [ libaio ]; + in '' + basedir="u01/app/oracle/product/${version}/xe" + cat > "$basedir/network/admin/listener.ora" <<SQL + # listener.ora Network Configuration File: + + SID_LIST_LISTENER = + (SID_LIST = + (SID_DESC = + (SID_NAME = PLSExtProc) + (ORACLE_HOME = ''${out}/libexec/oracle) + (PROGRAM = extproc) + ) + ) + + LISTENER = + (DESCRIPTION_LIST = + (DESCRIPTION = + (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE)) + (ADDRESS = (PROTOCOL = TCP)(HOST = %hostname%)(PORT = %port%)) + ) + ) + + DEFAULT_SERVICE_LISTENER = (XE) + SQL + + find u01 \ + \( -name '*.sh' \ + -o -path "$basedir/bin/*" \ + \) -print -exec "${patchelf}/bin/patchelf" \ + --interpreter "$(cat "$NIX_GCC/nix-support/dynamic-linker")" \ + --set-rpath "${libs}:$out/libexec/oracle/lib" \ + --force-rpath '{}' \; + ''; + + dontStrip = true; + dontPatchELF = true; + + installPhase = '' + mkdir -p "$out/libexec" + cp -r "u01/app/oracle/product/${version}/xe" "$out/libexec/oracle" + + for i in "$out/libexec/oracle/bin"/*; do + makeWrapper "$i" "$out/bin/''${i##*/}" \ + --set ORACLE_HOME "$out/libexec/oracle" \ + --set ORACLE_SID XE \ + --set NLS_LANG '$("'"$out"'/libexec/oracle/bin/nls_lang.sh")' \ + --prefix PATH : "$out/libexec/oracle/bin" + done + ''; + + meta = { + description = "Oracle Database Express Edition"; + homepage = "http://www.oracle.com/technetwork/products/express-edition/"; + license = licenses.proprietary; + }; +} |