lol
1{ stdenv, makeWrapper, requireFile, unzip, oraclejdk8, bash}:
2
3stdenv.mkDerivation rec {
4 version = "4.1.0.19.07";
5 name = "sqldeveloper-${version}";
6
7 src = requireFile {
8 name = "${name}-no-jre.zip";
9 url = http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html;
10 sha256 = "09gr40n4574fw9hg47xi4dk8vwgawzkjzzzj2h5jaicy0fdjkpbx";
11 };
12
13 buildInputs = [ makeWrapper unzip ];
14
15 buildCommand = ''
16 mkdir -p $out/bin
17 # patch to be able to install a sqldeveloper wrapper script compliant with nix's bin folder once installed
18 echo -e '#!${bash}/bin/bash\ncd "`dirname $0`"/../sqldeveloper/bin && ${bash}/bin/bash sqldeveloper $*' >> $out/bin/sqldeveloper
19
20 cd $out
21 unzip ${src}
22 cp -r sqldeveloper/* $out/
23 # Activate the needed shell script
24 rm $out/sqldeveloper.sh
25 chmod +x $out/bin/sqldeveloper
26 chmod +x $out/sqldeveloper/bin/sqldeveloper
27
28 wrapProgram $out/bin/sqldeveloper \
29 --set JAVA_HOME "${oraclejdk8}"
30 '';
31
32 meta = with stdenv.lib; {
33 description = "Oracle's Oracle DB GUI client";
34 longDescription = ''
35 Oracle SQL Developer is a free integrated development environment that
36 simplifies the development and management of Oracle Database in both
37 traditional and Cloud deployments. SQL Developer offers complete
38 end-to-end development of your PL/SQL applications, a worksheet for
39 running queries and scripts, a DBA console for managing the database,
40 a reports interface, a complete data modeling solution, and a migration
41 platform for moving your 3rd party databases to Oracle.
42 '';
43 homepage = http://www.oracle.com/technetwork/developer-tools/sql-developer/overview/index.html;
44 license = licenses.unfree;
45 maintainers = [ maintainers.ardumont ];
46 platforms = platforms.linux;
47 };
48}