Merge pull request #241570 from adamcstephens/tailwindcss/nobin
This commit is contained in:
@@ -2,12 +2,12 @@
|
||||
, fetchurl
|
||||
, stdenv
|
||||
, runCommand
|
||||
, tailwindcss-bin
|
||||
, tailwindcss
|
||||
,
|
||||
}:
|
||||
let
|
||||
inherit (stdenv.hostPlatform) system;
|
||||
throwSystem = throw "tailwindcss-bin has not been packaged for ${system} yet.";
|
||||
throwSystem = throw "tailwindcss has not been packaged for ${system} yet.";
|
||||
|
||||
plat = {
|
||||
aarch64-darwin = "macos-arm64";
|
||||
@@ -26,7 +26,7 @@ let
|
||||
}.${system} or throwSystem;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "tailwindcss-bin";
|
||||
pname = "tailwindcss";
|
||||
version = "3.3.2";
|
||||
|
||||
src = fetchurl {
|
||||
@@ -46,7 +46,7 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
passthru.tests.helptext = runCommand "tailwindcss-test-helptext" { } ''
|
||||
${tailwindcss-bin}/bin/tailwindcss --help > $out
|
||||
${tailwindcss}/bin/tailwindcss --help > $out
|
||||
'';
|
||||
passthru.updateScript = ./update.sh;
|
||||
|
||||
|
||||
@@ -4,19 +4,19 @@ set -eou pipefail
|
||||
|
||||
ROOT="$(dirname "$(readlink -f "$0")")"
|
||||
|
||||
CURRENT_VERSION=$(nix-instantiate --eval --strict --json -A tailwindcss-bin.version . | jq -r .)
|
||||
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-bin already at latest version $CURRENT_VERSION, exiting"
|
||||
echo "tailwindcss already at latest version $CURRENT_VERSION, exiting"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
function updatePlatform() {
|
||||
NIXPLAT=$1
|
||||
TAILWINDPLAT=$2
|
||||
echo "Updating tailwindcss-bin for $NIXPLAT"
|
||||
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")")
|
||||
|
||||
@@ -1815,7 +1815,7 @@ with pkgs;
|
||||
|
||||
systeroid = callPackage ../tools/system/systeroid { };
|
||||
|
||||
tailwindcss-bin = callPackage ../development/tools/tailwindcss { };
|
||||
tailwindcss = callPackage ../development/tools/tailwindcss { };
|
||||
|
||||
tauon = callPackage ../applications/audio/tauon { };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user