1 { runCommand, tailwindcss, nodePackages }:
5 inherit (tailwindcss) packageName version;
7 tailwindcssInput = builtins.toFile "input.css" ''
13 tailwindcssWithPlugins = tailwindcss.overrideAttrs (oldAttrs: {
15 nodePackages."@tailwindcss/typography"
19 tailwindcssWithPluginsConfig = builtins.toFile "tailwind.config.js" ''
21 content: ["./with-typography.input"],
23 require('@tailwindcss/typography'),
30 runCommand "${packageName}-tests" { meta.timeout = 60; }
35 ${tailwindcss}/bin/tailwind --help > /dev/null
36 ${tailwindcss}/bin/tailwindcss --help > /dev/null
38 # Ensure CLI with plugins runs
39 echo '"ml-4 prose"' > ./with-typography.input
40 ${tailwindcssWithPlugins}/bin/tailwind \
41 --config ${tailwindcssWithPluginsConfig} \
42 --input ${tailwindcssInput} \
43 --output $out/with-typography.css
45 grep -q ml-4 $out/with-typography.css
46 grep -q prose $out/with-typography.css