-
-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
139 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
{ | ||
fetchurl, | ||
appimageTools, | ||
lib, | ||
libGL, | ||
glib, | ||
glibc, | ||
pango, | ||
harfbuzz, | ||
fontconfig, | ||
libX11, | ||
freetype, | ||
e2fsprogs, | ||
expat, | ||
p11-kit, | ||
libxcb, | ||
libgpg-error, | ||
stdenv, | ||
cjson, | ||
libxcrypt-legacy, | ||
curl, | ||
makeWrapper, | ||
autoPatchelfHook, | ||
libxkbcommon, | ||
libselinux, | ||
language ? "en", | ||
isLite ? false, | ||
}: | ||
assert lib.elem language [ | ||
"en" | ||
"cs" | ||
]; | ||
assert lib.isBool isLite; | ||
let | ||
pname = if isLite then "navicat-premium-lite" else "navicat-premium"; | ||
version = "17.1.1"; | ||
src = fetchurl { | ||
url = "https://dn.navicat.com/download/navicat17-premium-${ | ||
if isLite then "lite-" else "" | ||
}${language}-x86_64.AppImage"; | ||
sha256 = | ||
if language == "en" then | ||
if isLite then | ||
"etKXXttd+bSQTyOyzbDx1mXhBH6xqQ1e+aqZIGgKcHs=" | ||
else | ||
"A+JSvzt2E/zq5rajjmRlNFkxUGyu33fAkkBYkTMHcYM=" | ||
else if isLite then | ||
"CFNJQXf8vX1NDY81n2/P2cs/N3ZcWFJVjv9yY7yZyJQ=" | ||
else | ||
"TGSnn6fa8qLLMltOAdmZvPgdfM1Ut9eCsuV4G/uZjDw="; | ||
}; | ||
appimageContents = appimageTools.extractType2 { inherit pname version src; }; | ||
libraryPath = lib.makeLibraryPath [ | ||
libGL | ||
glib | ||
glibc | ||
pango | ||
harfbuzz | ||
fontconfig | ||
libX11 | ||
freetype | ||
e2fsprogs | ||
expat | ||
p11-kit | ||
libxcb | ||
libgpg-error | ||
libxkbcommon | ||
libselinux | ||
]; | ||
in | ||
stdenv.mkDerivation { | ||
inherit pname version; | ||
|
||
nativeBuildInputs = [ | ||
autoPatchelfHook | ||
makeWrapper | ||
]; | ||
|
||
buildInputs = [ | ||
libgpg-error | ||
libxcb | ||
p11-kit | ||
expat | ||
e2fsprogs | ||
freetype | ||
libX11 | ||
fontconfig | ||
harfbuzz | ||
pango | ||
glibc | ||
glib | ||
libGL | ||
cjson | ||
curl | ||
libxcrypt-legacy | ||
libxkbcommon | ||
libselinux | ||
]; | ||
|
||
dontUnpack = true; | ||
|
||
installPhase = '' | ||
runHook preInstall | ||
cp -a ${appimageContents}/usr $out/ | ||
chmod -R u+rwX,go+rX,go-w $out | ||
mkdir -p $out/usr | ||
ln -s $out/lib $out/usr/lib | ||
runHook postInstall | ||
''; | ||
|
||
preFixup = '' | ||
wrapProgram $out/bin/navicat \ | ||
--prefix LD_LIBRARY_PATH : "${libraryPath}:$out/lib/oci:$out/lib/obci:$out/lib/pq-g:$out/lib:~/.config/navicat/Premium/lib/sqlite:~/.config/navicat/Premium/lib/oci" \ | ||
--set QT_PLUGIN_PATH "$out/plugins" \ | ||
--set QT_QPA_PLATFORM xcb \ | ||
--set QT_STYLE_OVERRIDE Fusion \ | ||
--chdir "$out" | ||
''; | ||
|
||
meta = { | ||
homepage = | ||
if isLite then | ||
"https://www.navicat.com/products/navicat-premium-lite" | ||
else | ||
"https://www.navicat.com/products/navicat-premium"; | ||
description = | ||
if isLite then | ||
"Navicat Premium Lite is a compact version of Navicat, packed with the core features needed for users who primarily need to perform basic database operations" | ||
else | ||
"Navicat Premium is a database development tool that allows you to simultaneously connect to MySQL, PostgreSQL, MongoDB, MariaDB, SQL Server, Oracle, SQLite, and Redis databases from a single application"; | ||
mainProgram = "navicat"; | ||
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; | ||
license = lib.licenses.unfree; | ||
maintainers = with lib.maintainers; [ aucub ]; | ||
platforms = [ "x86_64-linux" ]; | ||
}; | ||
} |