@ -2,7 +2,8 @@
, 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 , libappindicator-gtk3
, cups , expat , systemd , libnotify , libuuid , at-spi2-core , libappindicator-gtk3
, autoPatchelfHook
# Unfortunately this also overwrites the UI language (not just the spell
# checking language!):
, hunspellDicts , spellcheckerLanguage ? null # E.g. "de_DE"
@ -21,11 +22,32 @@ let
- - set HUNSPELL_DICTIONARIES " ${ hunspellDicts . ${ hunspellDict } } / s h a r e / h u n s p e l l " \
- - set LC_MESSAGES " ${ spellcheckerLanguage } " ''
else " " ) ;
rpath = lib . makeLibraryPath [
in stdenv . mkDerivation rec {
pname = " s i g n a l - d e s k t o p " ;
version = " 1 . 2 9 . 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}/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 = " h t t p s : / / u p d a t e s . s i g n a l . o r g / d e s k t o p / a p t / p o o l / m a i n / s / s i g n a l - d e s k t o p / s i g n a l - d e s k t o p _ ${ version } _ a m d 6 4 . d e b " ;
sha256 = " 1 s 1 r c 4 k y v 0 n x z 5 f y 5 i a 7 f f l p h f 3 i z k 8 0 k s 7 1 q 4 w d 6 7 k 1 g 9 l v c w 2 4 " ;
} ;
nativeBuildInputs = [
autoPatchelfHook
dpkg
wrapGAppsHook
] ;
buildInputs = [
alsaLib
atk
at-spi2-atk
at-spi2-core
atk
cairo
cups
dbus
@ -36,10 +58,6 @@ let
glib
gnome2 . GConf
gtk3
pango
libappindicator-gtk3
libnotify
libuuid
libX11
libXScrnSaver
libXcomposite
@ -51,55 +69,42 @@ let
libXrandr
libXrender
libXtst
libappindicator-gtk3
libnotify
libuuid
nspr
nss
udev
pango
systemd
xorg . libxcb
] ;
in stdenv . mkDerivation rec {
pname = " s i g n a l - d e s k t o p " ;
version = " 1 . 2 9 . 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 = " h t t p s : / / u p d a t e s . s i g n a l . o r g / d e s k t o p / a p t / p o o l / m a i n / s / s i g n a l - d e s k t o p / s i g n a l - d e s k t o p _ ${ version } _ a m d 6 4 . d e b " ;
sha256 = " 1 s 1 r c 4 k y v 0 n x z 5 f y 5 i a 7 f f l p h f 3 i z k 8 0 k s 7 1 q 4 w d 6 7 k 1 g 9 l v c w 2 4 " ;
} ;
phases = [ " u n p a c k P h a s e " " i n s t a l l P h a s e " ] ;
nativeBuildInputs = [ dpkg wrapGAppsHook ] ;
runtimeDependencies = [
systemd . lib
] ;
unpackPhase = " d p k g - d e b - x $ s r c . " ;
installPhase = ''
mkdir - p $ out
cp - R opt $ out
mv ./usr/share $ out/share
mv $ out/opt/Signal $ out/libexec
rmdir $ out/opt
dontBuild = true ;
dontConfigure = true ;
dontPatchELF = true ;
chmod - R g-w $ out
installPhase = ''
mkdir - p $ out/lib
# Patch signal
patchelf - - set-interpreter " $ ( c a t $ N I X _ C C / n i x - s u p p o r t / d y n a m i c - l i n k e r ) " \
- - set-rpath $ { rpath }: $ out/libexec $ out/libexec/signal-desktop
wrapProgram $ out/libexec/signal-desktop \
- - prefix XDG_DATA_DIRS : " ${ gtk3 } / s h a r e / g s e t t i n g s - s c h e m a s / ${ gtk3 . name } / " \
- - prefix LD_LIBRARY_PATH : " ${ stdenv . cc . cc . lib } / l i b " \
$ { customLanguageWrapperArgs } \
" ' ' ${ gappsWrapperArgs [ @ ] } "
mv usr/share $ out/share
mv opt/Signal $ out/lib
# 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 \