2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
2022-06-16 17:23:12 +00:00
|
|
|
, curlWithGnuTls
|
2021-06-28 23:13:55 +00:00
|
|
|
, zlib
|
|
|
|
, glib
|
|
|
|
, xorg
|
|
|
|
, dbus
|
|
|
|
, fontconfig
|
|
|
|
, libGL
|
|
|
|
, freetype
|
|
|
|
, xkeyboard_config
|
|
|
|
, makeDesktopItem
|
|
|
|
, makeWrapper
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "robo3t";
|
2021-03-16 09:55:35 +00:00
|
|
|
version = "1.4.3";
|
|
|
|
rev = "48f7dfd";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-03-16 09:55:35 +00:00
|
|
|
url = "https://github.com/Studio3T/robomongo/releases/download/v${version}/robo3t-${version}-linux-x86_64-${rev}.tar.gz";
|
|
|
|
sha256 = "sha256-pH4q/O3bq45ZZn+s/12iScd0WbfkcLjK4MBdVCMXK00=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
icon = fetchurl {
|
2021-03-16 09:55:35 +00:00
|
|
|
url = "https://github.com/Studio3T/robomongo/raw/${rev}/install/macosx/robomongo.iconset/icon_128x128.png";
|
|
|
|
sha256 = "sha256-2PkUxBq2ow0wl09k8B6LJJUQ+y4GpnmoAeumKN1u5xg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "robo3t";
|
|
|
|
exec = "robo3t";
|
|
|
|
icon = icon;
|
|
|
|
comment = "Query GUI for mongodb";
|
|
|
|
desktopName = "Robo3T";
|
|
|
|
genericName = "MongoDB management tool";
|
2022-03-05 16:20:37 +00:00
|
|
|
categories = [ "Development" "IDE" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
ldLibraryPath = lib.makeLibraryPath [
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.cc.cc
|
|
|
|
zlib
|
|
|
|
glib
|
|
|
|
xorg.libXi
|
|
|
|
xorg.libxcb
|
|
|
|
xorg.libXrender
|
|
|
|
xorg.libX11
|
|
|
|
xorg.libSM
|
|
|
|
xorg.libICE
|
|
|
|
xorg.libXext
|
|
|
|
dbus
|
|
|
|
fontconfig
|
|
|
|
freetype
|
|
|
|
libGL
|
2021-03-16 09:55:35 +00:00
|
|
|
curlWithGnuTls
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
installPhase = ''
|
2021-06-28 23:13:55 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
BASEDIR=$out/lib/robo3t
|
|
|
|
|
|
|
|
mkdir -p $BASEDIR/bin
|
|
|
|
cp bin/* $BASEDIR/bin
|
|
|
|
|
|
|
|
mkdir -p $BASEDIR/lib
|
|
|
|
cp -r lib/* $BASEDIR/lib
|
|
|
|
|
|
|
|
mkdir -p $out/share/applications
|
|
|
|
cp $desktopItem/share/applications/* $out/share/applications
|
|
|
|
|
|
|
|
mkdir -p $out/share/icons
|
|
|
|
cp ${icon} $out/share/icons/robomongo.png
|
|
|
|
|
|
|
|
patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 $BASEDIR/bin/robo3t
|
|
|
|
|
|
|
|
mkdir $out/bin
|
|
|
|
|
|
|
|
makeWrapper $BASEDIR/bin/robo3t $out/bin/robo3t \
|
|
|
|
--suffix LD_LIBRARY_PATH : ${ldLibraryPath} \
|
|
|
|
--suffix QT_XKB_CONFIG_ROOT : ${xkeyboard_config}/share/X11/xkb
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://robomongo.org/";
|
2021-06-28 23:13:55 +00:00
|
|
|
description = "Query GUI for mongodb. Formerly called Robomongo";
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2022-06-26 10:26:21 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2021-06-28 23:13:55 +00:00
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ eperuffo ];
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "robo3t";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|