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

catppuccin-gtk: fix nix derivation for build scripts
This commit is contained in:
Weijia Wang 2024-04-01 19:42:47 +02:00 committed by GitHub
commit 518d41b676
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 23 additions and 1 deletions

View file

@ -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

View file

@ -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)