Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 554ab637bf7f
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 17f02b52e686
Choose a head ref
  • 4 commits
  • 1 file changed
  • 4 contributors

Commits on Jan 24, 2020

  1. signal-desktop: add libappindicator-gtk3

    (cherry picked from commit 17da09c)
    mogorman authored and primeos committed Jan 24, 2020
    Copy the full SHA
    1baefff View commit details
  2. signal-desktop: use autoPatchelfHook, wrap properly (#77850)

    Most prominently we don't use `phases` because of #28910.
    This is also problematic when using wrapGAppsHook.
    In order to use wrapGAppsHook's automatic wrapping
    (this was done manually before because there was no fixupPhase)
    we need to install signal at lib/Signal instead of just into libexec.
    That's because it would try to wrap .so files.
    
    (cherry picked from commit 15e0b23)
    worldofpeace authored and primeos committed Jan 24, 2020
    Copy the full SHA
    ff8a947 View commit details
  3. signal-desktop: 1.29.6 -> 1.30.0

    Changelog: https://github.com/signalapp/Signal-Desktop/releases/tag/v1.30.0
    (cherry picked from commit 9cf50fa)
    Reason: Avoid an expired (unusable) build in the stable release
    (Signal-Desktop builds expire after 90 days).
    primeos committed Jan 24, 2020
    Copy the full SHA
    770bc9f View commit details
  4. Merge pull request #78428 from primeos/signal-desktop-backport

    [19.09] signal-desktop: 1.29.6 -> 1.30.0 (backport)
    flokli authored Jan 24, 2020
    Copy the full SHA
    17f02b5 View commit details
Showing with 57 additions and 42 deletions.
  1. +57 −42 pkgs/applications/networking/instant-messengers/signal-desktop/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{ stdenv, lib, fetchurl, dpkg, wrapGAppsHook
{ stdenv, lib, fetchurl, autoPatchelfHook, dpkg, wrapGAppsHook
, gnome2, gtk3, atk, at-spi2-atk, cairo, pango, gdk-pixbuf, glib, freetype, fontconfig
, dbus, libX11, xorg, libXi, libXcursor, libXdamage, libXrandr, libXcomposite
, libXext, libXfixes, libXrender, libXtst, libXScrnSaver, nss, nspr, alsaLib
, cups, expat, udev, libnotify, libuuid, at-spi2-core
, cups, expat, systemd, libnotify, libuuid, at-spi2-core, libappindicator-gtk3
# Unfortunately this also overwrites the UI language (not just the spell
# checking language!):
, hunspellDicts, spellcheckerLanguage ? null # E.g. "de_DE"
@@ -21,11 +21,32 @@ let
--set HUNSPELL_DICTIONARIES "${hunspellDicts.${hunspellDict}}/share/hunspell" \
--set LC_MESSAGES "${spellcheckerLanguage}"''
else "");
rpath = lib.makeLibraryPath [
in stdenv.mkDerivation rec {
pname = "signal-desktop";
version = "1.30.0"; # Please backport all updates to the stable channel.
# All releases have a limited lifetime and "expire" 90 days after the release.
# When releases "expire" the application becomes unusable until an update is
# applied. The expiration date for the current release can be extracted with:
# $ grep -a "^{\"buildExpiration" "${signal-desktop}/lib/Signal/resources/app.asar"
# (Alternatively we could try to patch the asar archive, but that requires a
# few additional steps and might not be the best idea.)

src = fetchurl {
url = "https://updates.signal.org/desktop/apt/pool/main/s/signal-desktop/signal-desktop_${version}_amd64.deb";
sha256 = "1gbvna40sc83s7mwip5281yn4bs0k19fj061y0xzwkvh0yk06x3i";
};

nativeBuildInputs = [
autoPatchelfHook
dpkg
wrapGAppsHook
];

buildInputs = [
alsaLib
atk
at-spi2-atk
at-spi2-core
atk
cairo
cups
dbus
@@ -36,9 +57,6 @@ let
glib
gnome2.GConf
gtk3
pango
libnotify
libuuid
libX11
libXScrnSaver
libXcomposite
@@ -50,59 +68,56 @@ let
libXrandr
libXrender
libXtst
libappindicator-gtk3
libnotify
libuuid
nspr
nss
udev
pango
systemd
xorg.libxcb
];

in stdenv.mkDerivation rec {
pname = "signal-desktop";
version = "1.29.6"; # Please backport all updates to the stable channel.
# All releases have a limited lifetime and "expire" 90 days after the release.
# When releases "expire" the application becomes unusable until an update is
# applied. The expiration date for the current release can be extracted with:
# $ grep -a "^{\"buildExpiration" "${signal-desktop}/libexec/resources/app.asar"
# (Alternatively we could try to patch the asar archive, but that requires a
# few additional steps and might not be the best idea.)

src = fetchurl {
url = "https://updates.signal.org/desktop/apt/pool/main/s/signal-desktop/signal-desktop_${version}_amd64.deb";
sha256 = "1s1rc4kyv0nxz5fy5ia7fflphf3izk80ks71q4wd67k1g9lvcw24";
};

phases = [ "unpackPhase" "installPhase" ];

nativeBuildInputs = [ dpkg wrapGAppsHook ];
runtimeDependencies = [
systemd.lib
];

unpackPhase = "dpkg-deb -x $src .";

installPhase = ''
mkdir -p $out
cp -R opt $out
dontBuild = true;
dontConfigure = true;
dontPatchELF = true;
# We need to run autoPatchelf manually with the "no-recurse" option, see
# https://github.com/NixOS/nixpkgs/pull/78413 for the reasons.
dontAutoPatchelf = true;

mv ./usr/share $out/share
mv $out/opt/Signal $out/libexec
rmdir $out/opt
installPhase = ''
mkdir -p $out/lib
chmod -R g-w $out
mv usr/share $out/share
mv opt/Signal $out/lib/Signal
# Patch signal
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath ${rpath}:$out/libexec $out/libexec/signal-desktop
wrapProgram $out/libexec/signal-desktop \
--prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}/" \
--prefix LD_LIBRARY_PATH : "${stdenv.cc.cc.lib}/lib" \
${customLanguageWrapperArgs} \
"''${gappsWrapperArgs[@]}"
# Note: The following path contains bundled libraries:
# $out/lib/Signal/resources/app.asar.unpacked/node_modules/sharp/vendor/lib/
# We run autoPatchelf with the "no-recurse" option to avoid picking those
# up, but resources/app.asar still requires them.
# Symlink to bin
mkdir -p $out/bin
ln -s $out/libexec/signal-desktop $out/bin/signal-desktop
ln -s $out/lib/Signal/signal-desktop $out/bin/signal-desktop
'';

preFixup = ''
gappsWrapperArgs+=(
--prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc ] }"
${customLanguageWrapperArgs}
)
# Fix the desktop link
substituteInPlace $out/share/applications/signal-desktop.desktop \
--replace /opt/Signal/signal-desktop $out/bin/signal-desktop
autoPatchelf --no-recurse -- $out/lib/Signal/
'';

meta = {