74 lines
1.8 KiB
Nix
74 lines
1.8 KiB
Nix
{
|
|
description = "Wordle-Solver";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
|
rust-overlay = {
|
|
url = "github:oxalica/rust-overlay";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
crate2nix = {
|
|
url = "github:nix-community/crate2nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = inputs @ {
|
|
flake-parts,
|
|
rust-overlay,
|
|
...
|
|
}:
|
|
flake-parts.lib.mkFlake {inherit inputs;} {
|
|
systems = [
|
|
"aarch64-linux"
|
|
"aarch64-darwin"
|
|
"x86_64-darwin"
|
|
"x86_64-linux"
|
|
];
|
|
|
|
imports = [
|
|
./nix/wasm-bindgen.nix
|
|
./nix/wordle-solver-docker.nix
|
|
./nix/wordle-solver-wasm-pkg.nix
|
|
./nix/wordle-solver-wasm.nix
|
|
./nix/wordle-solver-web-docker.nix
|
|
./nix/wordle-solver-web.nix
|
|
./nix/wordle-solver.nix
|
|
];
|
|
|
|
perSystem = {
|
|
pkgs,
|
|
system,
|
|
self',
|
|
...
|
|
}: let
|
|
utils = import ./nix/utils.nix;
|
|
rust-toolchain = utils.rust-toolchain pkgs;
|
|
in {
|
|
# Overlay pkgs with rust-bin
|
|
_module.args.pkgs = import inputs.nixpkgs {
|
|
inherit system;
|
|
overlays = [(import rust-overlay)];
|
|
config.allowUnsupportedSystem = true;
|
|
};
|
|
|
|
packages.default = self'.packages.wordle-solver;
|
|
|
|
devShells.default = pkgs.mkShell {
|
|
RA_LOG = "rust_analyzer=info";
|
|
buildInputs = [
|
|
rust-toolchain
|
|
self'.packages.wasm-bindgen
|
|
pkgs.nodejs
|
|
pkgs.svelte-language-server
|
|
pkgs.typescript-language-server
|
|
pkgs.vscode-langservers-extracted
|
|
pkgs.wasm-pack
|
|
pkgs.yarn
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|