tailwindcss: make v4 default, move tailwindcss_3 to by-name (#382685)
This commit is contained in:
@@ -0,0 +1 @@
|
||||
{ tailwindcss_4 }: tailwindcss_4
|
||||
+1
-2
@@ -3,7 +3,6 @@
|
||||
fetchurl,
|
||||
stdenv,
|
||||
runCommand,
|
||||
tailwindcss,
|
||||
}:
|
||||
let
|
||||
inherit (stdenv.hostPlatform) system;
|
||||
@@ -30,7 +29,7 @@ let
|
||||
.${system} or throwSystem;
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "tailwindcss";
|
||||
pname = "tailwindcss_3";
|
||||
version = "3.4.17";
|
||||
|
||||
src = fetchurl {
|
||||
+7
-7
@@ -1,27 +1,27 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl gnused jq nix-prefetch
|
||||
#!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.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"
|
||||
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 already at latest version $CURRENT_VERSION, exiting"
|
||||
echo "tailwindcss_3 already at latest version $CURRENT_VERSION, exiting"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
function updatePlatform() {
|
||||
NIXPLAT=$1
|
||||
TAILWINDPLAT=$2
|
||||
echo "Updating tailwindcss for $NIXPLAT"
|
||||
echo "Updating tailwindcss_3 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"
|
||||
sed -i "s,$NIXPLAT = \"sha256.*\",$NIXPLAT = \"${HASH}\"," "$ROOT/package.nix"
|
||||
}
|
||||
|
||||
updatePlatform aarch64-darwin macos-arm64
|
||||
@@ -5,7 +5,6 @@
|
||||
versionCheckHook,
|
||||
autoPatchelfHook,
|
||||
makeWrapper,
|
||||
tailwindcss_4,
|
||||
}:
|
||||
let
|
||||
version = "4.0.6";
|
||||
@@ -71,7 +70,10 @@ stdenv.mkDerivation {
|
||||
homepage = "https://tailwindcss.com/blog/tailwindcss-v4";
|
||||
license = lib.licenses.mit;
|
||||
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
|
||||
maintainers = [ lib.maintainers.adamjhf ];
|
||||
maintainers = with lib.maintainers; [
|
||||
adamcstephens
|
||||
adamjhf
|
||||
];
|
||||
mainProgram = "tailwindcss";
|
||||
platforms = lib.platforms.darwin ++ lib.platforms.linux;
|
||||
};
|
||||
|
||||
Regular → Executable
+6
-6
@@ -1,27 +1,27 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl gnused jq nix-prefetch
|
||||
#!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.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"
|
||||
LATEST_VERSION=$(list-git-tags --url=https://github.com/tailwindlabs/tailwindcss | rg 'v4[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 already at latest version $CURRENT_VERSION, exiting"
|
||||
echo "tailwindcss_4 already at latest version $CURRENT_VERSION, exiting"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
function updatePlatform() {
|
||||
NIXPLAT=$1
|
||||
TAILWINDPLAT=$2
|
||||
echo "Updating tailwindcss for $NIXPLAT"
|
||||
echo "Updating tailwindcss_4 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"
|
||||
sed -i "s,$NIXPLAT = \"sha256.*\",$NIXPLAT = \"${HASH}\"," "$ROOT/package.nix"
|
||||
}
|
||||
|
||||
updatePlatform aarch64-darwin macos-arm64
|
||||
|
||||
@@ -1081,8 +1081,6 @@ with pkgs;
|
||||
ocamlPackages = ocaml-ng.ocamlPackages_4_14;
|
||||
};
|
||||
|
||||
tailwindcss = callPackage ../development/tools/tailwindcss { };
|
||||
|
||||
ufolint = with python3Packages; toPythonApplication ufolint;
|
||||
|
||||
valeronoi = qt6Packages.callPackage ../tools/misc/valeronoi { };
|
||||
|
||||
Reference in New Issue
Block a user