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

Merge branch 'staging' into staging-next

parents 68c90849 ebcc625c
Loading
Loading
Loading
Loading
+13 −16
Original line number Diff line number Diff line
@@ -46,11 +46,16 @@ rustPlatform.buildRustPackage rec {
}
```

`buildRustPackage` requires either a `cargoHash` (preferred) or a
`cargoSha256` attribute, computed over all crate sources of this package.
`cargoHash` supports [SRI](https://www.w3.org/TR/SRI/) hashes and should be
preferred over `cargoSha256` which was used for traditional Nix SHA-256 hashes.
For example:
`buildRustPackage` requires a `cargoHash` attribute, computed over all crate sources of this package.

::: {.warning}
`cargoSha256` is already deprecated, and is subject to removal in favor of
`cargoHash` which supports [SRI](https://www.w3.org/TR/SRI/) hashes.

If you are still using `cargoSha256`, you can simply replace it with
`cargoHash` and recompute the hash, or convert the original sha256 to SRI
hash using `nix-hash --to-sri --type sha256 "<original sha256>"`.
:::

```nix
{
@@ -58,7 +63,7 @@ For example:
}
```

Exception: If the application has cargo `git` dependencies, the `cargoHash`/`cargoSha256`
Exception: If the application has cargo `git` dependencies, the `cargoHash`
approach will not work, and you will need to copy the `Cargo.lock` file of the application
to nixpkgs and continue with the next section for specifying the options of the `cargoLock`
section.
@@ -76,14 +81,6 @@ then be taken from the failed build. A fake hash can be used for
}
```

For `cargoSha256` you can use:

```nix
{
  cargoSha256 = lib.fakeSha256;
}
```

Per the instructions in the [Cargo Book](https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html)
best practices guide, Rust applications should always commit the `Cargo.lock`
file in git to ensure a reproducible build. However, a few packages do not, and
@@ -98,7 +95,7 @@ directory into a tar.gz archive.
The tarball with vendored dependencies contains a directory with the
package's `name`, which is normally composed of `pname` and
`version`. This means that the vendored dependencies hash
(`cargoHash`/`cargoSha256`) is dependent on the package name and
(`cargoHash`) is dependent on the package name and
version. The `cargoDepsName` attribute can be used to use another name
for the directory of vendored dependencies. For example, the hash can
be made invariant to the version by setting `cargoDepsName` to
@@ -123,7 +120,7 @@ rustPlatform.buildRustPackage rec {

### Importing a `Cargo.lock` file {#importing-a-cargo.lock-file}

Using a vendored hash (`cargoHash`/`cargoSha256`) is tedious when using
Using a vendored hash (`cargoHash`) is tedious when using
`buildRustPackage` within a project, since it requires that the hash
is updated after every change to `Cargo.lock`. Therefore,
`buildRustPackage` also supports vendoring dependencies directly from
+10 −0
Original line number Diff line number Diff line
@@ -228,6 +228,9 @@
- The `services.mxisd` module has been removed as both [mxisd](https://github.com/kamax-matrix/mxisd) and [ma1sd](https://github.com/ma1uta/ma1sd) are not maintained any longer.
  Consequently the package `pkgs.ma1sd` has also been removed.

- `ffmpeg_5` has been removed. Please use the unversioned `ffmpeg`,
  pin a newer version, or if necessary pin `ffmpeg_4` for compatibility.

## Other Notable Changes {#sec-release-24.11-notable-changes}

<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
@@ -236,6 +239,11 @@

- The `stackclashprotection` hardening flag has been added, though disabled by default.

- `cargoSha256` in `rustPlatform.buildRustPackage` has been deprecated in favor
  of `cargoHash` which supports SRI hashes. See
  [buildRustPackage: Compiling Rust applications with Cargo](https://nixos.org/manual/nixpkgs/unstable/#compiling-rust-applications-with-cargo)
  for more information.

- `hareHook` has been added as the language framework for Hare. From now on, it,
  not the `hare` package, should be added to `nativeBuildInputs` when building
  Hare programs.
@@ -267,6 +275,8 @@
  {option}`services.gitlab-runner.services.<name>.authenticationTokenConfigFile` instead of the former
  {option}`services.gitlab-runner.services.<name>.registrationConfigFile` option.

- `iproute2` now has libbpf support.

## Detailed migration information {#sec-release-24.11-migration}

### `sound` options removal {#sec-release-24.11-migration-sound}
+0 −1
Original line number Diff line number Diff line
@@ -33,7 +33,6 @@ with lib;
      fastfetch = super.fastfetch.override { vulkanSupport = false; waylandSupport = false; x11Support = false; };
      ffmpeg = super.ffmpeg.override { ffmpegVariant = "headless"; };
      ffmpeg_4 = super.ffmpeg_4.override { ffmpegVariant = "headless"; };
      ffmpeg_5 = super.ffmpeg_5.override { ffmpegVariant = "headless"; };
      ffmpeg_6 = super.ffmpeg_6.override { ffmpegVariant = "headless"; };
      ffmpeg_7 = super.ffmpeg_7.override { ffmpegVariant = "headless"; };
      # dep of graphviz, libXpm is optional for Xpm support
+2 −2
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ let
    );

  driverPaths = [
    pkgs.addOpenGLRunpath.driverLink
    pkgs.addDriverRunpath.driverLink

    # mesa:
    config.hardware.opengl.package
@@ -84,7 +84,7 @@ in
          {
            opengl.paths = config.hardware.opengl.extraPackages ++ [
              config.hardware.opengl.package
              pkgs.addOpenGLRunpath.driverLink
              pkgs.addDriverRunpath.driverLink
              "/dev/dri"
            ];
          }
+1 −1
Original line number Diff line number Diff line
@@ -403,7 +403,7 @@ in
      path = with pkgs; [
        # unfree:
        # config.boot.kernelPackages.nvidiaPackages.latest.bin
        ffmpeg_5-headless
        ffmpeg-headless
        libva-utils
        procps
        radeontop
Loading