Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
51 lines
1.1 KiB
Nix
51 lines
1.1 KiB
Nix
{
|
|
runCommand,
|
|
tailwindcss,
|
|
nodePackages,
|
|
}:
|
|
|
|
let
|
|
|
|
inherit (tailwindcss) packageName version;
|
|
|
|
tailwindcssInput = builtins.toFile "input.css" ''
|
|
@tailwind base;
|
|
@tailwind components;
|
|
@tailwind utilities;
|
|
'';
|
|
|
|
tailwindcssWithPlugins = tailwindcss.overrideAttrs (oldAttrs: {
|
|
plugins = [
|
|
nodePackages."@tailwindcss/typography"
|
|
];
|
|
});
|
|
|
|
tailwindcssWithPluginsConfig = builtins.toFile "tailwind.config.js" ''
|
|
module.exports = {
|
|
content: ["./with-typography.input"],
|
|
plugins: [
|
|
require('@tailwindcss/typography'),
|
|
],
|
|
}
|
|
'';
|
|
|
|
in
|
|
|
|
runCommand "${packageName}-tests" { meta.timeout = 60; } ''
|
|
mkdir $out
|
|
|
|
# Ensure CLI runs
|
|
${tailwindcss}/bin/tailwind --help > /dev/null
|
|
${tailwindcss}/bin/tailwindcss --help > /dev/null
|
|
|
|
# Ensure CLI with plugins runs
|
|
echo '"ml-4 prose"' > ./with-typography.input
|
|
${tailwindcssWithPlugins}/bin/tailwind \
|
|
--config ${tailwindcssWithPluginsConfig} \
|
|
--input ${tailwindcssInput} \
|
|
--output $out/with-typography.css
|
|
|
|
grep -q ml-4 $out/with-typography.css
|
|
grep -q prose $out/with-typography.css
|
|
''
|