Notes on the Debian packaging of Dart Sass ========================================== The names: dart-sass, sass and ruby-sass ---------------------------------------- Upstream's project and its standalone executable are both named dart-sass, which is also what upstream declares in pubspec.yaml: executables: dart-sass: sass sass: sass Accordingly the source package and the compiler binary package are called dart-sass, and the executable is installed as /usr/bin/dart-sass. The compiler is also reachable under the generic command name: debian/dart-sass.links makes /usr/bin/sass a symlink to /usr/bin/dart-sass, and the alias for the manual page, /usr/share/man/man1/sass.1.gz, is made in debian/rules (the page is only compressed after dh_link runs, so it cannot be declared there). The virtual package sass is provided by the dart-sass binary package as well. These are plain files of our own rather than update-alternatives entries. An earlier revision used the alternatives system, so that the name could be shared with ruby-sass, which then installed /usr/bin/sass, /usr/share/man/man1/sass.1.gz, /usr/bin/scss and /usr/bin/sass-convert as plain files of its own. ruby-sass 3.7.4-7 (2026-09-28) dropped its command line tools and became a transitional oldlibs package, so nothing else claims those two paths any more and there is no longer a reason to keep the extra indirection. This package therefore declares Breaks: ruby-sass (<< 3.7.4-7~) Replaces: ruby-sass (<< 3.7.4-7~) which lets it take over /usr/bin/sass and the manual page from the older ruby-sass, and makes apt upgrade ruby-sass first. /usr/bin/scss and /usr/bin/sass-convert are Ruby Sass specific and have no Dart Sass equivalent, so this package does not provide them; they are gone from the archive with ruby-sass 3.7.4-7. Two binary packages, two audiences ---------------------------------- dart-sass the compiler as a self-contained native executable, installed as /usr/bin/dart-sass. It is built for the architectures dart-sdk supports -- amd64, arm64, armhf and riscv64 as of 3.13.4 -- and debian/control carries that same list, so the two stay in step. node-sass the dart2js build of the same compiler, installed as the Node.js module "sass" under /usr/share/nodejs/sass, for bundlers such as webpack's sass-loader. It is architecture: all, so JavaScript tooling keeps working on the architectures the Dart SDK still does not cover. The JavaScript module deliberately has no bin/ entry: upstream's npm package ships a JavaScript command line wrapper under the same name, but here the command line compiler is dart-sass, which needs no Node.js at run time. The JavaScript module is wrapped, not just compiled --------------------------------------------------- dart2js output is not directly usable from Node.js. Upstream wraps it with its build tool cli_pkg, which cannot run during a Debian build (its tasks drive npm), so debian/make-node-module.py reproduces the same wrapper: it inlines the node_preamble that node_preamble ships, injects the require()s the Dart code performs, and writes the CommonJS/ESM entry points listed in upstream's tool/grind.dart. TypeScript definitions are not shipped -------------------------------------- Upstream's npm package also contains types/*.d.ts. Those are not part of this source package: upstream copies them out of a second repository (the sass/sass specification repository, see _fetchJSTypes() in tool/grind.dart) at build time, which a Debian build cannot do. The "types" and "exports.types" fields are therefore absent from the generated package.json. -- Emfox Zhou , Tue, 29 Sep 2026 22:00:00 +0800