From 5af750a43a74327a3f66cc3ff427aa52f6005c32 Mon Sep 17 00:00:00 2001 From: John Titor <50095635+JohnRTitor@users.noreply.github.com> Date: Sat, 6 Apr 2024 02:34:40 +0530 Subject: [PATCH] lightningcss: 1.24.0 -> 1.24.1 Additionally patch ./napi/Cargo.toml to allow building lightningcss-napi https://github.com/parcel-bundler/lightningcss/pull/713 https://github.com/parcel-bundler/lightningcss/issues/702 --- ...napi-fix-build-error-in-cargo-auditable.patch | 16 ++++++++++++++++ pkgs/by-name/li/lightningcss/package.nix | 13 ++++++++++--- 2 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 pkgs/by-name/li/lightningcss/0001-napi-fix-build-error-in-cargo-auditable.patch diff --git a/pkgs/by-name/li/lightningcss/0001-napi-fix-build-error-in-cargo-auditable.patch b/pkgs/by-name/li/lightningcss/0001-napi-fix-build-error-in-cargo-auditable.patch new file mode 100644 index 000000000000..b097e506b477 --- /dev/null +++ b/pkgs/by-name/li/lightningcss/0001-napi-fix-build-error-in-cargo-auditable.patch @@ -0,0 +1,16 @@ +diff --git a/napi/Cargo.toml b/napi/Cargo.toml +index 3360a9c..86d6ba5 100644 +--- a/napi/Cargo.toml ++++ b/napi/Cargo.toml +@@ -10,7 +10,7 @@ edition = "2021" + [features] + default = [] + visitor = ["lightningcss/visitor"] +-bundler = ["dep:crossbeam-channel", "dep:rayon"] ++bundler = ["dep:crossbeam-channel", "rayon"] + + [dependencies] + serde = { version = "1.0.123", features = ["derive"] } +-- +2.44.0 + diff --git a/pkgs/by-name/li/lightningcss/package.nix b/pkgs/by-name/li/lightningcss/package.nix index 6388413bd43b..53cf96e6688f 100644 --- a/pkgs/by-name/li/lightningcss/package.nix +++ b/pkgs/by-name/li/lightningcss/package.nix @@ -6,16 +6,23 @@ rustPlatform.buildRustPackage rec { pname = "lightningcss"; - version = "1.24.0"; + version = "1.24.1"; src = fetchFromGitHub { owner = "parcel-bundler"; repo = "lightningcss"; rev = "refs/tags/v${version}"; - hash = "sha256-Ai6zvLR5w2AarjZIWMPoDsU1Dr5kvREgL6oyg6TF+TU="; + hash = "sha256-HRuL7zwpN2e51+/Ltvif+eh+WBss/FtHCOlJfa/eVdE="; }; - cargoHash = "sha256-HHuj7uAqipPtbjkOsxxMq+JWXww2vUDTNGgnHd3UY3o="; + cargoHash = "sha256-HavdTNaLTGctePa890dy/jGlXZXXZu1QFeFJOpjOiME="; + + patches = [ + # Backport fix for build error for lightningcss-napi + # see https://github.com/parcel-bundler/lightningcss/pull/713 + # FIXME: remove when merged upstream + ./0001-napi-fix-build-error-in-cargo-auditable.patch + ]; buildFeatures = [ "cli"