haskellPackages.tailwind: fix build (#380641)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -29,12 +29,12 @@ let
|
||||
}
|
||||
.${system} or throwSystem;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "tailwindcss";
|
||||
version = "3.4.17";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/tailwindlabs/tailwindcss/releases/download/v${version}/tailwindcss-${plat}";
|
||||
url = "https://github.com/tailwindlabs/tailwindcss/releases/download/v${finalAttrs.version}/tailwindcss-${plat}";
|
||||
inherit hash;
|
||||
};
|
||||
|
||||
@@ -44,13 +44,15 @@ stdenv.mkDerivation rec {
|
||||
dontFixup = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/bin
|
||||
cp ${src} $out/bin/tailwindcss
|
||||
cp ${finalAttrs.src} $out/bin/tailwindcss
|
||||
chmod 755 $out/bin/tailwindcss
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru.tests.helptext = runCommand "tailwindcss-test-helptext" { } ''
|
||||
${tailwindcss}/bin/tailwindcss --help > $out
|
||||
${lib.getExe finalAttrs.finalPackage} --help > $out
|
||||
'';
|
||||
passthru.updateScript = ./update.sh;
|
||||
|
||||
@@ -63,4 +65,4 @@ stdenv.mkDerivation rec {
|
||||
mainProgram = "tailwindcss";
|
||||
platforms = platforms.darwin ++ platforms.linux;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user