2019-06-25 07:30:58 +01:00
|
|
|
{ stdenv, fetchurl, makeWrapper, wrapGAppsHook, autoPatchelfHook, dpkg
|
2019-05-22 12:03:39 +01:00
|
|
|
, xorg, atk, glib, pango, gdk-pixbuf, cairo, freetype, fontconfig, gtk3
|
2018-07-09 23:34:32 +01:00
|
|
|
, gnome2, dbus, nss, nspr, alsaLib, cups, expat, udev, libnotify, xdg_utils }:
|
2016-10-03 14:26:16 +01:00
|
|
|
|
2016-10-12 07:38:15 +01:00
|
|
|
let
|
2019-07-22 11:26:52 +01:00
|
|
|
version = "5.2.0";
|
2016-10-12 07:38:15 +01:00
|
|
|
in stdenv.mkDerivation rec {
|
2016-10-03 14:26:16 +01:00
|
|
|
name = "franz-${version}";
|
|
|
|
src = fetchurl {
|
2019-01-11 22:17:46 +00:00
|
|
|
url = "https://github.com/meetfranz/franz/releases/download/v${version}/franz_${version}_amd64.deb";
|
2019-07-22 11:26:52 +01:00
|
|
|
sha256 = "1wlfd1ja38vbjy8y5pg95cpvf5ixkkq53m7v3c24q473jax4ynvg";
|
2016-10-03 14:26:16 +01:00
|
|
|
};
|
|
|
|
|
2017-04-23 19:10:35 +01:00
|
|
|
# don't remove runtime deps
|
|
|
|
dontPatchELF = true;
|
2016-10-03 14:26:16 +01:00
|
|
|
|
2019-06-25 07:30:58 +01:00
|
|
|
nativeBuildInputs = [ autoPatchelfHook makeWrapper wrapGAppsHook dpkg ];
|
2018-05-17 20:43:51 +01:00
|
|
|
buildInputs = (with xorg; [
|
|
|
|
libXi libXcursor libXdamage libXrandr libXcomposite libXext libXfixes
|
|
|
|
libXrender libX11 libXtst libXScrnSaver
|
|
|
|
]) ++ [
|
2019-05-22 12:03:39 +01:00
|
|
|
gtk3 atk glib pango gdk-pixbuf cairo freetype fontconfig dbus
|
2018-07-09 23:34:32 +01:00
|
|
|
gnome2.GConf nss nspr alsaLib cups expat stdenv.cc.cc
|
2018-05-17 20:43:51 +01:00
|
|
|
];
|
|
|
|
runtimeDependencies = [ udev.lib libnotify ];
|
2017-11-01 13:17:44 +00:00
|
|
|
|
2019-01-11 22:17:46 +00:00
|
|
|
unpackPhase = "dpkg-deb -x $src .";
|
2016-10-03 14:26:16 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
2019-01-11 22:17:46 +00:00
|
|
|
mkdir -p $out/bin
|
|
|
|
cp -r opt $out
|
|
|
|
ln -s $out/opt/Franz/franz $out/bin
|
2016-10-12 07:38:15 +01:00
|
|
|
|
2017-04-23 19:10:35 +01:00
|
|
|
# provide desktop item and icon
|
2019-01-11 22:17:46 +00:00
|
|
|
cp -r usr/share $out
|
|
|
|
substituteInPlace $out/share/applications/franz.desktop \
|
|
|
|
--replace Exec=\"/opt/Franz/franz\" Exec=franz
|
2016-10-03 14:26:16 +01:00
|
|
|
'';
|
|
|
|
|
2019-06-25 07:30:58 +01:00
|
|
|
dontWrapGApps = true;
|
|
|
|
|
2016-11-19 13:39:13 +00:00
|
|
|
postFixup = ''
|
2019-06-25 07:30:58 +01:00
|
|
|
wrapProgram $out/opt/Franz/franz \
|
|
|
|
--prefix PATH : ${xdg_utils}/bin \
|
|
|
|
"''${gappsWrapperArgs[@]}"
|
2016-11-19 13:39:13 +00:00
|
|
|
'';
|
|
|
|
|
2016-10-03 14:26:16 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A free messaging app that combines chat & messaging services into one application";
|
2018-05-01 04:03:23 +01:00
|
|
|
homepage = https://meetfranz.com;
|
2016-10-03 14:26:16 +01:00
|
|
|
license = licenses.free;
|
2017-07-05 02:42:08 +01:00
|
|
|
maintainers = [ maintainers.gnidorah ];
|
2019-01-11 22:17:46 +00:00
|
|
|
platforms = ["x86_64-linux"];
|
2016-10-03 17:24:57 +01:00
|
|
|
hydraPlatforms = [];
|
2016-10-03 14:26:16 +01:00
|
|
|
};
|
|
|
|
}
|