!yUrHuDcxUngfTlDbiy:matrix.org

flakelight

38 Members
https://github.com/nix-community/flakelight12 Servers

Load older messages


SenderMessageTime
15 Mar 2024
@accelbread:matrix.orgaccelbreadcan just build one and pass it to flakelight. The default flakelight-rust one just uses Rust and Toml files15:21:57
@cmacr.ae:matrix.orgcmacrae 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
@cmacr.ae:matrix.orgcmacraeSorry, does that make sense?15:22:33
@accelbread:matrix.orgaccelbread * can just build one and pass it to flakelight. The default flakelight-rust one just uses Rust, cargo.toml, and cargo.locl15:22:37
@accelbread:matrix.orgaccelbread * can just build one and pass it to flakelight. The default flakelight-rust one just uses Rust, cargo.toml, and cargo.lock files15:22:42
@cmacr.ae:matrix.orgcmacrae
  outputs = { flakelight, flakelight-rust, devenv, ... }@inputs:
    flakelight ./. {
      imports = [ flakelight-rust.flakelightModules.default ];
      systems = inputs.nixpkgs.lib.systems.flakeExposed;

15:22:47
@cmacr.ae:matrix.orgcmacraelike this :)15:22:51
@accelbread:matrix.orgaccelbread

same way:

outputs = { flakelight, flakelight-rust, devenv, ... }@inputs:
    flakelight ./. {
      imports = [ flakelight-rust.flakelightModules.default ];
      systems = inputs.nixpkgs.lib.systems.flakeExposed;
      fileset = ./.;
15:23:32
@cmacr.ae:matrix.orgcmacraeoh, I tried that but it didn't seem to do what I wanted 😅 I must be doing something wrong15:23:59
@accelbread:matrix.orgaccelbreadcalling flakelight-rust is just a shortcut for calling flakelight and adding flakelight-rust.flakelightModules.default15:24:07
@accelbread:matrix.orgaccelbreadHmm, maybe the fileset is not matching your files?15:24:35
@cmacr.ae:matrix.orgcmacrae 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
@cmacr.ae:matrix.orgcmacraeI'll mess around and see what I can get working. It was very likely user error 🤡15:26:13
@accelbread:matrix.orgaccelbreadHmm, odd, might be something with workspaces too; I havn't actually used workspaces for actual projects, that was contributed by others so might have to mess around with it more15:27:10
@cmacr.ae:matrix.orgcmacrae seems they do some cargo overrides in some .cargo* files in the tree in places where they're calling out to some shell scripts, hence why I need to expand the filter 15:27:41
@accelbread:matrix.orgaccelbreaddo you know which subset of files is being picked up? ah15:27:50
@cmacr.ae:matrix.orgcmacraeyeah, I mean I legit have no idea what I'm doing haha, i've never really used rust properly15:28:08
@accelbread:matrix.orgaccelbreadI'm wondering is it might be due to how crane works 15:28:34
@cmacr.ae:matrix.orgcmacrae
In reply to @accelbread:matrix.org
do you know which subset of files is being picked up?
ah
all the rust related stuff! so that's good, the default filter is working
15:28:35
@accelbread:matrix.orgaccelbreadAh15:28:41
@accelbread:matrix.orgaccelbreadSo probably not a crane issue15:28:55
@cmacr.ae:matrix.orgcmacraenope :) let me try and get a different filter working and report back15:29:13
@accelbread:matrix.orgaccelbread

one thing you can try to debug is set:

15:29:30
@accelbread:matrix.orgaccelbread
{
  inputs.flakelight-rust.url = "github:accelbread/flakelight-rust";
  outputs = { flakelight-rust, ... }:
    flakelight-rust ./. ({ lib, outputs, ... }: {
      fileset = ./.;
      outputs.test = lib.fileset.toList outputs.fileset;
    });
}

and nix eval .#test

15:32:04
@accelbread:matrix.orgaccelbreadneed a recent nixpkgs for toList; one shipped with flakelight has it already iirc15:32:39
@accelbread:matrix.orgaccelbread * need a very recent nixpkgs for toList; one shipped with flakelight has it already iirce15:32:51
@accelbread:matrix.orgaccelbread * need a very recent nixpkgs for toList; one shipped with flakelight has it already iirc15:32:55
@cmacr.ae:matrix.orgcmacraeah nice, that's really handy, thanks!15:33:33
@cmacr.ae:matrix.orgcmacrae

doesn't seem like fileset is being honoured/evaluated correctly when I'm setting it like so:

  outputs = { flakelight, flakelight-rust, devenv, ... }@inputs:
    flakelight ./. ({ pkgs, lib, outputs, ... }: {
      imports = [ flakelight-rust.flakelightModules.default ];
      systems = lib.systems.flakeExposed;
      fileset = ./.;

tried mkForceing it in case, that didn't work either

15:48:30
@cmacr.ae:matrix.orgcmacrae the handy test output you provided showed that I was able to filter how I wanted. but when the build fails for the cargo stuff, I take a look at the log, get the build env's source tree and look in there, there's only rust related contents, even though I set the filter to ./. 15:49:47

Show newer messages


Back to Room ListRoom Version: 10