Commit Graph

6 Commits

Author SHA1 Message Date
Masum Reza
e13831335f
treewide: stdenv.is -> stdenv.hostPlatform.is (#356363)
* treewide: stdenv.is -> stdenv.hostPlatform.is

* treewide: nixfmt due to ci error
2024-11-17 16:11:54 +05:30
R. Ryantm
67d4f4645c binsider: 0.2.0 -> 0.2.1 2024-10-31 22:54:07 +00:00
David Sánchez
f87eb089bc
build: no default features for all non-linux 2024-10-13 07:13:23 +01:00
David Sánchez
f72464305f
binsider: 0.1.0 -> 0.2.0
This disables `binsider`'s default features when building for macOS, granting support for that platform. I have tested it builds and runs for `x86_64-linux`, `aarch64-linux` and `aarch64-darwin`.

It also generally disables a pair of tests that fail on these platforms, the same approach followed by `binsider` itself on its own flake (before it moved to `naersk`. See: ffb35ea966) instead of just running a `cargo build` for the `preCheck`.
2024-10-13 07:04:42 +01:00
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
Samuel Tardieu
864ea66340 binsider: init at 0.1.0 2024-09-12 18:31:05 +02:00