2021-11-16 22:13:42 +00:00
|
|
|
{
|
2024-06-27 08:33:36 +01:00
|
|
|
alsa-lib,
|
|
|
|
at-spi2-atk,
|
|
|
|
at-spi2-core,
|
|
|
|
atk,
|
|
|
|
cairo,
|
|
|
|
cups,
|
|
|
|
curl,
|
|
|
|
dbus,
|
|
|
|
dpkg,
|
|
|
|
expat,
|
|
|
|
fetchurl,
|
|
|
|
fontconfig,
|
|
|
|
freetype,
|
|
|
|
gdk-pixbuf,
|
|
|
|
glib,
|
|
|
|
gtk3,
|
|
|
|
lib,
|
|
|
|
libdrm,
|
2024-09-26 14:34:54 +01:00
|
|
|
libGL,
|
2024-06-27 08:33:36 +01:00
|
|
|
libnotify,
|
|
|
|
libsecret,
|
|
|
|
libuuid,
|
|
|
|
libxcb,
|
|
|
|
libxkbcommon,
|
|
|
|
mesa,
|
|
|
|
nspr,
|
|
|
|
nss,
|
|
|
|
pango,
|
|
|
|
stdenv,
|
|
|
|
systemd,
|
|
|
|
wrapGAppsHook3,
|
|
|
|
xorg,
|
2021-11-16 22:13:42 +00:00
|
|
|
}:
|
2018-05-09 03:14:37 +01:00
|
|
|
|
|
|
|
let
|
2024-10-02 05:52:47 +01:00
|
|
|
version = "1.44.4";
|
2018-05-09 03:14:37 +01:00
|
|
|
|
2021-01-15 09:19:50 +00:00
|
|
|
rpath = lib.makeLibraryPath [
|
2021-06-10 03:57:09 +01:00
|
|
|
alsa-lib
|
2020-09-18 07:13:09 +01:00
|
|
|
at-spi2-atk
|
|
|
|
at-spi2-core
|
2018-05-09 03:14:37 +01:00
|
|
|
atk
|
|
|
|
cairo
|
|
|
|
cups
|
|
|
|
curl
|
|
|
|
dbus
|
|
|
|
expat
|
|
|
|
fontconfig
|
|
|
|
freetype
|
2021-11-16 22:13:42 +00:00
|
|
|
gdk-pixbuf
|
2018-05-09 03:14:37 +01:00
|
|
|
glib
|
2020-10-25 19:38:25 +00:00
|
|
|
gtk3
|
2021-11-16 22:13:42 +00:00
|
|
|
libdrm
|
2024-09-26 14:34:54 +01:00
|
|
|
libGL
|
2018-05-09 03:14:37 +01:00
|
|
|
libnotify
|
2020-09-18 07:13:09 +01:00
|
|
|
libsecret
|
|
|
|
libuuid
|
2018-05-09 03:14:37 +01:00
|
|
|
libxcb
|
2021-11-16 22:13:42 +00:00
|
|
|
libxkbcommon
|
|
|
|
mesa
|
2018-05-09 03:14:37 +01:00
|
|
|
nspr
|
|
|
|
nss
|
2021-11-16 22:13:42 +00:00
|
|
|
pango
|
2018-05-09 03:14:37 +01:00
|
|
|
stdenv.cc.cc
|
|
|
|
systemd
|
|
|
|
xorg.libX11
|
2021-11-16 22:13:42 +00:00
|
|
|
xorg.libXScrnSaver
|
2018-05-09 03:14:37 +01:00
|
|
|
xorg.libXcomposite
|
|
|
|
xorg.libXcursor
|
|
|
|
xorg.libXdamage
|
|
|
|
xorg.libXext
|
|
|
|
xorg.libXfixes
|
|
|
|
xorg.libXi
|
|
|
|
xorg.libXrandr
|
|
|
|
xorg.libXrender
|
|
|
|
xorg.libXtst
|
2021-11-16 22:13:42 +00:00
|
|
|
xorg.libxkbfile
|
|
|
|
xorg.libxshmfence
|
|
|
|
(lib.getLib stdenv.cc.cc)
|
|
|
|
];
|
2018-05-09 03:14:37 +01:00
|
|
|
|
|
|
|
src =
|
2018-08-20 20:11:29 +01:00
|
|
|
if stdenv.hostPlatform.system == "x86_64-linux" then
|
2018-05-09 03:14:37 +01:00
|
|
|
fetchurl {
|
|
|
|
url = "https://downloads.mongodb.com/compass/mongodb-compass_${version}_amd64.deb";
|
2024-10-02 05:52:47 +01:00
|
|
|
hash = "sha256-0b0bdKRw+l4m144OVaH/KHB+UtAZ0zIA7KlP9zOE7A8=";
|
2018-05-09 03:14:37 +01:00
|
|
|
}
|
|
|
|
else
|
2018-08-20 20:11:29 +01:00
|
|
|
throw "MongoDB compass is not supported on ${stdenv.hostPlatform.system}";
|
2024-06-27 08:33:36 +01:00
|
|
|
# NOTE While MongoDB Compass is available to darwin, I do not have resources to test it
|
|
|
|
# Feel free to make a PR adding support if desired
|
2018-05-09 03:14:37 +01:00
|
|
|
|
2024-06-27 08:33:36 +01:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
2019-08-13 22:52:01 +01:00
|
|
|
pname = "mongodb-compass";
|
|
|
|
inherit version;
|
2018-05-09 03:14:37 +01:00
|
|
|
|
|
|
|
inherit src;
|
|
|
|
|
2024-06-27 08:33:36 +01:00
|
|
|
buildInputs = [
|
|
|
|
dpkg
|
|
|
|
wrapGAppsHook3
|
|
|
|
gtk3
|
|
|
|
];
|
2019-06-19 16:45:34 +01:00
|
|
|
dontUnpack = true;
|
2018-05-09 03:14:37 +01:00
|
|
|
|
|
|
|
buildCommand = ''
|
|
|
|
IFS=$'\n'
|
2020-09-18 07:13:09 +01:00
|
|
|
|
|
|
|
# The deb file contains a setuid binary, so 'dpkg -x' doesn't work here
|
|
|
|
dpkg --fsys-tarfile $src | tar --extract
|
|
|
|
|
|
|
|
mkdir -p $out
|
|
|
|
mv usr/* $out
|
|
|
|
|
|
|
|
# cp -av $out/usr/* $out
|
2018-05-09 03:14:37 +01:00
|
|
|
rm -rf $out/share/lintian
|
2020-09-18 07:13:09 +01:00
|
|
|
|
|
|
|
# The node_modules are bringing in non-linux files/dependencies
|
2018-05-09 03:14:37 +01:00
|
|
|
find $out -name "*.app" -exec rm -rf {} \; || true
|
|
|
|
find $out -name "*.dll" -delete
|
|
|
|
find $out -name "*.exe" -delete
|
2020-09-18 07:13:09 +01:00
|
|
|
|
2018-05-09 03:14:37 +01:00
|
|
|
# Otherwise it looks "suspicious"
|
|
|
|
chmod -R g-w $out
|
2020-09-18 07:13:09 +01:00
|
|
|
|
2018-05-09 03:14:37 +01:00
|
|
|
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
|
2020-09-18 07:13:09 +01:00
|
|
|
patchelf --set-rpath ${rpath}:$out/lib/mongodb-compass "$file" || true
|
2018-05-09 03:14:37 +01:00
|
|
|
done
|
2020-09-18 07:13:09 +01:00
|
|
|
|
2019-11-18 18:26:27 +00:00
|
|
|
wrapGAppsHook $out/bin/mongodb-compass
|
2018-05-09 03:14:37 +01:00
|
|
|
'';
|
|
|
|
|
2024-06-27 08:34:07 +01:00
|
|
|
meta = {
|
2018-05-09 03:14:37 +01:00
|
|
|
description = "GUI for MongoDB";
|
2024-09-26 14:38:48 +01:00
|
|
|
maintainers = with lib.maintainers; [
|
|
|
|
bryanasdev000
|
|
|
|
friedow
|
|
|
|
];
|
2022-07-25 00:24:17 +01:00
|
|
|
homepage = "https://github.com/mongodb-js/compass";
|
2024-06-27 08:34:07 +01:00
|
|
|
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
|
|
|
license = lib.licenses.sspl;
|
2018-05-09 03:14:37 +01:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2023-11-27 01:17:53 +00:00
|
|
|
mainProgram = "mongodb-compass";
|
2018-05-09 03:14:37 +01:00
|
|
|
};
|
|
|
|
}
|