Commit Graph

48 Commits

Author SHA1 Message Date
Ethan Carter Edwards
f6797be0ba zig: add meta.donationPage
Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
2026-06-01 00:37:41 -07:00
Jost Alemann
1373ce18ab zig: set __structuredAttrs 2026-04-17 10:32:56 +02:00
Marcin Serwin
68e44b479f maintainers: drop andrewrk
Signed-off-by: Marcin Serwin <marcin@serwin.dev>
2026-02-03 20:19:10 +01:00
Fernando Rodrigues
3562403503 treewide: fetchFromGitea -> fetchFromCodeberg
Most packages that used fetchFromGitea fetch their sources from Codeberg, so might as well migrate them.

The following command was used for this treewide:
```fish
for i in (rg 'fetchFromGitea \{\n *domain = "codeberg.org";' --multiline --files-with-matches)
    sed -z 's/fetchFromGitea {\n *domain = "codeberg.org";/fetchFromCodeberg {/g' $i > $i.tmp && mv $i.tmp $i
    sed -i 's/fetchFromGitea/fetchFromCodeberg/g' $i
end
```

The following paths were manually edited:

* pkgs/by-name/xr/xrsh/package.nix
* pkgs/applications/networking/browsers/librewolf/src.nix
* pkgs/by-name/go/gotosocial/package.nix
* pkgs/by-name/ka/katawa-shoujo-re-engineered/package.nix

Co-authored-by: Gutyina Gergő <gutyina.gergo.2@gmail.com>
Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
2026-01-31 21:08:16 +11:00
Jared Baur
1dfa285940 zig: use setupHook attribute on zig derivation
By moving the zig setup hook to the zig derivation itself, we allow for
zig to splice correctly with `callPackage`, meaning that the correct zig
can be pulled in during builds when zig is in `nativeBuildInputs` (for
example).

This change retains the `zig.hook` attribute for backward compatibility
by just pointing to the zig derivation. This also removes
`zig_default_flags`, since now the setup hook is not a derivation that
can be overridden. Overriding the build flags can now be done by setting
`dontSetZigDefaultFlags = true`.
2026-01-09 14:07:46 -08:00
Jost Alemann
3b685976b2 zig{-shell-completions}: source from codeberg
Zig has migrated from GitHub to Codeberg as described in this blog post:
https://ziglang.org/news/migrating-from-github-to-codeberg/
2025-11-27 10:44:20 +01:00
Sirio Balmelli
8fe447f8cc zig: 0.15.2 build no longer broken on x86_64-darwin
Signed-off-by: Sirio Balmelli <sirio@b-ad.ch>
2025-10-28 14:03:04 +01:00
Jost Alemann
bc725b12b2 zig: 0.14.1 -> 0.15.1
make zig use the latest release 0.15.1 / zig_0_15 by default
Release Notes: https://ziglang.org/download/0.15.1/release-notes.html
Diff: https://github.com/ziglang/zig/compare/0.14.1...0.15.1

Pinned existing packages that were not already pinned to zig_0_14 i.e. the previous default if they failed to build with zig_0_15

Dropped `backlight-auto` as it requires the already dropped zig_0_12 (see the comment in the meta section)
2025-09-07 23:08:10 +02:00
Jared Baur
ac8bce6bc1 zig: remove unused arg 2025-08-19 06:36:27 -07:00
Emily
ba90f3c54c zig_0_12: drop 2025-08-18 06:50:56 +01:00
Wolfgang Walther
5a0711127c treewide: run nixfmt 1.0.0 2025-07-24 13:55:40 +02:00
Tristan Ross
bac3beb820 zig: move passthru into a separate file 2025-06-06 11:42:49 -07:00
Tristan Ross
17acc11187 zig: misc Darwin fixes (#389137) 2025-06-05 08:55:48 -07:00
Tristan Ross
4aadd44044 zig: fix cc and bintools 2025-05-30 18:12:26 -07:00
Fernando Rodrigues
05580f4b44 treewide: switch instances of lib.teams.*.members to the new meta.teams attribute
Follow-up to #394797.

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
2025-04-25 22:20:17 -03:00
Tristan Ross
d2e95d833d zig: drop 0.11, use ninja (#397597) 2025-04-19 11:35:03 -07:00
Alex James
82493b30a0 zig: remove SystemVersion.plist from Darwin __impureHostDeps
[The default Nix sandbox profile already allows access to
SystemVersion.plist][1]. Drop it from `__impureHostDeps` as this is
redundant.

[1]: cacab33f0d/src/libstore/unix/build/sandbox-defaults.sb (L39-L42)
2025-04-13 14:02:55 -05:00
Alex James
88ef9cf994 zig: unconditionally enable strictDeps
strictDeps works with Clang after #318226.
2025-04-13 14:02:55 -05:00
Tristan Ross
6b2f93bd85 zig_0_11: drop 2025-04-09 23:12:27 -07:00
Tristan Ross
8f517fbfb4 zig: use ninja 2025-04-09 22:34:52 -07:00
K900
f42e00d66e Merge remote-tracking branch 'origin/master' into staging-next 2025-04-08 10:29:26 +03:00
Winter
a19cd4ffb1 Revert "treewide: replace rev with tag"
This reverts commit 65a333600d.

This wasn't tested for correctness with something like fodwatch [0],
and should not have been (self-)merged so quickly, especially without
further review.

It also resulted in the breakage of at least one package [1] (and that's
the one we know of and was caught).

A few packages that were updated in between this commit and this revert
were not reverted back to using `rev`, but other than that, this is a
1:1 revert.

[0]: https://codeberg.org/raphaelr/fodwatch
[1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e458
2025-04-08 02:57:25 -04:00
K900
b3146d4446 Merge remote-tracking branch 'origin/master' into staging-next 2025-04-07 21:21:10 +03:00
Pol Dellaiera
65a333600d treewide: replace rev with tag 2025-04-07 16:57:22 +02:00
Emily
61582c7043 lib/systems: use Darwin architecture names for config and uname
`aarch64-apple-darwin` no longer works with LLVM 20.
2025-04-02 21:22:47 +01:00
Jörg Thalheim
4f7495cac2 zig_0_11: mark as broken
See this error:

The following command exited with code 1:
/build/source/build/stage3/bin/zig test
docgen_tmp/test_noreturn_from_exit.zig -target x86_64-windows
--test-no-exec
../doc/langref.html.in:5198:25: error: test failed
      {#target_windows#}

Generating docgen examples [1872/5411] error: ParseError
/build/source/tools/docgen.zig:1864:17: 0x2a4c5f in exec (docgen)
                return error.ChildExitError;
                ^
/build/source/tools/docgen.zig:289:5: 0x2c023e in parseError__anon_6779
(docgen)
    return error.ParseError;
    ^
/build/source/tools/docgen.zig:1585:29: 0x2b7d4d in genHtml__anon_4842
(docgen)
                            return parseError(tokenizer,
code.source_token, "test failed", .{});
                            ^
/build/source/tools/docgen.zig:106:5: 0x2c44b8 in main (docgen)
    try genHtml(allocator, &tokenizer, &toc, buffered_writer.writer(),
zig_exe, opt_zig_lib_dir, do_code_tests);
    ^
2025-03-31 21:49:07 +02:00
Tristan Ross
96c2125a8c zig: 0.13 -> 0.14 2025-03-04 19:11:04 -08:00
Niklas Korz
90cf03cc56 zig: refactor system env substitution 2025-02-06 16:26:33 +01:00
Niklas Korz
0ae3ecb356 zig: fix darwin SDK lookup 2025-02-06 16:26:33 +01:00
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
3fc45e16ab zig: commonify 2025-01-26 22:10:42 -08: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
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
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
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
figsoda
fcdf10cd12 zig: restore with lib.maintainers;
This reverts 8315e00d46
2023-08-22 10:09:56 +00:00
Anderson Torres
b058a2fc29 zig: remove with lib 2023-08-22 02:08:01 +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
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
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