{ 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" <