lol
1{
2 lib,
3 stdenv,
4 makeWrapper,
5 fetchurl,
6 unzip,
7 jdk,
8}:
9
10stdenv.mkDerivation (finalAttrs: {
11 pname = "sqlcl";
12 version = "25.2.2.199.0918";
13
14 src = fetchurl {
15 url = "https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-${finalAttrs.version}.zip";
16 hash = "sha256-YsIEJkQXeVIABsCXNBfT6WZbrXur1hoEZFj97JvGHV8=";
17 };
18
19 nativeBuildInputs = [
20 makeWrapper
21 unzip
22 ];
23
24 unpackCmd = "unzip $curSrc";
25
26 installPhase = ''
27 mkdir -p $out/libexec
28 mv * $out/libexec/
29
30 makeWrapper $out/libexec/bin/sql $out/bin/sqlcl \
31 --set JAVA_HOME ${jdk.home} \
32 --chdir "$out/libexec/bin"
33 '';
34
35 meta = with lib; {
36 description = "Oracle's Oracle DB CLI client";
37 longDescription = ''
38 Oracle SQL Developer Command Line (SQLcl) is a free command line
39 interface for Oracle Database. It allows you to interactively or batch
40 execute SQL and PL/SQL. SQLcl provides in-line editing, statement
41 completion, and command recall for a feature-rich experience, all while
42 also supporting your previously written SQL*Plus scripts.
43 '';
44 homepage = "https://www.oracle.com/database/sqldeveloper/technologies/sqlcl/";
45 license = licenses.unfreeRedistributable;
46 platforms = [ "x86_64-linux" ];
47 maintainers = with maintainers; [ misterio77 ];
48 };
49})