mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 17:33:09 +00:00
54 lines
1.3 KiB
Nix
54 lines
1.3 KiB
Nix
{ lib
|
|
, stdenv
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, nix-update-script
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "lightningcss";
|
|
version = "1.26.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "parcel-bundler";
|
|
repo = "lightningcss";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-ZPqRxHbca8iflWwsDT2/sVbTstWnKVFcExcgrBXgzGc=";
|
|
};
|
|
|
|
cargoHash = "sha256-QYrjDJJTJo4BDQOqY1pZn7ph+uuQvbsMbzaAUr4siaE=";
|
|
|
|
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"
|
|
];
|
|
|
|
cargoBuildFlags = [
|
|
"--lib"
|
|
"--bin=lightningcss"
|
|
];
|
|
|
|
cargoTestFlags = [
|
|
"--lib"
|
|
];
|
|
|
|
passthru.updateScript = nix-update-script {};
|
|
|
|
meta = {
|
|
description = "Extremely fast CSS parser, transformer, and minifier written in Rust";
|
|
homepage = "https://lightningcss.dev/";
|
|
changelog = "https://github.com/parcel-bundler/lightningcss/releases/tag/v${version}";
|
|
license = lib.licenses.mpl20;
|
|
maintainers = with lib.maintainers; [ johnrtitor toastal ];
|
|
mainProgram = "lightningcss";
|
|
# never built on aarch64-linux since first introduction in nixpkgs
|
|
broken = stdenv.isLinux && stdenv.isAarch64;
|
|
};
|
|
}
|