From ec820a8d452a8b8e0e52a998cf4fbfbfb611e998 Mon Sep 17 00:00:00 2001 From: Philip Taron Date: Sun, 9 Feb 2025 05:42:36 -0800 Subject: [PATCH] haskellPackages.tailwind: enhance override to provide `tailwind` binary This reverts to previous use of `tailwind` wrapper before 50f5683d8c8534c2f125f76b5ba6d4fa22ad4fc6 removed it. Since we already had an override, this makes it a little chunkier to maintain compatibility. --- pkgs/development/haskell-modules/configuration-nix.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index f2415d204dbe..c0ff75b80800 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -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;