diff --git a/flake.lock b/flake.lock index f722e6e1..416272f0 100644 Binary files a/flake.lock and b/flake.lock differ diff --git a/flake.nix b/flake.nix index 492580fc..11b4e92a 100644 Binary files a/flake.nix and b/flake.nix differ diff --git a/homeManagerModules/firefox/default.nix b/homeManagerModules/firefox/default.nix index 7e475038..66fc2163 100644 --- a/homeManagerModules/firefox/default.nix +++ b/homeManagerModules/firefox/default.nix @@ -8,8 +8,7 @@ self: { rounding = (config.wayland.windowManager.hyprland.settings.decoration.rounding or 2) - 2; firefox-gx = pkgs.callPackage ./gx-theme.nix { - inherit (self.inputs) firefox-gx-src; - inherit (self.lib) mkVersion; + inherit self; }; in { config = { diff --git a/homeManagerModules/firefox/gx-theme.nix b/homeManagerModules/firefox/gx-theme.nix index 318d2b01..bb3b2a31 100644 --- a/homeManagerModules/firefox/gx-theme.nix +++ b/homeManagerModules/firefox/gx-theme.nix @@ -1,27 +1,38 @@ { lib, - mkVersion, - firefox-gx-src, + self, stdenvNoCC, -}: -stdenvNoCC.mkDerivation { - pname = "firefox-gx"; - version = mkVersion firefox-gx-src; +}: let + inherit (builtins) fromJSON readFile; + inherit (lib) hasPrefix replaceStrings; - src = firefox-gx-src; + inherit (self.inputs) firefox-gx-src; + inherit (self.lib) mkVersion; - 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 + lock = fromJSON (readFile ../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; - mkdir -p $out - cp -r ./* $out - ''; + src = firefox-gx-src; - meta = { - description = "Firefox Theme CSS to Opera GX Lovers"; - homepage = "https://github.com/Godiesc/firefox-gx"; - license = lib.licenses.mspl; - }; -} + 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; + }; + } diff --git a/inputs/default.nix b/inputs/default.nix index 10071f8f..9c0cc856 100644 --- a/inputs/default.nix +++ b/inputs/default.nix @@ -344,7 +344,7 @@ let { owner = "Godiesc"; repo = "firefox-gx"; - # ref = "v.9.6"; + ref = "v.9.7"; } { name = "git-theme-src";