Unverified Commit 518d41b6 authored by Weijia Wang's avatar Weijia Wang Committed by GitHub
Browse files

Merge pull request #290297 from daylinmorgan/catppuccin-gtk-patch

catppuccin-gtk: fix nix derivation for build scripts
parents 2351f04c 7e6f67dc
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
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
+6 −1
Original line number Diff line number Diff line
@@ -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)