nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 copyDesktopItems,
4 fetchurl,
5 makeDesktopItem,
6 makeWrapper,
7 openjdk17,
8 stdenv,
9}:
10
11let
12 pname = "dbvisualizer";
13in
14stdenv.mkDerivation (finalAttrs: {
15 inherit pname;
16 version = "25.2.6";
17
18 src =
19 let
20 underscoreVersion = builtins.replaceStrings [ "." ] [ "_" ] finalAttrs.version;
21 in
22 fetchurl {
23 url = "https://www.dbvis.com/product_download/dbvis-${finalAttrs.version}/media/dbvis_linux_${underscoreVersion}.tar.gz";
24 hash = "sha256-yiL0FFkSntwLy/oOkiDQKTvTOUrtbv/9kV+1nLZtMB0=";
25 };
26
27 strictDeps = true;
28
29 nativeBuildInputs = [
30 copyDesktopItems
31 makeWrapper
32 ];
33
34 desktopItems = [
35 (makeDesktopItem {
36 name = pname;
37 desktopName = "DB Visualizer";
38 tryExec = "dbvis";
39 exec = "dbvis";
40 icon = "dbvisualizer";
41 categories = [ "Development" ];
42 terminal = false;
43 keywords = [
44 "Database"
45 "SQL"
46 ];
47 })
48 ];
49
50 installPhase = ''
51 runHook preInstall
52
53 mkdir -p $out/bin
54 cp -a . $out
55
56 mkdir -p $out/share/icons/hicolor/128x128/apps
57 ln -s $out/resources/images/tool/dbvis-icon128x128.png \
58 $out/share/icons/hicolor/128x128/apps/dbvisualizer.png
59
60 ln -s $out/dbvis $out/bin/
61 wrapProgram $out/bin/dbvis --set INSTALL4J_JAVA_HOME ${openjdk17}
62
63 runHook postInstall
64 '';
65
66 meta = {
67 description = "Universal database tool";
68 homepage = "https://www.dbvis.com/";
69 maintainers = with lib.maintainers; [ boldikoller ];
70 license = lib.licenses.unfree;
71 mainProgram = "dbvis";
72 sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
73 };
74})