Revert "tailwindcss_4: init at 4.0.6 (#380210)"
This reverts commit 4220d1333d6ccdf22cef1845b1dbc3faeb1c4254, reversing changes made to 3082c71e8da4081bea00d655c5d2ff88a6ac3cb8.
This commit is contained in:
parent
6ca4c0b61b
commit
b75500d411
@ -574,11 +574,6 @@
|
|||||||
githubId = 2071575;
|
githubId = 2071575;
|
||||||
name = "Adam C. Stephens";
|
name = "Adam C. Stephens";
|
||||||
};
|
};
|
||||||
adamjhf = {
|
|
||||||
github = "adamjhf";
|
|
||||||
githubId = 50264672;
|
|
||||||
name = "Adam Freeth";
|
|
||||||
};
|
|
||||||
adamt = {
|
adamt = {
|
||||||
email = "mail@adamtulinius.dk";
|
email = "mail@adamtulinius.dk";
|
||||||
github = "adamtulinius";
|
github = "adamtulinius";
|
||||||
|
|||||||
@ -1,64 +0,0 @@
|
|||||||
{
|
|
||||||
lib,
|
|
||||||
stdenv,
|
|
||||||
fetchurl,
|
|
||||||
runCommand,
|
|
||||||
tailwindcss_4,
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
version = "4.0.6";
|
|
||||||
inherit (stdenv.hostPlatform) system;
|
|
||||||
throwSystem = throw "tailwindcss has not been packaged for ${system} yet.";
|
|
||||||
|
|
||||||
plat =
|
|
||||||
{
|
|
||||||
aarch64-darwin = "macos-arm64";
|
|
||||||
aarch64-linux = "linux-arm64";
|
|
||||||
x86_64-darwin = "macos-x64";
|
|
||||||
x86_64-linux = "linux-x64";
|
|
||||||
}
|
|
||||||
.${system} or throwSystem;
|
|
||||||
|
|
||||||
hash =
|
|
||||||
{
|
|
||||||
aarch64-darwin = "sha256-FopnfuGYBjjQkfPHdIWacpom9WsAVRwHPQ/14waWR7s=";
|
|
||||||
aarch64-linux = "sha256-y+9d53skmoSZPhbtk9vUkhKNzIE1A868Lnkw7Cot/PU=";
|
|
||||||
x86_64-darwin = "sha256-rFjaDtPjJO9W6G//7Uu5CJE+pB0sqLrMByC5pv4FA4E=";
|
|
||||||
x86_64-linux = "sha256-14EMXenpvPsKlnu5kebNu3MmfWwa7UYfAgEkh5EwVRM=";
|
|
||||||
}
|
|
||||||
.${system} or throwSystem;
|
|
||||||
in
|
|
||||||
stdenv.mkDerivation {
|
|
||||||
inherit version;
|
|
||||||
pname = "tailwindcss_4";
|
|
||||||
|
|
||||||
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 = ''
|
|
||||||
install -D $src $out/bin/tailwindcss
|
|
||||||
'';
|
|
||||||
|
|
||||||
passthru.tests.helptext = runCommand "tailwindcss-test-helptext" { } ''
|
|
||||||
${tailwindcss_4}/bin/tailwindcss --help > $out
|
|
||||||
'';
|
|
||||||
passthru.updateScript = ./update.sh;
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "Command-line tool for the CSS framework with composable CSS classes, standalone v4 CLI";
|
|
||||||
homepage = "https://tailwindcss.com/blog/tailwindcss-v4";
|
|
||||||
license = licenses.mit;
|
|
||||||
sourceProvenance = [ sourceTypes.binaryNativeCode ];
|
|
||||||
maintainers = [ maintainers.adamjhf ];
|
|
||||||
mainProgram = "tailwindcss";
|
|
||||||
platforms = platforms.darwin ++ platforms.linux;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@ -1,30 +0,0 @@
|
|||||||
#!/usr/bin/env nix-shell
|
|
||||||
#!nix-shell -i bash -p curl gnused jq nix-prefetch
|
|
||||||
set -eou pipefail
|
|
||||||
|
|
||||||
ROOT="$(dirname "$(readlink -f "$0")")"
|
|
||||||
|
|
||||||
CURRENT_VERSION=$(nix-instantiate --eval --strict --json -A tailwindcss.version . | jq -r .)
|
|
||||||
LATEST_VERSION=$(curl --fail --silent https://api.github.com/repos/tailwindlabs/tailwindcss/releases/latest | jq --raw-output .tag_name | sed 's/v//')
|
|
||||||
sed -i "s/version = \".*\"/version = \"${LATEST_VERSION}\"/" "$ROOT/default.nix"
|
|
||||||
|
|
||||||
if [ "$CURRENT_VERSION" = "$LATEST_VERSION" ]; then
|
|
||||||
echo "tailwindcss already at latest version $CURRENT_VERSION, exiting"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
function updatePlatform() {
|
|
||||||
NIXPLAT=$1
|
|
||||||
TAILWINDPLAT=$2
|
|
||||||
echo "Updating tailwindcss for $NIXPLAT"
|
|
||||||
|
|
||||||
URL="https://github.com/tailwindlabs/tailwindcss/releases/download/v${LATEST_VERSION}/tailwindcss-${TAILWINDPLAT}"
|
|
||||||
HASH=$(nix hash to-sri --type sha256 "$(nix-prefetch-url --type sha256 "$URL")")
|
|
||||||
|
|
||||||
sed -i "s,$NIXPLAT = \"sha256.*\",$NIXPLAT = \"${HASH}\"," "$ROOT/default.nix"
|
|
||||||
}
|
|
||||||
|
|
||||||
updatePlatform aarch64-darwin macos-arm64
|
|
||||||
updatePlatform aarch64-linux linux-arm64
|
|
||||||
updatePlatform x86_64-darwin macos-x64
|
|
||||||
updatePlatform x86_64-linux linux-x64
|
|
||||||
Loading…
x
Reference in New Issue
Block a user