1{
2 lib,
3 fetchurl,
4 _7zz,
5 stdenv,
6}:
7
8stdenv.mkDerivation (finalAttrs: {
9 pname = "tableplus";
10 version = "538";
11 src = fetchurl {
12 url = "https://download.tableplus.com/macos/${finalAttrs.version}/TablePlus.dmg";
13 hash = "sha256-db3dvjEzkqWrEO+lXyImk0cVBkh8MnCwHOYKIg+kRC4=";
14 };
15
16 sourceRoot = "TablePlus.app";
17
18 nativeBuildInputs = [ _7zz ];
19
20 installPhase = ''
21 runHook preInstall
22
23 mkdir -p "$out/Applications/TablePlus.app"
24 cp -R . "$out/Applications/TablePlus.app"
25 mkdir "$out/bin"
26 ln -s "$out/Applications/TablePlus.app/Contents/MacOS/TablePlus" "$out/bin/${finalAttrs.pname}"
27
28 runHook postInstall
29 '';
30
31 meta = with lib; {
32 description = "Database management made easy";
33 homepage = "https://tableplus.com";
34 license = licenses.unfree;
35 maintainers = with maintainers; [ yamashitax ];
36 platforms = platforms.darwin;
37 };
38})