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-10-31 13:37:42 +00:00
|
|
|
version = "5.4.1";
|
2019-08-13 22:52:01 +01:00
|
|
|
in stdenv.mkDerivation {
|
2019-08-13 22:52:01 +01:00
|
|
|
pname = "franz";
|
|
|
|
inherit version;
|
2016-10-03 14:26:16 +01:00
|
|
|
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-10-31 13:37:42 +00:00
|
|
|
sha256 = "1g1z5zjm9l081hpqslfc4h7pqh4k76ccmlz71r21204wy630mw6h";
|
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 \
|
2019-12-18 10:37:26 +00:00
|
|
|
--replace /opt/Franz/franz 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;
|
2019-10-24 13:31:24 +01:00
|
|
|
maintainers = [ maintainers.davidtwco ];
|
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
|
|
|
};
|
|
|
|
}
|