2023-10-26 14:12:53 -04:00
|
|
|
{ lib, stdenvNoCC, fetchFromGitHub, writeText }:
|
2023-10-09 04:13:58 -04:00
|
|
|
let
|
|
|
|
pname = "firefox-gx";
|
2023-10-26 00:35:24 -04:00
|
|
|
version = "8.5";
|
2023-10-26 14:12:53 -04:00
|
|
|
|
|
|
|
custom-menu = writeText "menu" "${builtins.readFile ./ogx_menu.css}";
|
|
|
|
custom-sidebar = writeText "sidebar" "${builtins.readFile ./ogx_left-sidebar.css}";
|
2023-10-09 04:13:58 -04:00
|
|
|
in
|
|
|
|
stdenvNoCC.mkDerivation {
|
|
|
|
inherit pname version;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Godiesc";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v.${version}";
|
2023-10-26 00:35:24 -04:00
|
|
|
sha256 = "sha256-llffq16PZz5GxkLIJDeWN1d04SCCJFqwCLzOrxgwhYI=";
|
2023-10-09 04:13:58 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
# Personal changes
|
|
|
|
sed -i 's/var(--fuchsia))/var(--purple))/' ./chrome/components/ogx_root-personal.css
|
|
|
|
|
2023-10-26 00:35:24 -04:00
|
|
|
# Fix new tab background for nix
|
2023-10-10 15:34:34 -04:00
|
|
|
substituteInPlace ./chrome/components/ogx_root-personal.css \
|
|
|
|
--replace '../images/newtab/wallpaper-dark.png' "$out/chrome/images/newtab/private-dark.png"
|
|
|
|
|
2023-10-26 14:12:53 -04:00
|
|
|
# TODO: make patch instead
|
|
|
|
cp -a ${custom-menu} ./chrome/components/ogx_menu.css
|
|
|
|
cp -a ${custom-sidebar} ./chrome/components/ogx_left-sidebar.css
|
|
|
|
|
2023-10-09 04:13:58 -04:00
|
|
|
mkdir -p $out
|
|
|
|
cp -r ./* $out
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Firefox Theme CSS to Opera GX Lovers ";
|
|
|
|
homepage = "https://github.com/Godiesc/firefox-gx";
|
|
|
|
license = licenses.mspl;
|
|
|
|
};
|
|
|
|
}
|