2015-09-10 15:44:19 +01:00
|
|
|
{ stdenv, makeWrapper, requireFile, unzip, openjdk }:
|
2015-03-12 13:00:14 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-12-19 09:58:47 +00:00
|
|
|
version = "17.3.1.279.0537";
|
2017-10-15 00:13:25 +01:00
|
|
|
name = "sqldeveloper-${version}";
|
2015-03-12 13:00:14 +00:00
|
|
|
|
2017-10-15 00:13:25 +01:00
|
|
|
src = requireFile rec {
|
|
|
|
name = "sqldeveloper-${version}-no-jre.zip";
|
2017-10-15 00:14:34 +01:00
|
|
|
url = "http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/";
|
2017-10-15 00:13:25 +01:00
|
|
|
message = ''
|
|
|
|
This Nix expression requires that ${name} already be part of the store. To
|
|
|
|
obtain it you need to
|
|
|
|
|
|
|
|
- navigate to ${url}
|
2017-12-19 09:55:19 +00:00
|
|
|
- make sure that it says "Version ${version}" above the list of downloads
|
2017-10-15 00:14:34 +01:00
|
|
|
- if it does not, click on the "Previous Version" link below the downloads
|
|
|
|
and repeat until the version is correct. This is necessarry because as the
|
|
|
|
time of this writing there exists no permanent link for the current version
|
|
|
|
yet.
|
|
|
|
Also consider updating this package yourself (you probably just need to
|
|
|
|
change the `version` variable and update the sha256 to the one of the
|
|
|
|
new file) or opening an issue at the nixpkgs repo.
|
2017-10-15 00:13:25 +01:00
|
|
|
- accept the license agreement
|
|
|
|
- download the file listed under "Other Platforms"
|
|
|
|
- sign in or create an oracle account if neccessary
|
|
|
|
|
|
|
|
and then add the file to the Nix store using either:
|
|
|
|
|
|
|
|
nix-store --add-fixed sha256 ${name}
|
|
|
|
|
|
|
|
or
|
|
|
|
|
|
|
|
nix-prefetch-url --type sha256 file:///path/to/${name}
|
|
|
|
'';
|
2017-10-15 00:14:34 +01:00
|
|
|
# obtained by `sha256sum sqldeveloper-${version}-no-jre.zip`
|
2017-12-19 09:58:47 +00:00
|
|
|
sha256 = "d9c3c61b12a57d6b0fd6e172bf5716d6e829306d44815bf68ae42eab8a51bea3";
|
2015-03-12 13:00:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ makeWrapper unzip ];
|
|
|
|
|
|
|
|
buildCommand = ''
|
|
|
|
mkdir -p $out/bin
|
2015-09-10 15:44:19 +01:00
|
|
|
echo >$out/bin/sqldeveloper '#! ${stdenv.shell}'
|
|
|
|
echo >>$out/bin/sqldeveloper 'export JAVA_HOME=${openjdk}/lib/openjdk'
|
|
|
|
echo >>$out/bin/sqldeveloper 'export JDK_HOME=$JAVA_HOME'
|
|
|
|
echo >>$out/bin/sqldeveloper "cd $out/lib/${name}/sqldeveloper/bin"
|
|
|
|
echo >>$out/bin/sqldeveloper '${stdenv.shell} sqldeveloper "$@"'
|
|
|
|
chmod +x $out/bin/sqldeveloper
|
2015-03-12 13:00:14 +00:00
|
|
|
|
2015-09-10 15:44:19 +01:00
|
|
|
mkdir -p $out/lib/
|
2015-03-12 13:00:14 +00:00
|
|
|
cd $out
|
|
|
|
unzip ${src}
|
2015-09-10 15:44:19 +01:00
|
|
|
mv sqldeveloper $out/lib/${name}
|
2015-03-12 13:00:14 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2015-04-28 09:54:58 +01:00
|
|
|
description = "Oracle's Oracle DB GUI client";
|
2015-03-12 13:00:14 +00:00
|
|
|
longDescription = ''
|
|
|
|
Oracle SQL Developer is a free integrated development environment that
|
|
|
|
simplifies the development and management of Oracle Database in both
|
|
|
|
traditional and Cloud deployments. SQL Developer offers complete
|
|
|
|
end-to-end development of your PL/SQL applications, a worksheet for
|
|
|
|
running queries and scripts, a DBA console for managing the database,
|
|
|
|
a reports interface, a complete data modeling solution, and a migration
|
|
|
|
platform for moving your 3rd party databases to Oracle.
|
|
|
|
'';
|
2017-08-01 21:03:30 +01:00
|
|
|
homepage = http://www.oracle.com/technetwork/developer-tools/sql-developer/overview/;
|
2015-03-12 13:00:14 +00:00
|
|
|
license = licenses.unfree;
|
|
|
|
maintainers = [ maintainers.ardumont ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|