Skip to content

Commit

Permalink
Merge #279139: staging-next-23.11 iteration 2
Browse files Browse the repository at this point in the history
...into release-23.11
vcunat committed Jan 18, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents d722102 + 6f16d3a commit 8ae7c0e
Showing 127 changed files with 2,923 additions and 1,077 deletions.
28 changes: 14 additions & 14 deletions lib/tests/modules.sh
Original file line number Diff line number Diff line change
@@ -24,14 +24,14 @@ evalConfig() {
local attr=$1
shift
local script="import ./default.nix { modules = [ $* ];}"
nix-instantiate --timeout 1 -E "$script" -A "$attr" --eval-only --show-trace --read-write-mode
nix-instantiate --timeout 1 -E "$script" -A "$attr" --eval-only --show-trace --read-write-mode --json
}

reportFailure() {
local attr=$1
shift
local script="import ./default.nix { modules = [ $* ];}"
echo 2>&1 "$ nix-instantiate -E '$script' -A '$attr' --eval-only"
echo 2>&1 "$ nix-instantiate -E '$script' -A '$attr' --eval-only --json"
evalConfig "$attr" "$@" || true
((++fail))
}
@@ -140,7 +140,7 @@ checkConfigOutput '^42$' config.value ./declare-either.nix ./define-value-int-po
checkConfigOutput '^"24"$' config.value ./declare-either.nix ./define-value-string.nix
# types.oneOf
checkConfigOutput '^42$' config.value ./declare-oneOf.nix ./define-value-int-positive.nix
checkConfigOutput '^\[ \]$' config.value ./declare-oneOf.nix ./define-value-list.nix
checkConfigOutput '^\[\]$' config.value ./declare-oneOf.nix ./define-value-list.nix
checkConfigOutput '^"24"$' config.value ./declare-oneOf.nix ./define-value-string.nix

# Check mkForce without submodules.
@@ -320,7 +320,7 @@ checkConfigOutput '^"24"$' config.value ./freeform-attrsOf.nix ./define-value-st
# Shorthand modules interpret `meta` and `class` as config items
checkConfigOutput '^true$' options._module.args.value.result ./freeform-attrsOf.nix ./define-freeform-keywords-shorthand.nix
# No freeform assignments shouldn't make it error
checkConfigOutput '^{ }$' config ./freeform-attrsOf.nix
checkConfigOutput '^{}$' config ./freeform-attrsOf.nix
# but only if the type matches
checkConfigError 'A definition for option .* is not of type .*' config.value ./freeform-attrsOf.nix ./define-value-list.nix
# and properties should be applied
@@ -358,19 +358,19 @@ checkConfigError 'The option .* has conflicting definitions' config.value ./type
checkConfigOutput '^0$' config.value.int ./types-anything/equal-atoms.nix
checkConfigOutput '^false$' config.value.bool ./types-anything/equal-atoms.nix
checkConfigOutput '^""$' config.value.string ./types-anything/equal-atoms.nix
checkConfigOutput '^/$' config.value.path ./types-anything/equal-atoms.nix
checkConfigOutput '^"/[^"]+"$' config.value.path ./types-anything/equal-atoms.nix
checkConfigOutput '^null$' config.value.null ./types-anything/equal-atoms.nix
checkConfigOutput '^0.1$' config.value.float ./types-anything/equal-atoms.nix
# Functions can't be merged together
checkConfigError "The option .value.multiple-lambdas.<function body>. has conflicting option types" config.applied.multiple-lambdas ./types-anything/functions.nix
checkConfigOutput '^<LAMBDA>$' config.value.single-lambda ./types-anything/functions.nix
checkConfigOutput '^true$' config.valueIsFunction.single-lambda ./types-anything/functions.nix
checkConfigOutput '^null$' config.applied.merging-lambdas.x ./types-anything/functions.nix
checkConfigOutput '^null$' config.applied.merging-lambdas.y ./types-anything/functions.nix
# Check that all mk* modifiers are applied
checkConfigError 'attribute .* not found' config.value.mkiffalse ./types-anything/mk-mods.nix
checkConfigOutput '^{ }$' config.value.mkiftrue ./types-anything/mk-mods.nix
checkConfigOutput '^{}$' config.value.mkiftrue ./types-anything/mk-mods.nix
checkConfigOutput '^1$' config.value.mkdefault ./types-anything/mk-mods.nix
checkConfigOutput '^{ }$' config.value.mkmerge ./types-anything/mk-mods.nix
checkConfigOutput '^{}$' config.value.mkmerge ./types-anything/mk-mods.nix
checkConfigOutput '^true$' config.value.mkbefore ./types-anything/mk-mods.nix
checkConfigOutput '^1$' config.value.nested.foo ./types-anything/mk-mods.nix
checkConfigOutput '^"baz"$' config.value.nested.bar.baz ./types-anything/mk-mods.nix
@@ -390,16 +390,16 @@ checkConfigOutput '^"a b y z"$' config.resultFooBar ./declare-variants.nix ./def
checkConfigOutput '^"a b c"$' config.resultFooFoo ./declare-variants.nix ./define-variant.nix

## emptyValue's
checkConfigOutput "[ ]" config.list.a ./emptyValues.nix
checkConfigOutput "{ }" config.attrs.a ./emptyValues.nix
checkConfigOutput "\[\]" config.list.a ./emptyValues.nix
checkConfigOutput "{}" config.attrs.a ./emptyValues.nix
checkConfigOutput "null" config.null.a ./emptyValues.nix
checkConfigOutput "{ }" config.submodule.a ./emptyValues.nix
checkConfigOutput "{}" config.submodule.a ./emptyValues.nix
# These types don't have empty values
checkConfigError 'The option .int.a. is used but not defined' config.int.a ./emptyValues.nix
checkConfigError 'The option .nonEmptyList.a. is used but not defined' config.nonEmptyList.a ./emptyValues.nix

## types.raw
checkConfigOutput "{ foo = <CODE>; }" config.unprocessedNesting ./raw.nix
checkConfigOutput '^true$' config.unprocessedNestingEvaluates.success ./raw.nix
checkConfigOutput "10" config.processedToplevel ./raw.nix
checkConfigError "The option .multiple. is defined multiple times" config.multiple ./raw.nix
checkConfigOutput "bar" config.priorities ./raw.nix
@@ -433,13 +433,13 @@ checkConfigOutput 'ok' config.freeformItems.foo.bar ./adhoc-freeformType-survive
checkConfigOutput '^1$' config.sub.specialisation.value ./extendModules-168767-imports.nix

# Class checks, evalModules
checkConfigOutput '^{ }$' config.ok.config ./class-check.nix
checkConfigOutput '^{}$' config.ok.config ./class-check.nix
checkConfigOutput '"nixos"' config.ok.class ./class-check.nix
checkConfigError 'The module .*/module-class-is-darwin.nix was imported into nixos instead of darwin.' config.fail.config ./class-check.nix
checkConfigError 'The module foo.nix#darwinModules.default was imported into nixos instead of darwin.' config.fail-anon.config ./class-check.nix

# Class checks, submoduleWith
checkConfigOutput '^{ }$' config.sub.nixosOk ./class-check.nix
checkConfigOutput '^{}$' config.sub.nixosOk ./class-check.nix
checkConfigError 'The module .*/module-class-is-darwin.nix was imported into nixos instead of darwin.' config.sub.nixosFail.config ./class-check.nix

# submoduleWith type merge with different class
5 changes: 4 additions & 1 deletion lib/tests/modules/raw.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, ... }: {
{ lib, config, ... }: {

options = {
processedToplevel = lib.mkOption {
@@ -13,6 +13,9 @@
priorities = lib.mkOption {
type = lib.types.raw;
};
unprocessedNestingEvaluates = lib.mkOption {
default = builtins.tryEval config.unprocessedNesting;
};
};

config = {
4 changes: 2 additions & 2 deletions lib/tests/modules/types-anything/equal-atoms.nix
Original file line number Diff line number Diff line change
@@ -9,15 +9,15 @@
value.int = 0;
value.bool = false;
value.string = "";
value.path = /.;
value.path = ./.;
value.null = null;
value.float = 0.1;
}
{
value.int = 0;
value.bool = false;
value.string = "";
value.path = /.;
value.path = ./.;
value.null = null;
value.float = 0.1;
}
4 changes: 4 additions & 0 deletions lib/tests/modules/types-anything/functions.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{ lib, config, ... }: {

options.valueIsFunction = lib.mkOption {
default = lib.mapAttrs (name: lib.isFunction) config.value;
};

options.value = lib.mkOption {
type = lib.types.anything;
};
16 changes: 7 additions & 9 deletions nixos/modules/hardware/video/webcam/ipu6.nix
Original file line number Diff line number Diff line change
@@ -13,11 +13,12 @@ in
enable = mkEnableOption (lib.mdDoc "support for Intel IPU6/MIPI cameras");

platform = mkOption {
type = types.enum [ "ipu6" "ipu6ep" ];
type = types.enum [ "ipu6" "ipu6ep" "ipu6epmtl" ];
description = lib.mdDoc ''
Choose the version for your hardware platform.
Use `ipu6` for Tiger Lake and `ipu6ep` for Alder Lake respectively.
Use `ipu6` for Tiger Lake, `ipu6ep` for Alder Lake or Raptor Lake,
and `ipu6epmtl` for Meteor Lake.
'';
};

@@ -29,9 +30,7 @@ in
ipu6-drivers
];

hardware.firmware = with pkgs; [ ]
++ optional (cfg.platform == "ipu6") ipu6-camera-bin
++ optional (cfg.platform == "ipu6ep") ipu6ep-camera-bin;
hardware.firmware = [ pkgs.ipu6-camera-bins ];

services.udev.extraRules = ''
SUBSYSTEM=="intel-ipu6-psys", MODE="0660", GROUP="video"
@@ -44,14 +43,13 @@ in

extraPackages = with pkgs.gst_all_1; [ ]
++ optional (cfg.platform == "ipu6") icamerasrc-ipu6
++ optional (cfg.platform == "ipu6ep") icamerasrc-ipu6ep;
++ optional (cfg.platform == "ipu6ep") icamerasrc-ipu6ep
++ optional (cfg.platform == "ipu6epmtl") icamerasrc-ipu6epmtl;

input = {
pipeline = "icamerasrc";
format = mkIf (cfg.platform == "ipu6ep") (mkDefault "NV12");
format = mkIf (cfg.platform != "ipu6") (mkDefault "NV12");
};
};

};

}
2 changes: 1 addition & 1 deletion nixos/modules/services/web-apps/netbox.nix
Original file line number Diff line number Diff line change
@@ -317,7 +317,7 @@ in {

serviceConfig = defaultServiceConfig // {
ExecStart = ''
${pkgs.python3Packages.gunicorn}/bin/gunicorn netbox.wsgi \
${pkg.gunicorn}/bin/gunicorn netbox.wsgi \
--bind ${cfg.listenAddress}:${toString cfg.port} \
--pythonpath ${pkg}/opt/netbox/netbox
'';
4 changes: 2 additions & 2 deletions pkgs/applications/editors/vim/common.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{ lib, fetchFromGitHub }:
rec {
version = "9.0.2048";
version = "9.0.2116";

src = fetchFromGitHub {
owner = "vim";
repo = "vim";
rev = "v${version}";
hash = "sha256-zR2iPiD4/gf5BnxYoe3cx2ebGWE1P2bY4Cg15gveFgg=";
hash = "sha256-ZKcNg/RrjvEsxpIcTjzQYi1xig3zLeTV+PXaBb4gUuM=";
};

enableParallelBuilding = true;
7 changes: 5 additions & 2 deletions pkgs/applications/misc/blender/default.nix
Original file line number Diff line number Diff line change
@@ -52,7 +52,10 @@ stdenv.mkDerivation (finalAttrs: rec {
nativeBuildInputs =
[ cmake makeWrapper python310Packages.wrapPython llvmPackages.llvm.dev
]
++ lib.optionals cudaSupport [ addOpenGLRunpath ]
++ lib.optionals cudaSupport [
addOpenGLRunpath
cudaPackages.cuda_nvcc
]
++ lib.optionals waylandSupport [ pkg-config ];
buildInputs =
[ boost ffmpeg gettext glew ilmbase
@@ -87,7 +90,7 @@ stdenv.mkDerivation (finalAttrs: rec {
llvmPackages.openmp SDL Cocoa CoreGraphics ForceFeedback OpenAL OpenGL
])
++ lib.optional jackaudioSupport libjack2
++ lib.optional cudaSupport cudaPackages.cudatoolkit
++ lib.optionals cudaSupport [ cudaPackages.cuda_cudart ]
++ lib.optional colladaSupport opencollada
++ lib.optional spaceNavSupport libspnav;
pythonPath = with python310Packages; [ numpy requests zstandard ];
12 changes: 8 additions & 4 deletions pkgs/applications/misc/mupdf/default.nix
Original file line number Diff line number Diff line change
@@ -60,12 +60,12 @@ let

in
stdenv.mkDerivation rec {
version = "1.23.5";
version = "1.23.6";
pname = "mupdf";

src = fetchurl {
url = "https://mupdf.com/downloads/archive/${pname}-${version}-source.tar.gz";
sha256 = "sha256-blZ5zfqu+cfoniljlSIM4sEz7T3K1RpHhmczbG6uxwY=";
sha256 = "sha256-rBHrhZ3UBEiOUVPNyWUbtDQeW6r007Pyfir8gvmq3Ck=";
};

patches = [ ./0001-Use-command-v-in-favor-of-which.patch
@@ -165,10 +165,14 @@ stdenv.mkDerivation rec {
EOF
moveToOutput "bin" "$bin"
'' + lib.optionalString (enableX11 || enableGL) ''
'' + (lib.optionalString (stdenv.isDarwin) ''
for exe in $bin/bin/*; do
install_name_tool -change build/shared-release/libmupdf.dylib $out/lib/libmupdf.dylib "$exe"
done
'') + (lib.optionalString (enableX11 || enableGL) ''
mkdir -p $bin/share/icons/hicolor/48x48/apps
cp docs/logo/mupdf.png $bin/share/icons/hicolor/48x48/apps
'' + (if enableGL then ''
'') + (if enableGL then ''
ln -s "$bin/bin/mupdf-gl" "$bin/bin/mupdf"
'' else lib.optionalString (enableX11) ''
ln -s "$bin/bin/mupdf-x11" "$bin/bin/mupdf"
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff -rup rsync-3.2.7/configure.sh rsync-3.2.7-fixed/configure.sh
--- rsync-3.2.7/configure.sh 2022-10-20 17:57:22
+++ rsync-3.2.7-fixed/configure.sh 2024-01-01 19:51:58
@@ -7706,7 +7706,7 @@ else $as_nop
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
-main()
+int main()
{
if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
exit(1);
2 changes: 2 additions & 0 deletions pkgs/applications/networking/sync/rsync/default.nix
Original file line number Diff line number Diff line change
@@ -34,6 +34,8 @@ stdenv.mkDerivation rec {
# https://github.com/WayneD/rsync/issues/511#issuecomment-1774612577
# original source: https://build.opensuse.org/package/view_file/network/rsync/rsync-fortified-strlcpy-fix.patch?expand=1&rev=3f8dd2f4a404c96c0f69176e60893714
./rsync-fortified-strlcpy-fix.patch
# https://github.com/WayneD/rsync/pull/558
./configure.ac-fix-failing-IPv6-check.patch
];

buildInputs = [ libiconv zlib popt ]
34 changes: 29 additions & 5 deletions pkgs/applications/science/molecular-dynamics/gromacs/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
{ lib, stdenv, fetchurl, cmake, hwloc, fftw, perl, blas, lapack, mpi, cudatoolkit
{ lib
, stdenv
, fetchurl
, cmake
, hwloc
, fftw
, perl
, blas
, lapack
, mpi
, cudaPackages
, singlePrec ? true
, config
, enableMpi ? false
@@ -7,6 +17,8 @@
}:

let
inherit (cudaPackages.cudaFlags) cudaCapabilities dropDot;

# Select reasonable defaults for all major platforms
# The possible values are defined in CMakeLists.txt:
# AUTO None SSE2 SSE4.1 AVX_128_FMA AVX_256 AVX2_256
@@ -31,7 +43,9 @@ in stdenv.mkDerivation rec {

outputs = [ "out" "dev" "man" ];

nativeBuildInputs = [ cmake ];
nativeBuildInputs =
[ cmake ]
++ lib.optionals enableCuda [ cudaPackages.cuda_nvcc ];

buildInputs = [
fftw
@@ -40,13 +54,17 @@ in stdenv.mkDerivation rec {
blas
lapack
] ++ lib.optional enableMpi mpi
++ lib.optional enableCuda cudatoolkit
;
++ lib.optionals enableCuda [
cudaPackages.cuda_cudart
cudaPackages.libcufft
cudaPackages.cuda_profiler_api
];

propagatedBuildInputs = lib.optional enableMpi mpi;
propagatedUserEnvPkgs = lib.optional enableMpi mpi;

cmakeFlags = [
(lib.cmakeBool "GMX_HWLOC" true)
"-DGMX_SIMD:STRING=${SIMD cpuAcceleration}"
"-DGMX_OPENMP:BOOL=TRUE"
"-DBUILD_SHARED_LIBS=ON"
@@ -66,7 +84,13 @@ in stdenv.mkDerivation rec {
else [
"-DGMX_MPI:BOOL=FALSE"
]
) ++ lib.optional enableCuda "-DGMX_GPU=CUDA";
) ++ lib.optionals enableCuda [
"-DGMX_GPU=CUDA"
(lib.cmakeFeature "CMAKE_CUDA_ARCHITECTURES" (builtins.concatStringsSep ";" (map dropDot cudaCapabilities)))

# Gromacs seems to ignore and override the normal variables, so we add this ad hoc:
(lib.cmakeFeature "GMX_CUDA_TARGET_COMPUTE" (builtins.concatStringsSep ";" (map dropDot cudaCapabilities)))
];

postInstall = ''
moveToOutput share/cmake $dev
4 changes: 2 additions & 2 deletions pkgs/build-support/emacs/melpa.nix
Original file line number Diff line number Diff line change
@@ -11,8 +11,8 @@ let
src = fetchFromGitHub {
owner = "melpa";
repo = "package-build";
rev = "c3c535e93d9dc92acd21ebc4b15016b5c3b90e7d";
sha256 = "17z0wbqdd6fspbj43yq8biff6wfggk74xgnaf1xx6ynsp1i74is5";
rev = "c48aa078c01b4f07b804270c4583a0a58ffea1c0";
sha256 = "sha256-MzPj375upIiYXdQR+wWXv3A1zMqbSrZlH0taLuxx/1M=";
};

patches = [ ./package-build-dont-use-mtime.patch ];
Loading

5 comments on commit 8ae7c0e

@haru02w
Copy link

@haru02w haru02w commented on 8ae7c0e Jan 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit breaks the nvidia-vaapi-driver to me. I really don't know why

@vcunat
Copy link
Member Author

@vcunat vcunat commented on 8ae7c0e Jan 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@haru02w: my tip is this PR:
#273040

@vcunat
Copy link
Member Author

@vcunat vcunat commented on 8ae7c0e Jan 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@haru02w
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I run nix-build /nix/store/wxz34yi2w55cy0yvk3avs8awd8n4d2g7-nvidia-vaapi-driver-0.0.11.drv or rebuild my system with the latest 23.11 commit it doesn't build
but nix build nixpkgs#nvidia-vaapi-driver builds just fine.
That's strange

@vcunat
Copy link
Member Author

@vcunat vcunat commented on 8ae7c0e Jan 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nixpkgs# usually points to the nixpkgs-unstable channel. You can inspect

$ nix registry list | grep flake:nixpkgs

Please sign in to comment.