Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

catppuccin-gtk: fix nix derivation for build scripts #290297

Merged
merged 1 commit into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions pkgs/data/themes/catppuccin-gtk/colloid-src-git-reset.patch
Original file line number Diff line number Diff line change
@@ -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
7 changes: 6 additions & 1 deletion pkgs/data/themes/catppuccin-gtk/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]))
Expand All @@ -54,7 +58,7 @@ stdenvNoCC.mkDerivation rec {
'';

postPatch = ''
patchShebangs --build colloid/install.sh
patchShebangs --build colloid/install.sh colloid/build.sh
'';

dontConfigure = true;
Expand All @@ -63,6 +67,7 @@ stdenvNoCC.mkDerivation rec {
installPhase = ''
runHook preInstall

cp -r colloid colloid-base
mkdir -p $out/share/themes
export HOME=$(mktemp -d)

Expand Down
Loading