build(flake): split into flake modules
This commit is contained in:
+24
-16
@@ -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 {};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user