Skip to content

Commit

Permalink
Merge branch 'staging' into staging-next
Browse files Browse the repository at this point in the history
  • Loading branch information
vcunat committed Dec 4, 2024
2 parents fa74d5d + d1b7f8c commit 3f0a5da
Show file tree
Hide file tree
Showing 693 changed files with 7,517 additions and 13,654 deletions.
4 changes: 2 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ insert_final_newline = false
# see https://nixos.org/nixpkgs/manual/#chap-conventions

# Match json/lockfiles/markdown/nix/perl/python/ruby/shell/docbook files, set indent to spaces
[*.{json,lock,md,nix,pl,pm,py,rb,sh,xml}]
[*.{bash,json,lock,md,nix,pl,pm,py,rb,sh,xml}]
indent_style = space

# Match docbook files, set indent width of one
Expand All @@ -36,7 +36,7 @@ indent_size = 1
indent_size = 2

# Match perl/python/shell scripts, set indent width of four
[*.{pl,pm,py,sh}]
[*.{bash,pl,pm,py,sh}]
indent_size = 4

# Match gemfiles, set indent to spaces with width of two
Expand Down
36 changes: 34 additions & 2 deletions doc/languages-frameworks/vim.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,16 +234,48 @@ Finally, there are some plugins that are also packaged in nodePackages because t

### Testing Neovim plugins {#testing-neovim-plugins}

`nvimRequireCheck=MODULE` is a simple test which checks if Neovim can requires the lua module `MODULE` without errors. This is often enough to catch missing dependencies.
#### neovimRequireCheck {#testing-neovim-plugins-neovim-require-check}
`neovimRequireCheck` is a simple test which checks if Neovim can requires lua modules without errors. This is often enough to catch missing dependencies.

This can be manually added through plugin definition overrides in the [overrides.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/overrides.nix).
It accepts a single string for a module, or a list of module strings to test.
- `nvimRequireCheck = MODULE;`
- `nvimRequireCheck = [ MODULE1 MODULE2 ];`

When `neovimRequireCheck` is not specified, we will search the plugin's directory for lua modules to attempt loading. This quick smoke test can catch obvious dependency errors that might be missed.
The check hook will fail the build if any failures are detected to encourage inspecting the logs to identify potential issues.

If you would like to only check a specific module, this can be manually added through plugin definition overrides in the [overrides.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/overrides.nix).

```nix
gitsigns-nvim = super.gitsigns-nvim.overrideAttrs {
dependencies = [ self.plenary-nvim ];
nvimRequireCheck = "gitsigns";
};
```
Some plugins will have lua modules that require a user configuration to function properly or can contain optional lua modules that we dont want to test requiring.
We can skip specific modules using `nvimSkipModule`. Similar to `nvimRequireCheck`, it accepts a single string or a list of strings.
- `nvimSkipModule = MODULE;`
- `nvimSkipModule = [ MODULE1 MODULE2 ];`

```nix
asyncrun-vim = super.asyncrun-vim.overrideAttrs {
nvimSkipModule = [
# vim plugin with optional toggleterm integration
"asyncrun.toggleterm"
"asyncrun.toggleterm2"
];
};
```

In rare cases, we might not want to actually test loading lua modules for a plugin. In those cases, we can disable `neovimRequireCheck` with `doCheck = false;`.

This can be manually added through plugin definition overrides in the [overrides.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/overrides.nix).
```nix
vim-test = super.vim-test.overrideAttrs {
# Vim plugin with a test lua file
doCheck = false;
};
```

### Plugin optional configuration {#vim-plugin-required-snippet}

Expand Down
3 changes: 3 additions & 0 deletions doc/redirects.json
Original file line number Diff line number Diff line change
Expand Up @@ -3760,6 +3760,9 @@
"testing-neovim-plugins": [
"index.html#testing-neovim-plugins"
],
"testing-neovim-plugins-neovim-require-check": [
"index.html#testing-neovim-plugins-neovim-require-check"
],
"vim-plugin-required-snippet": [
"index.html#vim-plugin-required-snippet"
],
Expand Down
37 changes: 15 additions & 22 deletions doc/stdenv/platform-notes.chapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,31 +87,24 @@ When that happens, the one with the highest version is always used.

The following is a list of Xcode versions, the SDK version in Nixpkgs, and the attribute to use to add it.
Check your package’s documentation (platform support or installation instructions) to find which Xcode or SDK version to use.
Generally, only the last SDK release for a major version is packaged (each _x_ in 10._x_ until 10.15 is considered a major version).

| Xcode version | SDK version | Nixpkgs attribute |
|--------------------|---------------------------------------------------|-------------------|
| Varies by platform | 10.12.2 (x86_64-darwin)<br/>11.3 (aarch64-darwin) | `apple-sdk` |
| 8.0–8.3.3 | 10.12.2 | `apple-sdk_10_12` |
| 9.0–9.4.1 | 10.13.2 | `apple-sdk_10_13` |
| 10.0–10.3 | 10.14.6 | `apple-sdk_10_14` |
| 11.0–11.7 | 10.15.6 | `apple-sdk_10_15` |
| 12.0–12.5.1 | 11.3 | `apple-sdk_11` |
| 13.0–13.4.1 | 12.3 | `apple-sdk_12` |
| 14.0–14.3.1 | 13.3 | `apple-sdk_13` |
| 15.0–15.4 | 14.4 | `apple-sdk_14` |
| 16.0 | 15.0 | `apple-sdk_15` |
Generally, only the last SDK release for a major version is packaged.

| Xcode version | SDK version | Nixpkgs attribute |
|--------------------|--------------------|------------------------------|
| 12.0–12.5.1 | 11.3 | `apple-sdk_11` / `apple-sdk` |
| 13.0–13.4.1 | 12.3 | `apple-sdk_12` |
| 14.0–14.3.1 | 13.3 | `apple-sdk_13` |
| 15.0–15.4 | 14.4 | `apple-sdk_14` |
| 16.0 | 15.0 | `apple-sdk_15` |


#### Darwin Default SDK versions {#sec-darwin-troubleshooting-darwin-defaults}

The current default versions of the deployment target (minimum version) and SDK are indicated by Darwin-specific attributes on the platform. Because of the ways that minimum version and SDK can be changed that are not visible to Nix, they should be treated as lower bounds.
The current default version of the SDK and deployment target (minimum supported version) are indicated by the Darwin-specific platform attributes `darwinSdkVersion` and `darwinMinVersion`.
Because of the ways that minimum version and SDK can be changed that are not visible to Nix, they should be treated as lower bounds.
If you need to parameterize over a specific version, create a function that takes the version as a parameter instead of relying on these attributes.

- `darwinMinVersion` defaults to 10.12 on x86_64-darwin and 11.0 on aarch64-darwin.
It sets the default deployment target.
- `darwinSdkVersion` defaults to 10.12 on x86-64-darwin and 11.0 on aarch64-darwin.
Only the major version determines the SDK version, resulting in the 10.12.2 and 11.3 SDKs being used on these platforms respectively.
On macOS, the `darwinMinVersion` and `darwinSdkVersion` are always the same, and are currently set to 11.3.


#### `xcrun` cannot find a binary {#sec-darwin-troubleshooting-xcrun}
Expand Down Expand Up @@ -264,10 +257,10 @@ The legacy SDK provided two ways of overriding the default SDK.
These are both being phased out along with the legacy SDKs.
They have been updated to set up the new SDK for you, but you should replace them with doing that directly.

- `pkgs.darwin.apple_sdk_11_0.callPackage` - this pattern was used to provide frameworks from the 11.0 SDK.
It now adds the `apple-sdk_11` package to your derivation’s build inputs.
- `pkgs.darwin.apple_sdk_11_0.callPackage` - this pattern was used to provide frameworks from the macOS 11 SDK.
It is now the same as `callPackage`.
- `overrideSDK` - this stdenv adapter would try to replace the frameworks used by your derivation and its transitive dependencies.
It now adds the `apple-sdk_11` package for `11.0` or the `apple-sdk_12` package for `12.3`.
It now adds the `apple-sdk_12` package for `12.3` and does nothing for `11.0`.
If `darwinMinVersion` is specified, it will add `darwinMinVersionHook` with the specified minimum version.
No other SDK versions are supported.

Expand Down
4 changes: 2 additions & 2 deletions lib/systems/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ let
else null;
# The canonical name for this attribute is darwinSdkVersion, but some
# platforms define the old name "sdkVer".
darwinSdkVersion = final.sdkVer or (if final.isAarch64 then "11.0" else "10.12");
darwinSdkVersion = final.sdkVer or "11.3";
darwinMinVersion = final.darwinSdkVersion;
darwinMinVersionVariable =
if final.isMacOS then "MACOSX_DEPLOYMENT_TARGET"
Expand Down Expand Up @@ -293,7 +293,7 @@ let
# to an emulator program. That is, if an emulator requires additional
# arguments, a wrapper should be used.
if pkgs.stdenv.hostPlatform.canExecute final
then "${pkgs.execline}/bin/exec"
then lib.getExe (pkgs.writeShellScriptBin "exec" ''exec "$@"'')
else if final.isWindows
then "${wine}/bin/wine${optionalString (final.parsed.cpu.bits == 64) "64"}"
else if final.isLinux && pkgs.stdenv.hostPlatform.isLinux && final.qemuArch != null
Expand Down
86 changes: 43 additions & 43 deletions maintainers/scripts/bootstrap-files/refresh-tarballs.bash
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ Synopsis:
This is usually done in the following cases:
1. Single target fix: current bootstrap files for a single target
are problematic for some reason (target-specific bug). In this
case we can refresh just that target as:
are problematic for some reason (target-specific bug). In this
case we can refresh just that target as:
\$ $0 --commit --targets=i686-unknown-linux-gnu
\$ $0 --commit --targets=i686-unknown-linux-gnu
2. Routine refresh: all bootstrap files should be refreshed to avoid
debugging problems that only occur on very old binaries.
debugging problems that only occur on very old binaries.
\$ $0 --commit --all-targets
\$ $0 --commit --all-targets
To get help on uploading refreshed binaries to 'tarballs.nixos.org'
please have a look at <maintainers/scripts/bootstrap-files/README.md>.
Expand Down Expand Up @@ -232,50 +232,50 @@ for target in "${targets[@]}"; do
# - build time: ${build_time}
{
EOF
for p in "${outpath}/on-server"/*; do
fname=$(basename "$p")
fnames+=("$fname")
case "$fname" in
bootstrap-tools.tar.xz) attr=bootstrapTools ;;
busybox) attr=$fname ;;
unpack.nar.xz) attr=unpack ;;
*) die "Don't know how to map '$fname' to attribute name. Please update me."
esac

executable_arg=
executable_nix=
if [[ -x "$p" ]]; then
executable_arg="--executable"
executable_nix="executable = true;"
fi
unpack_nix=
name_nix=
if [[ $fname = *.nar.xz ]]; then
unpack_nix="unpack = true;"
name_nix="name = \"${fname%.nar.xz}\";"
sri=$(nar_sri_get "$p" "${fname%.nar.xz}")
[[ $? -ne 0 ]] && die "Failed to get hash of '$p'"
else
sha256=$(nix-prefetch-url $executable_arg --name "$fname" "file://$p")
[[ $? -ne 0 ]] && die "Failed to get the hash for '$p'"
sri=$(nix-hash --to-sri "sha256:$sha256")
[[ $? -ne 0 ]] && die "Failed to convert '$sha256' hash to an SRI form"
fi

# individual file entries
cat <<EOF
$attr = import <nix/fetchurl.nix> {
for p in "${outpath}/on-server"/*; do
fname=$(basename "$p")
fnames+=("$fname")
case "$fname" in
bootstrap-tools.tar.xz) attr=bootstrapTools ;;
busybox) attr=$fname ;;
unpack.nar.xz) attr=unpack ;;
*) die "Don't know how to map '$fname' to attribute name. Please update me."
esac

executable_arg=
executable_nix=
if [[ -x "$p" ]]; then
executable_arg="--executable"
executable_nix="executable = true;"
fi
unpack_nix=
name_nix=
if [[ $fname = *.nar.xz ]]; then
unpack_nix="unpack = true;"
name_nix="name = \"${fname%.nar.xz}\";"
sri=$(nar_sri_get "$p" "${fname%.nar.xz}")
[[ $? -ne 0 ]] && die "Failed to get hash of '$p'"
else
sha256=$(nix-prefetch-url $executable_arg --name "$fname" "file://$p")
[[ $? -ne 0 ]] && die "Failed to get the hash for '$p'"
sri=$(nix-hash --to-sri "sha256:$sha256")
[[ $? -ne 0 ]] && die "Failed to convert '$sha256' hash to an SRI form"
fi

# individual file entries
cat <<EOF
$attr = import <nix/fetchurl.nix> {
url = "http://tarballs.nixos.org/${s3_prefix}/${nixpkgs_revision}/$fname";
hash = "${sri}";$(
[[ -n ${executable_nix} ]] && printf "\n %s" "${executable_nix}"
[[ -n ${name_nix} ]] && printf "\n %s" "${name_nix}"
[[ -n ${unpack_nix} ]] && printf "\n %s" "${unpack_nix}"
)
};
)
};
EOF
done
# footer
cat <<EOF
done
# footer
cat <<EOF
}
EOF
} > "${target_file}"
Expand Down
13 changes: 12 additions & 1 deletion nixos/doc/manual/release-notes/rl-2505.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,19 @@

<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->

- The default PHP version has been updated to 8.3.
- **This release of Nixpkgs requires macOS Big Sur 11.3 or newer, as announced in the 24.11 release notes.**
We cannot guarantee that packages will continue to work on older versions of macOS.
Future Nixpkgs releases will only support [macOS versions supported by Apple](https://endoflife.date/macos); this means that **Nixpkgs 25.11 will require macOS Sonoma 14 or newer**.
Users on old macOS versions should consider upgrading to a supported version (potentially using [OpenCore Legacy Patcher](https://dortania.github.io/OpenCore-Legacy-Patcher/) for old hardware) or installing NixOS.
If neither of those options are viable and you require new versions of software, [MacPorts](https://www.macports.org/) supports versions back to Mac OS X Snow Leopard 10.6.

- GCC has been updated from GCC 13 to GCC 14.
This introduces some backwards‐incompatible changes; see the [upstream porting guide](https://gcc.gnu.org/gcc-14/porting_to.html) for details.

- LLVM has been updated from LLVM 16 (on Darwin) and LLVM 18 (on other platforms) to LLVM 19.
This introduces some backwards‐incompatible changes; see the [upstream release notes](https://releases.llvm.org/) for details.

- The default PHP version has been updated to 8.3.
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->

## New Modules {#sec-release-25.05-new-modules}
Expand Down
7 changes: 1 addition & 6 deletions nixos/modules/services/video/frigate.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ let
filterAttrsRecursive
hasPrefix
makeLibraryPath
match
mkDefault
mkEnableOption
mkPackageOption
Expand Down Expand Up @@ -108,10 +107,6 @@ let
withCoralUSB = any (d: d.type == "edgetpu" && hasPrefix "usb" d.device or "") detectors;
withCoralPCI = any (d: d.type == "edgetpu" && hasPrefix "pci" d.device or "") detectors;
withCoral = withCoralPCI || withCoralUSB;

# Provide ffmpeg-full for NVIDIA hardware acceleration
ffmpegArgs = cfg.settings.ffmpeg.hwaccel_args or "";
ffmpeg' = if match "/nvidia/" ffmpegArgs != null then pkgs.ffmpeg-full else pkgs.ffmpeg-headless;
in

{
Expand Down Expand Up @@ -571,7 +566,7 @@ in
path = with pkgs; [
# unfree:
# config.boot.kernelPackages.nvidiaPackages.latest.bin
ffmpeg'
ffmpeg-headless
libva-utils
procps
radeontop
Expand Down
2 changes: 1 addition & 1 deletion nixos/tests/prometheus-exporters.nix
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ let
succeed(
'echo \'${postData}\'> /tmp/data.json'
)
succeed('sed -ie "s DATE $(date +%s) " /tmp/data.json')
succeed('sed -i -e "s DATE $(date +%s) " /tmp/data.json')
succeed(
"curl -sSfH 'Content-Type: application/json' -X POST --data @/tmp/data.json localhost:9103/collectd"
)
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/audio/fluidsynth/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

stdenv.mkDerivation rec {
pname = "fluidsynth";
version = "2.3.6";
version = "2.3.7";

src = fetchFromGitHub {
owner = "FluidSynth";
repo = "fluidsynth";
rev = "v${version}";
hash = "sha256-bmA4eUh7MC4dXPsOOi9Q5jneSE5OGUWrztv+46LxaW0=";
hash = "sha256-4Jn8pyVPrTPYZGdPZB+8guxTbD6s/1OpmLJlioDQFMA=";
};

outputs = [ "out" "dev" "man" ];
Expand Down
16 changes: 9 additions & 7 deletions pkgs/applications/audio/fmit/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ mkDerivation rec {
substituteInPlace fmit.pro --replace '$$FMITVERSIONGITPRO' '${version}'
'';

preConfigure = ''
qmakeFlags="$qmakeFlags \
CONFIG+=${lib.optionalString alsaSupport "acs_alsa"} \
CONFIG+=${lib.optionalString jackSupport "acs_jack"} \
CONFIG+=${lib.optionalString portaudioSupport "acs_portaudio"} \
PREFIXSHORTCUT=$out"
'';
qmakeFlags = [
"PREFIXSHORTCUT=${placeholder "out"}"
] ++ lib.optionals alsaSupport [
"CONFIG+=acs_alsa"
] ++ lib.optionals jackSupport [
"CONFIG+=acs_jack"
] ++ lib.optionals portaudioSupport [
"CONFIG+=acs_portaudio"
];

meta = with lib; {
description = "Free Musical Instrument Tuner";
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/audio/mpg123/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ assert withConplay -> !libOnly;

stdenv.mkDerivation rec {
pname = "${lib.optionalString libOnly "lib"}mpg123";
version = "1.32.8";
version = "1.32.9";

src = fetchurl {
url = "mirror://sourceforge/mpg123/mpg123-${version}.tar.bz2";
hash = "sha256-/u4TdMeVQODkBd8LxF/eIK1nARQlw2GidZ4hRolKJ6c=";
hash = "sha256-A7YeQATpYLrPKs2toD7ZTTduaqsnpgFEe9SQjYQHspE=";
};

outputs = [ "out" "dev" "man" ] ++ lib.optional withConplay "conplay";
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/audio/snapcast/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ stdenv, lib, fetchFromGitHub, cmake, pkg-config
, alsa-lib, asio, avahi, boost179, flac, libogg, libvorbis, libopus, soxr
, alsa-lib, asio, avahi, boost, flac, libogg, libvorbis, libopus, soxr
, IOKit, AudioToolbox
, aixlog, popl
, pulseaudioSupport ? false, libpulseaudio
Expand All @@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
# snapcast also supports building against tremor but as we have libogg, that's
# not needed
buildInputs = [
boost179
boost
asio avahi flac libogg libvorbis libopus
aixlog popl soxr
] ++ lib.optional pulseaudioSupport libpulseaudio
Expand Down
Loading

0 comments on commit 3f0a5da

Please sign in to comment.