Skip to content

Commit

Permalink
dbvisualizer: init at 24.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
boldikoller committed Nov 25, 2024
1 parent 5f31855 commit 639e6bc
Showing 1 changed file with 74 additions and 0 deletions.
74 changes: 74 additions & 0 deletions pkgs/by-name/db/dbvisualizer/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
lib,
copyDesktopItems,
fetchurl,
makeDesktopItem,
makeWrapper,
openjdk17,
stdenv,
}:

let
pname = "dbvisualizer";
in
stdenv.mkDerivation (finalAttrs: {
inherit pname;
version = "24.2.2";

src =
let
underscoreVersion = builtins.replaceStrings [ "." ] [ "_" ] finalAttrs.version;
in
fetchurl {
url = "https://www.dbvis.com/product_download/dbvis-${finalAttrs.version}/media/dbvis_linux_${underscoreVersion}.tar.gz";
hash = "sha256-/K50c7pqpKQ2/EEk2iPSTT+3IbLRF1cdo8GHzkIXiHQ=";
};

strictDeps = true;

nativeBuildInputs = [
copyDesktopItems
makeWrapper
];

desktopItems = [
(makeDesktopItem {
name = pname;
desktopName = "DB Visualizer";
tryExec = "dbvis";
exec = "dbvis";
icon = "dbvisualizer";
categories = [ "Development" ];
terminal = false;
keywords = [
"Database"
"SQL"
];
})
];

installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp -a . $out
mkdir -p $out/share/icons/hicolor/128x128/apps
ln -s $out/resources/images/tool/dbvis-icon128x128.png \
$out/share/icons/hicolor/128x128/apps/dbvisualizer.png
ln -s $out/dbvis $out/bin/
wrapProgram $out/bin/dbvis --set INSTALL4J_JAVA_HOME ${openjdk17}
runHook postInstall
'';

meta = {
description = "The universal database tool";
homepage = "https://www.dbvis.com/";
maintainers = with lib.maintainers; [ boldikoller ];
license = lib.licenses.unfree;
mainProgram = "dbvis";
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
};
})

0 comments on commit 639e6bc

Please sign in to comment.