forked from colonelpanic/dotfiles
[NixOS] Add gitter
This commit is contained in:
parent
f34ff00082
commit
0026359c8e
@ -4,7 +4,8 @@ Wants=taffybar.service
|
|||||||
After=taffybar.service
|
After=taffybar.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/usr/bin/env run_unity.sh gitter
|
ExecStart=/usr/bin/env Gitter
|
||||||
|
ExecStart/usr/bin/env pkill Gitter
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
let
|
let
|
||||||
|
gitter = with pkgs; callPackage ./gitter.nix { };
|
||||||
my-python-packages = python-packages: with python-packages; [
|
my-python-packages = python-packages: with python-packages; [
|
||||||
appdirs
|
appdirs
|
||||||
requests
|
requests
|
||||||
@ -134,6 +135,7 @@ in
|
|||||||
emacs
|
emacs
|
||||||
firefox
|
firefox
|
||||||
kleopatra
|
kleopatra
|
||||||
|
gitter
|
||||||
google-chrome
|
google-chrome
|
||||||
hexchat
|
hexchat
|
||||||
keybase-gui-fixed
|
keybase-gui-fixed
|
||||||
|
65
nixos/gitter.nix
Normal file
65
nixos/gitter.nix
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
{ stdenv, alsaLib, atk, cairo, cups, dbus, dpkg, expat, fetchurl
|
||||||
|
, fontconfig, freetype, gdk_pixbuf, glib, gnome3, gtk3, libX11
|
||||||
|
, libXScrnSaver, libXcomposite, libXcursor, libXdamage, libXext, libXfixes
|
||||||
|
, libXi, libXrandr, libXrender, libXtst, libappindicator-gtk3, libcxx
|
||||||
|
, libnotify, libpulseaudio, libxcb, makeDesktopItem, makeWrapper, nspr, nss
|
||||||
|
, nwjs, pango, systemd }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "gitter";
|
||||||
|
version = "4.1.0";
|
||||||
|
name = "${pname}-${version}";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://update.gitter.im/linux64/${pname}_${version}_amd64.deb";
|
||||||
|
sha256 = "1gny9i2pywvczzrs93k8krqn6hwm6c2zg8yr3xmjqs3p88817wbi";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ makeWrapper dpkg ];
|
||||||
|
|
||||||
|
unpackPhase = "dpkg -x $src .";
|
||||||
|
|
||||||
|
libPath = stdenv.lib.makeLibraryPath [
|
||||||
|
alsaLib atk cairo cups dbus expat fontconfig freetype gdk_pixbuf glib
|
||||||
|
gnome3.gconf gtk3 libX11 libXScrnSaver libXcomposite libXcursor libXdamage
|
||||||
|
libXext libXfixes libXi libXrandr libXrender libXtst libappindicator-gtk3
|
||||||
|
libcxx libnotify libpulseaudio libxcb nspr nss pango stdenv.cc.cc systemd
|
||||||
|
];
|
||||||
|
|
||||||
|
gitterDirectorySuffix = "opt/gitter";
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/{bin,opt/gitter,share/pixmaps}
|
||||||
|
mv ./opt/Gitter/linux64/* $out/opt/gitter
|
||||||
|
|
||||||
|
patchelf --debug --set-interpreter ${stdenv.cc.bintools.dynamicLinker} \
|
||||||
|
--set-rpath "$out/${gitterDirectorySuffix}/lib:${libPath}" \
|
||||||
|
$out/${gitterDirectorySuffix}/Gitter
|
||||||
|
|
||||||
|
patchelf --debug --set-rpath "$out/${gitterDirectorySuffix}/lib:${libPath}" \
|
||||||
|
$out/${gitterDirectorySuffix}/lib/libnw.so
|
||||||
|
|
||||||
|
wrapProgram $out/${gitterDirectorySuffix}/Gitter --prefix LD_LIBRARY_PATH : ${libPath}
|
||||||
|
|
||||||
|
ln -s $out/${gitterDirectorySuffix}/Gitter $out/bin/
|
||||||
|
ln -s $out/${gitterDirectorySuffix}/logo.png $out/share/pixmaps/gitter.png
|
||||||
|
ln -s "${desktopItem}/share/applications" $out/share/
|
||||||
|
'';
|
||||||
|
|
||||||
|
desktopItem = makeDesktopItem {
|
||||||
|
name = pname;
|
||||||
|
exec = "Gitter";
|
||||||
|
icon = pname;
|
||||||
|
desktopName = "Gitter";
|
||||||
|
genericName = meta.description;
|
||||||
|
categories = "Network;InstantMessaging;";
|
||||||
|
};
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "Where developers come to talk";
|
||||||
|
downloadPage = "https://gitter.im/apps";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = [ maintainers.imalison ];
|
||||||
|
platforms = [ "x86_64-linux" ];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user