push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,67 @@
{
lib,
fetchurl,
stdenv,
runCommand,
}:
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-odDHmFdZrMygvxLlGsHcvw9s8v/7Yubg9i0JHEd6EKM=";
aarch64-linux = "sha256-abE3i4EzGS19L+sSoRb6EtA1WU9Y2z7/IVh55K2M85s=";
armv7l-linux = "sha256-cE59ka+6bh9jCImv0NfbNrRjTmKFEswUHVBKW+riiGA=";
x86_64-darwin = "sha256-bL2tdL53bAh/+l6aBXUSxUiY+f6IKNM2IhLf4y/JM6M=";
x86_64-linux = "sha256-fST3+hkdIZO3jNX1pCpgk+FECVIZCFKfQtgLEf3h8dQ=";
}
.${system} or throwSystem;
in
stdenv.mkDerivation (finalAttrs: {
pname = "tailwindcss_3";
version = "3.4.17";
src = fetchurl {
url = "https://github.com/tailwindlabs/tailwindcss/releases/download/v${finalAttrs.version}/tailwindcss-${plat}";
inherit hash;
};
dontUnpack = true;
dontConfigure = true;
dontBuild = true;
dontFixup = true;
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp ${finalAttrs.src} $out/bin/tailwindcss
chmod 755 $out/bin/tailwindcss
runHook postInstall
'';
passthru.tests.helptext = runCommand "tailwindcss-test-helptext" { } ''
${lib.getExe finalAttrs.finalPackage} --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;
};
})

View File

@@ -0,0 +1,31 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p common-updater-scripts gnused jq nix-prefetch
set -eou pipefail
ROOT="$(dirname "$(readlink -f "$0")")"
CURRENT_VERSION=$(nix-instantiate --eval --strict --json -A tailwindcss_3.version . | jq -r .)
LATEST_VERSION=$(list-git-tags --url=https://github.com/tailwindlabs/tailwindcss | rg 'v3[0-9\.]*$' | sed -e 's/^v//' | sort -V | tail -n 1)
sed -i "s/version = \".*\"/version = \"${LATEST_VERSION}\"/" "$ROOT/package.nix"
if [ "$CURRENT_VERSION" = "$LATEST_VERSION" ]; then
echo "tailwindcss_3 already at latest version $CURRENT_VERSION, exiting"
exit 0
fi
function updatePlatform() {
NIXPLAT=$1
TAILWINDPLAT=$2
echo "Updating tailwindcss_3 for $NIXPLAT"
URL="https://github.com/tailwindlabs/tailwindcss/releases/download/v${LATEST_VERSION}/tailwindcss-${TAILWINDPLAT}"
HASH=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 "$(nix-prefetch-url --type sha256 "$URL")")
sed -i "s,$NIXPLAT = \"sha256.*\",$NIXPLAT = \"${HASH}\"," "$ROOT/package.nix"
}
updatePlatform aarch64-darwin macos-arm64
updatePlatform aarch64-linux linux-arm64
updatePlatform armv7l-linux linux-armv7
updatePlatform x86_64-darwin macos-x64
updatePlatform x86_64-linux linux-x64