Merge pull request #98198 from emanueleperuffo/fix-mongodb-compass
mongodb-compass: 1.17.0 -> 1.22.1
This commit is contained in:
commit
9d9d85ae87
@ -1,13 +1,14 @@
|
|||||||
{ stdenv, fetchurl, dpkg
|
{ stdenv, fetchurl, dpkg
|
||||||
, alsaLib, atk, cairo, cups, curl, dbus, expat, fontconfig, freetype, glib
|
, alsaLib, at-spi2-atk, at-spi2-core, atk, cairo, cups, curl, dbus, expat, fontconfig, freetype, glib
|
||||||
, gnome2, gnome3, libnotify, libxcb, nspr, nss, systemd, xorg, wrapGAppsHook }:
|
, gnome2, gnome3, libnotify, libsecret, libuuid, libxcb, nspr, nss, systemd, xorg, wrapGAppsHook }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
version = "1.22.1";
|
||||||
version = "1.17.0";
|
|
||||||
|
|
||||||
rpath = stdenv.lib.makeLibraryPath [
|
rpath = stdenv.lib.makeLibraryPath [
|
||||||
alsaLib
|
alsaLib
|
||||||
|
at-spi2-atk
|
||||||
|
at-spi2-core
|
||||||
atk
|
atk
|
||||||
cairo
|
cairo
|
||||||
cups
|
cups
|
||||||
@ -22,6 +23,8 @@ let
|
|||||||
gnome3.gtk
|
gnome3.gtk
|
||||||
gnome2.pango
|
gnome2.pango
|
||||||
libnotify
|
libnotify
|
||||||
|
libsecret
|
||||||
|
libuuid
|
||||||
libxcb
|
libxcb
|
||||||
nspr
|
nspr
|
||||||
nss
|
nss
|
||||||
@ -46,7 +49,7 @@ let
|
|||||||
if stdenv.hostPlatform.system == "x86_64-linux" then
|
if stdenv.hostPlatform.system == "x86_64-linux" then
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = "https://downloads.mongodb.com/compass/mongodb-compass_${version}_amd64.deb";
|
url = "https://downloads.mongodb.com/compass/mongodb-compass_${version}_amd64.deb";
|
||||||
sha256 = "085xq1ik8kyza1kq9kn0pf98zk6g2qa21clxhn48rgnqk20aninv";
|
sha256 = "1wbjj2w4dii644lprvmwnlval53yqh4y0f58cad657jjw8101rd9";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
throw "MongoDB compass is not supported on ${stdenv.hostPlatform.system}";
|
throw "MongoDB compass is not supported on ${stdenv.hostPlatform.system}";
|
||||||
@ -62,20 +65,30 @@ in stdenv.mkDerivation {
|
|||||||
|
|
||||||
buildCommand = ''
|
buildCommand = ''
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
dpkg -x $src $out
|
|
||||||
cp -av $out/usr/* $out
|
# 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
|
||||||
rm -rf $out/share/lintian
|
rm -rf $out/share/lintian
|
||||||
#The node_modules are bringing in non-linux files/dependencies
|
|
||||||
|
# The node_modules are bringing in non-linux files/dependencies
|
||||||
find $out -name "*.app" -exec rm -rf {} \; || true
|
find $out -name "*.app" -exec rm -rf {} \; || true
|
||||||
find $out -name "*.dll" -delete
|
find $out -name "*.dll" -delete
|
||||||
find $out -name "*.exe" -delete
|
find $out -name "*.exe" -delete
|
||||||
|
|
||||||
# Otherwise it looks "suspicious"
|
# Otherwise it looks "suspicious"
|
||||||
chmod -R g-w $out
|
chmod -R g-w $out
|
||||||
|
|
||||||
for file in `find $out -type f -perm /0111 -o -name \*.so\*`; do
|
for file in `find $out -type f -perm /0111 -o -name \*.so\*`; do
|
||||||
echo "Manipulating file: $file"
|
echo "Manipulating file: $file"
|
||||||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$file" || true
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$file" || true
|
||||||
patchelf --set-rpath ${rpath}:$out/share/mongodb-compass "$file" || true
|
patchelf --set-rpath ${rpath}:$out/lib/mongodb-compass "$file" || true
|
||||||
done
|
done
|
||||||
|
|
||||||
wrapGAppsHook $out/bin/mongodb-compass
|
wrapGAppsHook $out/bin/mongodb-compass
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user