!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

557 Members
119 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
14 Jul 2025
@qyliss:fairydust.spaceAlyssa RossWe discussed this three years ago and IIRC you came around to my pkg-config hook change14:03:46
@emilazy:matrix.orgemilyyeah I am fine with this solution14:05:16
@emilazy:matrix.orgemily Alyssa Ross: replaceStrings ["-"] ["_"] is not necessary, it checks both 14:05:27
@qyliss:fairydust.spaceAlyssa Ross
In reply to @qyliss:fairydust.space
We discussed this three years ago and IIRC you came around to my pkg-config hook change
Sadly I don't seem to have decryption keys beyond 2023
14:05:57
@emilazy:matrix.orgemily

there's also a very dubious

pkgs/development/compilers/rust/cargo.nix
111:          HOST_PKG_CONFIG_PATH = "${pkgsBuildBuild.pkg-config}/bin/pkg-config";

these days

14:05:58
@emilazy:matrix.orgemilythat is almost certainly wrong14:06:02
@emilazy:matrix.orgemily

and this is a silly hack that can go away

pkgs/build-support/rust/build-rust-package/default.nix
141:      PKG_CONFIG_ALLOW_CROSS = if stdenv.buildPlatform != stdenv.hostPlatform then 1 else 0;
14:06:14
@emilazy:matrix.orgemilyother than that the PR LGTM14:06:30
@qyliss:fairydust.spaceAlyssa RossI guess I'll give it a rebase...14:06:55
@emilazy:matrix.orgemilythough we have a field for this these days right?14:07:22
@emilazy:matrix.orgemilythe env form14:07:24
@emilazy:matrix.orgemilyoh14:07:31
@emilazy:matrix.orgemily Alyssa Ross: there is one more wrinkle that maybe John Ericson can help explain 14:07:41
@emilazy:matrix.orgemily
[[ -z ${strictDeps-} ]] || (( "$hostOffset" < 0 )) || return 0
14:07:45
@emilazy:matrix.orgemily the hook just does not run if strictDeps. I have no idea why. it seems like this condition is maybe just backwards? 14:07:59
@Ericson2314:matrix.orgJohn EricsonI thought the host offset would be -114:12:30
@Ericson2314:matrix.orgJohn EricsonWhen used as native build input14:12:50
@Ericson2314:matrix.orgJohn EricsonThis logic should be the same as other wrappers, iirc14:13:01
@Ericson2314:matrix.orgJohn EricsonBasically the setup hook should only run if you have a pkg config which is runnable at build time 14:13:28
@emilazy:matrix.orgemilyah14:15:42
@emilazy:matrix.orgemilyok, I see14:15:43
@emilazy:matrix.orgemily it is to handle the marginal case of buildInputs = [ pkg-config ]; 14:15:52
@emilazy:matrix.orgemily QuadRadical (Ping / Reply): I think that either it will just build out of the box on top of #196333, or you might need to add depsBuildBuild = [ pkg-config lvm2 ]; and nothing else 14:16:42
@emilazy:matrix.orgemily(once it's rebased)14:16:49
@quadradical:federated.nexusQuadRadical (Ping) okay thanks 14:27:23
@quadradical:federated.nexusQuadRadical (Ping)its taking ages to build for some reason14:27:27
@quadradical:federated.nexusQuadRadical (Ping)perl and gettext is taking so long14:27:46
@tomasajt:matrix.orgToma

By the way, John Ericson do you remember why the python package-set's spliced scope has splicing disabled for hooks?

The original PR: https://github.com/NixOS/nixpkgs/pull/104201
Currently: https://github.com/NixOS/nixpkgs/blob/b125d87d5b6473acc534c46f06cc0c835c595452/pkgs/development/interpreters/python/passthrufun.nix#L78
Usage of keep: https://github.com/NixOS/nixpkgs/blob/e6d2b439c23fa01b18ae6f677f5e5aba3be48518/lib/customisation.nix#L688-L691
(the comment was added by someone else in https://github.com/NixOS/nixpkgs/commit/dd48cb0b3479912a9c6adfaa7279dbadabaeae2b)

Recent discussion: https://github.com/NixOS/nixpkgs/pull/424913#discussion_r2204760754

14:31:52
@qyliss:fairydust.spaceAlyssa RossJust checking which one of the many Rust target variables is the right one here, since we've learned a lot about them since 202214:32:40
@qyliss:fairydust.spaceAlyssa RossYeah it's cargoShortTarget14:35:18

Show newer messages


Back to Room ListRoom Version: 6