Commit graph

40 commits

Author SHA1 Message Date
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
Michael Reilly 84cf00f980
treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
Mario Rodas 9e522a736d
zig: 0.4.0 -> 0.5.0
Release Notes: https://ziglang.org/download/0.5.0/release-notes.html
2019-09-30 20:00:00 -05:00
Will Dietz 1a8328b126 zig: 0.3.0 -> 0.4.0
Bump to use LLVM8, but just guessing ;).
2019-04-09 00:51:35 -05:00
Andrew Kelley f2fe5f7709
zig: 0.2.0 -> 0.3.0 2018-09-29 15:18:57 -04:00
Andrew Kelley dc3b791854 zig: 0.1.1 -> 0.2.0 2018-03-20 13:32:10 -04:00
Daiderd Jordan db7e0aeb42
llvm-packages: cleanup 2018-02-06 23:38:46 +01:00
Andrew Kelley 835201e814 zig: init at 0.1.1 2017-10-21 12:45:54 -04:00