2021-01-23 12:26:19 +00:00
|
|
|
{ lib, stdenv, makeDesktopItem, makeWrapper, requireFile, unzip, jdk }:
|
2015-03-12 13:00:14 +00:00
|
|
|
|
2018-04-23 14:04:09 +01:00
|
|
|
let
|
2021-01-25 18:13:07 +00:00
|
|
|
version = "20.4.0.379.2205";
|
2018-04-23 14:04:09 +01:00
|
|
|
|
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "sqldeveloper";
|
|
|
|
exec = "sqldeveloper";
|
|
|
|
icon = "sqldeveloper";
|
|
|
|
desktopName = "Oracle SQL Developer";
|
|
|
|
genericName = "Oracle SQL Developer";
|
|
|
|
comment = "Oracle's Oracle DB GUI client";
|
2020-06-25 03:18:37 +01:00
|
|
|
categories = "Development;";
|
2018-04-23 14:04:09 +01:00
|
|
|
};
|
|
|
|
in
|
2019-08-13 22:52:01 +01:00
|
|
|
stdenv.mkDerivation {
|
2018-04-23 14:04:09 +01:00
|
|
|
|
|
|
|
inherit version;
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "sqldeveloper";
|
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";
|
2020-02-04 12:14:36 +00:00
|
|
|
url = "https://www.oracle.com/tools/downloads/sqldev-downloads.html";
|
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}
|
|
|
|
'';
|
2021-01-25 18:13:07 +00:00
|
|
|
sha256 = "1h53gl41ydr7kim6q9ckg3xyhb0rhmwj7jnis0xz6vms52b3h59k";
|
2015-03-12 13:00:14 +00:00
|
|
|
};
|
|
|
|
|
2021-02-07 09:17:39 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ unzip ];
|
2015-03-12 13:00:14 +00:00
|
|
|
|
2018-08-15 22:37:31 +01:00
|
|
|
unpackCmd = "unzip $curSrc";
|
2015-03-12 13:00:14 +00:00
|
|
|
|
2018-08-15 22:37:31 +01:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/libexec $out/share/{applications,pixmaps}
|
|
|
|
mv * $out/libexec/
|
2018-04-23 14:04:09 +01:00
|
|
|
|
2018-08-15 22:37:31 +01:00
|
|
|
mv $out/libexec/icon.png $out/share/pixmaps/sqldeveloper.png
|
2018-04-23 14:04:09 +01:00
|
|
|
cp ${desktopItem}/share/applications/* $out/share/applications
|
2018-08-15 22:37:31 +01:00
|
|
|
|
|
|
|
makeWrapper $out/libexec/sqldeveloper/bin/sqldeveloper $out/bin/sqldeveloper \
|
|
|
|
--set JAVA_HOME ${jdk.home} \
|
|
|
|
--run "cd $out/libexec/sqldeveloper/bin"
|
2015-03-12 13:00:14 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
meta = with 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.
|
|
|
|
'';
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://www.oracle.com/technetwork/developer-tools/sql-developer/overview/";
|
2015-03-12 13:00:14 +00:00
|
|
|
license = licenses.unfree;
|
2020-02-04 12:14:36 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
maintainers = with maintainers; [ ardumont ma27 ];
|
2015-03-12 13:00:14 +00:00
|
|
|
};
|
|
|
|
}
|