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"
```
Given the current situation, I have not been able to take care of
anything related to that module. Upgrades are merged without upgrading
properly the module, unfortunately.
This caused too much divergence and I still do not have the energy to
take care of it.
I will leave it to the more active recent committers who touched the
module to take it from there.
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
It broke again because of some linker error.
```
garage-aarch64-darwin> warning: use of deprecated associated function `garage_db::sled_adapter::SledDb::init`: The Sled database is now deprecated and will be removed in Garage v1.0. Please migrate to LMDB or Sqlite as soon as possible.
garage-aarch64-darwin> --> src/model/garage.rs:134:31
garage-aarch64-darwin> |
garage-aarch64-darwin> 134 | db::sled_adapter::SledDb::init(db)
garage-aarch64-darwin> | ^^^^
garage-aarch64-darwin> |
garage-aarch64-darwin> = note: `#[warn(deprecated)]` on by default
garage-aarch64-darwin>
garage-aarch64-darwin> Compiling garage_api v0.9.2 (/private/tmp/nix-build-garage-0.9.2.drv-0/source/src/api)
garage-aarch64-darwin> Compiling garage_web v0.9.2 (/private/tmp/nix-build-garage-0.9.2.drv-0/source/src/web)
garage-aarch64-darwin> warning: `garage_model` (lib) generated 1 warning
garage-aarch64-darwin> Compiling garage v0.9.2 (/private/tmp/nix-build-garage-0.9.2.drv-0/source/src/garage)
garage-aarch64-darwin> warning: use of deprecated associated function `garage_db::sled_adapter::SledDb::init`: The Sled database is now deprecated and will be removed in Garage v1.0. Please migrate to LMDB or Sqlite as soon as possible.
garage-aarch64-darwin> --> src/garage/cli/convert_db.rs:65:29
garage-aarch64-darwin> |
garage-aarch64-darwin> 65 | Ok(sled_adapter::SledDb::init(db))
garage-aarch64-darwin> | ^^^^
garage-aarch64-darwin> |
garage-aarch64-darwin> = note: `#[warn(deprecated)]` on by default
garage-aarch64-darwin>
garage-aarch64-darwin> error: linker `/nix/store/6kpjydf9x7zqa1xq2qipnwr32ki3fs2n-clang-wrapper-16.0.6/bin/cc` not found
garage-aarch64-darwin> |
garage-aarch64-darwin> = note: No such file or directory (os error 2)
```
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
https://git.deuxfleurs.fr/Deuxfleurs/garage/releases/tag/v0.9.1
Due to a recent change in the build system, we have to remove actively a
file (`.cargo/config.toml`) to avoid the mold linker to leak during the linkage phase.
Not sure if we should have more sophisticated ways to ignore this.