Commit Graph

10 Commits

Author SHA1 Message Date
sdedovic
5348841262 bws: 0.4.0 -> 1.0.0 2024-09-26 18:51:31 -05: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
Julius Michaelis
6a9beaf893 treewide: skip generating shell completions using $out/bin/… when cross compiling
This focuses on Rust packages, since the most commonly used argument
parser library (clap/structopt) makes the following pattern natural and
thus common:

  postInstall = ''
    installShellCompletion --cmd foo \
      --bash <($out/bin/foo completion bash) \
      …

This commit just guards those with

lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform)

splitting the string where unrelated actions are performed.
2024-08-04 10:50:48 +09:00
Mario Rodas
efd178f207 bws: update meta 2024-04-06 04:20:00 +00:00
Mario Rodas
1418413833 bws: build with --package 2024-04-06 04:20:00 +00:00
Mario Rodas
6ecf48c936 bws: install completions 2024-04-06 04:20:00 +00:00
Mario Rodas
95974f051c bws: cleanup dependencies 2024-04-06 04:20:00 +00:00
Mario Rodas
422e5c7019 bws: fix build on darwin 2024-04-06 04:20:00 +00:00
seth
775c6f4943
bws: 0.3.0 -> 0.4.0 2024-01-05 22:19:00 -05:00
Mostly Void
92f9132366
bws: init at 0.3.0 2023-08-08 01:15:32 +03:00