1 { lib, fetchurl, appimageTools, pkgs, makeWrapper }:
4 pname = "beekeeper-studio";
6 name = "${pname}-${version}";
9 url = "https://github.com/beekeeper-studio/beekeeper-studio/releases/download/v${version}/Beekeeper-Studio-${version}.AppImage";
10 name = "${pname}-${version}.AppImage";
11 hash = "sha512-an4Gqx2mx/rnkLe/LUAz3qRdrqWBcrWcdCiNi8Hz1OKBp1SWN3acU8RppIM0uwlrcBkjnigbbM5DZ2o+svA23A==";
14 appimageContents = appimageTools.extractType2 {
18 appimageTools.wrapType2 {
21 multiArch = false; # no 32bit needed
22 extraPkgs = pkgs: appimageTools.defaultFhsEnvArgs.multiPkgs pkgs ++ [ pkgs.bash ];
24 extraInstallCommands = ''
25 ln -s $out/bin/${name} $out/bin/${pname}
26 source "${makeWrapper}/nix-support/setup-hook"
27 wrapProgram $out/bin/${pname} \
28 --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland}}"
29 install -m 444 -D ${appimageContents}/${pname}.desktop $out/share/applications/${pname}.desktop
30 install -m 444 -D ${appimageContents}/${pname}.png \
31 $out/share/icons/hicolor/512x512/apps/${pname}.png
32 substituteInPlace $out/share/applications/${pname}.desktop \
33 --replace 'Exec=AppRun' 'Exec=${pname}'
38 description = "Modern and easy to use SQL client for MySQL, Postgres, SQLite, SQL Server, and more. Linux, MacOS, and Windows";
39 homepage = "https://www.beekeeperstudio.io";
40 changelog = "https://github.com/beekeeper-studio/beekeeper-studio/releases/tag/v${version}";
41 license = licenses.mit;
42 maintainers = with maintainers; [ milogert alexnortung ];
43 platforms = [ "x86_64-linux" ];