All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: "Alexis Lothoré" <alexis.lothore@bootlin.com>
Cc: buildroot@buildroot.org,
	 Nicolas Carrier <nicolas.carrier@nav-timing.safrangroup.com>
Subject: Re: [Buildroot] [PATCH 2/2] package/sass: new package
Date: Mon, 10 Aug 2026 14:32:29 +0200	[thread overview]
Message-ID: <anmxxqb2-h3Fy_f-@windsurf> (raw)
In-Reply-To: <DKL5OZPSP69X.2WIL567PI8DXH@bootlin.com>

Hello,

On Mon, Aug 10, 2026 at 11:29:01AM +0200, Alexis Lothoré wrote:

> Yes, this `npm install` downloads 3 dependencies for this sass tool.
> I understand that it is not ideal (having some download in the build
> step), but proposed it anyway, as it was a potential "known issue" in
> Arnout's proposal ([1]). But if this is finally a no-go, thinking a bit
> more about it, I see two main options:
> - find a way to vendor the dependencies (may be as simple as setting a
>   post download hook which performs the npm install ?)

This is what Arnout was proposing. However, a post download hook
doesn't work because it's too late: the tarball has already been
created, while we want the dependencies to be *part* of the tarball,
i.e we want the vendoring (collecting the dependencies) to happen
prior to the tarball being created and added to $(DL_DIR).

Instead, you should have a look at how it works for the cargo and
golang infrastructures.

We have this concept of <pkg>_DOWNLOAD_POST_PROCESS (which is NOT the
same as <pkg>_POST_DOWNLOAD_HOOKS!).

package/pkg-cargo.mk does:

$(2)_DOWNLOAD_POST_PROCESS = cargo

which causes support/download/cargo-post-process to be called in the
middle of the download step.

What it does is basically:

1. Unpack the tarball that was downloaded
2. Run "cargo vendor" to download the dependencies
3. Repack the tarball

support/download/go-post-process works in a similar manner, but runs
"go mod vendor" to download the dependencies.

If you can identify the right incantation to ask npm to download the
dependencies so that we can implement something like this, then it
would be great.

> - this sass package is a node wrapper around the official project
>   dart-sass ([2]). I did not take a look at all at how to build and run
>   it (I am pretty ignorant in Dart), but I can take a look. I am not
>   sure how capable Buildroot is about building Dart projects (I see some
>   flutter-sdk-bin package, I am not sure how re-usable it could be to
>   build some randome dart projects)

I have also no idea :-)

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

      reply	other threads:[~2026-08-10 12:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-06 21:24 [Buildroot] [PATCH 0/2] package: bring two host tools Alexis Lothoré via buildroot
2026-08-06 21:24 ` [Buildroot] [PATCH 1/2] package/uglifyjs: new package Alexis Lothoré via buildroot
2026-08-07  7:44   ` Thomas Petazzoni via buildroot
2026-08-10  8:44     ` Alexis Lothoré via buildroot
2026-08-06 21:24 ` [Buildroot] [PATCH 2/2] package/sass: " Alexis Lothoré via buildroot
2026-08-07  8:29   ` Thomas Petazzoni via buildroot
2026-08-07 11:55     ` Thomas Perale via buildroot
2026-08-10 12:25       ` Alexis Lothoré via buildroot
2026-08-10 21:04         ` Thomas Perale via buildroot
2026-08-10  9:29     ` Alexis Lothoré via buildroot
2026-08-10 12:32       ` Thomas Petazzoni via buildroot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=anmxxqb2-h3Fy_f-@windsurf \
    --to=buildroot@buildroot.org \
    --cc=alexis.lothore@bootlin.com \
    --cc=nicolas.carrier@nav-timing.safrangroup.com \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.