about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/misc/tableplus/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/misc/tableplus/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/misc/tableplus/default.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/misc/tableplus/default.nix b/nixpkgs/pkgs/applications/misc/tableplus/default.nix
new file mode 100644
index 000000000000..c53f89582b45
--- /dev/null
+++ b/nixpkgs/pkgs/applications/misc/tableplus/default.nix
@@ -0,0 +1,37 @@
+{ lib
+, fetchurl
+, undmg
+, stdenv
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "tableplus";
+  version = "504";
+  src = fetchurl {
+    url = "https://download.tableplus.com/macos/${finalAttrs.version}/TablePlus.dmg";
+    hash = "sha256-YFUquv71QFEnlmh93+HsFN6XtgoUx6CMOVqfdWAIWfo=";
+  };
+
+  sourceRoot = "TablePlus.app";
+
+  nativeBuildInputs = [ undmg ];
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p "$out/Applications/TablePlus.app"
+    cp -R . "$out/Applications/TablePlus.app"
+    mkdir "$out/bin"
+    ln -s "$out/Applications/TablePlus.app/Contents/MacOS/TablePlus" "$out/bin/${finalAttrs.pname}"
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Database management made easy";
+    homepage = "https://tableplus.com";
+    license = licenses.unfree;
+    maintainers = with maintainers; [ yamashitax ];
+    platforms = platforms.darwin;
+  };
+})