Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Set up zig
uses: mlugg/setup-zig@v2
with:
version: 0.16.0-dev.2471+e9eadee00
version: 0.16.0

- uses: DeterminateSystems/nix-installer-action@main

Expand All @@ -31,14 +31,14 @@ jobs:
- name: Run executable on zls
run: |
git clone https://github.com/zigtools/zls
nix run .#overlay_0_16 -- zls
nix run . -- zls
nix run .# -- zls
nix run .# -- zls

- name: Run integration tests for issue 60
run: |
nix --version
nix run .#overlay_0_16_debug -- fixtures/integrationtest/issue60-1-build.zig.zon
nix run .#overlay_0_16_debug -- fixtures/integrationtest/issue60-2-build.zig.zon
nix run .# -- fixtures/integrationtest/issue60-1-build.zig.zon
nix run .# -- fixtures/integrationtest/issue60-2-build.zig.zon

format:
name: format
Expand All @@ -50,7 +50,7 @@ jobs:
- name: Set up zig
uses: mlugg/setup-zig@v2
with:
version: 0.16.0-dev.2471+e9eadee00
version: 0.16.0

- name: Check formatting
run: zig fmt --check .
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ To use the generated file, add this to your Nix expression:

```nix
postPatch = ''
ln -s ${callPackage ./deps.nix { }} $ZIG_GLOBAL_CACHE_DIR/p
# For Zig version < 0.16.0, uncomment the following line
# ln -s ${callPackage ./deps.nix { }} $ZIG_GLOBAL_CACHE_DIR/p
# For Zig version >= 0.16.0
ln -s ${pkgs.callPackage ./nix/deps.nix { }} zig-pkg
'';
```

Expand Down
80 changes: 4 additions & 76 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 5 additions & 39 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
inputs.nixpkgs-lib.follows = "nixpkgs";
};
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
zig-overlay = {
url = "github:mitchellh/zig-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};

outputs =
Expand Down Expand Up @@ -38,48 +34,18 @@
let
inherit (pkgs)
callPackage
zigpkgs
zig_0_13
zig_0_14
zig_0_15
zig_0_16
;
zig_0_16 = zigpkgs.master-2026-02-03;
zig_0_16_for_overlay = zig_0_16.overrideAttrs (
f: p: {
passthru.hook = callPackage "${inputs.nixpkgs}/pkgs/development/compilers/zig/hook.nix" {
zig = pkgs.lib.recursiveUpdate f.finalPackage {
# Aparantly, `platforms` and `maintainers` are missing from the nightly. We use the ones
# from 0.14, assuming that the values are the same.
meta = { inherit (zig_0_14.meta) platforms maintainers; };
};
};
}
);
in
{
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
overlays = [
inputs.zig-overlay.overlays.default
];
config = { };
};

packages = {
default = callPackage ./nix/package.nix {
zig = zigpkgs.master.overrideAttrs (
f: p: {
inherit (zig_0_14) meta;

passthru.hook = callPackage "${inputs.nixpkgs}/pkgs/development/compilers/zig/hook.nix" {
zig = f.finalPackage;
};
}
);
};
default_0_14 = callPackage ./nix/package.nix { zig = zig_0_14; };
default = callPackage ./nix/package.nix { zig = zig_0_16; };
default_0_13 = callPackage ./nix/package.nix { zig = zig_0_13; };
overlay_0_16 = callPackage ./nix/package.nix { zig = zig_0_16_for_overlay; };
overlay_0_16_debug = callPackage ./nix/package.nix { zig = zig_0_16_for_overlay; debug = true; };
default_0_14 = callPackage ./nix/package.nix { zig = zig_0_14; };
default_0_15 = callPackage ./nix/package.nix { zig = zig_0_15; };
};
};
};
Expand Down
2 changes: 1 addition & 1 deletion nix/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ stdenv.mkDerivation {
src = ../.;

nativeBuildInputs = [
zig.hook
zig
];

zigBuildFlags = [
Expand Down
Loading