Files
nixpkgs/pkgs/os-specific/windows/default.nix
Artturin 2494e3664f splice.nix: make pkgs splicedPackages when required
This will make `pkgs` used in `callPackage`, and `pkgsCross.X.pkgs` have
packages with `__spliced`.

3029741718/pkgs/development/interpreters/python/passthrufun.nix (L37)

d2bd9a39de/pkgs/top-level/python-packages.nix (L10720)

```
nix-repl>
pkgsCross.aarch64-multiplatform.python3Packages.protobuf4.protobuf.__spliced
error:
       … while evaluating the attribute
'aarch64-multiplatform.python3Packages.protobuf4.protobuf.__spliced'
         at
/home/artturin/nixgits/my-nixpkgs/.worktree/1/pkgs/development/python-modules/protobuf/4.nix:119:13:
          118|   passthru = {
          119|     inherit protobuf;
             |             ^
          120|   };

       error: attribute '__spliced' missing
       at «string»:1:1:
            1|
pkgsCross.aarch64-multiplatform.python3Packages.protobuf4.protobuf.__spliced
             | ^
```

to

```
nix-repl>
pkgsCross.aarch64-multiplatform.python3Packages.protobuf4.protobuf.__spliced
{
  buildBuild = «derivation
/nix/store/s7da5mfvx4h1n86j78knaj9cprglxqz6-protobuf-25.4.drv»;
  buildHost = «derivation
/nix/store/s7da5mfvx4h1n86j78knaj9cprglxqz6-protobuf-25.4.drv»;
  buildTarget = «repeated»;
  hostHost = «derivation
/nix/store/mszvybzs4zxh43awyrjnybsfcb265n9r-protobuf-aarch64-unknown-linux-gnu-25.4.drv»;
  hostTarget = «repeated»;
}
```

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-10-28 21:54:10 +01:00

56 lines
1.4 KiB
Nix

{
lib,
config,
stdenv,
buildPackages,
pkgs,
newScope,
overrideCC,
stdenvNoLibc,
emptyDirectory,
}:
lib.makeScope newScope (
self:
with self;
{
dlfcn = callPackage ./dlfcn { };
mingw_w64 = callPackage ./mingw-w64 {
stdenv = stdenvNoLibc;
};
# FIXME untested with llvmPackages_16 was using llvmPackages_8
crossThreadsStdenv = overrideCC stdenvNoLibc (
if stdenv.hostPlatform.useLLVM or false then
buildPackages.llvmPackages.clangNoLibcxx
else
buildPackages.gccWithoutTargetLibc.override (old: {
bintools = old.bintools.override {
libc = pkgs.pkgsHostTarget.libc;
noLibc = pkgs.libc == null;
nativeLibc = false;
};
libc = pkgs.pkgsHostTarget.libc;
noLibc = pkgs.libc == null;
nativeLibc = false;
})
);
mingw_w64_headers = callPackage ./mingw-w64/headers.nix { };
mcfgthreads = callPackage ./mcfgthreads { stdenv = crossThreadsStdenv; };
npiperelay = callPackage ./npiperelay { };
pthreads = callPackage ./mingw-w64/pthreads.nix { stdenv = crossThreadsStdenv; };
libgnurx = callPackage ./libgnurx { };
sdk = callPackage ./msvcSdk { };
}
// lib.optionalAttrs config.allowAliases {
mingw_w64_pthreads = lib.warn "windows.mingw_w64_pthreads is deprecated, windows.pthreads should be preferred" self.pthreads;
}
)