diff options
author | Matthew Justin Bauer <mjbauer95@gmail.com> | 2018-05-18 21:43:38 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-18 21:43:38 -0500 |
commit | 05ff6862c8142d6e78202a19e6527889fb98f5d9 (patch) | |
tree | bad904adff897fa38cae572c3103d97dca788d09 /pkgs/tools/misc | |
parent | 13d55dd65afcd4c30b59ef7f07cf79c7db8734cf (diff) | |
parent | f6e061f62f63028959f0921963c4e6738db5662f (diff) | |
download | nixlib-05ff6862c8142d6e78202a19e6527889fb98f5d9.tar nixlib-05ff6862c8142d6e78202a19e6527889fb98f5d9.tar.gz nixlib-05ff6862c8142d6e78202a19e6527889fb98f5d9.tar.bz2 nixlib-05ff6862c8142d6e78202a19e6527889fb98f5d9.tar.lz nixlib-05ff6862c8142d6e78202a19e6527889fb98f5d9.tar.xz nixlib-05ff6862c8142d6e78202a19e6527889fb98f5d9.tar.zst nixlib-05ff6862c8142d6e78202a19e6527889fb98f5d9.zip |
Merge pull request #40199 from jarjee/newpkg/mongodb-compass
mongodb-compass: init at 1.13.1
Diffstat (limited to 'pkgs/tools/misc')
-rw-r--r-- | pkgs/tools/misc/mongodb-compass/default.nix | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/pkgs/tools/misc/mongodb-compass/default.nix b/pkgs/tools/misc/mongodb-compass/default.nix new file mode 100644 index 000000000000..f8475ee2e0e0 --- /dev/null +++ b/pkgs/tools/misc/mongodb-compass/default.nix @@ -0,0 +1,86 @@ +{ stdenv, fetchurl, dpkg +, alsaLib, atk, cairo, cups, curl, dbus, expat, fontconfig, freetype, glib +, gnome2, libnotify, libxcb, nspr, nss, systemd, xorg }: + +let + + version = "1.13.1"; + + rpath = stdenv.lib.makeLibraryPath [ + alsaLib + atk + cairo + cups + curl + dbus + expat + fontconfig + freetype + glib + gnome2.GConf + gnome2.gdk_pixbuf + gnome2.gtk + 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 = + if stdenv.system == "x86_64-linux" then + fetchurl { + url = "https://downloads.mongodb.com/compass/mongodb-compass_${version}_amd64.deb"; + sha256 = "0x23jshnr0rafm5sn2vhq2y2gryg8mksahzyv5fszblgaxay234p"; + } + else + throw "MongoDB compass is not supported on ${stdenv.system}"; + +in stdenv.mkDerivation { + name = "mongodb-compass-${version}"; + + inherit src; + + buildInputs = [ dpkg ]; + unpackPhase = "true"; + + 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 + ''; + + meta = with stdenv.lib; { + description = "The GUI for MongoDB"; + homepage = https://www.mongodb.com/products/compass; + license = licenses.unfree; + platforms = [ "x86_64-linux" ]; + }; +} |