diff options
author | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2024-04-01 19:42:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-01 19:42:47 +0200 |
commit | 518d41b676747ee6ce05f9c5c9f75c9e311583ac (patch) | |
tree | d509528fa582f6d0dca848e541cf76490de3866b /pkgs/data | |
parent | 2351f04cd4719fd8c1e121e1280757da66bdd2fb (diff) | |
parent | 7e6f67dcb15840cfc12b38d2f1463a127df1a96e (diff) |
Merge pull request #290297 from daylinmorgan/catppuccin-gtk-patch
catppuccin-gtk: fix nix derivation for build scripts
Diffstat (limited to 'pkgs/data')
-rw-r--r-- | pkgs/data/themes/catppuccin-gtk/colloid-src-git-reset.patch | 17 | ||||
-rw-r--r-- | pkgs/data/themes/catppuccin-gtk/default.nix | 7 |
2 files changed, 23 insertions, 1 deletions
diff --git a/pkgs/data/themes/catppuccin-gtk/colloid-src-git-reset.patch b/pkgs/data/themes/catppuccin-gtk/colloid-src-git-reset.patch new file mode 100644 index 0000000000000..7ee1f4bd9b6f7 --- /dev/null +++ b/pkgs/data/themes/catppuccin-gtk/colloid-src-git-reset.patch @@ -0,0 +1,17 @@ +diff --git a/scripts/create_theme.py b/scripts/create_theme.py +index 074dc43..7e7a8eb 100644 +--- a/scripts/create_theme.py ++++ b/scripts/create_theme.py +@@ -34,7 +34,11 @@ def create_theme(types: List[str], accents: List[str], dest: str, link: bool = F + os.chdir(work_dir) + subprocess.call("./build.sh", shell=True) # Rebuild all scss + subprocess.call(install_cmd, shell=True) # Install the theme globally for you +- subprocess.call("git reset --hard HEAD", shell=True) # reset colloid repo to original state ++ # subprocess.call("git reset --hard HEAD", shell=True) # reset colloid repo to original state ++ # recreate git reset ++ os.chdir(repo_dir) ++ shutil.rmtree("colloid") ++ shutil.copytree("colloid-base", "colloid") + + try: + # Rename colloid generated files as per catppuccin diff --git a/pkgs/data/themes/catppuccin-gtk/default.nix b/pkgs/data/themes/catppuccin-gtk/default.nix index 49df77b2adb96..0dc881942bccb 100644 --- a/pkgs/data/themes/catppuccin-gtk/default.nix +++ b/pkgs/data/themes/catppuccin-gtk/default.nix @@ -40,6 +40,10 @@ stdenvNoCC.mkDerivation rec { nativeBuildInputs = [ gtk3 sassc ]; + patches = [ + ./colloid-src-git-reset.patch + ]; + buildInputs = [ gnome-themes-extra (python3.withPackages (ps: [ ps.catppuccin ])) @@ -54,7 +58,7 @@ stdenvNoCC.mkDerivation rec { ''; postPatch = '' - patchShebangs --build colloid/install.sh + patchShebangs --build colloid/install.sh colloid/build.sh ''; dontConfigure = true; @@ -63,6 +67,7 @@ stdenvNoCC.mkDerivation rec { installPhase = '' runHook preInstall + cp -r colloid colloid-base mkdir -p $out/share/themes export HOME=$(mktemp -d) |