nixos-configs/homeManagerModules/firefox/firefox-gx/default.nix
matt1432 eaecd0eec5
All checks were successful
Discord / discord commits (push) Has been skipped
chore(firefox-gx): replace fix with latest commit
2025-01-29 12:10:37 -05:00

40 lines
1 KiB
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 ../../../flake.lock);
rev =
lock.nodes.firefox-gx-src.original.ref
or lock.nodes.firefox-gx-src.original.rev;
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;
};
}