Commit 17d404ee authored by figsoda's avatar figsoda Committed by Anderson Torres
Browse files

zig.hook: rename from zigHook

This makes using specific versions of zig easier (without overrides)
parent a52cccf7
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
# zigHook {#zighook}
# zig.hook {#zig-hook}

[Zig](https://ziglang.org/) is a general-purpose programming language and toolchain for maintaining robust, optimal and reusable software.

In Nixpkgs, `zigHook` overrides the default build, check and install phases.
In Nixpkgs, `zig.hook` overrides the default build, check and install phases.

## Example code snippet {#example-code-snippet}

```nix
{ lib
, stdenv
, zigHook
, zig
}:

stdenv.mkDerivation {
  # . . .

  nativeBuildInputs = [
    zigHook
    zig.hook
  ];

  zigBuildFlags = [ "-Dman-pages=true" ];
@@ -27,7 +27,7 @@ stdenv.mkDerivation {
}
```

## Variables controlling zigHook {#variables-controlling-zighook}
## Variables controlling zig.hook {#variables-controlling-zig-hook}

### `dontUseZigBuild` {#dontUseZigBuild}

@@ -53,7 +53,7 @@ Disables using `zigInstallPhase`.

Controls the flags passed to the install phase.

### Variables honored by zigHook {#variablesHonoredByZigHook}
### Variables honored by zig.hook {#variables-honored-by-zig-hook}

- `prefixKey`
- `dontAddPrefix`
+3 −3
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchFromGitHub
, zigHook
, zig_0_9
}:

stdenv.mkDerivation (finalAttrs: {
@@ -16,7 +16,7 @@ stdenv.mkDerivation (finalAttrs: {
  };

  nativeBuildInputs = [
    zigHook
    zig_0_9.hook
  ];

  meta = {
@@ -24,6 +24,6 @@ stdenv.mkDerivation (finalAttrs: {
    homepage = "https://github.com/benbusby/colorstorm";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ ];
    inherit (zigHook.meta) platforms;
    inherit (zig_0_9.meta) platforms;
  };
})
+2 −2
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
, util-linux
, xwininfo
, zenity
, zigHook
, zig_0_10
}:

stdenv.mkDerivation (finalAttrs: {
@@ -33,7 +33,7 @@ stdenv.mkDerivation (finalAttrs: {

  nativeBuildInputs = [
    pkg-config
    zigHook
    zig_0_10.hook
    makeWrapper
  ];

+3 −3
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
, pkg-config
, river
, wayland
, zigHook
, zig_0_9
}:

stdenv.mkDerivation (finalAttrs: {
@@ -23,7 +23,7 @@ stdenv.mkDerivation (finalAttrs: {
    pkg-config
    river
    wayland
    zigHook
    zig_0_9.hook
  ];

  meta = with lib; {
@@ -42,6 +42,6 @@ stdenv.mkDerivation (finalAttrs: {
    changelog = "https://git.sr.ht/~novakane/rivercarro/refs/v${finalAttrs.version}";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ kraem ];
    inherit (zigHook.meta) platforms;
    inherit (zig_0_9.meta) platforms;
  };
})
+2 −2
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@
, scdoc
, wayland
, wayland-protocols
, zigHook
, zig_0_10
}:

stdenv.mkDerivation (finalAttrs: {
@@ -26,7 +26,7 @@ stdenv.mkDerivation (finalAttrs: {
    pkg-config
    scdoc
    wayland
    zigHook
    zig_0_10.hook
  ];

  buildInputs = [
Loading