This commit is contained in:
ediblerope 2026-05-15 22:33:38 +01:00
parent e5407513a3
commit 19813ee0b1

View file

@ -83,20 +83,16 @@
papirusDark = pkgs.runCommand "papirus-dark-${closestPfColor}" { papirusDark = pkgs.runCommand "papirus-dark-${closestPfColor}" {
nativeBuildInputs = [ pkgs.papirus-folders ]; nativeBuildInputs = [ pkgs.papirus-folders ];
} '' } ''
# Work in a fully writable temp tree so papirus-folders can find and # Copy theme to a writable temp dir and pass its absolute path to
# modify the theme without fighting the nix sandbox path structure. # papirus-folders so it bypasses XDG lookup entirely.
tmpdata=$(mktemp -d) themedir=$(mktemp -d)/Papirus-Dark
mkdir -p $tmpdata/icons cp -r ${pkgs.papirus-icon-theme}/share/icons/Papirus-Dark "$themedir"
cp -r ${pkgs.papirus-icon-theme}/share/icons/Papirus-Dark $tmpdata/icons/ chmod -R u+w "$themedir"
chmod -R u+w $tmpdata/icons/Papirus-Dark
export HOME=$(mktemp -d) papirus-folders -C ${closestPfColor} -t "$themedir"
export XDG_DATA_HOME=$tmpdata
papirus-folders -C ${closestPfColor} -t Papirus-Dark
mkdir -p $out/share/icons mkdir -p $out/share/icons
cp -r $tmpdata/icons/Papirus-Dark $out/share/icons/ cp -r "$themedir" $out/share/icons/Papirus-Dark
''; '';
# Map matugen's Material You placeholders to the closest base16 slot # Map matugen's Material You placeholders to the closest base16 slot