aboutsummaryrefslogtreecommitdiff
path: root/git/theme.nix
diff options
context:
space:
mode:
Diffstat (limited to 'git/theme.nix')
-rw-r--r--git/theme.nix20
1 files changed, 20 insertions, 0 deletions
diff --git a/git/theme.nix b/git/theme.nix
new file mode 100644
index 0000000..4d4a395
--- /dev/null
+++ b/git/theme.nix
@@ -0,0 +1,20 @@
+{ pkgs }:
+
+# The extra stylesheet for cgit, served next to cgit's stock cgit.css, plus the
+# webfont it references. Fonts ship here rather than being pulled from
+# kassouni.net so they stay same-origin and need no CORS headers.
+pkgs.runCommand "cgit-theme"
+ {
+ nativeBuildInputs = [ pkgs.dart-sass ];
+
+ meta = {
+ description = "cgit stylesheet matching kassouni.net";
+ license = pkgs.lib.licenses.mit;
+ platforms = pkgs.lib.platforms.all;
+ };
+ }
+ ''
+ mkdir -p $out
+ sass --no-source-map --load-path=${../style} ${./cgit.scss} $out/theme.css
+ cp -r ${../site/static/fonts} $out/fonts
+ ''