tools for building gleam projects with nix

gleam2nix/generate: rename from gen-nix

foxgirl.engineering 80498245 7b96ec82

verified
+5 -5
+2 -2
README.md
··· 12 12 13 13 ## quickstart 14 14 the general flow goes like: 15 - 1. use the `gleam2nix gen-nix` tool to generate a `gleam.nix` file from your gleam project's `manifest.toml` 15 + 1. use the `gleam2nix generate` tool to generate a `gleam.nix` file from your gleam project's `manifest.toml` 16 16 2. call `buildGleamApplication` to produce a derivation for your project 17 17 18 18 to get gleam2nix imported, pick one of the following based on your project structure: ··· 53 53 } 54 54 ``` 55 55 56 - run `gleam2nix gen-nix` in the root of your project (ie. the folder containing your `manifest.toml`) to get a `gleam.nix` file. you can then pass it to a `buildGleamApplication` call to get your derivation: 56 + run `gleam2nix generate` in the root of your project (ie. the folder containing your `manifest.toml`) to get a `gleam.nix` file. you can then pass it to a `buildGleamApplication` call to get your derivation: 57 57 ```nix 58 58 buildGleamApplication { 59 59 pname = "my-gleam-application";
+3 -3
src/main.rs
··· 18 18 enum Command { 19 19 Appspec, 20 20 Entrypoint, 21 - GenNix, 21 + GenerateNix, 22 22 NotFound, 23 23 } 24 24 ··· 26 26 fn from(value: &str) -> Self { 27 27 match value { 28 28 "appspec" => Command::Appspec, 29 - "gen-nix" => Command::GenNix, 29 + "generate" => Command::GenerateNix, 30 30 "entrypoint" => Command::Entrypoint, 31 31 _ => Command::NotFound, 32 32 } ··· 73 73 .first() 74 74 .ok_or(miette!("No module name specified"))?, 75 75 ), 76 - Command::GenNix => gen_nix(args), 76 + Command::GenerateNix => gen_nix(args), 77 77 Command::NotFound => Err(miette!("Command not found")), 78 78 } 79 79 }