2018-12-11 12:15:33 +00:00
|
|
|
{ alsaLib, autoPatchelfHook, fetchurl, gtk3, libnotify
|
2021-01-11 07:54:33 +00:00
|
|
|
, makeDesktopItem, makeWrapper, nss, lib, stdenv, udev, xdg_utils
|
2018-12-11 12:15:33 +00:00
|
|
|
, xorg
|
|
|
|
}:
|
2018-08-15 17:03:18 +00:00
|
|
|
|
2021-01-15 05:42:41 +00:00
|
|
|
with lib;
|
2018-08-15 17:03:18 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
bits = "x86_64";
|
|
|
|
|
2019-09-29 09:46:13 +00:00
|
|
|
version = "4.11.3";
|
2018-08-15 17:03:18 +00:00
|
|
|
|
|
|
|
desktopItem = makeDesktopItem rec {
|
|
|
|
name = "Wavebox";
|
2018-12-11 11:42:51 +00:00
|
|
|
exec = "wavebox";
|
2018-08-15 17:03:18 +00:00
|
|
|
icon = "wavebox";
|
|
|
|
desktopName = name;
|
|
|
|
genericName = name;
|
|
|
|
categories = "Network;";
|
|
|
|
};
|
|
|
|
|
|
|
|
tarball = "Wavebox_${replaceStrings ["."] ["_"] (toString version)}_linux_${bits}.tar.gz";
|
|
|
|
|
2019-08-13 21:52:01 +00:00
|
|
|
in stdenv.mkDerivation {
|
2019-08-13 21:52:01 +00:00
|
|
|
pname = "wavebox";
|
|
|
|
inherit version;
|
2018-08-15 17:03:18 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/wavebox/waveboxapp/releases/download/v${version}/${tarball}";
|
2019-09-29 09:46:13 +00:00
|
|
|
sha256 = "0z04071lq9bfyrlg034fmvd4346swgfhxbmsnl12m7c2m2b9z784";
|
2018-08-15 17:03:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# don't remove runtime deps
|
|
|
|
dontPatchELF = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
|
|
|
|
|
|
|
|
buildInputs = with xorg; [
|
2018-12-11 11:42:51 +00:00
|
|
|
libXdmcp libXScrnSaver libXtst
|
2018-08-15 17:03:18 +00:00
|
|
|
] ++ [
|
2018-12-11 11:42:51 +00:00
|
|
|
alsaLib gtk3 nss
|
2018-08-15 17:03:18 +00:00
|
|
|
];
|
|
|
|
|
2020-08-12 18:28:45 +00:00
|
|
|
runtimeDependencies = [ (getLib udev) libnotify ];
|
2018-08-15 17:03:18 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin $out/opt/wavebox
|
|
|
|
cp -r * $out/opt/wavebox
|
|
|
|
|
|
|
|
# provide desktop item and icon
|
|
|
|
mkdir -p $out/share/applications $out/share/pixmaps
|
|
|
|
ln -s ${desktopItem}/share/applications/* $out/share/applications
|
|
|
|
ln -s $out/opt/wavebox/Wavebox-linux-x64/wavebox_icon.png $out/share/pixmaps/wavebox.png
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
makeWrapper $out/opt/wavebox/Wavebox $out/bin/wavebox \
|
|
|
|
--prefix PATH : ${xdg_utils}/bin
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-08-15 17:03:18 +00:00
|
|
|
description = "Wavebox messaging application";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://wavebox.io";
|
2018-08-15 17:03:18 +00:00
|
|
|
license = licenses.mpl20;
|
|
|
|
maintainers = with maintainers; [ rawkode ];
|
|
|
|
platforms = ["x86_64-linux"];
|
|
|
|
hydraPlatforms = [];
|
|
|
|
};
|
|
|
|
}
|