Commit Graph

139 Commits

Author SHA1 Message Date
Niklas Korz
546222ab35 zig_0_10: remove 2025-02-05 23:58:04 +01:00
Niklas Korz
243dd29d89 zig_0_9: remove 2025-02-05 23:48:16 +01:00
Tristan Ross
2ca29c56ef zig: split cc and bintools wrappers 2025-01-26 22:10:45 -08:00
Tristan Ross
50e0d27a0e zig.cc: add bintools 2025-01-26 22:10:45 -08:00
Tristan Ross
3fc45e16ab zig: commonify 2025-01-26 22:10:42 -08:00
Silvan Mosberger
4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
Aleksana
af50c28579 splice.nix: remove toplevel {build,host,target}Platform in __splicedPackages (#350299) 2024-10-24 15:19:21 +08:00
Artturin
95c1043ff5 treewide: remove usages of aliases {build,host,target}Platform 2024-10-23 22:40:32 +03:00
Motiejus Jakštys
5cdff541c3 zig: fix cache folder handling
- `env.ZIG_GLOBAL_CACHE_DIR` does not resolve variables, so
all actions had their cache dir in the current directory, named
'$TMPDIR/zig-cache'.
- zig cache does not conflict, so it's totally fine to reuse it in both
  build and tests (thus removing `--cache-dir`).

While we're at this, fix a `substituteInPlace` deprecation warning.
2024-10-20 20:14:19 +03: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
Wolfgang Walther
e3191276d9 zig: improve shellcheck disable comments 2024-08-24 12:23:36 +02:00
Wolfgang Walther
5564042031 zig: support structuredAttrs in setup hook
Tested waylock with and without __structuredAttrs.
2024-08-24 12:23:36 +02:00
Tristan Ross
945426bccc zig: add stdenv 2024-07-27 19:43:40 -07:00
Tristan Ross
65c81d4eae zig: add cc wrapper 2024-07-27 19:43:36 -07:00
Sigmanificient
6dd44107ac treewide: remove unused lib (and other) arguments 2024-07-26 11:18:09 +02:00
Jared Baur
d118df3f8d zig_0_13.hook: disable progress output
The progress output is not printed in a readable manner in a nix build.
Passing `--color off` disables it during builds.
2024-07-23 20:07:40 -07:00
Alex James
cae03b78b4 zig: fix build on Darwin with sandbox enabled
During stage 3 of compilation, Zig calls `std.zig.system.darwin.macos.detect`,
which parses /System/Library/CoreServices/.SystemVersionPlatform.plist and
/System/Library/CoreServices/SystemVersion.plist[^1] to determine the OS
version. These paths are inaccessible when the sandbox is enabled, which causes
the build to fail with `OSVersionDetectionFail`[^2]. Fix the build with the
relaxed sandbox option by adding these paths to `__impureHostDeps`.

[^1]: cd62005f19/lib/std/zig/system/darwin/macos.zig
[^2]: https://github.com/NixOS/nixpkgs/issues/287861#issuecomment-2148703491
2024-06-16 17:51:10 -05:00
Jared Baur
623e23e25f zig_0_12: unbreak clang builds 2024-06-14 23:13:57 -07:00
Jared Baur
d203c3f1e2 zig: 0.12.0 -> 0.12.1 2024-06-14 23:12:41 -07:00
tomberek
933ae429e0 Merge pull request #317861 from ExpidusOS/feat/zig-0.13
zig_0_13: init
2024-06-14 22:13:51 -04:00
Alexis Hildebrandt
755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00
Tristan Ross
55fcb63b2c zig_0_13: init 2024-06-07 23:44:16 -07:00
Anderson Torres
0b575c9759 zig_0_12: huge refactor
- migrate it to a dedicated directory, zig/0.12
  - can't migrate to by-name
    - because of undecipherable darwin.apple_sdk_11_0.callPackage
- nixfmt
- add a simple version test
2024-05-27 20:35:27 -03:00
Anderson Torres
e1f9afc289 zig_0_11: huge refactor
- migrate it to a dedicated directory, zig/0.11
  - can't migrate to by-name
    - because of undecipherable darwin.apple_sdk_11_0.callPackage
- nixfmt
- add a simple version test
2024-05-27 20:35:27 -03:00
Anderson Torres
5427d85cc7 zig_0_10: huge refactor
- migrate it to a dedicated directory, zig/0.10
  - can't migrate to by-name
    - because of undecipherable darwin.apple_sdk_11_0.callPackage
- nixfmt
- add a simple version test
2024-05-27 20:35:27 -03:00
Anderson Torres
cad194ac57 zig_0_9: huge refactor
- migrate it to a dedicated directory, zig/0.9
  - can't migrate to by-name
    - because of undecipherable darwin.apple_sdk_11_0.callPackage
- nixfmt
- add a simple version test
2024-05-27 20:35:27 -03:00
Anderson Torres
048a15057a zig-shell-completions: migrate to by-name 2024-05-27 20:35:27 -03:00
OPNA2608
0122b82531 zig-shell-completions: unstable-2023-11-18 -> 0-unstable-2023-11-18 2024-05-05 16:22:58 +02:00
Zhong Jianxin
e1b03a0e51 zig.hook: support zig 0.12 2024-04-25 19:41:15 +08:00
Tristan Ross
3b5257d01b zig_0_12: init 2024-04-19 14:24:09 -07:00
zimbatm
2a751800fd zig: add meta.mainProgram 2024-01-02 22:20:30 +01:00
R. Ryantm
7073d808dd zig-shell-completions: unstable-2023-08-17 -> unstable-2023-11-18 2023-12-10 13:13:32 +00:00
Anderson Torres
a49eb940a2 zig: reword setup hook
- Move the huge comment from setup-hook.sh to hook.nix
- Prefix zig in the echoCmd calls
2023-09-09 15:27:11 +00:00
figsoda
3b6bef448e zig.hook: clean up
- remove noop `lib.concatStringsSep`
- reformat `releaseType`
- inline `cpu`
2023-08-22 10:09:56 +00:00
figsoda
fcdf10cd12 zig: restore with lib.maintainers;
This reverts 8315e00d46
2023-08-22 10:09:56 +00:00
Anderson Torres
ebb4d8a13f zig-shell-completions: refactor
- Use rec-less, overlay-style overridable recursive attributes (in effect since
https://github.com/NixOS/nixpkgs/pull/119942);
- Remove nested with (according to
https://nix.dev/anti-patterns/language#with-attrset-expression);
- Add updateScript.
2023-08-22 02:08:01 +00:00
Anderson Torres
fd774bd82b zig.hook: reword 2023-08-22 02:08:01 +00:00
Anderson Torres
b058a2fc29 zig: remove with lib 2023-08-22 02:08:01 +00:00
Aaron Jheng
9182fed84c zig-shell-completions: init at unstable-2023-08-17 2023-08-21 11:36:49 +00:00
figsoda
81b970640e Merge pull request #248252 from figsoda/zig-team 2023-08-13 21:28:26 -04:00
figsoda
d488487336 zig: remove aiotter from maintainers
https://github.com/NixOS/nixpkgs/pull/248252#issuecomment-1674462834
2023-08-11 09:31:40 -04:00
Anderson Torres
643635b58c zig_0_10: rename patches 2023-08-10 10:49:35 +00:00
Anderson Torres
2cb6b63c31 zig_0_9: rename patches 2023-08-10 10:49:35 +00:00
Anderson Torres
dd4925487b zig_0_9: rename file
Because it will not be updated after all.
2023-08-10 10:49:35 +00:00
figsoda
17d404ee80 zig.hook: rename from zigHook
This makes using specific versions of zig easier (without overrides)
2023-08-10 02:37:53 +00:00
figsoda
55a8deab40 zig: maintained by the zig team 2023-08-09 22:22:42 -04:00
figsoda
6acf0bf645 zigHook: support zig 0.11 2023-08-07 10:25:02 +00:00
figsoda
3b74f1205c zig_0_11: init
https://ziglang.org/download/0.11.0/release-notes.html
2023-08-06 02:14:04 +00:00
figsoda
36ca4639d7 zig: introduce generic.nix to remove duplicate code
- zig_0_9: move tests to installCheck
- zig_0_9: set ZIG_GLOBAL_CACHE_DIR instead of HOME
2023-08-06 02:14:04 +00:00
Anderson Torres
9d9af3d49f zigHook: remove badPlatforms
Because zig itself doesn't set it by default.
2023-08-01 10:08:55 +00:00