New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
slack: Generalize theming #61328
slack: Generalize theming #61328
Conversation
Not too important but this seem like it could be made fixed-output. Maybe consider making it local-only, as well. |
I do not know how to do that :) |
Oh well, it's not terribly important. It'd just be an optimization. Anyway, if you're interested in how to do it: In general, creating a fixed-output drv amounts to declaring the output checksum, as in let # for syntax highlighting
outputHashMode = "recursive"; # or "flat"
outputHashAlgo = "sha256";
outputHash = "...."; Since the drv in this case is supposed to produce an output containing a single file from a single file source, it'd be neater if you could flatten the whole thing into a single expr. I expect you could do that with In general, to make it local-only, you'd add attrs let # for syntax highlighting
preferLocalBuild = true;
allowSubstitutes = false; (This would be unnecessary with |
Split out dark theme Fixes NixOS#61155
cat <<EOF >> $out/lib/slack/resources/app.asar.unpacked/src/static/ssb-interop.js | ||
document.addEventListener('DOMContentLoaded', function() { | ||
let tt__customCss = ".menu ul li a:not(.inline_menu_link) {color: #fff !important;}" | ||
$.ajax({ | ||
url: '${darkModeCssUrl}', | ||
url: '${theme}/theme.css', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NeQuissimus hey, sorry, but how is this suppose to work now?
This would expand for a new version of slack-dark
package to this url in AJAX call.
https://myslackgroup.slack.com/nix/store/wcpbpwp161w5gvlchi2nnvra60l1dlzw-slack-theme-black/theme.css
This would never work AFAIK. It might work with file://
prefix, but from what I remember electron
will always block AJAX calls to local filesystem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also since url now has postfix of /theme.css
always I would be unable to pass my own custom URL as a workaround sadly. :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created a fix for this #65156
Caused by NixOS#61328
Caused by NixOS#61328
Split out dark theme
Fixes #61155
Motivation for this change
#61155
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)