Merge branch 'dropbox--xkbcommon'
This commit is contained in:
commit
8ff4c7957a
@ -3,6 +3,7 @@
|
|||||||
, libdrm, libffi, libICE, libSM
|
, libdrm, libffi, libICE, libSM
|
||||||
, libX11, libXcomposite, libXext, libXmu, libXrender, libxcb
|
, libX11, libXcomposite, libXext, libXmu, libXrender, libxcb
|
||||||
, libxml2, libxslt, ncurses, zlib
|
, libxml2, libxslt, ncurses, zlib
|
||||||
|
, qtbase, qtdeclarative, qtwebkit, makeQtWrapper
|
||||||
}:
|
}:
|
||||||
|
|
||||||
# this package contains the daemon version of dropbox
|
# this package contains the daemon version of dropbox
|
||||||
@ -43,6 +44,8 @@ let
|
|||||||
dbus_libs fontconfig freetype gcc.cc glib libdrm libffi libICE libSM
|
dbus_libs fontconfig freetype gcc.cc glib libdrm libffi libICE libSM
|
||||||
libX11 libXcomposite libXext libXmu libXrender libxcb libxml2 libxslt
|
libX11 libXcomposite libXext libXmu libXrender libxcb libxml2 libxslt
|
||||||
ncurses zlib
|
ncurses zlib
|
||||||
|
|
||||||
|
qtbase qtdeclarative qtwebkit
|
||||||
];
|
];
|
||||||
|
|
||||||
desktopItem = makeDesktopItem {
|
desktopItem = makeDesktopItem {
|
||||||
@ -65,21 +68,24 @@ in stdenv.mkDerivation {
|
|||||||
|
|
||||||
sourceRoot = ".dropbox-dist";
|
sourceRoot = ".dropbox-dist";
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper patchelf ];
|
nativeBuildInputs = [ makeQtWrapper patchelf ];
|
||||||
dontPatchELF = true; # patchelf invoked explicitly below
|
|
||||||
dontStrip = true; # already done
|
dontStrip = true; # already done
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
|
||||||
|
|
||||||
mkdir -p "$out/${appdir}"
|
mkdir -p "$out/${appdir}"
|
||||||
cp -r --no-preserve=mode "dropbox-lnx.${arch}-${version}"/* "$out/${appdir}/"
|
cp -r --no-preserve=mode "dropbox-lnx.${arch}-${version}"/* "$out/${appdir}/"
|
||||||
|
|
||||||
|
# Vendored libraries interact poorly with our graphics drivers
|
||||||
rm "$out/${appdir}/libdrm.so.2"
|
rm "$out/${appdir}/libdrm.so.2"
|
||||||
rm "$out/${appdir}/libffi.so.6"
|
rm "$out/${appdir}/libffi.so.6"
|
||||||
rm "$out/${appdir}/libGL.so.1"
|
rm "$out/${appdir}/libGL.so.1"
|
||||||
rm "$out/${appdir}/libX11-xcb.so.1"
|
rm "$out/${appdir}/libX11-xcb.so.1"
|
||||||
|
|
||||||
|
# Cannot use vendored Qt libraries due to problem with xkbcommon
|
||||||
|
rm "$out/${appdir}/"libQt5*.so.5
|
||||||
|
rm "$out/${appdir}/qt.conf"
|
||||||
|
rm -fr "$out/${appdir}/plugins"
|
||||||
|
|
||||||
mkdir -p "$out/share/applications"
|
mkdir -p "$out/share/applications"
|
||||||
cp "${desktopItem}/share/applications/"* $out/share/applications
|
cp "${desktopItem}/share/applications/"* $out/share/applications
|
||||||
|
|
||||||
@ -88,47 +94,32 @@ in stdenv.mkDerivation {
|
|||||||
|
|
||||||
mkdir -p "$out/bin"
|
mkdir -p "$out/bin"
|
||||||
RPATH="${ldpath}:$out/${appdir}"
|
RPATH="${ldpath}:$out/${appdir}"
|
||||||
makeWrapper "$out/${appdir}/dropbox" "$out/bin/dropbox" \
|
makeQtWrapper "$out/${appdir}/dropbox" "$out/bin/dropbox" \
|
||||||
--prefix LD_LIBRARY_PATH : "$RPATH"
|
--prefix LD_LIBRARY_PATH : "$RPATH"
|
||||||
|
|
||||||
chmod 755 $out/${appdir}/dropbox
|
chmod 755 $out/${appdir}/dropbox
|
||||||
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
fixupPhase = ''
|
fixupPhase = ''
|
||||||
runHook preFixup
|
|
||||||
|
|
||||||
INTERP=$(cat $NIX_CC/nix-support/dynamic-linker)
|
INTERP=$(cat $NIX_CC/nix-support/dynamic-linker)
|
||||||
RPATH="${ldpath}:$out/${appdir}"
|
RPATH="${ldpath}:$out/${appdir}"
|
||||||
getType='s/ *Type: *\([A-Z]*\) (.*/\1/'
|
getType='s/ *Type: *\([A-Z]*\) (.*/\1/'
|
||||||
find "$out/${appdir}" -type f -a -perm -0100 -print | while read obj; do
|
find "$out/${appdir}" -type f -print | while read obj; do
|
||||||
dynamic=$(readelf -S "$obj" 2>/dev/null | grep "DYNAMIC" || true)
|
dynamic=$(readelf -S "$obj" 2>/dev/null | grep "DYNAMIC" || true)
|
||||||
|
|
||||||
if [[ -n "$dynamic" ]]; then
|
if [[ -n "$dynamic" ]]; then
|
||||||
type=$(readelf -h "$obj" 2>/dev/null | grep 'Type:' | sed -e "$getType")
|
|
||||||
|
|
||||||
if [[ "$type" == "EXEC" ]]; then
|
|
||||||
|
|
||||||
|
if readelf -l "$obj" 2>/dev/null | grep "INTERP" >/dev/null; then
|
||||||
echo "patching interpreter path in $type $obj"
|
echo "patching interpreter path in $type $obj"
|
||||||
patchelf --set-interpreter "$INTERP" "$obj"
|
patchelf --set-interpreter "$INTERP" "$obj"
|
||||||
|
fi
|
||||||
|
|
||||||
|
type=$(readelf -h "$obj" 2>/dev/null | grep 'Type:' | sed -e "$getType")
|
||||||
|
if [ "$type" == "EXEC" ] || [ "$type" == "DYN" ]; then
|
||||||
|
|
||||||
echo "patching RPATH in $type $obj"
|
echo "patching RPATH in $type $obj"
|
||||||
oldRPATH=$(patchelf --print-rpath "$obj")
|
oldRPATH=$(patchelf --print-rpath "$obj")
|
||||||
patchelf --set-rpath "''${oldRPATH:+$oldRPATH:}$RPATH" "$obj"
|
patchelf --set-rpath "''${oldRPATH:+$oldRPATH:}$RPATH" "$obj"
|
||||||
|
|
||||||
echo "shrinking RPATH in $type $obj"
|
|
||||||
patchelf --shrink-rpath "$obj"
|
|
||||||
|
|
||||||
elif [[ "$type" == "DYN" ]]; then
|
|
||||||
|
|
||||||
echo "patching RPATH in $type $obj"
|
|
||||||
oldRPATH=$(patchelf --print-rpath "$obj")
|
|
||||||
patchelf --set-rpath "''${oldRPATH:+$oldRPATH:}$RPATH" "$obj"
|
|
||||||
|
|
||||||
echo "shrinking RPATH in $type $obj"
|
|
||||||
patchelf --shrink-rpath "$obj"
|
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
echo "unknown ELF type \"$type\"; not patching $obj"
|
echo "unknown ELF type \"$type\"; not patching $obj"
|
||||||
@ -138,8 +129,6 @@ in stdenv.mkDerivation {
|
|||||||
done
|
done
|
||||||
|
|
||||||
paxmark m $out/${appdir}/dropbox
|
paxmark m $out/${appdir}/dropbox
|
||||||
|
|
||||||
runHook postFixup
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -15403,7 +15403,7 @@ with pkgs;
|
|||||||
bittorrentSync14 = callPackage ../applications/networking/bittorrentsync/1.4.x.nix { };
|
bittorrentSync14 = callPackage ../applications/networking/bittorrentsync/1.4.x.nix { };
|
||||||
bittorrentSync20 = callPackage ../applications/networking/bittorrentsync/2.0.x.nix { };
|
bittorrentSync20 = callPackage ../applications/networking/bittorrentsync/2.0.x.nix { };
|
||||||
|
|
||||||
dropbox = callPackage ../applications/networking/dropbox { };
|
dropbox = libsForQt5.callPackage ../applications/networking/dropbox { };
|
||||||
|
|
||||||
dropbox-cli = callPackage ../applications/networking/dropbox-cli { };
|
dropbox-cli = callPackage ../applications/networking/dropbox-cli { };
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user