nixos-configs/homeManagerModules/firefox/firefox-gx/default.nix
matt1432 b402f01d49
All checks were successful
Discord / discord commits (push) Has been skipped
feat(firefox): write custom-css in scss
2024-12-10 16:40:51 -05:00

38 lines
985 B
Nix

{
lib,
self,
stdenvNoCC,
}: let
inherit (builtins) fromJSON readFile;
inherit (lib) hasPrefix replaceStrings;
inherit (self.inputs) firefox-gx-src;
inherit (self.lib) mkVersion;
lock = fromJSON (readFile "${self}/flake.lock");
rev = lock.nodes.firefox-gx-src.original.ref;
in
stdenvNoCC.mkDerivation {
pname = "firefox-gx";
version =
if hasPrefix "v." rev
then replaceStrings ["v"] ["0"] rev
else mkVersion firefox-gx-src;
src = firefox-gx-src;
installPhase = ''
# Personal changes
sed -i 's/var(--fuchsia))/var(--purple))/' ./chrome/components/ogx_root-personal.css
sed -i 's#../newtab/wallpaper-dark1.png#../newtab/wallpaper-dark2.png#' ./chrome/components/ogx_root-personal.css
mkdir -p $out
cp -r ./* $out
'';
meta = {
description = "Firefox Theme CSS to Opera GX Lovers";
homepage = "https://github.com/Godiesc/firefox-gx";
license = lib.licenses.mspl;
};
}