Commit Graph

57 Commits

Author SHA1 Message Date
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
Anderson Torres
a85a699e40 zigHook: init
A setup hook for using the Zig compiler in Nixpkgs.

*Warning*: the setup-hook shell script was linted with shellcheck!
2023-08-01 10:08:55 +00:00
Anderson Torres
d485da9d00 zig_0_10: refactor
- Use rec-less, overlay-style overridable recursive attributes (in effect since
NixOS#119942);
- Add decoration hooks over installCheckPhase
- Use doInstallCheck instead of doCheck.
- Directly sets env.ZIG_GLOBAL_CACHE_DIR instead of using preBuild
- Add meta.changelog
2023-07-08 20:40:38 -03:00
Anderson Torres
cc08d73612 zig_0_9: refactor
- Move zig_0_10_0 to prePatch
- Use rec-less, overlay-style overridable recursive attributes (in effect since
NixOS#119942);
- Add meta.changelog
2023-07-08 20:40:38 -03:00
Jakub Konka
18c80c166f zig: 0.10 fix macOS build
Relevant upstream issue: ziglang/zig#14559

The patch is a backport of fixes that landed in zig-master and can
be removed with zig-0.11 release.

Additionally, make sure we link statically against LLVM to avoid
unpleasant runtime surprises originating from mixing static and
dynamic LLVM libraries.

Finally, unbreak Zig 0.10.1 on macOS.
2023-03-14 14:02:39 +01:00
Dmitry Bogatov
1360d4cc51 zig: build offline documentation 2023-03-05 13:56:53 -05:00
Winter
ac44b254b4 zig_0_9: build with baseline CPU target
26b9a2f4a1 changes Zig 0.10 to build the
compiler (notably *not* its outputs, at least not by default) with
its baseline CPU target, but we should ideally do it for both versions
to increase reproducibility, as well as increase the number of users who
are able to use Hydra-provided Zig binaries.

This also adds a comment above the flag in 0.10, to explain why we're adding
the flag, as we do with the RPATH one.

See https://github.com/NixOS/nixpkgs/issues/214356 and https://github.com/NixOS/nixpkgs/issues/185665
for further context.
2023-02-16 21:59:16 -05:00
Adam Stephens
26b9a2f4a1
zig_0_10: switch to baseline cpu target for better compatibility 2023-02-12 09:22:11 -05:00
Matthew "strager" Glazar
db76c9e04a zig_0_10: init at 0.10.1
On Linux, upgrade Zig to version 0.10.1.

On macOS/Darwin, Zig version 0.10.1 is broken, so keep 0.9.1.

Several Zig-using packages are broken with Zig version 0.10.1, so pin
those packages to Zig version 0.9.1.
2023-01-28 00:01:06 -08:00
Matthew "strager" Glazar
aea9b201cb zig: rename to zig_0_9 to prepare for version 0.10
Several Zig-using packages are broken with a newer version of Zig, and
other packages are blocked on a Zig upgrade.

Prepare for two Zig versions side-by-side by renaming default.nix to
0.9.1.nix.
2023-01-28 00:01:06 -08:00
Weijia Wang
c8df1da271 zig: fix build on darwin 2023-01-04 00:06:36 +01:00
Nguyễn Gia Phong
d2e3b5ba13
zig: fix index out of bounds reading RPATH 2022-08-16 13:05:50 +09:00
Vladimír Čunát
0879ac5da6
Merge branch 'master' into staging-next 2022-07-16 20:07:05 +02:00
aiotter
036b52f824 maintainers: add aiotter 2022-07-16 14:57:54 +09:00
aiotter
98ee102955 zig: build for darwin 2022-07-16 14:57:36 +09:00
Vladimír Čunát
8169a7fce0
Merge branch 'master' into staging-next 2022-07-13 09:57:41 +02:00
zowoq
8b4718e736 zig_0_8_1: remove 2022-07-13 07:46:10 +10:00
Artturin
83b4764dc3 treewide: fix fallout from 'cmake/setup-hook.sh: Don't skip build-RPATH'
f7414e2b3a
2022-07-12 18:25:19 +03:00
AndersonTorres
53578062a4 zig: 0.9.0 -> 0.9.1 2022-02-16 21:29:52 -03:00
Сухарик
d9c13cf44e zig: 0.8.1 -> 0.9.0 2021-12-24 11:56:47 +03:00
AndersonTorres
d559051a1c zig: 0.8.0 -> 0.8.1 2021-09-08 14:50:08 +09:00
AndersonTorres
2dfbbc0266 zig: checks are back! 2021-06-14 13:09:44 -03:00
AndersonTorres
5971dc1aeb zig: 0.7.1 -> 0.8.0
Eliminated the check phase (file $src/test/stage1/behavior.zig not found).
2021-06-04 19:45:16 -03:00
Vladimír Čunát
c48eaa70e3
Merge branch 'master' into staging-next 2021-05-14 22:27:34 +02:00
AndersonTorres
cfd20fa9e1 zig: rewrite
substituteAll is not used anymore.
2021-05-14 00:22:12 -03:00
Jonathan Ringer
7f1726ffca zig: fix llvm build 2021-05-08 18:13:45 -07:00
Ben Siraphob
acc5f7b18a pkgs/development/compilers: stdenv.lib -> lib 2021-01-23 08:57:37 +07:00
Miikka Koskinen
5b95e93e1d zig: 0.6.0 -> 0.7.1 2020-12-24 16:23:17 +02:00
Ben Siraphob
9305c7bf26 zig: mark as broken on darwin 2020-10-08 16:36:44 +07:00
William Roe
d51340f27f zig: fix build
It looks like https://github.com/NixOS/nixpkgs/pull/88248 broke the
build for zig.

The error you get when building zig on the current master branch is:

```
Scanning dependencies of target zig_build_libstage2
: CommandLine Error: Option 'polly' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options
make[2]: *** [CMakeFiles/zig_build_libstage2.dir/build.make:77: CMakeFiles/zig_build_libstage2] Error 1
make[1]: *** [CMakeFiles/Makefile2:252: CMakeFiles/zig_build_libstage2.dir/all] Error 2
make: *** [Makefile:150: all] Error 2
```

The patch that added polly into some build args was likely necessary
only for LLVM 10.0.0 and when that was updated to 10.0.1 it stopped
working or became unnecessary. With this patch removed, zig builds fine
and passes the tests.
2020-08-03 13:17:40 +01:00
Christine Dodrill
24b3158efc zig: apply suggestion from @cole-h 2020-04-13 18:56:41 -04:00
Christine Dodrill
f94bd95368
Update pkgs/development/compilers/zig/default.nix
Co-Authored-By: Andrew Kelley <andrew@ziglang.org>
2020-04-13 18:44:34 -04:00
Christine Dodrill
841089817d development/compilers/zig: upgrade to 0.6.0 2020-04-13 18:37:09 -04:00