2018-05-17 20:43:51 +01:00
|
|
|
{ stdenv, fetchurl, makeDesktopItem, makeWrapper, autoPatchelfHook
|
2018-05-29 13:29:13 +01:00
|
|
|
, xorg, atk, glib, pango, gdk_pixbuf, cairo, freetype, fontconfig, gtk2
|
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
|
2018-08-20 20:11:29 +01:00
|
|
|
bits = if stdenv.hostPlatform.system == "x86_64-linux" then "x64"
|
2016-10-03 17:57:50 +01:00
|
|
|
else "ia32";
|
2016-10-12 07:38:15 +01:00
|
|
|
|
2016-10-03 14:26:16 +01:00
|
|
|
version = "4.0.4";
|
2016-10-12 07:38:15 +01:00
|
|
|
|
|
|
|
desktopItem = makeDesktopItem rec {
|
|
|
|
name = "Franz";
|
|
|
|
exec = name;
|
|
|
|
icon = "franz";
|
|
|
|
desktopName = name;
|
|
|
|
genericName = "Franz messenger";
|
|
|
|
categories = "Network;";
|
|
|
|
};
|
|
|
|
in stdenv.mkDerivation rec {
|
2016-10-03 14:26:16 +01:00
|
|
|
name = "franz-${version}";
|
|
|
|
src = fetchurl {
|
2016-10-12 07:38:15 +01:00
|
|
|
url = "https://github.com/meetfranz/franz-app/releases/download/${version}/Franz-linux-${bits}-${version}.tgz";
|
2016-10-03 17:57:50 +01:00
|
|
|
sha256 = if bits == "x64" then
|
|
|
|
"0ssym0jfrig474g6j67g1jfybjkxnyhbqqjvrs8z6ihwlyd3rrk5" else
|
|
|
|
"16l9jma2hiwzl9l41yhrwribcgmxca271rq0cfbbm9701mmmciyy";
|
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
|
|
|
|
2018-05-17 20:43:51 +01:00
|
|
|
nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
|
|
|
|
buildInputs = (with xorg; [
|
|
|
|
libXi libXcursor libXdamage libXrandr libXcomposite libXext libXfixes
|
|
|
|
libXrender libX11 libXtst libXScrnSaver
|
|
|
|
]) ++ [
|
2018-05-29 13:29:13 +01:00
|
|
|
gtk2 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
|
|
|
|
2016-10-03 14:26:16 +01:00
|
|
|
unpackPhase = ''
|
|
|
|
tar xzf $src
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2017-04-23 19:10:35 +01:00
|
|
|
mkdir -p $out/bin $out/opt/franz
|
|
|
|
cp -r * $out/opt/franz
|
|
|
|
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
|
2016-10-12 07:38:15 +01:00
|
|
|
mkdir -p $out/share/applications $out/share/pixmaps
|
|
|
|
ln -s ${desktopItem}/share/applications/* $out/share/applications
|
2017-04-23 19:10:35 +01:00
|
|
|
ln -s $out/opt/franz/resources/app.asar.unpacked/assets/franz.png $out/share/pixmaps
|
2016-10-03 14:26:16 +01:00
|
|
|
'';
|
|
|
|
|
2016-11-19 13:39:13 +00:00
|
|
|
postFixup = ''
|
2017-04-23 19:10:35 +01:00
|
|
|
paxmark m $out/opt/franz/Franz
|
2017-11-01 13:17:44 +00:00
|
|
|
wrapProgram $out/opt/franz/Franz --prefix PATH : ${xdg_utils}/bin
|
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 ];
|
2016-10-03 17:57:50 +01:00
|
|
|
platforms = ["i686-linux" "x86_64-linux"];
|
2016-10-03 17:24:57 +01:00
|
|
|
hydraPlatforms = [];
|
2016-10-03 14:26:16 +01:00
|
|
|
};
|
|
|
|
}
|