!VRULIdgoKmKPzJZzjj:nixos.org

Nix Hackers

902 Members
For people hacking on the Nix package manager itself191 Servers

Load older messages


SenderMessageTime
20 Feb 2025
@Ericson2314:matrix.orgJohn Ericson you can do a fucked up #include "libutil-file.cc" 19:02:46
@Ericson2314:matrix.orgJohn Ericsonbut you cannot do a libexpr include from libstore19:02:57
@emilazy:matrix.orgemilyI see, ok19:03:02
@emilazy:matrix.orgemilyI understand the scoping now19:03:12
@Ericson2314:matrix.orgJohn Ericsonmeson has both configure time and build time path manipulation19:03:31
@emilazy:matrix.orgemily it's hard for me to see any non-hacky way of avoiding include/nix that doesn't leave the Nix-build-time include paths different from the Nix-end-user include paths 19:05:17
@emilazy:matrix.orgemilybecause you still end up with C++ files, maybe internal headers, whatever on the path19:05:27
@Ericson2314:matrix.orgJohn Ericsonagreed19:05:44
@Ericson2314:matrix.orgJohn Ericsonand I want private non-installed headers19:05:49
@emilazy:matrix.orgemily perhaps it would be best if the libraries were entirely separate Meson builds that consume each other via .pc files, but I don't know if Meson itself can orchestrate that or if you'd have to just do it with Nix. 19:06:00
@Ericson2314:matrix.orgJohn Ericsonwhich further motivates a separation19:06:01
@Ericson2314:matrix.orgJohn Ericson emily: we are trying to do the meson version of taht 19:06:21
@Ericson2314:matrix.orgJohn Ericson * emily: we are trying to do the meson version of that 19:06:23
@Ericson2314:matrix.orgJohn Ericsonwith meson subprojects19:06:27
@Ericson2314:matrix.orgJohn Ericsonbut it is designed to not require installing19:06:36
@emilazy:matrix.orgemily perhaps you can use fs.copyfile to copy headers into an include/nix/* directory in the build tree and then have that be the include directory 19:06:50
@Ericson2314:matrix.orgJohn Ericson(installing is all side effects not ninja target direven, like most build systems)19:06:54
@Ericson2314:matrix.orgJohn Ericson fs.copyFile will do it at configure time 19:07:02
@emilazy:matrix.orgemilyI think that that should work and satisfy ^ strongly19:07:07
@emilazy:matrix.orgemilyit says "Copy a file from the source directory to the build directory at build time", is that inaccurate?19:07:18
@Ericson2314:matrix.orgJohn Ericsonwhich will kill the debug cycle19:07:19
@emilazy:matrix.orgemily it returns a custom_target() 19:07:22
@emilazy:matrix.orgemilywhich would run at build time, afaik.19:07:27
@Ericson2314:matrix.orgJohn Ericsonoh woah19:07:29
@Ericson2314:matrix.orgJohn Ericsonok sorry 19:07:34
@Ericson2314:matrix.orgJohn Ericson I didn't know any of the fs.* things were deferred actions 19:07:45
@emilazy:matrix.orgemily so you enumerate (or glob I guess if you have to) the headers from source – that part would be configure time, I suppose – fs.copyfile them to include/nix, and include in the build directory that can be the resulting library's include directory 19:08:16
@Ericson2314:matrix.orgJohn Ericsonwe already don't have glob (RIP)19:08:26
@Ericson2314:matrix.orgJohn Ericsonso making a bunch of separate build targets is OK19:08:35
@emilazy:matrix.orgemilyseems like a silly amount of ceremony but you can probably abstract it into the existing support thing.19:10:33

Show newer messages


Back to Room ListRoom Version: 6