!VRULIdgoKmKPzJZzjj:nixos.org

Nix Hackers

891 Members
For people hacking on the Nix package manager itself189 Servers

Load older messages


SenderMessageTime
20 Feb 2025
@emilazy:matrix.orgemily <nix/globals.hh> wants SYSTEM which is defined in Meson-generated config-store.hh which doesn't appear to be included anywhere. again not sure I'm holding it right. (maybe it needs to be explicitly included by Nix C++ API users?) 00:13:48
@roberthensing:matrix.orgRobert Hensing (roberth) we did it this way because the out (bin) is a trivial builder, not a proper mkDerivation call 00:13:58
@roberthensing:matrix.orgRobert Hensing (roberth)if the root package remains too buggy we could do a more custom derivation in a non-custom package attrset00:15:34
@roberthensing:matrix.orgRobert Hensing (roberth)those should be part of the pkg-config compiler flags00:17:06
@roberthensing:matrix.orgRobert Hensing (roberth)which is admittedly a weird approach00:17:36
@emilazy:matrix.orgemily
Libs: -L${libdir} -lnixstore
Libs.private: -lsandbox /nix/store/nqwpwimfcy6wakn4p47v4prijq0cbqik-boost-1.87.0/lib/libboost_container.dylib -L/nix/store/x99grmq3agqymigz4kbns60vqc1w9d2k-aws-sdk-cpp-1.11.448/lib -laws-cpp-sdk-transfer -laws-cpp-sdk-s3 -laws-cpp-sdk-core -laws-crt-cpp
Cflags: -I${includedir}/nix -std=c++2a
00:17:37
@emilazy:matrix.orgemilyit doesn't seem to be00:17:39
@emilazy:matrix.orgemily I grepped the whole ^dev outputs for config-store and there's nothing 00:17:49
@emilazy:matrix.orgemily

what I mean is

stdenv.mkDerivation {
  name = "nix-kitchen-sink";
  outputs = [ "bin" "out" "dev" ];
  dontUnpack = true;
  dontBuild = true;
  installPhase = ''
    runHook preInstall
    ln -s ${nix-cli} $bin
    mkdir -p $out/lib
    ln -s ${lib.getLib nix-lib-1}/lib/* $out/lib/
    ln -s ${lib.getLib nix-lib-2}/lib/* $out/lib/
    mkdir -p $dev/{lib/pkgconfig,include/nix}
    ln -s ${lib.getLib nix-lib-1}/include/nix/* $out/include/nix/
    ln -s ${lib.getLib nix-lib-2}/include/nix/* $out/include/nix/
    # etc. (and also this is probably wrong for splicing/cross but you get the idea)
    runHook postInstall
  '';
}
00:20:06
@emilazy:matrix.orgemilywhich does not seem like it would require any strange low-level workarounds for the output selection machinery, because they would just be real outputs (that happen to be full of symlinks)00:20:26
@roberthensing:matrix.orgRobert Hensing (roberth) I do have a goal for that machinery to not be strange, because it helps remove certain dependency chains, especially those in foo.doc outputs, but that is secondary 00:21:56
@roberthensing:matrix.orgRobert Hensing (roberth)can be used to simplify bootstrapping a bit00:22:34
@emilazy:matrix.orgemily ok, a bigger issue is that e.g. /nix/store/8fc4pxbkadmhnw2zspsbiayz0qdkkm94-nix-main-2.26.1-dev/include/nix/shared.hh does #include "path.hh", but <nix/path.hh> is in nix-store, and AFAICT even if you have them both on the include path a relative include won't look at "the same prefix in another directory" like that 00:22:44
@emilazy:matrix.orgemily (I haven't tested with your PR yet since it requires a full Nix rebuild, I'm just manually adding libs.foos, but it seems like the separate library packages just don't work so I don't think propagation would fix that) 00:23:04
@emilazy:matrix.orgemily (a symlink farm would hide the issue I think, by making path.hh be in the same directory as shared.hh, but it seems like a general issue for having split-up components) 00:23:24
@emilazy:matrix.orgemilyhm, it might be user error actually. let me test some more00:24:30
@roberthensing:matrix.orgRobert Hensing (roberth)between these packages, meson seems to figure things out, fwiw00:25:26
@roberthensing:matrix.orgRobert Hensing (roberth) we could make dev a symlink farm if we need to 00:25:58
@Ericson2314:matrix.orgJohn Ericson emily: you might want to see what nix-eval-jobs and hydra are now doing for 2.26 00:29:11
@Ericson2314:matrix.orgJohn Ericsonyes the config stuff is not yet good by any means00:29:24
@emilazy:matrix.orgemily looks like explicit -includes rather than anything in the .pc? https://github.com/NixOS/hydra/blob/18c0d762109549351ecf622cde34514351a72492/meson.build#L22-L26 00:30:17
@Ericson2314:matrix.orgJohn Ericsonyes :*00:30:27
@Ericson2314:matrix.orgJohn Ericson * yes :(00:30:30
@Ericson2314:matrix.orgJohn Ericsonnow that we are more explicit about the configuration variables than with autoconf, I want to only export the ones the headers actualy depend on00:31:15
@Ericson2314:matrix.orgJohn Ericson(which should be a lot less)00:31:21
@Ericson2314:matrix.orgJohn Ericson and use regular #include 00:31:37
@Ericson2314:matrix.orgJohn Ericson emily: another thing is I don't know whether #include "foo" or #include <nix/foo> is better within nix itself 00:34:26
@Ericson2314:matrix.orgJohn Ericsonthe latter violates "don't know your own name" but keeps us dogfooding our headers as others would use them00:34:50
@Ericson2314:matrix.orgJohn Ericson (the /nix in the pkg-config is definitely bad) 00:35:04
@Ericson2314:matrix.orgJohn Ericson * (the /nix in the *.pc is definitely bad) 00:35:14

Show newer messages


Back to Room ListRoom Version: 6