Skip to content

Instantly share code, notes, and snippets.

@barryfm
Created May 3, 2021 19:46
Show Gist options
  • Save barryfm/b50dc60bdfad48fca5ca75736dc3126b to your computer and use it in GitHub Desktop.
Save barryfm/b50dc60bdfad48fca5ca75736dc3126b to your computer and use it in GitHub Desktop.
Bubblemail 1.4 with avatars enabled
{ lib
, fetchFromGitLab
, gettext
, gtk3
, python3Packages
, gdk-pixbuf
, libnotify
, gst_all_1
, libsecret
, wrapGAppsHook
, gsettings-desktop-schemas
, gnome-online-accounts
, glib
, gobject-introspection
, folks
, vala, pkg-config
}:
python3Packages.buildPythonApplication rec {
pname = "bubblemail";
version = "1.4";
src = fetchFromGitLab {
domain = "framagit.org";
owner = "razer";
repo = "bubblemail";
rev = "v${version}";
sha256 = "1p0xwsfncjm7yswp1kf2w6rlrim767rrza9pb62h11yxgfjpiy9h";
};
buildInputs = [
gtk3
gdk-pixbuf
glib
libnotify
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good
gst_all_1.gst-plugins-bad
libsecret
gnome-online-accounts
folks
];
nativeBuildInputs = [
gettext
wrapGAppsHook
python3Packages.pillow
# For setup-hook
gobject-introspection
vala
pkg-config
];
propagatedBuildInputs = with python3Packages; [
gsettings-desktop-schemas
pygobject3
dbus-python
pyxdg
];
# See https://nixos.org/nixpkgs/manual/#ssec-gnome-common-issues-double-wrapped
dontWrapGApps = true;
# https://github.com/NixOS/nixpkgs/issues/56943
strictDeps = false;
postPatch= ''
substituteInPlace bubblemail/utils.py \
--replace "/usr/bin" "$out/bin" \
--replace "/usr/share/locale" "$out/share/locale"
substituteInPlace setup.py \
--replace "/bin/bash" "/usr/bin/env bash"
substituteInPlace data/bubblemail.desktop \
--replace "/usr/bin/" ""
substituteInPlace data/bubblemaild.desktop \
--replace "/usr/bin/" ""
'';
preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
wrapProgram $out/bin/bubblemail-avatar-provider "''${gappsWrapperArgs[@]}"
'';
postInstall = ''
if [ -d data/avatars ]; then
mkdir -p $out/share/bubblemail/avatars
cp data/avatars/* $out/share/bubblemail/avatars/
fi
'';
meta = with lib; {
description = "An extensible mail notification service.";
homepage = "http://bubblemail.free.fr/";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ doronbehar ];
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment