tableplus: add linux support
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
{
|
||||
lib,
|
||||
fetchurl,
|
||||
_7zz,
|
||||
stdenv,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "tableplus";
|
||||
version = "538";
|
||||
src = fetchurl {
|
||||
url = "https://download.tableplus.com/macos/${finalAttrs.version}/TablePlus.dmg";
|
||||
hash = "sha256-db3dvjEzkqWrEO+lXyImk0cVBkh8MnCwHOYKIg+kRC4=";
|
||||
};
|
||||
|
||||
sourceRoot = "TablePlus.app";
|
||||
|
||||
nativeBuildInputs = [ _7zz ];
|
||||
|
||||
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 = {
|
||||
description = "Database management made easy";
|
||||
homepage = "https://tableplus.com";
|
||||
license = lib.licenses.unfree;
|
||||
maintainers = with lib.maintainers; [ yamashitax ];
|
||||
platforms = lib.platforms.darwin;
|
||||
};
|
||||
})
|
||||
@@ -0,0 +1,74 @@
|
||||
{
|
||||
autoPatchelfHook,
|
||||
dpkg,
|
||||
fetchurl,
|
||||
gtk3,
|
||||
gtksourceview3,
|
||||
krb5,
|
||||
lib,
|
||||
libgee,
|
||||
libsecret,
|
||||
libxkbcommon,
|
||||
stdenv,
|
||||
wrapGAppsHook3,
|
||||
xorg,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "tableplus";
|
||||
version = "0.1.284";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://web.archive.org/web/20251230232124/https://deb.tableplus.com/debian/22/pool/main/t/tableplus/tableplus_${finalAttrs.version}_amd64.deb";
|
||||
hash = "sha256-TrYRRpjSVRD721XEd0gwGPv4RNq/uwaswPW2J8oVjXQ=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoPatchelfHook
|
||||
dpkg
|
||||
wrapGAppsHook3
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gtk3
|
||||
gtksourceview3
|
||||
krb5
|
||||
libgee
|
||||
libsecret
|
||||
libxkbcommon
|
||||
xorg.libX11
|
||||
xorg.libXcursor
|
||||
xorg.libXext
|
||||
xorg.libXi
|
||||
xorg.libXrandr
|
||||
xorg.libXrender
|
||||
xorg.libxcb
|
||||
];
|
||||
|
||||
unpackPhase = ''
|
||||
dpkg-deb -x $src .
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
substituteInPlace opt/tableplus/tableplus.desktop \
|
||||
--replace-fail "Exec=/usr/local/bin/tableplus" "Exec=tableplus" \
|
||||
--replace-fail "Icon=/opt/tableplus/resource/image/logo.png" "Icon=tableplus"
|
||||
install -Dt $out/bin opt/tableplus/tableplus
|
||||
install -Dt $out/share/applications/ opt/tableplus/tableplus.desktop
|
||||
install -Dt $out/share/icons/hicolor/256x256/apps/ opt/tableplus/resource/image/tableplus.png
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Database management made easy";
|
||||
homepage = "https://tableplus.com";
|
||||
license = lib.licenses.unfree;
|
||||
maintainers = with lib.maintainers; [ rhydianjenkins ];
|
||||
platforms = lib.platforms.linux;
|
||||
mainProgram = "tableplus";
|
||||
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
|
||||
};
|
||||
})
|
||||
@@ -1,38 +1,11 @@
|
||||
{
|
||||
lib,
|
||||
fetchurl,
|
||||
_7zz,
|
||||
callPackage,
|
||||
stdenv,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "tableplus";
|
||||
version = "538";
|
||||
src = fetchurl {
|
||||
url = "https://download.tableplus.com/macos/${finalAttrs.version}/TablePlus.dmg";
|
||||
hash = "sha256-db3dvjEzkqWrEO+lXyImk0cVBkh8MnCwHOYKIg+kRC4=";
|
||||
};
|
||||
|
||||
sourceRoot = "TablePlus.app";
|
||||
|
||||
nativeBuildInputs = [ _7zz ];
|
||||
|
||||
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 = {
|
||||
description = "Database management made easy";
|
||||
homepage = "https://tableplus.com";
|
||||
license = lib.licenses.unfree;
|
||||
maintainers = with lib.maintainers; [ yamashitax ];
|
||||
platforms = lib.platforms.darwin;
|
||||
};
|
||||
})
|
||||
if stdenv.hostPlatform.isDarwin then
|
||||
callPackage ./darwin.nix { }
|
||||
else if stdenv.hostPlatform.isLinux then
|
||||
callPackage ./linux.nix { }
|
||||
else
|
||||
throw "Unsupported platform: ${stdenv.hostPlatform.system}"
|
||||
|
||||
Reference in New Issue
Block a user