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