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 18, 2024
1 parent 5f31855 commit 8bf2817
Showing 1 changed file with 73 additions and 0 deletions.
73 changes: 73 additions & 0 deletions pkgs/by-name/db/dbvisualizer/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
lib,
copyDesktopItems,
fetchurl,
makeDesktopItem,
makeWrapper,
stdenv,
temurin-jre-bin-17,
}:

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

src =
let
underscoreVersion = lib.concatStringsSep "_" (lib.splitString "." 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 ${temurin-jre-bin-17}
runHook postInstall
'';

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

0 comments on commit 8bf2817

Please sign in to comment.