!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

398 Members
92 Servers

Load older messages


SenderMessageTime
6 Oct 2024
@suskeyhose:matrix.orgsrasuso what exactly is splicedPackages doing? Is it checking like the system I'm on or something?16:57:45
@suskeyhose:matrix.orgsrasuI'm not sure I understand it from what I'm seeing online16:57:57
@artturin:matrix.orgArtturin
nix-repl> pkgsCross.aarch64-multiplatform.libblocksruntime ? __spliced
false

nix-repl> pkgsCross.aarch64-multiplatform.__splicedPackages.libblocksruntime ? __spliced
true

nix-repl> pkgsCross.aarch64-multiplatform.__splicedPackages.libblocksruntime.__spliced
{
«derivation /nix/store/fm8syvjd5m26fwqx7w77v3iwvx837a5g-blocksruntime-unstable-2014-06-24.drv»;
  buildHost = «derivation /nix/store/pqb7gyra58j01mdcnbrjmyrcznva24qg-blocksruntime-unstable-2014-06-24.drv»;
  buildTarget = «repeated»;
  hostHost = «derivation /nix/store/q0pxcv7nqca2ma4kxa4ymgspj4qgg9vj-blocksruntime-aarch64-unknown-linux-gnu-unstable-2014-06-24.drv»;
  hostTarget = «repeated»;
}

https://github.com/NixOS/nixpkgs/blob/6abc2cbbc4f9d151b46f4d87cae0e6a2b1b20f49/pkgs/stdenv/generic/make-derivation.nix#L304-L316

17:00:43
@artturin:matrix.orgArtturin *
nix-repl> pkgsCross.aarch64-multiplatform.libblocksruntime ? __spliced
false

nix-repl> pkgsCross.aarch64-multiplatform.__splicedPackages.libblocksruntime ? __spliced
true

nix-repl> pkgsCross.aarch64-multiplatform.__splicedPackages.libblocksruntime.__spliced
{
«derivation /nix/store/fm8syvjd5m26fwqx7w77v3iwvx837a5g-blocksruntime-unstable-2014-06-24.drv»;
  buildHost = «derivation /nix/store/pqb7gyra58j01mdcnbrjmyrcznva24qg-blocksruntime-unstable-2014-06-24.drv»;
  buildTarget = «repeated»;
  hostHost = «derivation /nix/store/q0pxcv7nqca2ma4kxa4ymgspj4qgg9vj-blocksruntime-aarch64-unknown-linux-gnu-unstable-2014-06-24.drv»;
  hostTarget = «repeated»;
}

https://github.com/NixOS/nixpkgs/blob/6abc2cbbc4f9d151b46f4d87cae0e6a2b1b20f49/pkgs/stdenv/generic/make-derivation.nix#L304-L316

17:00:53
@artturin:matrix.orgArtturin *
nix-repl> :p pkgsCross.aarch64-multiplatform.__splicedPackages.libblocksruntime.__spliced
{
  buildBuild = «derivation /nix/store/fm8syvjd5m26fwqx7w77v3iwvx837a5g-blocksruntime-unstable-2014-06-24.drv»;
  buildHost = «derivation /nix/store/pqb7gyra58j01mdcnbrjmyrcznva24qg-blocksruntime-unstable-2014-06-24.drv»;
  buildTarget = «repeated»;
  hostHost = «derivation /nix/store/q0pxcv7nqca2ma4kxa4ymgspj4qgg9vj-blocksruntime-aarch64-unknown-linux-gnu-unstable-2014-06-24.drv»;
  hostTarget = «repeated»;
}

https://github.com/NixOS/nixpkgs/blob/6abc2cbbc4f9d151b46f4d87cae0e6a2b1b20f49/pkgs/stdenv/generic/make-derivation.nix#L304-L316

17:01:11
@artturin:matrix.orgArtturin The reason you need to specify __splicedPackages is because you're using the pkgs directly 17:03:41
@artturin:matrix.orgArtturin not getting them from callPackage 17:03:50
@suskeyhose:matrix.orgsrasuah, interesting17:05:07
@artturin:matrix.orgArtturin
nix-repl> (pkgsCross.aarch64-multiplatform.callPackage ({libblocksruntime}: {inherit libblocksruntime; }) { }).libblocksruntime.__spliced
{
  buildBuild = «derivation /nix/store/fm8syvjd5m26fwqx7w77v3iwvx837a5g-blocksruntime-unstable-2014-06-24.drv»;
  buildHost = «derivation /nix/store/pqb7gyra58j01mdcnbrjmyrcznva24qg-blocksruntime-unstable-2014-06-24.drv»;
  buildTarget = «repeated»;
  hostHost = «derivation /nix/store/q0pxcv7nqca2ma4kxa4ymgspj4qgg9vj-blocksruntime-aarch64-unknown-linux-gnu-unstable-2014-06-24.drv»;
  hostTarget = «repeated»;
}
17:05:40
@artturin:matrix.orgArtturin *
nix-repl> (pkgsCross.aarch64-multiplatform.callPackage ({libblocksruntime}: {inherit libblocksruntime; }) { }).libblocksruntime.__spliced
{
  buildBuild = «derivation /nix/store/fm8syvjd5m26fwqx7w77v3iwvx837a5g-blocksruntime-unstable-2014-06-24.drv»;
  buildHost = «derivation /nix/store/pqb7gyra58j01mdcnbrjmyrcznva24qg-blocksruntime-unstable-2014-06-24.drv»;
  buildTarget = «repeated»;
  hostHost = «derivation /nix/store/q0pxcv7nqca2ma4kxa4ymgspj4qgg9vj-blocksruntime-aarch64-unknown-linux-gnu-unstable-2014-06-24.drv»;
  hostTarget = «repeated»;
}
17:05:45
@artturin:matrix.orgArtturinhttps://github.com/NixOS/nixpkgs/blob/6abc2cbbc4f9d151b46f4d87cae0e6a2b1b20f49/pkgs/top-level/splice.nix#L140-L14417:06:39
@artturin:matrix.orgArtturin pkgs.newScope is the newScope on line 144 17:06:56
@artturin:matrix.orgArtturinhttps://github.com/NixOS/nixpkgs/blob/6abc2cbbc4f9d151b46f4d87cae0e6a2b1b20f49/pkgs/top-level/splice.nix#L12517:07:06
@artturin:matrix.orgArtturinxorg is there for historical reasons (it really shouldn't be special-cased)17:08:04
@artturin:matrix.orgArtturinhttps://github.com/NixOS/nixpkgs/blob/6abc2cbbc4f9d151b46f4d87cae0e6a2b1b20f49/lib/customisation.nix#L163-L26917:08:58
@suskeyhose:matrix.orgsrasusetting the stdenv to llvmPackages_18.stdenv as suggested before doesn't appear to allow me to use the right clang version without still referring to llvmPackages_18.clang17:14:10
@suskeyhose:matrix.orgsrasuSorry if my questions are pretty basic, I'm still relatively new to doing more advanced shells and packaging. The most I have done so far is packaging binaries etc, and most of my dev till now has been on arch.17:15:20
@artturin:matrix.orgArtturin
In reply to @suskeyhose:matrix.org
setting the stdenv to llvmPackages_18.stdenv as suggested before doesn't appear to allow me to use the right clang version without still referring to llvmPackages_18.clang
Link the project and push what you have now
17:16:41
@suskeyhose:matrix.orgsrasualright17:16:47
@suskeyhose:matrix.orgsrasuhttps://git.sr.ht/~srasu/c_template/tree/nix/pkgs-cross-windows-build17:21:48
@suskeyhose:matrix.orgsrasuone commit back on the log is where I was at before I started trying to split the devShells17:22:15
@artturin:matrix.orgArtturin

You don't have the

    let
      pkgs = pkgsCross.mingwW64.__splicedPackages;
    in

in windows

17:25:43
@suskeyhose:matrix.orgsrasusure, but I'm trying to just get back to builds working while using the stdenv alteration. Even the linux one is using the wrong clang version.17:27:57
@artturin:matrix.orgArtturin You have clang in nativeBuildInputs 17:28:32
@suskeyhose:matrix.orgsrasu right, I had thought that setting the different stdenv would get the right version in there, I guess not. What should I be pulling in to get the right compiler, seeing as I'd previously gotten it by getting pkgs.llvmPackages_18.clang 17:29:19
@artturin:matrix.orgArtturin
In reply to @suskeyhose:matrix.org
right, I had thought that setting the different stdenv would get the right version in there, I guess not. What should I be pulling in to get the right compiler, seeing as I'd previously gotten it by getting pkgs.llvmPackages_18.clang
None because the you're overriding the stdenv and that already has the compiler you want
17:30:20
@suskeyhose:matrix.orgsrasuah, ok17:30:29
@artturin:matrix.orgArtturin The clang is just pkgs.clang, not affected by the stdenv 17:30:48
@artturin:matrix.orgArtturin * The clang you have in nativeBuildInputs is just pkgs.clang, not affected by the stdenv 17:31:00
@suskeyhose:matrix.orgsrasuOk, linux is working again17:31:15

Show newer messages


Back to Room ListRoom Version: 6