2019-11-28 11:05:17 +00:00
|
|
|
{ atomEnv
|
|
|
|
, autoPatchelfHook
|
|
|
|
, dpkg
|
|
|
|
, fetchurl
|
|
|
|
, makeDesktopItem
|
|
|
|
, makeWrapper
|
|
|
|
, stdenv
|
2020-08-12 18:23:07 +00:00
|
|
|
, lib
|
2019-11-28 11:05:17 +00:00
|
|
|
, udev
|
|
|
|
, wrapGAppsHook
|
|
|
|
, cpio
|
|
|
|
, xar
|
2020-08-25 21:43:29 +00:00
|
|
|
, libdbusmenu
|
2022-04-14 18:02:28 +00:00
|
|
|
, libxshmfence
|
2018-04-11 18:46:23 +00:00
|
|
|
}:
|
2019-03-21 02:24:04 +00:00
|
|
|
|
2018-04-11 18:46:23 +00:00
|
|
|
let
|
2019-03-21 02:24:04 +00:00
|
|
|
|
2019-07-16 22:09:29 +00:00
|
|
|
inherit (stdenv.hostPlatform) system;
|
2018-04-11 18:46:23 +00:00
|
|
|
|
2019-08-04 09:08:33 +00:00
|
|
|
throwSystem = throw "Unsupported system: ${system}";
|
|
|
|
|
2019-03-21 02:24:04 +00:00
|
|
|
pname = "wire-desktop";
|
|
|
|
|
2019-07-16 22:09:29 +00:00
|
|
|
version = {
|
2022-04-11 20:13:08 +00:00
|
|
|
x86_64-darwin = "3.27.4357";
|
2022-04-11 20:10:24 +00:00
|
|
|
x86_64-linux = "3.27.2944";
|
2019-08-04 09:08:33 +00:00
|
|
|
}.${system} or throwSystem;
|
2018-04-11 18:46:23 +00:00
|
|
|
|
2019-07-16 22:09:29 +00:00
|
|
|
sha256 = {
|
2022-04-11 20:13:08 +00:00
|
|
|
x86_64-darwin = "0xihg9fzsbwib2fmb1yqx9015i9q4k0ph8lna4mzgicmrjkw54g8";
|
2022-04-11 20:10:24 +00:00
|
|
|
x86_64-linux = "1wqnrmp8q84izvqv25fgks5pv6la3vahm5dsn7bc6zxqb0xz2xvy";
|
2019-08-04 09:08:33 +00:00
|
|
|
}.${system} or throwSystem;
|
2018-07-09 22:34:32 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-07-16 22:09:19 +00:00
|
|
|
description = "A modern, secure messenger for everyone";
|
|
|
|
longDescription = ''
|
|
|
|
Wire Personal is a secure, privacy-friendly messenger. It combines useful
|
|
|
|
and fun features, audited security, and a beautiful, distinct user
|
|
|
|
interface. It does not require a phone number to register and chat.
|
|
|
|
|
|
|
|
* End-to-end encrypted chats, calls, and files
|
|
|
|
* Crystal clear voice and video calling
|
|
|
|
* File and screen sharing
|
|
|
|
* Timed messages and chats
|
|
|
|
* Synced across your phone, desktop and tablet
|
|
|
|
'';
|
2019-11-28 11:05:17 +00:00
|
|
|
homepage = "https://wire.com/";
|
|
|
|
downloadPage = "https://wire.com/download/";
|
2019-07-16 22:09:19 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2019-11-28 11:05:17 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
arianvp
|
|
|
|
kiwi
|
|
|
|
toonn
|
|
|
|
];
|
|
|
|
platforms = [
|
|
|
|
"x86_64-darwin"
|
|
|
|
"x86_64-linux"
|
|
|
|
];
|
2019-03-21 02:24:04 +00:00
|
|
|
};
|
2018-04-11 18:46:23 +00:00
|
|
|
|
2019-07-16 22:09:29 +00:00
|
|
|
linux = stdenv.mkDerivation rec {
|
|
|
|
inherit pname version meta;
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://wire-app.wire.com/linux/debian/pool/main/"
|
2019-11-28 11:05:17 +00:00
|
|
|
+ "Wire-${version}_amd64.deb";
|
2019-07-16 22:09:29 +00:00
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
|
|
|
desktopItem = makeDesktopItem {
|
2022-02-22 14:56:15 +00:00
|
|
|
categories = [ "Network" "InstantMessaging" "Chat" "VideoConference" ];
|
2019-07-16 22:09:29 +00:00
|
|
|
comment = "Secure messenger for everyone";
|
2019-12-15 06:46:24 +00:00
|
|
|
desktopName = "Wire";
|
2019-11-28 11:05:17 +00:00
|
|
|
exec = "wire-desktop %U";
|
2019-07-16 22:09:29 +00:00
|
|
|
genericName = "Secure messenger";
|
2019-11-28 11:05:17 +00:00
|
|
|
icon = "wire-desktop";
|
|
|
|
name = "wire-desktop";
|
2022-02-22 14:56:15 +00:00
|
|
|
startupWMClass = "Wire";
|
2019-07-16 22:09:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
dontConfigure = true;
|
2019-11-28 11:05:17 +00:00
|
|
|
dontPatchELF = true;
|
|
|
|
dontWrapGApps = true;
|
2019-07-16 22:09:29 +00:00
|
|
|
|
2019-11-28 11:05:17 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoPatchelfHook
|
|
|
|
dpkg
|
|
|
|
makeWrapper
|
|
|
|
wrapGAppsHook
|
2019-07-16 22:09:29 +00:00
|
|
|
];
|
|
|
|
|
2022-04-14 18:02:28 +00:00
|
|
|
buildInputs = [ libxshmfence ] ++ atomEnv.packages;
|
2019-11-28 11:05:17 +00:00
|
|
|
|
2021-03-05 17:07:53 +00:00
|
|
|
unpackPhase = ''
|
|
|
|
runHook preUnpack
|
|
|
|
|
|
|
|
dpkg-deb -x $src .
|
|
|
|
|
|
|
|
runHook postUnpack
|
|
|
|
'';
|
2019-07-16 22:09:29 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2021-03-05 17:07:53 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2019-11-28 11:05:17 +00:00
|
|
|
mkdir -p "$out/bin"
|
2019-07-16 22:09:29 +00:00
|
|
|
cp -R "opt" "$out"
|
|
|
|
cp -R "usr/share" "$out/share"
|
|
|
|
chmod -R g-w "$out"
|
|
|
|
|
|
|
|
# Desktop file
|
|
|
|
mkdir -p "$out/share/applications"
|
|
|
|
cp "${desktopItem}/share/applications/"* "$out/share/applications"
|
2021-03-05 17:07:53 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2019-07-16 22:09:29 +00:00
|
|
|
'';
|
2019-11-28 11:05:17 +00:00
|
|
|
|
|
|
|
runtimeDependencies = [
|
2020-08-12 18:23:07 +00:00
|
|
|
(lib.getLib udev)
|
2020-08-25 21:43:29 +00:00
|
|
|
libdbusmenu
|
2019-11-28 11:05:17 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
makeWrapper $out/opt/Wire/wire-desktop $out/bin/wire-desktop \
|
|
|
|
"''${gappsWrapperArgs[@]}"
|
|
|
|
'';
|
2019-03-21 02:24:04 +00:00
|
|
|
};
|
2018-04-11 18:46:23 +00:00
|
|
|
|
2019-08-13 21:52:01 +00:00
|
|
|
darwin = stdenv.mkDerivation {
|
2019-07-16 22:09:29 +00:00
|
|
|
inherit pname version meta;
|
2018-11-11 03:01:44 +00:00
|
|
|
|
2019-07-16 22:09:29 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/wireapp/wire-desktop/releases/download/"
|
2020-04-06 16:25:29 +00:00
|
|
|
+ "macos%2F${version}/Wire.pkg";
|
2019-07-16 22:09:29 +00:00
|
|
|
inherit sha256;
|
|
|
|
};
|
2018-04-11 18:46:23 +00:00
|
|
|
|
2019-11-28 11:05:17 +00:00
|
|
|
buildInputs = [
|
|
|
|
cpio
|
|
|
|
xar
|
|
|
|
];
|
2018-04-11 18:46:23 +00:00
|
|
|
|
2019-07-16 22:09:29 +00:00
|
|
|
unpackPhase = ''
|
2021-03-05 17:07:53 +00:00
|
|
|
runHook preUnpack
|
|
|
|
|
2019-07-16 22:09:29 +00:00
|
|
|
xar -xf $src
|
|
|
|
cd com.wearezeta.zclient.mac.pkg
|
2021-03-05 17:07:53 +00:00
|
|
|
|
|
|
|
runHook postUnpack
|
2019-07-16 22:09:29 +00:00
|
|
|
'';
|
2018-04-11 18:46:23 +00:00
|
|
|
|
2019-07-16 22:09:29 +00:00
|
|
|
buildPhase = ''
|
2021-03-05 17:07:53 +00:00
|
|
|
runHook preBuild
|
|
|
|
|
2019-07-16 22:09:29 +00:00
|
|
|
cat Payload | gunzip -dc | cpio -i
|
2021-03-05 17:07:53 +00:00
|
|
|
|
|
|
|
runHook postBuild
|
2019-07-16 22:09:29 +00:00
|
|
|
'';
|
2018-07-09 22:34:32 +00:00
|
|
|
|
2019-07-16 22:09:29 +00:00
|
|
|
installPhase = ''
|
2021-03-05 17:07:53 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2019-07-16 22:09:29 +00:00
|
|
|
mkdir -p $out/Applications
|
|
|
|
cp -r Wire.app $out/Applications
|
2021-03-05 17:07:53 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2019-07-16 22:09:29 +00:00
|
|
|
'';
|
2019-03-21 02:24:04 +00:00
|
|
|
};
|
2019-07-16 22:09:29 +00:00
|
|
|
|
2019-11-28 11:05:17 +00:00
|
|
|
in
|
|
|
|
if stdenv.isDarwin
|
|
|
|
then darwin
|
|
|
|
else linux
|