1{ lib, fetchurl, appimageTools, pkgs }:
2
3let
4 pname = "beekeeper-studio";
5 version = "2.1.4";
6 name = "${pname}-${version}";
7
8 src = fetchurl {
9 url = "https://github.com/beekeeper-studio/beekeeper-studio/releases/download/v${version}/Beekeeper-Studio-${version}.AppImage";
10 name="${pname}-${version}.AppImage";
11 sha512 = "1aik88wi9axv66axjmmjmlna1sp0pz92z8i2x6pq3bs0gcs4i1q3qxxbrfc14ynbpa65knimfhwzrrshchnijgdazx3qjzh8jwzfiwl";
12 };
13
14 appimageContents = appimageTools.extractType2 {
15 inherit name src;
16 };
17in appimageTools.wrapType2 {
18 inherit name src;
19
20 multiPkgs = null; # no 32bit needed
21 extraPkgs = pkgs: appimageTools.defaultFhsEnvArgs.multiPkgs pkgs ++ [ pkgs.bash ];
22
23 extraInstallCommands = ''
24 ln -s $out/bin/${name} $out/bin/${pname}
25 install -m 444 -D ${appimageContents}/${pname}.desktop $out/share/applications/${pname}.desktop
26 install -m 444 -D ${appimageContents}/${pname}.png \
27 $out/share/icons/hicolor/512x512/apps/${pname}.png
28 substituteInPlace $out/share/applications/${pname}.desktop \
29 --replace 'Exec=AppRun' 'Exec=${pname}'
30 '';
31
32 meta = with lib; {
33 description = "Modern and easy to use SQL client for MySQL, Postgres, SQLite, SQL Server, and more. Linux, MacOS, and Windows";
34 homepage = "https://www.beekeeperstudio.io";
35 changelog = "https://github.com/beekeeper-studio/beekeeper-studio/releases/tag/v2.1.4";
36 license = licenses.mit;
37 maintainers = with maintainers; [ milogert ];
38 platforms = [ "x86_64-linux" ];
39 };
40}