{ lib , fetchurl , stdenv , runCommand , tailwindcss , }: let inherit (stdenv.hostPlatform) system; throwSystem = throw "tailwindcss has not been packaged for ${system} yet."; plat = { aarch64-darwin = "macos-arm64"; aarch64-linux = "linux-arm64"; armv7l-linux = "linux-armv7"; x86_64-darwin = "macos-x64"; x86_64-linux = "linux-x64"; }.${system} or throwSystem; hash = { aarch64-darwin = "sha256-8ZEfjHzAKl3zhR411+DG1dYCvH+5kjyKCaAsvGPxufM="; aarch64-linux = "sha256-5SHOyRnJJusu07zCLg6t+Y+N9fchHrw/CDIea77p140="; armv7l-linux = "sha256-Gww+nE22t1IGiZgMozdFt6UAARjS5GUU+TAouPCJU2s="; x86_64-darwin = "sha256-kUQH5sENMfgL8AStspXMJfCaP+/KQ6t3i+1bqFbMndg="; x86_64-linux = "sha256-DD4h2EeaTFP/4c/H/pZfa2DYz1l73zTbEyuMZcYUNUE="; }.${system} or throwSystem; in stdenv.mkDerivation rec { pname = "tailwindcss"; version = "3.4.10"; src = fetchurl { url = "https://github.com/tailwindlabs/tailwindcss/releases/download/v${version}/tailwindcss-${plat}"; inherit hash; }; dontUnpack = true; dontConfigure = true; dontBuild = true; dontFixup = true; installPhase = '' mkdir -p $out/bin cp ${src} $out/bin/tailwindcss chmod 755 $out/bin/tailwindcss ''; passthru.tests.helptext = runCommand "tailwindcss-test-helptext" { } '' ${tailwindcss}/bin/tailwindcss --help > $out ''; passthru.updateScript = ./update.sh; meta = with lib; { description = "Command-line tool for the CSS framework with composable CSS classes, standalone CLI"; homepage = "https://tailwindcss.com/blog/standalone-cli"; license = licenses.mit; sourceProvenance = [ sourceTypes.binaryNativeCode ]; maintainers = [ maintainers.adamcstephens ]; mainProgram = "tailwindcss"; platforms = platforms.darwin ++ platforms.linux; }; }