3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/instant-messengers/franz/default.nix

70 lines
2.2 KiB
Nix
Raw Normal View History

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
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 ];
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
'';
postFixup = ''
2017-04-23 19:10:35 +01:00
paxmark m $out/opt/franz/Franz
wrapProgram $out/opt/franz/Franz --prefix PATH : ${xdg_utils}/bin
'';
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"];
hydraPlatforms = [];
2016-10-03 14:26:16 +01:00
};
}