Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
signal-desktop-beta: init at 1.1.0-beta.5 (#32619)
Signal is a bit like google-chrome, wherein the beta version is independent from the release builds and uses different data locations and binary names.
- Loading branch information
Showing
2 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
87 changes: 87 additions & 0 deletions
87
pkgs/applications/networking/instant-messengers/signal-desktop/beta.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
{ stdenv, lib, fetchurl, dpkg, gnome2, atk, cairo, gdk_pixbuf, glib, freetype, | ||
fontconfig, dbus, libX11, xlibs, libXi, libXcursor, libXdamage, libXrandr, | ||
libXcomposite, libXext, libXfixes, libXrender, libXtst, libXScrnSaver, nss, | ||
nspr, alsaLib, cups, expat, udev | ||
}: | ||
let | ||
rpath = lib.makeLibraryPath [ | ||
alsaLib | ||
atk | ||
cairo | ||
cups | ||
dbus | ||
expat | ||
fontconfig | ||
freetype | ||
gdk_pixbuf | ||
glib | ||
gnome2.GConf | ||
gnome2.gtk | ||
gnome2.pango | ||
libX11 | ||
libXScrnSaver | ||
libXcomposite | ||
libXcursor | ||
libXdamage | ||
libXext | ||
libXfixes | ||
libXi | ||
libXrandr | ||
libXrender | ||
libXtst | ||
nspr | ||
nss | ||
stdenv.cc.cc | ||
udev | ||
xlibs.libxcb | ||
]; | ||
|
||
in | ||
stdenv.mkDerivation rec { | ||
name = "signal-desktop-${version}"; | ||
|
||
version = "1.1.0-beta.5"; | ||
|
||
src = | ||
if stdenv.system == "x86_64-linux" then | ||
fetchurl { | ||
url = "https://updates.signal.org/desktop/apt/pool/main/s/signal-desktop/signal-desktop-beta_${version}_amd64.deb"; | ||
sha256 = "1kllym2iazp9i5afrh0vmsqqlh5b8i6f929p5yhl8bl4zd17zwpx"; | ||
} | ||
else | ||
throw "Signal for Desktop is not currently supported on ${stdenv.system}"; | ||
|
||
phases = [ "unpackPhase" "installPhase" ]; | ||
nativeBuildInputs = [ dpkg ]; | ||
unpackPhase = "dpkg-deb -x $src ."; | ||
installPhase = '' | ||
mkdir -p $out | ||
cp -R opt $out | ||
cp -R usr/share $out/share | ||
chmod -R g-w $out | ||
# Patch signal | ||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ | ||
--set-rpath "${rpath}:$out/opt/Signal Beta" \ | ||
"$out/opt/Signal Beta/signal-desktop-beta" | ||
# Symlink to bin | ||
mkdir -p $out/bin | ||
ln -s "$out/opt/Signal Beta/signal-desktop-beta" $out/bin/signal-desktop-beta | ||
# Fix the desktop link | ||
substituteInPlace $out/share/applications/signal-desktop-beta.desktop \ | ||
--replace "/opt/Signal Beta/signal-desktop-beta" $out/bin/signal-desktop-beta | ||
''; | ||
|
||
meta = { | ||
description = "Signal Private Messenger for the Desktop (Beta version)"; | ||
homepage = https://signal.org/; | ||
license = lib.licenses.gpl3; | ||
maintainers = with lib.maintainers; [ ixmatus benley ]; | ||
platforms = [ | ||
"x86_64-linux" | ||
]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters