flakelight | 38 Members | |
| https://github.com/nix-community/flakelight | 12 Servers |
| Sender | Message | Time |
|---|---|---|
| 13 Mar 2024 | ||
| I'll have to look into that; would be nice to package our tests properly lol | 17:16:05 | |
| yeah it looked pretty comprehensive when I had a brief read over the site/docs | 17:17:50 | |
| What I need is just a function that takes a locked requirements.txt, and gives me a nix file that I can import to get a python environment matching the requirements.txt | 17:19:32 | |
ah yeah, like all the old 2nix tools. as you already mentioned, dream2nix looks very promising | 17:20:25 | |
| hmm still seems like a bit of a hefty dependency. pip2nix is almost perfect except for being quite out-of-date and not working on Mac. Maybe I ought to just fork it and update it one of these days | 17:26:20 | |
| yeah that's a fair point. I think it has some very lofty goals and is nothing like the smaller converters we're historically used to | 17:32:22 | |
| Yeah, I'm also usually not creating a package, but creating a python environment used by devShell, formatter, and multiple packages | 17:33:09 | |
| Or doing something like creating the python env esp-idf requires, and using the esp-idf build system in my derivation | 17:33:50 | |
| yeah exactly 👍️ | 17:56:15 | |
| 14 Mar 2024 | ||
| 11:02:44 | ||
| 18:44:30 | ||
| 15 Mar 2024 | ||
me again accelbread 👋😅 looking at using flakelight-rust for our company's mono-repo. when using flakelight-rust in a flakelight flake, where I'm importing the flakelightModule, how can I set the fileset option? | 14:51:25 | |
also, out of curiosity, maybe you can help me figure out: looks like they're using a top level Cargo.toml in the root of the repo. it uses a large members section to define all its components, of which some are cargo packages. the top level Cargo.toml doesn't have a package section defined, so I added one and called it "<thing>-meta". which in turn seems like it's then instructing to build everything (the desired outcome). do you think this is a good approach for using flakelight-rust? | 14:51:28 | |
| Sounds like its using a cargo workspace; currently flakelight-rust builds the default package if it is set (it can be set to one of the other crates or the workspace itself can have a package section) If you want to build everything, a meta package seems fine for now with current support. Would be best if we add support for building all the crates in a workspace as separate packages though; that way nothing special has to be done. | 15:17:38 | |
|
Above is easy way which gives pacakges access to all files in the repo | 15:19:32 | |
| best practice to have a more restricted set though so that changes to README/etc dont cause a rebuild and better build isolation | 15:20:03 | |
| Docs for what you can do with filesets is here: https://nixos.org/manual/nixpkgs/unstable/#sec-fileset | 15:21:17 | |
| can just build one and pass it to flakelight. The default flakelight-rust one just uses Rust and Toml files | 15:21:57 | |
okay, that's great, thanks for all that info! in your example for setting fileset above, that's just using flakelight-rust. how can I do that in a flakelight ./. { call where I'm using flakelight-rust's flakelightModule.default in flakelight's imports arg? | 15:22:26 | |
| Sorry, does that make sense? | 15:22:33 | |
| * can just build one and pass it to flakelight. The default flakelight-rust one just uses Rust, cargo.toml, and cargo.locl | 15:22:37 | |
| * can just build one and pass it to flakelight. The default flakelight-rust one just uses Rust, cargo.toml, and cargo.lock files | 15:22:42 | |
| 15:22:47 | |
| like this :) | 15:22:51 | |
| same way:
| 15:23:32 | |
| oh, I tried that but it didn't seem to do what I wanted 😅 I must be doing something wrong | 15:23:59 | |
| calling flakelight-rust is just a shortcut for calling flakelight and adding flakelight-rust.flakelightModules.default | 15:24:07 | |
| Hmm, maybe the fileset is not matching your files? | 15:24:35 | |
yeah, I tried ./. to do everything as a test, but it didn't look like the whole tree was in the build env | 15:25:52 | |
| I'll mess around and see what I can get working. It was very likely user error 🤡 | 15:26:13 | |