Unverified Commit 30e272bc authored by Vladimír Čunát's avatar Vladimír Čunát
Browse files

Merge #216499: staging-next 2023-02-15

parents 5d1eee6c 1af0d67e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@
  This chapter describes several special builders.
 </para>
 <xi:include href="special/fhs-environments.section.xml" />
 <xi:include href="special/makesetuphook.section.xml" />
 <xi:include href="special/mkshell.section.xml" />
 <xi:include href="special/darwin-builder.section.xml" />
</chapter>
+37 −0
Original line number Diff line number Diff line
# pkgs.makeSetupHook {#sec-pkgs.makeSetupHook}

`pkgs.makeSetupHook` is a builder that produces hooks that go in to `nativeBuildInputs`

## Usage {#sec-pkgs.makeSetupHook-usage}

```nix
pkgs.makeSetupHook {
  name = "something-hook";
  propagatedBuildInputs = [ pkgs.commandsomething ];
  depsTargetTargetPropagated = [ pkgs.libsomething ];
} ./script.sh
```

#### setup hook that depends on the hello package and runs hello and @shell@ is substituted with path to bash

```nix
pkgs.makeSetupHook {
    name = "run-hello-hook";
    propagatedBuildInputs = [ pkgs.hello ];
    substitutions = { shell = "${pkgs.bash}/bin/bash"; };
    passthru.tests.greeting = callPackage ./test { };
    meta.platforms = lib.platforms.linux;
} (writeScript "run-hello-hook.sh" ''
    #!@shell@
    hello
'')
```

## Attributes

* `name` Set the name of the hook.
* `propagatedBuildInputs` Runtime dependencies (such as binaries) of the hook.
* `depsTargetTargetPropagated` Non-binary dependencies.
* `meta`
* `passthru`
* `substitutions` Variables for `substituteAll`
+8 −1
Original line number Diff line number Diff line
@@ -213,6 +213,13 @@ rec {
            outputSpecified = true;
            drvPath = assert condition; drv.${outputName}.drvPath;
            outPath = assert condition; drv.${outputName}.outPath;
          } //
            # TODO: give the derivation control over the outputs.
            #       `overrideAttrs` may not be the only attribute that needs
            #       updating when switching outputs.
            lib.optionalAttrs (passthru?overrideAttrs) {
              # TODO: also add overrideAttrs when overrideAttrs is not custom, e.g. when not splicing.
              overrideAttrs = f: (passthru.overrideAttrs f).${outputName};
            };
        };

+2 −0
Original line number Diff line number Diff line
@@ -259,6 +259,8 @@ In addition to numerous new and upgraded packages, this release has the followin

- The new option `services.tailscale.useRoutingFeatures` controls various settings for using Tailscale features like exit nodes and subnet routers. If you wish to use your machine as an exit node, you can set this setting to `server`, otherwise if you wish to use an exit node you can set this setting to `client`. The strict RPF warning has been removed as the RPF will be loosened automatically based on the value of this setting.

- `openjdk` from version 11 and above is not build with `openjfx` (i.e.: JavaFX) support by default anymore. You can re-enable it by overriding, e.g.: `openjdk11.override { enableJavaFX = true; };`.

- [Xastir](https://xastir.org/index.php/Main_Page) can now access AX.25 interfaces via the `libax25` package.

- `tvbrowser-bin` was removed, and now `tvbrowser` is built from source.
+38 −0
Original line number Diff line number Diff line
{
  "context.properties": {},
  "context.modules": [
    {
      "name": "libpipewire-module-rt",
      "args": {
        "nice.level": -11
      },
      "flags": [
        "ifexists",
        "nofail"
      ]
    },
    {
      "name": "libpipewire-module-protocol-native"
    },
    {
      "name": "libpipewire-module-client-node"
    },
    {
      "name": "libpipewire-module-adapter"
    },
    {
      "name": "libpipewire-module-rtp-source",
      "args": {
        "sap.ip": "239.255.255.255",
        "sap.port": 9875,
        "sess.latency.msec": 10,
        "local.ifname": "eth0",
        "stream.props": {
          "media.class": "Audio/Source",
          "node.virtual": false,
          "device.api": "aes67"
        }
      }
    }
  ]
}
Loading