-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
treewide: replace stdenv.is
with stdenv.hostPlatform.is
#341407
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
6.topic: python
6.topic: nixos
Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS
6.topic: haskell
6.topic: qt/kde
8.has: module (update)
This PR changes an existing module in `nixos/`
6.topic: emacs
Text editor
6.topic: rust
6.topic: golang
6.topic: ruby
6.topic: vim
6.topic: erlang
6.topic: ocaml
6.topic: nodejs
6.topic: lua
6.topic: agda
"A dependently typed programming language / interactive theorem prover"
6.topic: nim
Nim programing language
6.topic: LXQt
The Lightweight Qt Desktop Environment
6.topic: Enlightenment DE
The Enlightenment Desktop Environment
6.topic: mate
The MATE Desktop Environment
6.topic: vscode
6.topic: flakes
The experimental Nix feature
6.topic: lib
The Nixpkgs function library
6.topic: zig
6.topic: jupyter
Interactive computing tooling: kernels, notebook, jupyterlab
6.topic: julia
6.topic: php
6.topic: k3s
Kubernates distribution (https://k3s.io/)
6.topic: llvm/clang
Issues related to llvmPackages, clangStdenv and related
6.topic: dotnet
Language: .NET
6.topic: flutter
labels
Sep 12, 2024
Artturin
force-pushed
the
stdenvshorthandtreewide
branch
from
September 24, 2024 15:52
c5312e0
to
71f1b2e
Compare
Artturin
force-pushed
the
stdenvshorthandtreewide
branch
from
September 24, 2024 15:56
71f1b2e
to
986cfc6
Compare
Excited this is finally happening. Thanks @Artturin! |
Artturin
force-pushed
the
stdenvshorthandtreewide
branch
from
September 24, 2024 19:20
986cfc6
to
182d986
Compare
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" ```
`treewide: replace stdenv.is with stdenv.hostPlatform.is`
Artturin
force-pushed
the
stdenvshorthandtreewide
branch
from
September 24, 2024 21:04
182d986
to
63fa53d
Compare
Reproduced the commits locally, ofborg has reported low build numbers on previous rebases, seems impossible to race ofborg and merge conflicts. Merging now and will take responsibility for the revert if ofborg throws up a scary result. |
13 tasks
13 tasks
msfjarvis
added a commit
to msfjarvis/dotfiles
that referenced
this pull request
Sep 26, 2024
Following nixpkgs: NixOS/nixpkgs#341407
sternenseemann
added a commit
that referenced
this pull request
Sep 27, 2024
Conflicts from #341407 resolved.
imincik
added a commit
to imincik/geospatial-nix
that referenced
this pull request
Sep 27, 2024
imincik
added a commit
to imincik/geospatial-nix
that referenced
this pull request
Sep 27, 2024
imincik
added a commit
to imincik/geospatial-nix
that referenced
this pull request
Sep 27, 2024
imincik
added a commit
to imincik/geospatial-nix
that referenced
this pull request
Sep 27, 2024
imincik
added a commit
to imincik/geospatial-nix
that referenced
this pull request
Sep 27, 2024
imincik
added a commit
to imincik/geospatial-nix
that referenced
this pull request
Sep 27, 2024
imincik
added a commit
to imincik/geospatial-nix
that referenced
this pull request
Sep 27, 2024
imincik
added a commit
to imincik/geospatial-nix
that referenced
this pull request
Sep 27, 2024
msfjarvis
added a commit
to msfjarvis/dotfiles
that referenced
this pull request
Sep 30, 2024
Following nixpkgs: NixOS/nixpkgs#341407
13 tasks
Rhys-T
added a commit
to Rhys-T/nur-packages
that referenced
this pull request
Nov 4, 2024
14 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
2.status: merge conflict
This PR has merge conflicts with the target branch
6.topic: agda
"A dependently typed programming language / interactive theorem prover"
6.topic: dotnet
Language: .NET
6.topic: emacs
Text editor
6.topic: Enlightenment DE
The Enlightenment Desktop Environment
6.topic: erlang
6.topic: flakes
The experimental Nix feature
6.topic: flutter
6.topic: golang
6.topic: haskell
6.topic: julia
6.topic: jupyter
Interactive computing tooling: kernels, notebook, jupyterlab
6.topic: k3s
Kubernates distribution (https://k3s.io/)
6.topic: lib
The Nixpkgs function library
6.topic: llvm/clang
Issues related to llvmPackages, clangStdenv and related
6.topic: lua
6.topic: LXQt
The Lightweight Qt Desktop Environment
6.topic: mate
The MATE Desktop Environment
6.topic: nim
Nim programing language
6.topic: nixos
Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS
6.topic: nodejs
6.topic: ocaml
6.topic: php
6.topic: python
6.topic: qt/kde
6.topic: ruby
6.topic: rust
6.topic: vim
6.topic: vscode
6.topic: zig
8.has: module (update)
This PR changes an existing module in `nixos/`
10.rebuild-darwin: 1-10
10.rebuild-darwin: 1
10.rebuild-linux: 1-10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Approve or thumbs up to show that you approve of the idea, or request changes on the first file to discuss why you don't think it's a good idea.
Join https://matrix.to/#/#stdenv:nixos.org to discuss
I'll reset to master and rerun the commands before merge.
Further replacements can be done in the PR where the warnings are added.
The commits can be added to
.git-blame-ignore-revs
in a separate PRtreewide: replace
stdenv.is
withstdenv.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 wayOne example of why this is bad and especially affects compiler packages
#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 itdoesn't make sense.
The rebuilds are due to
src ./.
or similarhttps://gist.github.com/Artturin/4cc1e73fc612cb7a79459a9bb6bc27a3