haskellPackages.tailwind: enhance override to provide tailwind binary

This reverts to previous use of `tailwind` wrapper before 50f5683d8c removed it.

Since we already had an override, this makes it a little chunkier to maintain compatibility.
This commit is contained in:
Philip Taron
2025-02-09 08:21:46 -08:00
parent a6621bdf83
commit ec820a8d45
@@ -1426,6 +1426,16 @@ self: super: builtins.intersectAttrs super {
pkgs.nodePackages."@tailwindcss/line-clamp"
pkgs.nodePackages."@tailwindcss/typography"
];
# Added a shim for the `tailwindcss` CLI entry point
nativeBuildInputs = (oa.nativeBuildInputs or []) ++ [ pkgs.buildPackages.makeBinaryWrapper ];
postInstall = (oa.postInstall or "") + ''
nodePath=""
for p in "$out" "${pkgs.nodePackages.postcss}" $plugins; do
nodePath="$nodePath''${nodePath:+:}$p/lib/node_modules"
done
makeWrapper "$out/bin/tailwindcss" "$out/bin/tailwind" --prefix NODE_PATH : "$nodePath"
unset nodePath
'';
})) super.tailwind;
emanote = addBuildDepend pkgs.stork super.emanote;