Skip to content

Commit ec820a8

Browse files
committed
haskellPackages.tailwind: enhance override to provide tailwind binary
This reverts to previous use of `tailwind` wrapper before 50f5683 removed it. Since we already had an override, this makes it a little chunkier to maintain compatibility.
1 parent a6621bd commit ec820a8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pkgs/development/haskell-modules/configuration-nix.nix

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1426,6 +1426,16 @@ self: super: builtins.intersectAttrs super {
14261426
pkgs.nodePackages."@tailwindcss/line-clamp"
14271427
pkgs.nodePackages."@tailwindcss/typography"
14281428
];
1429+
# Added a shim for the `tailwindcss` CLI entry point
1430+
nativeBuildInputs = (oa.nativeBuildInputs or []) ++ [ pkgs.buildPackages.makeBinaryWrapper ];
1431+
postInstall = (oa.postInstall or "") + ''
1432+
nodePath=""
1433+
for p in "$out" "${pkgs.nodePackages.postcss}" $plugins; do
1434+
nodePath="$nodePath''${nodePath:+:}$p/lib/node_modules"
1435+
done
1436+
makeWrapper "$out/bin/tailwindcss" "$out/bin/tailwind" --prefix NODE_PATH : "$nodePath"
1437+
unset nodePath
1438+
'';
14291439
})) super.tailwind;
14301440

14311441
emanote = addBuildDepend pkgs.stork super.emanote;

0 commit comments

Comments
 (0)