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

57 lines
1.7 KiB
Nix
Raw Normal View History

{ 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
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 ];
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
'';
dontWrapGApps = true;
postFixup = ''
wrapProgram $out/opt/Franz/franz \
--prefix PATH : ${xdg_utils}/bin \
"''${gappsWrapperArgs[@]}"
'';
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"];
hydraPlatforms = [];
2016-10-03 14:26:16 +01:00
};
}