2018-05-09 04:14:37 +02:00
|
|
|
{ stdenv, fetchurl, dpkg
|
|
|
|
, alsaLib, atk, cairo, cups, curl, dbus, expat, fontconfig, freetype, glib
|
2019-11-18 19:26:27 +01:00
|
|
|
, gnome2, gnome3, libnotify, libxcb, nspr, nss, systemd, xorg, wrapGAppsHook }:
|
2018-05-09 04:14:37 +02:00
|
|
|
|
|
|
|
let
|
|
|
|
|
2019-07-24 17:04:37 +02:00
|
|
|
version = "1.17.0";
|
2018-05-09 04:14:37 +02:00
|
|
|
|
|
|
|
rpath = stdenv.lib.makeLibraryPath [
|
|
|
|
alsaLib
|
|
|
|
atk
|
|
|
|
cairo
|
|
|
|
cups
|
|
|
|
curl
|
|
|
|
dbus
|
|
|
|
expat
|
|
|
|
fontconfig
|
|
|
|
freetype
|
|
|
|
glib
|
|
|
|
gnome2.GConf
|
|
|
|
gnome2.gdk_pixbuf
|
2019-07-24 17:04:37 +02:00
|
|
|
gnome3.gtk
|
2018-05-09 04:14:37 +02:00
|
|
|
gnome2.pango
|
|
|
|
libnotify
|
|
|
|
libxcb
|
|
|
|
nspr
|
|
|
|
nss
|
|
|
|
stdenv.cc.cc
|
|
|
|
systemd
|
|
|
|
|
|
|
|
xorg.libxkbfile
|
|
|
|
xorg.libX11
|
|
|
|
xorg.libXcomposite
|
|
|
|
xorg.libXcursor
|
|
|
|
xorg.libXdamage
|
|
|
|
xorg.libXext
|
|
|
|
xorg.libXfixes
|
|
|
|
xorg.libXi
|
|
|
|
xorg.libXrandr
|
|
|
|
xorg.libXrender
|
|
|
|
xorg.libXtst
|
|
|
|
xorg.libXScrnSaver
|
|
|
|
] + ":${stdenv.cc.cc.lib}/lib64";
|
|
|
|
|
|
|
|
src =
|
2018-08-20 21:11:29 +02:00
|
|
|
if stdenv.hostPlatform.system == "x86_64-linux" then
|
2018-05-09 04:14:37 +02:00
|
|
|
fetchurl {
|
|
|
|
url = "https://downloads.mongodb.com/compass/mongodb-compass_${version}_amd64.deb";
|
2019-07-24 17:04:37 +02:00
|
|
|
sha256 = "085xq1ik8kyza1kq9kn0pf98zk6g2qa21clxhn48rgnqk20aninv";
|
2018-05-09 04:14:37 +02:00
|
|
|
}
|
|
|
|
else
|
2018-08-20 21:11:29 +02:00
|
|
|
throw "MongoDB compass is not supported on ${stdenv.hostPlatform.system}";
|
2018-05-09 04:14:37 +02:00
|
|
|
|
|
|
|
in stdenv.mkDerivation {
|
2019-08-13 23:52:01 +02:00
|
|
|
pname = "mongodb-compass";
|
|
|
|
inherit version;
|
2018-05-09 04:14:37 +02:00
|
|
|
|
|
|
|
inherit src;
|
|
|
|
|
2019-11-18 19:26:27 +01:00
|
|
|
buildInputs = [ dpkg wrapGAppsHook gnome3.gtk ];
|
2019-06-19 17:45:34 +02:00
|
|
|
dontUnpack = true;
|
2018-05-09 04:14:37 +02:00
|
|
|
|
|
|
|
buildCommand = ''
|
|
|
|
IFS=$'\n'
|
|
|
|
dpkg -x $src $out
|
|
|
|
cp -av $out/usr/* $out
|
|
|
|
rm -rf $out/share/lintian
|
|
|
|
#The node_modules are bringing in non-linux files/dependencies
|
|
|
|
find $out -name "*.app" -exec rm -rf {} \; || true
|
|
|
|
find $out -name "*.dll" -delete
|
|
|
|
find $out -name "*.exe" -delete
|
|
|
|
# Otherwise it looks "suspicious"
|
|
|
|
chmod -R g-w $out
|
|
|
|
for file in `find $out -type f -perm /0111 -o -name \*.so\*`; do
|
|
|
|
echo "Manipulating file: $file"
|
|
|
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$file" || true
|
|
|
|
patchelf --set-rpath ${rpath}:$out/share/mongodb-compass "$file" || true
|
|
|
|
done
|
2019-11-18 19:26:27 +01:00
|
|
|
wrapGAppsHook $out/bin/mongodb-compass
|
2018-05-09 04:14:37 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "The GUI for MongoDB";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://www.mongodb.com/products/compass";
|
2018-05-09 04:14:37 +02:00
|
|
|
license = licenses.unfree;
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|