@@ -1,9 +1,7 @@
1−{ stdenv, fetchurl, dpkg, makeWrapper , alsaLib, atk, cairo,
1+{ theme ? null, stdenv, fetchurl, dpkg, makeWrapper , alsaLib, atk, cairo,
22cups, curl, dbus, expat, fontconfig, freetype, glib , gnome2, gtk3, gdk_pixbuf,
33libappindicator-gtk3, libnotify, libxcb, nspr, nss, pango , systemd, xorg,
4−at-spi2-atk, libuuid,
5−darkMode ? false,
6−darkModeCssUrl ? "https://cdn.rawgit.com/laCour/slack-night-mode/master/css/raw/black.css"
4+at-spi2-atk, libuuid
75}:
86
97let
@@ -94,12 +92,12 @@ in stdenv.mkDerivation {
9492 substituteInPlace $out/share/applications/slack.desktop \
9593 --replace /usr/bin/ $out/bin/ \
9694 --replace /usr/share/ $out/share/
97− '' + stdenv.lib.optionalString darkMode ''
95+ '' + stdenv.lib.optionalString (theme != null) ''
9896 cat <<EOF >> $out/lib/slack/resources/app.asar.unpacked/src/static/ssb-interop.js
9997 document.addEventListener('DOMContentLoaded', function() {
10098 let tt__customCss = ".menu ul li a:not(.inline_menu_link) {color: #fff !important;}"
10199 $.ajax({
102− url: '${darkModeCssUrl}',
100+ url: '${theme}/theme.css',
103101 success: function(css) {
104102 \$("<style></style>").appendTo('head').html(css + tt__customCss);
105103 \$("<style></style>").appendTo('head').html('#reply_container.upload_in_threads .inline_message_input_container {background: padding-box #545454}');