Unverified Commit 025b892d authored by github-actions[bot]'s avatar github-actions[bot] Committed by GitHub
Browse files

Merge staging-next into staging

parents c9039a01 e1e1a2b5
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_0_11
}:

stdenv.mkDerivation {
  # . . .

  nativeBuildInputs = [
    zigHook
    zig_0_11.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`
+6 −0
Original line number Diff line number Diff line
@@ -12428,6 +12428,12 @@
    githubId = 15707703;
    name = "Helmi Nour";
  };
  nrhtr = {
    email = "jeremy@jenga.xyz";
    github = "nrhtr";
    githubId = 74261;
    name = "Jeremy Parker";
  };
  nshalman = {
    email = "nahamu@gmail.com";
    github = "nshalman";
+0 −1
Original line number Diff line number Diff line
@@ -97,7 +97,6 @@ in
  };

  config = mkIf (cfg.provider != "libc") {
    boot.kernel.sysctl."vm.max_map_count" = mkIf (cfg.provider == "graphene-hardened") (mkDefault 1048576); # TODO: Default vm.max_map_count has been increased system-wide
    environment.etc."ld-nix.so.preload".text = ''
      ${providerLibPath}
    '';
+13 −1
Original line number Diff line number Diff line
@@ -27,7 +27,10 @@ let
    ${cfg.extraConfig}
  '';

  chronyFlags = [ "-n" "-m" "-u" "chrony" "-f" "${configFile}" ] ++ cfg.extraFlags;
  chronyFlags =
    [ "-n" "-u" "chrony" "-f" "${configFile}" ]
    ++ optional cfg.enableMemoryLocking "-m"
    ++ cfg.extraFlags;
in
{
  options = {
@@ -73,6 +76,15 @@ in
        '';
      };

      enableMemoryLocking = mkOption {
        type = types.bool;
        default = config.environment.memoryAllocator.provider != "graphene-hardened";
        defaultText = ''config.environment.memoryAllocator.provider != "graphene-hardened"'';
        description = lib.mdDoc ''
          Whether to add the `-m` flag to lock memory.
        '';
      };

      enableNTS = mkOption {
        type = types.bool;
        default = false;
+1 −0
Original line number Diff line number Diff line
@@ -167,6 +167,7 @@ in {
  cgit = handleTest ./cgit.nix {};
  charliecloud = handleTest ./charliecloud.nix {};
  chromium = (handleTestOn ["aarch64-linux" "x86_64-linux"] ./chromium.nix {}).stable or {};
  chrony = handleTestOn ["aarch64-linux" "x86_64-linux"] ./chrony.nix {};
  chrony-ptp = handleTestOn ["aarch64-linux" "x86_64-linux"] ./chrony-ptp.nix {};
  cinnamon = handleTest ./cinnamon.nix {};
  cjdns = handleTest ./cjdns.nix {};
Loading