Commit Graph

9 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
Mynacol
1a2fc30c43 leanify: Add simple check
Check that the executable is where it's expected and that it can be
executed. The command is expected to fail with `Map file error: Invalid argument`.
However, it returns with return value 0.
2024-05-31 17:34:14 +02:00
Mynacol
f0152c8c2c leanify: 2023-10-19 -> 2023-12-17
As part of this upgrade, don't abort on compiler warnings, e.g.:
```
> clang -Wall -Werror -O3  -Wno-unused-function -I./lib  -c -o lib/zopfli/squeeze.o lib/zopfli/squeeze.c
> lib/zopfli/squeeze.c:341:10: error: variable 'total_length_test' set but not used [-Werror,-Wunused-but-set-variable]
>   size_t total_length_test = 0;
>          ^
> 1 error generated.
> make: *** [<builtin>: lib/zopfli/squeeze.o] Error 1
```
2024-03-18 16:18:56 +01:00
kirillrdy
5d7eab6c06
Merge pull request #264607 from Mynacol/leanify-2023-10
leanify: unstable-2022-12-04 -> unstable-2023-10-19
2024-02-17 11:36:42 +11:00
h7x4
41974d5ed9
treewide: add mainProgram 2023-11-27 02:17:53 +01:00
Mynacol
c952d99534 leanify: unstable-2022-12-04 -> unstable-2023-10-19 2023-10-31 16:38:46 +01:00
Weijia Wang
49fc798b25 leanify: support darwin 2023-03-29 14:26:44 +03:00
Paul Prechtel
3f977c13dd
leanify: mark darwin as broken
See https://github.com/NixOS/nixpkgs/pull/223300#discussion_r1148651152

Co-authored-by: Weijia Wang <9713184+wegank@users.noreply.github.com>
2023-03-27 00:04:39 +02:00
Mynacol
de50889848 leanify: init at unstable-2022-12-04
The stable v0.4.3 from 2015 wouldn't compile for me, so I just chose the
last git commit. According to the changelog, there is v0.4.4, but no git
tag or GitHub release is available.
2023-03-26 23:14:47 +02:00