6 Oct 2024 |
srasu | so what exactly is splicedPackages doing? Is it checking like the system I'm on or something? | 16:57:45 |
srasu | I'm not sure I understand it from what I'm seeing online | 16:57:57 |
Artturin | 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 | * 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 | * 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 | The reason you need to specify __splicedPackages is because you're using the pkgs directly | 17:03:41 |
Artturin | not getting them from callPackage | 17:03:50 |
srasu | ah, interesting | 17:05:07 |
Artturin | 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 | * 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 | https://github.com/NixOS/nixpkgs/blob/6abc2cbbc4f9d151b46f4d87cae0e6a2b1b20f49/pkgs/top-level/splice.nix#L140-L144 | 17:06:39 |
Artturin | pkgs.newScope is the newScope on line 144 | 17:06:56 |
Artturin | https://github.com/NixOS/nixpkgs/blob/6abc2cbbc4f9d151b46f4d87cae0e6a2b1b20f49/pkgs/top-level/splice.nix#L125 | 17:07:06 |
Artturin | xorg is there for historical reasons (it really shouldn't be special-cased) | 17:08:04 |
Artturin | https://github.com/NixOS/nixpkgs/blob/6abc2cbbc4f9d151b46f4d87cae0e6a2b1b20f49/lib/customisation.nix#L163-L269 | 17:08:58 |
srasu | 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 | 17:14:10 |
srasu | Sorry 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 | 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 |
srasu | alright | 17:16:47 |
srasu | https://git.sr.ht/~srasu/c_template/tree/nix/pkgs-cross-windows-build | 17:21:48 |
srasu | one commit back on the log is where I was at before I started trying to split the devShells | 17:22:15 |
Artturin | You don't have the
let
pkgs = pkgsCross.mingwW64.__splicedPackages;
in
in windows
| 17:25:43 |
srasu | sure, 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 | You have clang in nativeBuildInputs | 17:28:32 |
srasu | 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 | 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 |
srasu | ah, ok | 17:30:29 |
Artturin | The clang is just pkgs.clang , not affected by the stdenv | 17:30:48 |
Artturin | * The clang you have in nativeBuildInputs is just pkgs.clang , not affected by the stdenv | 17:31:00 |
srasu | Ok, linux is working again | 17:31:15 |