| 26 Feb 2026 |
dramforever | (which does not exist) | 19:39:45 |
dramforever | it working before was the broken state, where depsBuildBuild has failed to select the x86_64-linux one | 19:42:51 |
dramforever | oh wait i probably misunderstood | 19:46:42 |
dramforever | do you mean you were using pkgsCross.mingwW64.stdenv.mkDerivation? that would do the right thing wrt dependencies | 19:47:14 |
dramforever | if you were just adding pkgsCross.mingwW64.stdenv.cc it wouldn't change the fact that you have a native x86_64-linux stdenv | 19:47:56 |
Artturin | https://github.com/CrazyChaoz/backtor/blob/c9552af05f426dc3faff29b4efc6b0100e08699a/flake.nix#L40 | 19:51:41 |
Artturin | This should really be true so you can be sure that you have the right behaviour | 19:51:55 |
dramforever | i can't tell if this crane thing is doing the right thing | 19:53:08 |
rosssmyth | If you are using Crane, if you use pkgsCross.mingwW64.callPackage, you do not have to manually specify windows.pthreads | 19:54:18 |
rosssmyth | Because of a change a really cool person did
https://github.com/ipetkov/crane/commit/7cc51a10ddafa9ed1693afdf26d1bffb6ce027a0 | 19:55:13 |
dramforever | ... i fail to see how | 19:55:19 |
dramforever | ooooh | 19:55:42 |
rosssmyth | It checks what stdenv is being used | 19:55:48 |
dramforever | because it's handled in crane | 19:55:49 |
rosssmyth | I want to do this in Nixpkgs for rustPlatform.buildRustPackage but no one seems to be able to agree how to do it | 19:56:20 |
rosssmyth | So it's just not done atm | 19:56:28 |
rosssmyth | There is an attempt to do it, but it doesn't work | 19:56:38 |
rosssmyth | https://github.com/NixOS/nixpkgs/blob/254bfbcf45f588ecac20e2d79e163ee133037638/pkgs/build-support/rust/build-rust-package/default.nix#L164 | 19:57:16 |
rosssmyth | Doesn't work because rustc nor the rustc wrapper never looks are buildInputs | 19:57:38 |
rosssmyth | * Doesn't work because rustc nor the rustc wrapper never look at buildInputs | 19:57:45 |
rosssmyth | https://github.com/NixOS/nixpkgs/pull/457066 | 19:59:12 |
dramforever | this is kind of weird | 20:01:30 |
dramforever | so i don't understand why rustc needs to know this | 20:01:56 |
rosssmyth | Something about mingw requiring pthreads but most other targets don't so rustc doesn't try to link it by default. It's been a while since I looked into it. | 20:05:18 |
rosssmyth | * Something about mingw requiring pthreads but most other targets don't so rustc doesn't tell llvm link pthreads in by default. It's been a while since I looked into it. | 20:05:39 |
rosssmyth | * Something about mingw requiring pthreads but most other targets don't so rustc doesn't tell llvm to link pthreads in by default. It's been a while since I looked into it. | 20:05:45 |
rosssmyth | or maybe the opposite where rustc tells llvm to link it in uncondtionally | 20:06:52 |
rosssmyth | idk | 20:06:54 |
rosssmyth | * or maybe the opposite where rustc tells llvm to link it in uncondtionally, but only on mingw | 20:07:30 |
dramforever | yeah your code does neither of that | 20:07:50 |