mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 14:57:28 +03:00
franz: 4.0.4 -> 5.0.0-beta.19
This commit is contained in:
parent
7ef94bee72
commit
e107569b6f
@ -1,60 +1,44 @@
|
|||||||
{ stdenv, fetchurl, makeDesktopItem, makeWrapper, autoPatchelfHook
|
{ stdenv, fetchurl, makeWrapper, autoPatchelfHook, dpkg
|
||||||
, xorg, atk, glib, pango, gdk_pixbuf, cairo, freetype, fontconfig, gtk2
|
, xorg, atk, glib, pango, gdk_pixbuf, cairo, freetype, fontconfig, gtk3
|
||||||
, gnome2, dbus, nss, nspr, alsaLib, cups, expat, udev, libnotify, xdg_utils }:
|
, gnome2, dbus, nss, nspr, alsaLib, cups, expat, udev, libnotify, xdg_utils }:
|
||||||
|
|
||||||
let
|
let
|
||||||
bits = if stdenv.hostPlatform.system == "x86_64-linux" then "x64"
|
version = "5.0.0-beta.19";
|
||||||
else "ia32";
|
|
||||||
|
|
||||||
version = "4.0.4";
|
|
||||||
|
|
||||||
desktopItem = makeDesktopItem rec {
|
|
||||||
name = "Franz";
|
|
||||||
exec = name;
|
|
||||||
icon = "franz";
|
|
||||||
desktopName = name;
|
|
||||||
genericName = "Franz messenger";
|
|
||||||
categories = "Network;";
|
|
||||||
};
|
|
||||||
in stdenv.mkDerivation rec {
|
in stdenv.mkDerivation rec {
|
||||||
name = "franz-${version}";
|
name = "franz-${version}";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/meetfranz/franz-app/releases/download/${version}/Franz-linux-${bits}-${version}.tgz";
|
url = "https://github.com/meetfranz/franz/releases/download/v${version}/franz_${version}_amd64.deb";
|
||||||
sha256 = if bits == "x64" then
|
sha256 = "1b9b8y19iqx8bnax7hbh9rkjfxk8a9gqb1akrcxwwfi46l816gyy";
|
||||||
"0ssym0jfrig474g6j67g1jfybjkxnyhbqqjvrs8z6ihwlyd3rrk5" else
|
|
||||||
"16l9jma2hiwzl9l41yhrwribcgmxca271rq0cfbbm9701mmmciyy";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# don't remove runtime deps
|
# don't remove runtime deps
|
||||||
dontPatchELF = true;
|
dontPatchELF = true;
|
||||||
|
|
||||||
nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
|
nativeBuildInputs = [ autoPatchelfHook makeWrapper dpkg ];
|
||||||
buildInputs = (with xorg; [
|
buildInputs = (with xorg; [
|
||||||
libXi libXcursor libXdamage libXrandr libXcomposite libXext libXfixes
|
libXi libXcursor libXdamage libXrandr libXcomposite libXext libXfixes
|
||||||
libXrender libX11 libXtst libXScrnSaver
|
libXrender libX11 libXtst libXScrnSaver
|
||||||
]) ++ [
|
]) ++ [
|
||||||
gtk2 atk glib pango gdk_pixbuf cairo freetype fontconfig dbus
|
gtk3 atk glib pango gdk_pixbuf cairo freetype fontconfig dbus
|
||||||
gnome2.GConf nss nspr alsaLib cups expat stdenv.cc.cc
|
gnome2.GConf nss nspr alsaLib cups expat stdenv.cc.cc
|
||||||
];
|
];
|
||||||
runtimeDependencies = [ udev.lib libnotify ];
|
runtimeDependencies = [ udev.lib libnotify ];
|
||||||
|
|
||||||
unpackPhase = ''
|
unpackPhase = "dpkg-deb -x $src .";
|
||||||
tar xzf $src
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin $out/opt/franz
|
mkdir -p $out/bin
|
||||||
cp -r * $out/opt/franz
|
cp -r opt $out
|
||||||
ln -s $out/opt/franz/Franz $out/bin
|
ln -s $out/opt/Franz/franz $out/bin
|
||||||
|
|
||||||
# provide desktop item and icon
|
# provide desktop item and icon
|
||||||
mkdir -p $out/share/applications $out/share/pixmaps
|
cp -r usr/share $out
|
||||||
ln -s ${desktopItem}/share/applications/* $out/share/applications
|
substituteInPlace $out/share/applications/franz.desktop \
|
||||||
ln -s $out/opt/franz/resources/app.asar.unpacked/assets/franz.png $out/share/pixmaps
|
--replace Exec=\"/opt/Franz/franz\" Exec=franz
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
wrapProgram $out/opt/franz/Franz --prefix PATH : ${xdg_utils}/bin
|
wrapProgram $out/opt/Franz/franz --prefix PATH : ${xdg_utils}/bin
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
@ -62,7 +46,7 @@ in stdenv.mkDerivation rec {
|
|||||||
homepage = https://meetfranz.com;
|
homepage = https://meetfranz.com;
|
||||||
license = licenses.free;
|
license = licenses.free;
|
||||||
maintainers = [ maintainers.gnidorah ];
|
maintainers = [ maintainers.gnidorah ];
|
||||||
platforms = ["i686-linux" "x86_64-linux"];
|
platforms = ["x86_64-linux"];
|
||||||
hydraPlatforms = [];
|
hydraPlatforms = [];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user