depot/third_party/nixpkgs/pkgs/by-name/li/lightningcss/package.nix
Default email 587713944a Project import generated by Copybara.
GitOrigin-RevId: 6143fc5eeb9c4f00163267708e26191d1e918932
2024-04-21 17:54:59 +02:00

50 lines
1.2 KiB
Nix

{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
}:
rustPlatform.buildRustPackage rec {
pname = "lightningcss";
version = "1.24.1";
src = fetchFromGitHub {
owner = "parcel-bundler";
repo = "lightningcss";
rev = "refs/tags/v${version}";
hash = "sha256-HRuL7zwpN2e51+/Ltvif+eh+WBss/FtHCOlJfa/eVdE=";
};
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"
];
cargoBuildFlags = [
"--lib"
"--bin=lightningcss"
];
cargoTestFlags = [
"--lib"
];
meta = with lib; {
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 = licenses.mpl20;
maintainers = with maintainers; [ johnrtitor toastal ];
mainProgram = "lightningcss";
# never built on aarch64-linux since first introduction in nixpkgs
broken = stdenv.isLinux && stdenv.isAarch64;
};
}