fix discord catppuccin theme packaging
This commit is contained in:
parent
a3d91c2d46
commit
f1810eb104
1 changed files with 49 additions and 3 deletions
|
|
@ -1,11 +1,57 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
catppuccin-discord = pkgs.fetchurl {
|
catppuccin-discord-src = pkgs.fetchFromGitHub {
|
||||||
url = "https://catppuccin.github.io/discord/dist/catppuccin-${config.catppuccin.flavor}-${config.catppuccin.accent}.theme.css";
|
owner = "catppuccin";
|
||||||
sha256 = "sha256-bMxCPo7vg+iHXspsVnrboonlUvkShk5l+gqFIbAxd0o=";
|
repo = "discord";
|
||||||
|
rev = "1b2dffbabf75a294a0fb9245f9f7244a853e7ada";
|
||||||
|
hash = "sha256-LdUPnnbbSwgaw37FJD2s1vPiTaISaYbtOWRxQIekQkQ=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
yarnOfflineCache = pkgs.fetchYarnDeps {
|
||||||
|
yarnLock = "${catppuccin-discord-src}/yarn.lock";
|
||||||
|
hash = "sha256-BhE3aKyA/LBErjWx+lbEVb/CIXhqHkXbV+9U2djIBhs=";
|
||||||
|
};
|
||||||
|
|
||||||
|
catppuccin-discord-pkg = pkgs.stdenv.mkDerivation {
|
||||||
|
pname = "catppuccin-discord";
|
||||||
|
version = "unstable";
|
||||||
|
|
||||||
|
src = catppuccin-discord-src;
|
||||||
|
|
||||||
|
nativeBuildInputs = with pkgs; [
|
||||||
|
yarn
|
||||||
|
nodejs
|
||||||
|
fixup-yarn-lock
|
||||||
|
nodePackages.sass
|
||||||
|
];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace package.json \
|
||||||
|
--replace-fail "--no-charset --no-source-map" ""
|
||||||
|
'';
|
||||||
|
|
||||||
|
configurePhase = ''
|
||||||
|
export HOME=$TMPDIR
|
||||||
|
yarn config --offline set yarn-offline-mirror ${yarnOfflineCache}
|
||||||
|
fixup-yarn-lock yarn.lock
|
||||||
|
yarn install --offline --frozen-lockfile --ignore-scripts --ignore-platform
|
||||||
|
'';
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
yarn --offline build
|
||||||
|
yarn --offline release
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out
|
||||||
|
find .
|
||||||
|
cp -r dist/* $out
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
catppuccin-discord = "${catppuccin-discord-pkg}/dist/catppuccin-${config.catppuccin.flavor}-${config.catppuccin.accent}.theme.css";
|
||||||
|
|
||||||
mergedThemes = pkgs.runCommand "mergedConfig" { } ''
|
mergedThemes = pkgs.runCommand "mergedConfig" { } ''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
cp ${catppuccin-discord} $out/catppuccin.css
|
cp ${catppuccin-discord} $out/catppuccin.css
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue