-
Notifications
You must be signed in to change notification settings - Fork 0
/
catppuccin-gtk-overlay.nix
63 lines (54 loc) · 1.67 KB
/
catppuccin-gtk-overlay.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{lib, ...}: final: prev: let
nv = (import ./nvpkgs.nix).catppuccin-gtk;
in {
catppuccin-gtk =
prev.callPackage (
args:
(prev.catppuccin-gtk.override args).overrideAttrs (attrs: {
inherit (nv) version;
# src = final.fetchFromGitHub {
# inherit (nv.src) rev sha256;
# owner = "catppuccin";
# repo = "gtk";
# };
src = builtins.fetchGit {
inherit (nv.src) url rev;
#hash = nv.src.sha256;
submodules = true;
};
patches = null; # patches not needed for 1.x
nativeBuildInputs =
attrs.nativeBuildInputs
++ [
final.git # to apply patches
];
postUnpack = false; # use the submodule instead
installPhase = ''
set -e
runHook preInstall
python ./build.py ${args.variant} \
${lib.optionalString (args.accents != []) "--accent " + builtins.toString args.accents} \
--size ${args.size} \
${lib.optionalString (args.tweaks != []) "--tweaks " + builtins.toString args.tweaks} \
--dest releases
mkdir -p $out/share
cp -r releases $out/share/themes
runHook postInstall
'';
})
)
{};
}
# mkdir -p $out/share/themes
# # cp -r releases $out/share/themes
# cd releases
# for dir in "$base_dir"/*/; do
# if [ -d "$dir" ]; then
# IFS=-
# tokens=( $input )
# read -a tokens <<< "''${tokens[*]^}";
# filename="$(echo "''${name[*]%%+*}")"
# IFS=$originalIFS
# mv "$dir" "$out/share/themes/$filename"
# fi
# done