build(flake): split into flake modules

This commit is contained in:
2026-09-06 16:39:29 +02:00
parent 46e977acf5
commit 5ea156c181
9 changed files with 216 additions and 189 deletions
+24 -16
View File
@@ -1,19 +1,27 @@
{
fetchCrate,
buildWasmBindgenCli,
rustPlatform,
...
}:
buildWasmBindgenCli rec {
src = fetchCrate {
pname = "wasm-bindgen-cli";
version = "0.2.127";
hash = "sha256-di+qBAdd7pENLiIB9CoZoab+W5xeDoByMREcCGTSzWo=";
};
let
drv = {
fetchCrate,
buildWasmBindgenCli,
rustPlatform,
...
}:
buildWasmBindgenCli rec {
src = fetchCrate {
pname = "wasm-bindgen-cli";
version = "0.2.127";
hash = "sha256-di+qBAdd7pENLiIB9CoZoab+W5xeDoByMREcCGTSzWo=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit src;
inherit (src) pname version;
hash = "sha256-FTv2GZIAQs0ePdIZXIXil7JbZ6kIT05VG6vqC1qNFxQ=";
cargoDeps = rustPlatform.fetchCargoVendor {
inherit src;
inherit (src) pname version;
hash = "sha256-FTv2GZIAQs0ePdIZXIXil7JbZ6kIT05VG6vqC1qNFxQ=";
};
};
utils = import ./utils.nix;
in {
perSystem = {pkgs, ...}: {
packages.wasm-bindgen = (utils.toolchain-pkgs pkgs).callPackage drv {};
};
}