nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 autoPatchelfHook,
3 dpkg,
4 fetchurl,
5 gtk3,
6 gtksourceview3,
7 krb5,
8 lib,
9 libgee,
10 libsecret,
11 libxkbcommon,
12 stdenv,
13 wrapGAppsHook3,
14 libxrender,
15 libxrandr,
16 libxi,
17 libxext,
18 libxcursor,
19 libx11,
20 libxcb,
21}:
22
23stdenv.mkDerivation (finalAttrs: {
24 pname = "tableplus";
25 version = "0.1.284";
26
27 src = fetchurl {
28 url = "https://web.archive.org/web/20251230232124/https://deb.tableplus.com/debian/22/pool/main/t/tableplus/tableplus_${finalAttrs.version}_amd64.deb";
29 hash = "sha256-TrYRRpjSVRD721XEd0gwGPv4RNq/uwaswPW2J8oVjXQ=";
30 };
31
32 nativeBuildInputs = [
33 autoPatchelfHook
34 dpkg
35 wrapGAppsHook3
36 ];
37
38 buildInputs = [
39 gtk3
40 gtksourceview3
41 krb5
42 libgee
43 libsecret
44 libxkbcommon
45 libx11
46 libxcursor
47 libxext
48 libxi
49 libxrandr
50 libxrender
51 libxcb
52 ];
53
54 unpackPhase = ''
55 dpkg-deb -x $src .
56 '';
57
58 installPhase = ''
59 runHook preInstall
60
61 substituteInPlace opt/tableplus/tableplus.desktop \
62 --replace-fail "Exec=/usr/local/bin/tableplus" "Exec=tableplus" \
63 --replace-fail "Icon=/opt/tableplus/resource/image/logo.png" "Icon=tableplus"
64 install -Dt $out/bin opt/tableplus/tableplus
65 install -Dt $out/share/applications/ opt/tableplus/tableplus.desktop
66 install -Dt $out/share/icons/hicolor/256x256/apps/ opt/tableplus/resource/image/tableplus.png
67
68 runHook postInstall
69 '';
70
71 meta = {
72 description = "Database management made easy";
73 homepage = "https://tableplus.com";
74 license = lib.licenses.unfree;
75 maintainers = with lib.maintainers; [ rhydianjenkins ];
76 platforms = lib.platforms.linux;
77 mainProgram = "tableplus";
78 sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
79 };
80})