Commit Graph

22 Commits

Author SHA1 Message Date
Artturin
e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00
John Ericson
f43cc75868
Clean up cross bootstrapping, take 2 (#321525) 2024-09-06 14:56:54 -04: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
R. Ryantm
9d01eec584 uclibc: 1.0.49 -> 1.0.50 2024-08-20 00:09:08 +00:00
Sigmanificient
6dd44107ac treewide: remove unused lib (and other) arguments 2024-07-26 11:18:09 +02:00
Vladimír Čunát
38ba06c7b9
Merge #321435: Revert #320852: Clean up cross bootstrapping 2024-06-21 08:14:02 +02: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
nixpkgs-merge-bot[bot]
63f6e9650c
Merge pull request #321307 from r-ryantm/auto-update/uclibc
uclibc: 1.0.48 -> 1.0.49
2024-06-21 05:36:53 +00:00
R. Ryantm
3b3932e6d7 uclibc: 1.0.48 -> 1.0.49 2024-06-20 17:34:39 +00: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
Alexis Hildebrandt
755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00
R. Ryantm
081e6f300b uclibc: 1.0.47 -> 1.0.48 2024-05-05 04:46:12 +00:00
Weijia Wang
a2e3bd8789 ucblogo: wrapGAppsHook -> wrapGAppsHook3 2024-05-02 21:58:10 +02:00
matthewcroughan
20bbe15aea ucblogo: init at 6.2.4 2024-05-02 15:31:49 +00:00
Mario Rodas
f11d350852 uclibc-ng: add passthru.updateScript 2024-04-06 04:20:00 +00:00
Mario Rodas
ca8bf15da9 uclibc-ng: 1.0.45 -> 1.0.47 2024-04-06 04:20:00 +00:00
R. Ryantm
bcc41ee917 uclibc: 1.0.44 -> 1.0.45 2024-01-22 04:35:20 +00:00
Fabian Affolter
4d1d464618 uchecker: init at 0.1.2
A simple tool to detect outdated shared libraries still linked to processes in memory

https://github.com/cloudlinux/kcare-uchecker
2024-01-16 22:36:01 +01:00
Maciej Krüger
019b212fe7
ucode: init at 0.0.20231102 2023-12-07 12:19:06 +01:00
Anderson Torres
2b74160d8e uclibc-ng: refactor
- finalAttrs
- no nested with
2023-10-11 23:42:04 -03:00
Anderson Torres
0b89ccec2e uclibc-ng: migrate to by-name 2023-10-11 23:42:04 -03:00
Anderson Torres
8485cdfad5 ucg: cleanup
- Use rec-less, overlay-style overridable recursive attributes (in effect since
https://github.com/NixOS/nixpkgs/pull/119942);
- Remove installCheckPhase
  - Change it to a separated derivation inside passthru.tests
- Set meta.mainProgram
2023-09-13 15:31:38 +00:00