Commit Graph

32 Commits

Author SHA1 Message Date
Ross Smyth
1cfbe94e38 windows: makeScope -> makeScopeWithSplicing 2025-11-11 11:57:36 -05:00
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
jopejoe1
fc2902e627 windows: fix eval of some packages on linux
This makes those packages appear in search
2025-10-12 07:59:31 +02:00
David McFarland
1acd8658f0 cygwin.newlib-cygwin{,-nobin}: init at 3.6.4 2025-09-27 21:21:47 -03:00
jopejoe1
5c20d4dc2f windows.mingw_w64_pthreads: put deprecation behind alias 2025-08-25 20:21:29 +02:00
John Ericson
b4b350d8bd windows.pthreads: Remove win32-pthreads, exclusively use mingwW64 pthreads (#430165) 2025-08-01 16:33:42 -04:00
Ross Smyth
8e2c959cdb windows.mingw_w64_pthreads: Deprecate 2025-08-01 15:47:52 -04:00
Ross Smyth
b84321bf45 windows.pthreads: Use mingw-w64 pthreads exclusively
pthreads-win32 is old, crusty, and unmaintained.
2025-08-01 15:47:33 -04:00
Ross Smyth
bcee3e2e29 windows.w32api: drop
This is from mingw, not mingw-w64, and is not used at all
2025-08-01 15:42:15 -04:00
John Ericson
b068263d5f windows.mingwrt: drop (#430153) 2025-08-01 15:16:37 -04:00
Ross Smyth
f13cf0819c windows.mingwrt: drop
Broken package, not used at all in nixpkgs
2025-08-01 11:49:00 -04:00
Ross Smyth
558cec2ee9 windows.cygwinSetup: drop
Has been broken for a while. So just drop it.
2025-08-01 11:31:52 -04:00
Ross Smyth
4e93287c0e windows.sdk: init at 17.14.9+36310.24.-july.2025- 2025-07-30 16:59:58 -04:00
John Ericson
5c1955ff14 libcCross: Remove!
We have a long-standing goal of nothing with "cross" in its name. This
gets us much closer!
2025-06-05 18:11:07 -04:00
seth
613a1dafd5 windows.*: format with nixfmt 2024-11-06 17:27:11 -05:00
John Ericson
5f134ec6cf Clean up cross bootstrapping
For a long time, we've had `crossLibcStdenv`, `*Cross` libc attributes,
and `*bsdCross` pre-libc package sets. This was always bad because
having "cross" things is "not declarative": the naming doesn't reflect
what packages *need* but rather how we *provide* something. This is
ugly, and creates needless friction between cross and native building.

Now, almost all of these `*Cross` attributes are gone: just these are
kept:

- Glibc's and Musl's are kept, because those packages are widely used
  and I didn't want to risk changing the native builds of those at this
  time.

- generic `libcCross`, `theadsCross`, and friends, because these relate
  to the convolulted GCC bootstrap which still needs to be redone.

The BSD and obscure Linux or freestnanding libcs have conversely all
been made to use a new `stdenvNoLibc`, which is like the old
`crossLibcStdenv` except:

1. It usable for native and cross alike

2. It named according to what it *is* ("a standard environment without
   libc but with a C compiler"), rather than some non-compositional
   jargon ("the stdenv used for building libc when cross compiling",
   yuck).

I should have done this change long ago, but I was stymied because of
"infinite recursions". The problem was that in too many cases we are
overriding `stdenv` to *remove* things we don't need, and this risks
cyles since those more minimal stdenvs are used to build things in the
more maximal stdenvs.

The solution is to pass `stage.nix` `stdenvNoCC`, so we can override to
*build up* rather than *tear down*. For now, the full `stdenv` is also
passed, so I don't need to change the native bootstraps, but I can see
this changing as we make things more uniform and clean those up.

(adapted from commit 51f1ecaa59)
(adapted from commit 1743662e55)
2024-09-06 10:26:56 -04:00
Vladimír Čunát
879821772c Revert #320852: Clean up cross bootstrapping
It rebuilt stdenv on *-darwin; we can't do that in nixpkgs master.
This reverts commit 2f20501c5f, reversing
changes made to fd469c24af.
2024-06-21 07:48:24 +02:00
John Ericson
51f1ecaa59 Clean up cross bootstrapping
For a long time, we've had `crossLibcStdenv`, `*Cross` libc attributes,
and `*bsdCross` pre-libc package sets. This was always bad because
having "cross" things is "not declarative": the naming doesn't reflect
what packages *need* but rather how we *provide* something. This is
ugly, and creates needless friction between cross and native building.

Now, almost all of these `*Cross` attributes are gone: just these are
kept:

- Glibc's and Musl's are kept, because those packages are widely used
  and I didn't want to risk changing the native builds of those at this
  time.

- generic `libcCross`, `theadsCross`, and friends, because these relate
  to the convolulted GCC bootstrap which still needs to be redone.

The BSD and obscure Linux or freestnanding libcs have conversely all
been made to use a new `stdenvNoLibc`, which is like the old
`crossLibcStdenv` except:

1. It usable for native and cross alike

2. It named according to what it *is* ("a standard environment without
   libc but with a C compiler"), rather than some non-compositional
   jargon ("the stdenv used for building libc when cross compiling",
   yuck).

I should have done this change long ago, but I was stymied because of
"infinite recursions". The problem was that in too many cases we are
overriding `stdenv` to *remove* things we don't need, and this risks
cyles since those more minimal stdenvs are used to build things in the
more maximal stdenvs.

The solution is to pass `stage.nix` `stdenvNoCC`, so we can override to
*build up* rather than *tear down*. For now, the full `stdenv` is also
passed, so I don't need to change the native bootstraps, but I can see
this changing as we make things more uniform and clean those up.

Finally, the BSDs also had to be cleaned up, since they have a few
pre-libc dependencies, demanding a systematic approach. I realized what
rhelmot did in 61202561d9 (specify what
packages just need `stdenvNoLibc`) is definitely the right approach for
this, and adjusted NetBSD and OpenBSD to likewise use it.
2024-06-18 17:04:16 -04:00
Weijia Wang
58b98e9a25 windows.mcfgthreads_pre_gcc_13: drop 2024-04-28 04:43:28 +02:00
annalee
5650490844 windows.crossThreadsStdenv: llvmPackages_8 -> llvmPackages
removing references to llvmPackages_8 in preparation to drop it from the
tree
2024-01-25 12:23:35 +00:00
Weijia Wang
0c9d7dad11 windows.wxMSW: drop 2024-01-06 01:09:13 +01:00
Vladimír Čunát
b4cc333048 Merge branch 'master' into staging-next 2023-09-04 20:19:44 +02:00
ajs124
44c3cb965f windows.jom: remove
depends on qt4
versions > 1.1 support qt5, but our qt5 packages do not
and most likely will never support windows
2023-09-04 13:54:51 +02:00
marius david
097d59184b windows.dlfcn: init at 1.3.1 2023-08-28 21:31:57 +03:00
Adam Joseph
2affd455a4 gccCrossStageStatic: enable dynamic libraries, rename to gccWithoutTargetLibc
This commit allows `gccCrossStageStatic` to build dynamically-linked
libraries.  Since is no longer restricted to building static
libraries its name is no longer appropriate, and this commit also
renames it to the more-accurate `gccWithoutTargetLibc`.

By default, you can't build a gcc that knows how to create dynamic
libraries unless you have already built the targetPlatform libc.

Because of this, our gcc cross-compiler is built in two stages:

  1. Build a cross-compiler (gccCrossStageStatic) that can build
     only static libraries.

  2. Use gccCrossStageStatic to compile the targetPlatform libc.

  3. Use the targetPlatform libc to build a fully-capable cross
     compiler.

You might notice that this pattern looks very similar to what we do
with `xgcc` in the stdenv bootstrap.  Indeed it is!  I would like to
work towards getting the existing stdenv bootstrap to handle cross
compilers as well.  However we don't want to cripple `stdenv.xgcc`
by taking away its ability to build dynamic libraries.

It turns out that the only thing gcc needs the targetPlatform libc
for is to emit a DT_NEEDED for `-lc` into `libgcc.so`.  That's it!
And since we don't use `gccCrossStageStatic` to build anything other
than libc, it's safe to omit the `DT_NEEDED` because that `libgcc`
will never be loaded by anything other than `libc`.  So `libc` will
already be in the process's address space.

Other people have noticed this; crosstool-ng has been using this
approach for a very long time:

  36ad0b17a7/scripts/build/cc/gcc.sh (L638-L640)
2023-07-01 13:12:40 -07:00
Sergei Trofimovich
c6132dcf23 pkgsCross.mingwW64.windows.mcfgthreads: add gcc13 compatible version
Upstream `gcc-13` merged `mcfgthreads` support with a caveat: it's
headers interface is not compatible with the patch `nixpkgs` was
carrying in `gcc-12` and before.

To keep both new (`gcc13`) and old (`_pre_gcc13`) version I held back
previous `windows.mcfgthreads` attribute as
`windows.mcfgthreads_pre_gcc_13`. It is used for `gcc` before 13.

The change fixes the build of `pkgsCross.mingwW64.stdenv` itself and
example program:

    $ nix build --impure --expr 'with import ./. {}; pkgsCross.mingwW64.re2c.override { stdenv = pkgsCross.mingwW64.gcc11Stdenv; }'
2023-06-08 07:43:56 +01:00
Shea Levy
121a26897f npiperelay: init at 0.1.0 2022-05-18 08:15:04 -04:00
John Ericson
18c38f8aee treewide: All the linker to be chosen independently
This will begin the process of breaking up the `useLLVM` monolith. That
is good in general, but I hope will be good for NetBSD and Darwin in
particular.

Co-authored-by: sterni <sternenseemann@systemli.org>
2021-05-14 21:29:51 +00:00
Ben Siraphob
16d91ee628 pkgs/os-specific: stdenv.lib -> lib 2021-01-17 23:26:08 +07:00
John Ericson
06c5e811e6 mcfgthreads: Init from git 2019-11-11 00:25:24 -05:00
John Ericson
0a63190c31 windows top-level: Clean up with makeScope 2019-11-11 00:25:24 -05:00
Matthew Bauer
9cee386f38 windows: refactor 2018-08-07 14:16:55 -04:00