Skip to content

Commit

Permalink
Trunk: use native dart-sass (ipetkov#360)
Browse files Browse the repository at this point in the history
Replace the javascript version of dart-sass with a native binary version.
Should improve built times and reduce disk usage.

---------

Co-authored-by: Ivan Petkov <[email protected]>
  • Loading branch information
Leonardo Eugênio and ipetkov authored Aug 11, 2023
1 parent ff2e879 commit 1b8653a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## Unreleased

### Changed
* `buildTrunkPackage` will now use `dart-sass` instead of `nodePackages.sass`

## [0.13.0] - 2023-08-07

### Added
Expand Down
2 changes: 1 addition & 1 deletion docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ environment variables during the build, you can bring them back via
#### Native build dependencies and included hooks
The following hooks are automatically added as native build inputs:
* `binaryen`
* `nodePackages.sass`
* `dart-sass`
* `trunk`
* `wasm-bindgen-cli`

Expand Down
6 changes: 2 additions & 4 deletions lib/buildTrunkPackage.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
, buildDepsOnly
, crateNameFromCargoToml
, mkCargoDerivation
, nodePackages
, dart-sass
, removeReferencesToVendoredSourcesHook
, trunk
, vendorCargoDeps
Expand Down Expand Up @@ -72,9 +72,7 @@ mkCargoDerivation (args // {

nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [
binaryen
# dart-sass compiled to javascript
# TODO: replace with a native version when it comes to nixpkgs
nodePackages.sass
dart-sass
trunk
wasm-bindgen-cli
# Store references are certainly false positives
Expand Down

0 comments on commit 1b8653a

Please sign in to comment.