| 27 Dec 2025 |
flokli | That's the aws-lc-sys crate, and it shows some obscure errors about various symbols not found, if compiling on a MacOS system. | 23:30:28 |
flokli | it notably only fails is compiling inside the derivation, not when using cargo. | 23:30:48 |
emily | looks like maybe a missing rustPlatform.bindgenHook or similar? | 23:30:57 |
emily | can you share the derivation code maybe? | 23:31:13 |
flokli | https://git.snix.dev/snix/snix, nix-build -A snix.store | 23:31:46 |
emily | ah, this is using crane? | 23:32:39 |
flokli | crate2nix, see the snix/Cargo.nix file, and snix/default.nix calling into it | 23:33:15 |
flokli | I'll check if adding bindgenHook helps | 23:33:53 |
emily | I doubt it will | 23:34:21 |
emily | since I think crate2nix works entirely differently(?) | 23:34:27 |
emily | I'd be tempted to sanity check with rustPlatform.buildRustPackage because my intuition would be crate2nix is doing something messed up here that is breaking the cc crate etc. | 23:34:49 |
emily | (it's also probably not bindgen on a second look) | 23:35:19 |
flokli | mmm | 23:37:15 |
emily | did this stop working at some specific point or did it just never work? | 23:39:38 |
griff | emily: a cargo update added aws-lc as a transitive dependency and that broke things | 23:40:37 |
emily | I see | 23:41:34 |
emily | I remember there being some thing with aws-lc-sys in the past but not what it was | 23:41:55 |
emily | uh, hm | 23:42:29 |
emily | error occurred in cc-rs: command did not execute successfully (status code exit status: 1): env -u […] | 23:42:41 |
emily | oh, it's only unsetting IPHONEOS_DEPLOYMENT_TARGET | 23:42:53 |
emily | flokli: try adding cmake to nativeBuildInputs | 23:45:38 |
emily | it seems like we have that for some aws-lc-sys-using packages in-tree and https://github.com/aws/aws-lc-rs/tree/e0aa4187a8e00e2ec69dc4efb8a10a824863f586/aws-lc-sys/builder suggests it has entirely different build backends for both | 23:46:09 |
emily | if it works I guess we'd want to upstream it into pkgs/build-support/rust/default-crate-overrides.nix | 23:46:38 |
flokli | it still complains about not finding type name u_int etc, even with cmake in there | 23:56:37 |
emily | does the log change at all? e.g. the line cargo:warning=Building with: CC | 23:57:39 |
emily | oh to be clear cmake needs to be provided to the aws-lc-sys derivation | 23:57:52 |
emily | not any Snix one | 23:57:53 |
emily | so you'll need to define it in the crates overrides or etc. | 23:57:59 |
emily | (because crate2nix splits up crate builds) | 23:58:10 |
flokli | yes, that's what I did | 23:58:12 |