From 423d736158d919e90a312a0e401690a6a2de4911 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 21 Jul 2025 10:04:15 +0000 Subject: [PATCH 01/17] runme: 3.14.2 -> 3.15.0 --- pkgs/by-name/ru/runme/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ru/runme/package.nix b/pkgs/by-name/ru/runme/package.nix index 9caec27e0ca8..07184a263f4d 100644 --- a/pkgs/by-name/ru/runme/package.nix +++ b/pkgs/by-name/ru/runme/package.nix @@ -13,16 +13,16 @@ buildGoModule rec { pname = "runme"; - version = "3.14.2"; + version = "3.15.0"; src = fetchFromGitHub { owner = "runmedev"; repo = "runme"; rev = "v${version}"; - hash = "sha256-s+GhfbxPLiIE0PT08srj+McUAhhhlG0JOOoWJyiMAeo="; + hash = "sha256-mVqDCHCZn0hbhNZjMyD+B52ZjG5GTplz9FNJoA8DY8A="; }; - vendorHash = "sha256-ixAd+ItQ1kLZZxQQNKcRH2dxQvnX/gpja930SSREzzA="; + vendorHash = "sha256-AXjU0nhSSdyfdYofjRI0wtF+nEsZmqLjr5j7FzY+x94="; nativeBuildInputs = [ installShellFiles From 1af42c491031aae7738cb914cd3acf450ecf1f95 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 16 Jul 2025 20:31:31 +0000 Subject: [PATCH 02/17] oxlint: 1.3.0 -> 1.6.0 --- pkgs/by-name/ox/oxlint/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ox/oxlint/package.nix b/pkgs/by-name/ox/oxlint/package.nix index 783547b110f9..2ee5a4f40e92 100644 --- a/pkgs/by-name/ox/oxlint/package.nix +++ b/pkgs/by-name/ox/oxlint/package.nix @@ -7,16 +7,16 @@ rustPlatform.buildRustPackage rec { pname = "oxlint"; - version = "1.3.0"; + version = "1.6.0"; src = fetchFromGitHub { owner = "oxc-project"; repo = "oxc"; tag = "oxlint_v${version}"; - hash = "sha256-+K8hc6uU/p/hT3bkaGPZpVcK9itSGJM9Mdhfw3DSZJw="; + hash = "sha256-URgz9k89WgYfCu9OlNCZk5wRt8upt58rIxFWa90L+OQ="; }; - cargoHash = "sha256-D0YEodCzBpf7g3VnKyydEDtjzGUu+XsGc2BpXU4CR6Q="; + cargoHash = "sha256-s1UXL+y/BISOnPJmdpQFztYRd5je9C8jcc+e+iWtRuU="; buildInputs = [ rust-jemalloc-sys From c7a6f489ae35c3541e6374cffb85a01a5b94a09f Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 11 Jul 2025 20:35:26 +0000 Subject: [PATCH 03/17] cargo-hack: 0.6.36 -> 0.6.37 --- pkgs/by-name/ca/cargo-hack/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ca/cargo-hack/package.nix b/pkgs/by-name/ca/cargo-hack/package.nix index e5aacf2b6450..9edcf25632bb 100644 --- a/pkgs/by-name/ca/cargo-hack/package.nix +++ b/pkgs/by-name/ca/cargo-hack/package.nix @@ -6,14 +6,14 @@ rustPlatform.buildRustPackage rec { pname = "cargo-hack"; - version = "0.6.36"; + version = "0.6.37"; src = fetchCrate { inherit pname version; - hash = "sha256-AO4bB+aqAzGxFyPhuwaEQDAbL+fCIWY2rv3QFdBAq7s="; + hash = "sha256-OlWSyp3et/48x5lRE14pIny8HHQcgOV2f9mI9hcj8K4="; }; - cargoHash = "sha256-fWKrHo5WdeEhnPxATbZ9Cjv+aiSxOh0pRDeeHHDk8u4="; + cargoHash = "sha256-1FgFHnNCEGoBUbH+Uk67W9ufsGtr9uGdzJz0xZuPQ9U="; # some necessary files are absent in the crate version doCheck = false; From 660ef4d559830b6ea3cffb009c91096b9c0417a9 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 19 Jul 2025 13:10:23 +0000 Subject: [PATCH 04/17] cargo-mutants: 25.2.0 -> 25.2.2 --- pkgs/by-name/ca/cargo-mutants/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ca/cargo-mutants/package.nix b/pkgs/by-name/ca/cargo-mutants/package.nix index 1a983965546f..f9eedb7aff23 100644 --- a/pkgs/by-name/ca/cargo-mutants/package.nix +++ b/pkgs/by-name/ca/cargo-mutants/package.nix @@ -6,16 +6,16 @@ rustPlatform.buildRustPackage rec { pname = "cargo-mutants"; - version = "25.2.0"; + version = "25.2.2"; src = fetchFromGitHub { owner = "sourcefrog"; repo = "cargo-mutants"; rev = "v${version}"; - hash = "sha256-//OUOf4RUM69tHBB17p4OSs/cCvv0HnDjyRUzUZc8KE="; + hash = "sha256-VDXI/pR7lmIMrsHx9E+oWp0PPUcl83Hc98z6Sh18Hsc="; }; - cargoHash = "sha256-QZrpH0nJ6a9AQAKNp/tkT1hpkUMWa2kh8kek2rY8wO4="; + cargoHash = "sha256-fTGIFD6V7L3erzi2RexR9XJNIV/UTu8vwFnrNpeFE4A="; # too many tests require internet access doCheck = false; From db607f1a01520c415c807b8dd64e7a6bf1276a47 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 9 Jul 2025 00:30:35 +0000 Subject: [PATCH 05/17] argc: 1.22.0 -> 1.23.0 --- pkgs/by-name/ar/argc/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ar/argc/package.nix b/pkgs/by-name/ar/argc/package.nix index a689a8eee95f..5492ae34eab8 100644 --- a/pkgs/by-name/ar/argc/package.nix +++ b/pkgs/by-name/ar/argc/package.nix @@ -14,16 +14,16 @@ let in rustPlatform.buildRustPackage rec { pname = "argc"; - version = "1.22.0"; + version = "1.23.0"; src = fetchFromGitHub { owner = "sigoden"; repo = "argc"; rev = "v${version}"; - hash = "sha256-sviGDwxbCBsNY5viV7Qim6B/COd1Uz0Wj/6n/Ge+A50="; + hash = "sha256-in2ymxiSZbs3wZwo/aKfu11x8SLx4OHOoa/tVxr3FyM="; }; - cargoHash = "sha256-uyUwmTDa1RcgQbc/6wMwRK6932CatuGMr0FPd2rAufk="; + cargoHash = "sha256-2UmI9CMa130T7ML9iVNQ8Zh/stiFg05eBtF1sprmwk8="; nativeBuildInputs = [ installShellFiles ] ++ lib.optional (!canExecuteHost) buildPackages.argc; From 1b069079496cac762589dae20019579b94ec884f Mon Sep 17 00:00:00 2001 From: qbisi Date: Wed, 18 Jun 2025 01:04:29 +0800 Subject: [PATCH 06/17] vtk: 9.2.6 -> 9.5.0 --- pkgs/by-name/ex/exhibit/package.nix | 2 +- pkgs/by-name/f3/f3d/package.nix | 7 +- pkgs/development/libraries/vtk/9.x.nix | 5 - pkgs/development/libraries/vtk/default.nix | 30 ++ pkgs/development/libraries/vtk/generic.nix | 418 +++++++++++++++----- pkgs/development/libraries/vtk/vtk.egg-info | 5 - pkgs/top-level/aliases.nix | 4 + pkgs/top-level/all-packages.nix | 20 +- pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 14 +- 10 files changed, 359 insertions(+), 147 deletions(-) delete mode 100644 pkgs/development/libraries/vtk/9.x.nix create mode 100644 pkgs/development/libraries/vtk/default.nix delete mode 100644 pkgs/development/libraries/vtk/vtk.egg-info diff --git a/pkgs/by-name/ex/exhibit/package.nix b/pkgs/by-name/ex/exhibit/package.nix index 73fe81102632..79b0f4742ea4 100644 --- a/pkgs/by-name/ex/exhibit/package.nix +++ b/pkgs/by-name/ex/exhibit/package.nix @@ -36,7 +36,7 @@ python3Packages.buildPythonApplication rec { dependencies = with python3Packages; [ pygobject3 - f3d_egl + f3d ]; dontWrapGApps = true; diff --git a/pkgs/by-name/f3/f3d/package.nix b/pkgs/by-name/f3/f3d/package.nix index 28b9e4dbf253..b24c155673d9 100644 --- a/pkgs/by-name/f3/f3d/package.nix +++ b/pkgs/by-name/f3/f3d/package.nix @@ -9,10 +9,7 @@ libXt, openusd, tbb, - # There is a f3d overridden with EGL enabled vtk in top-level/all-packages.nix - # compiling with EGL enabled vtk will result in f3d running in headless mode - # See https://github.com/NixOS/nixpkgs/pull/324022. This may change later. - vtk_9, + vtk, autoPatchelfHook, python3Packages, opencascade-occt, @@ -50,7 +47,7 @@ stdenv.mkDerivation rec { ]; buildInputs = [ - vtk_9 + vtk opencascade-occt assimp fontconfig diff --git a/pkgs/development/libraries/vtk/9.x.nix b/pkgs/development/libraries/vtk/9.x.nix deleted file mode 100644 index 3734c20f0e05..000000000000 --- a/pkgs/development/libraries/vtk/9.x.nix +++ /dev/null @@ -1,5 +0,0 @@ -import ./generic.nix { - majorVersion = "9.2"; - minorVersion = "6"; - sourceSha256 = "sha256-BvyNScTlb0mMQPyzilY+2NTsMTWNAQHomI8LtNU53RI="; -} diff --git a/pkgs/development/libraries/vtk/default.nix b/pkgs/development/libraries/vtk/default.nix new file mode 100644 index 000000000000..5418f6f97dee --- /dev/null +++ b/pkgs/development/libraries/vtk/default.nix @@ -0,0 +1,30 @@ +{ + callPackage, + fetchpatch2, +}: +let + mkVtk = initArgs: callPackage (import ./generic.nix initArgs) { }; +in +{ + vtk_9_5 = mkVtk { + version = "9.5.0"; + sourceSha256 = "sha256-BK6GJGuVV8a2GvvFNKbfCZJE+8jzk3+C5rwFcJU6+H0="; + patches = [ + # https://gitlab.kitware.com/vtk/vtk/-/issues/19699 + (fetchpatch2 { + url = "https://gitlab.kitware.com/vtk/vtk/-/commit/6b4f7b853675c63e4831c366ca8f78e320c1bfb5.diff"; + hash = "sha256-hWJc5RxW6iK+W/rTxp2GUWKcm/2+oxbP5nVZ0EUSKHE="; + }) + # https://gitlab.kitware.com/vtk/vtk/-/issues/19705 + (fetchpatch2 { + url = "https://gitlab.kitware.com/vtk/vtk/-/commit/ce10dfe82ffa19c8108885625a6f8b3f980bed3b.diff"; + hash = "sha256-kyPM0whL4WeaV27sNM1fbbs5kwMYn+9E561HtvnwHRc="; + }) + # https://gitlab.kitware.com/vtk/vtk/-/merge_requests/12262 + (fetchpatch2 { + url = "https://gitlab.kitware.com/vtk/vtk/-/commit/c0e0f793e6adf740f5b1c91ac330afdbc2a03b72.diff"; + hash = "sha256-BinSv8sPqpAEcgkn8trnCPv2snR9MGcA8rkVflAhc5w="; + }) + ]; + }; +} diff --git a/pkgs/development/libraries/vtk/generic.nix b/pkgs/development/libraries/vtk/generic.nix index 02f3606f63cd..85d60a996121 100644 --- a/pkgs/development/libraries/vtk/generic.nix +++ b/pkgs/development/libraries/vtk/generic.nix @@ -1,145 +1,347 @@ { - majorVersion, - minorVersion, + version, sourceSha256, - patchesToFetch ? [ ], + patches ? [ ], }: { - stdenv, lib, + newScope, + stdenv, fetchurl, cmake, - libGLU, - libGL, - libX11, - xorgproto, - libXt, + pkg-config, + + # common dependencies + tk, + mpi, + python3Packages, + catalyst, + cli11, + boost, + eigen, + verdict, + double-conversion, + + # common data libraries + lz4, + xz, + zlib, + pugixml, + expat, + jsoncpp, + libxml2, + exprtk, + utf8cpp, + libarchive, + nlohmann_json, + + # filters + openturns, + openslide, + + # io modules + cgns, + adios2, + libLAS, + libgeotiff, + laszip_2, + gdal, + pdal, + alembic, + imath, + openvdb, + c-blosc, + unixODBC, + postgresql, + libmysqlclient, + ffmpeg, + libjpeg, libpng, libtiff, - fetchpatch, - enableQt ? false, - qtx11extras, - qttools, - qtdeclarative, - qtEnv, - enablePython ? false, - python ? throw "vtk: Python support requested, but no python interpreter was given.", - enableEgl ? false, + proj, + sqlite, + libogg, + libharu, + libtheora, + hdf5, + netcdf, + opencascade-occt, + + # threading + tbb, + llvmPackages, + + # rendering + viskores, + freetype, + fontconfig, + libX11, + libXfixes, + libXrender, + libXcursor, + gl2ps, + libGL, + qt5, + qt6, + + # custom options + qtVersion ? null, + # To avoid conflicts between the propagated vtkPackages.hdf5 + # and the input hdf5 used by most downstream packages, + # we set mpiSupport to false by default. + mpiSupport ? false, + pythonSupport ? false, + + # passthru.tests + testers, }: - let - inherit (lib) optionalString optionals; - - version = "${majorVersion}.${minorVersion}"; - pythonMajor = lib.substring 0 1 python.pythonVersion; + qtPackages = + if (isNull qtVersion) then + null + else if (qtVersion == "6") then + qt6 + else if (qtVersion == "5") then + qt5 + else + throw ''qtVersion must be "5", "6" or null''; + vtkPackages = lib.makeScope newScope (self: { + inherit + tbb + mpi + mpiSupport + python3Packages + pythonSupport + ; + hdf5 = hdf5.override { + inherit mpi mpiSupport; + cppSupport = !mpiSupport; + }; + openvdb = self.callPackage openvdb.override { }; + netcdf = self.callPackage netcdf.override { }; + catalyst = self.callPackage catalyst.override { }; + adios2 = self.callPackage adios2.override { }; + cgns = self.callPackage cgns.override { }; + viskores = self.callPackage viskores.override { }; + }); + vtkBool = feature: bool: lib.cmakeFeature feature "${if bool then "YES" else "NO"}"; in -stdenv.mkDerivation { - pname = "vtk" + optionalString enableEgl "-egl" + optionalString enableQt "-qvtk"; - inherit version; +stdenv.mkDerivation (finalAttrs: { + pname = "vtk"; + inherit version patches; src = fetchurl { - url = "https://www.vtk.org/files/release/${majorVersion}/VTK-${version}.tar.gz"; - sha256 = sourceSha256; + url = "https://www.vtk.org/files/release/${lib.versions.majorMinor finalAttrs.version}/VTK-${finalAttrs.version}.tar.gz"; + hash = sourceSha256; }; - nativeBuildInputs = [ cmake ]; + nativeBuildInputs = [ + cmake + pkg-config # required for finding MySQl + ] + ++ lib.optional pythonSupport python3Packages.python + ++ lib.optional ( + pythonSupport && stdenv.buildPlatform == stdenv.hostPlatform + ) python3Packages.pythonImportsCheckHook; buildInputs = [ + libLAS + libgeotiff + laszip_2 + gdal + pdal + alembic + imath + c-blosc + unixODBC + postgresql + libmysqlclient + ffmpeg + opencascade-occt + fontconfig + openturns + libarchive + libGL + vtkPackages.openvdb + ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ + libXfixes + libXrender + libXcursor + ] + ++ lib.optional (!(isNull qtPackages)) qtPackages.qttools + ++ lib.optional mpiSupport mpi + ++ lib.optional pythonSupport tk; + + # propagated by vtk-config.cmake + propagatedBuildInputs = [ + eigen + boost + verdict + double-conversion + freetype + lz4 + xz + zlib + expat + exprtk + pugixml + jsoncpp + libxml2 + utf8cpp + nlohmann_json + libjpeg libpng libtiff + proj + sqlite + libogg + libharu + libtheora + cli11 + openslide + vtkPackages.hdf5 + vtkPackages.cgns + vtkPackages.adios2 + vtkPackages.netcdf + vtkPackages.catalyst + vtkPackages.viskores + vtkPackages.tbb ] - ++ optionals enableQt [ - (qtEnv "qvtk-qt-env" [ - qtx11extras - qttools - qtdeclarative - ]) + ++ lib.optionals stdenv.cc.isClang [ + llvmPackages.openmp ] - ++ optionals stdenv.hostPlatform.isLinux [ - libGLU - xorgproto - libXt - ] - ++ optionals enablePython [ - python - ]; - propagatedBuildInputs = optionals stdenv.hostPlatform.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ libX11 - libGL + gl2ps + ] + # create meta package providing dist-info for python3Pacakges.vtk that common cmake build does not do + ++ lib.optionals pythonSupport [ + (python3Packages.mkPythonMetaPackage { + inherit (finalAttrs) pname version meta; + dependencies = + with python3Packages; + [ + numpy + wslink + matplotlib + ] + ++ lib.optional mpiSupport (mpi4py.override { inherit mpi; }); + }) ]; - # see https://github.com/NixOS/nixpkgs/pull/178367#issuecomment-1238827254 - patches = map fetchpatch patchesToFetch; - - # GCC 13: error: 'int64_t' in namespace 'std' does not name a type - postPatch = '' - sed '1i#include ' \ - -i ThirdParty/libproj/vtklibproj/src/proj_json_streaming_writer.hpp \ - -i IO/Image/vtkSEPReader.h - '' - + optionalString stdenv.hostPlatform.isDarwin '' - sed -i 's|COMMAND vtkHashSource|COMMAND "DYLD_LIBRARY_PATH=''${VTK_BINARY_DIR}/lib" ''${VTK_BINARY_DIR}/bin/vtkHashSource-${majorVersion}|' ./Parallel/Core/CMakeLists.txt - sed -i 's/fprintf(output, shift)/fprintf(output, "%s", shift)/' ./ThirdParty/libxml2/vtklibxml2/xmlschemas.c - sed -i 's/fprintf(output, shift)/fprintf(output, "%s", shift)/g' ./ThirdParty/libxml2/vtklibxml2/xpath.c + # wrapper script calls qmlplugindump, crashes due to lack of minimal platform plugin + # Could not find the Qt platform plugin "minimal" in "" + preConfigure = lib.optionalString (qtVersion == "5") '' + export QT_PLUGIN_PATH=${lib.getBin qt5.qtbase}/${qt5.qtbase.qtPluginPrefix} ''; + env = { + CMAKE_PREFIX_PATH = "${lib.getDev openvdb}/lib/cmake/OpenVDB"; + NIX_LDFLAGS = "-L${lib.getLib libmysqlclient}/lib/mariadb"; + }; + + cmakeFlags = [ + (lib.cmakeFeature "CMAKE_INSTALL_BINDIR" "bin") + (lib.cmakeFeature "CMAKE_INSTALL_LIBDIR" "lib") + (lib.cmakeFeature "CMAKE_INSTALL_INCLUDEDIR" "include") + + # vtk common configure options + (lib.cmakeBool "VTK_DISPATCH_SOA_ARRAYS" true) + (lib.cmakeBool "VTK_ENABLE_CATALYST" true) + (lib.cmakeBool "VTK_WRAP_SERIALIZATION" true) + (lib.cmakeBool "VTK_BUILD_ALL_MODULES" true) + (lib.cmakeBool "VTK_VERSIONED_INSTALL" false) + (lib.cmakeBool "VTK_SMP_ENABLE_OPENMP" true) + (lib.cmakeFeature "VTK_SMP_IMPLEMENTATION_TYPE" "TBB") + + # use system packages if possible + (lib.cmakeBool "VTK_USE_EXTERNAL" true) + (lib.cmakeBool "VTK_MODULE_USE_EXTERNAL_VTK_fast_float" false) # required version incompatible + (lib.cmakeBool "VTK_MODULE_USE_EXTERNAL_VTK_pegtl" false) # required version incompatible + (lib.cmakeBool "VTK_MODULE_USE_EXTERNAL_VTK_ioss" false) # missing in nixpkgs + (lib.cmakeBool "VTK_MODULE_USE_EXTERNAL_VTK_token" false) # missing in nixpkgs + (lib.cmakeBool "VTK_MODULE_USE_EXTERNAL_VTK_fmt" false) # prefer vendored fmt + (lib.cmakeBool "VTK_MODULE_USE_EXTERNAL_VTK_scn" false) # missing in nixpkgs + (lib.cmakeBool "VTK_MODULE_USE_EXTERNAL_VTK_gl2ps" stdenv.hostPlatform.isLinux) # external gl2ps causes failure linking to macOS OpenGL.framework + + # Rendering + (vtkBool "VTK_MODULE_ENABLE_VTK_RenderingRayTracing" false) # ospray + (vtkBool "VTK_MODULE_ENABLE_VTK_RenderingOpenXR" false) # openxr + (vtkBool "VTK_MODULE_ENABLE_VTK_RenderingOpenVR" false) # openvr + (vtkBool "VTK_MODULE_ENABLE_VTK_RenderingAnari" false) # anari + + # qtSupport + (vtkBool "VTK_GROUP_ENABLE_Qt" (!(isNull qtPackages))) + (lib.cmakeFeature "VTK_QT_VERSION" "Auto") # will search for Qt6 first + + # pythonSupport + (lib.cmakeBool "VTK_USE_TK" pythonSupport) + (vtkBool "VTK_GROUP_ENABLE_Tk" pythonSupport) + (lib.cmakeBool "VTK_WRAP_PYTHON" pythonSupport) + (lib.cmakeBool "VTK_BUILD_PYI_FILES" pythonSupport) + (lib.cmakeFeature "VTK_PYTHON_VERSION" "3") + + # mpiSupport + (lib.cmakeBool "VTK_USE_MPI" mpiSupport) + (vtkBool "VTK_GROUP_ENABLE_MPI" mpiSupport) + ]; + + # byte-compile python modules since the CMake build does not do it + postInstall = lib.optionalString pythonSupport '' + python -m compileall -s $out $out/${python3Packages.python.sitePackages} + ''; + + pythonImportsCheck = [ "vtk" ]; + dontWrapQtApps = true; - # Shared libraries don't work, because of rpath troubles with the current - # nixpkgs cmake approach. It wants to call a binary at build time, just - # built and requiring one of the shared objects. - # At least, we use -fPIC for other packages to be able to use this in shared - # objects. - cmakeFlags = [ - "-DCMAKE_C_FLAGS=-fPIC" - "-DCMAKE_CXX_FLAGS=-fPIC" - "-DVTK_MODULE_USE_EXTERNAL_vtkpng=ON" - "-DVTK_MODULE_USE_EXTERNAL_vtktiff=1" - "-DVTK_MODULE_ENABLE_VTK_RenderingExternal=YES" - ] - ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ - "-DOPENGL_INCLUDE_DIR=${lib.getInclude libGL}/include" - (lib.cmakeBool "VTK_OPENGL_HAS_EGL" enableEgl) - ] - ++ [ - "-DCMAKE_INSTALL_LIBDIR=lib" - "-DCMAKE_INSTALL_INCLUDEDIR=include" - "-DCMAKE_INSTALL_BINDIR=bin" - "-DVTK_VERSIONED_INSTALL=OFF" - ] - ++ optionals enableQt [ - "-DVTK_GROUP_ENABLE_Qt:STRING=YES" - ] - ++ optionals enablePython [ - "-DVTK_WRAP_PYTHON:BOOL=ON" - "-DVTK_PYTHON_VERSION:STRING=${pythonMajor}" - ]; + postFixup = + # Remove thirdparty find module that have been provided in nixpkgs. + '' + rm -rf $out/lib/cmake/vtk/patches + rm $out/lib/cmake/vtk/Find{EXPAT,Freetype,utf8cpp,LibXml2,FontConfig}.cmake + '' + # libvtkglad.so will find and load libGL.so at runtime. + + lib.optionalString stdenv.hostPlatform.isLinux '' + patchelf --add-rpath ${lib.getLib libGL}/lib $out/lib/libvtkglad.so + ''; - env = { - # Lots of warnings in vendored code… - NIX_CFLAGS_COMPILE = - if stdenv.cc.isClang then - "-Wno-error=incompatible-function-pointer-types" - else - "-Wno-error=incompatible-pointer-types"; + passthru = { + inherit + pythonSupport + mpiSupport + ; + + vtkPackages = vtkPackages.overrideScope ( + final: prev: { + vtk = finalAttrs.finalPackage; + } + ); + + tests = { + cmake-config = testers.hasCmakeConfigModules { + moduleNames = [ "VTK" ]; + + package = finalAttrs.finalPackage; + + nativeBuildInputs = lib.optionals (!(isNull qtPackages)) [ + qtPackages.qttools + qtPackages.wrapQtAppsHook + ]; + }; + }; }; - postInstall = optionalString enablePython '' - substitute \ - ${./vtk.egg-info} \ - $out/${python.sitePackages}/vtk-${version}.egg-info \ - --subst-var-by VTK_VER "${version}" - ''; + requiredSystemFeatures = [ "big-parallel" ]; - meta = with lib; { + meta = { description = "Open source libraries for 3D computer graphics, image processing and visualization"; homepage = "https://www.vtk.org/"; - license = licenses.bsd3; - maintainers = with maintainers; [ - tfmoraes - ]; - platforms = platforms.unix; - badPlatforms = optionals enableEgl platforms.darwin; + changelog = "https://docs.vtk.org/en/latest/release_details/${lib.versions.majorMinor finalAttrs.version}.html"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ qbisi ]; + platforms = lib.platforms.unix; }; -} +}) diff --git a/pkgs/development/libraries/vtk/vtk.egg-info b/pkgs/development/libraries/vtk/vtk.egg-info deleted file mode 100644 index c932fce54070..000000000000 --- a/pkgs/development/libraries/vtk/vtk.egg-info +++ /dev/null @@ -1,5 +0,0 @@ -Metadata-Version: 2.1 -Name: vtk -Version: @VTK_VER@ -Summary: VTK is an open-source toolkit for 3D computer graphics, image processing, and visualization -Platform: UNKNOWN diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 1ae05201e429..0e079cf71cbd 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -666,6 +666,7 @@ mapAliases { ### F ### + f3d_egl = lib.warnOnInstantiate "'f3d' now build with egl support by default, so `f3d_egl` is deprecated, consider using 'f3d' instead." f3d; # added 2025-07-18 factor-lang-scope = throw "'factor-lang-scope' has been renamed to 'factorPackages'"; # added 2024-11-28 fahcontrol = throw "fahcontrol has been removed because the download is no longer available"; # added 2024-09-24 fahviewer = throw "fahviewer has been removed because the download is no longer available"; # added 2024-09-24 @@ -2121,6 +2122,9 @@ mapAliases { vocal = throw "'vocal' has been archived upstream. Consider using 'gnome-podcasts' or 'kasts' instead."; # Added 2025-04-12 void = throw "'void' has been removed due to lack of upstream maintenance"; # Added 2025-01-25 volnoti = throw "'volnoti' has been removed due to lack of maintenance upstream."; # Added 2024-12-04 + vtk_9 = lib.warnOnInstantiate "'vtk_9' has been renamed to 'vtk_9_5'" vtk_9_5; # Added 2025-07-18 + vtk_9_egl = lib.warnOnInstantiate "'vtk_9_5' now build with egl support by default, so `vtk_9_egl` is deprecated, consider using 'vtk_9_5' instead." vtk_9_5; # Added 2025-07-18 + vtk_9_withQt5 = throw "'vtk_9_withQt5' has been removed, Consider using 'vtkWithQt5' instead." vtkWithQt5; # Added 2025-07-18 vuze = throw "'vuze' was removed because it is unmaintained upstream and insecure (CVE-2018-13417). BiglyBT is a maintained fork."; # Added 2024-11-22 vwm = throw "'vwm' was removed as it is broken and not maintained upstream"; # Added 2025-05-17 inherit (libsForQt5.mauiPackages) vvave; # added 2022-05-17 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e8aac496ba84..a20e94613b5b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2112,8 +2112,6 @@ with pkgs; waylandSupport = !stdenv.hostPlatform.isDarwin; }; - f3d_egl = f3d.override { vtk_9 = vtk_9_egl; }; - fast-cli = nodePackages.fast-cli; ### TOOLS/TYPESETTING/TEX @@ -9635,17 +9633,19 @@ with pkgs; wine = wineWowPackages.staging; }; - vtk_9 = libsForQt5.callPackage ../development/libraries/vtk/9.x.nix { - stdenv = if stdenv.cc.isClang then llvmPackages_17.stdenv else stdenv; + inherit (callPackage ../development/libraries/vtk { }) vtk_9_5; + + vtk = vtk_9_5; + + vtk-full = vtk.override { + qtVersion = "6"; + mpiSupport = true; + pythonSupport = true; }; - vtk_9_withQt5 = vtk_9.override { enableQt = true; }; + vtkWithQt5 = vtk.override { qtVersion = "5"; }; - vtk = vtk_9; - - vtk_9_egl = vtk_9.override { enableEgl = true; }; - - vtkWithQt5 = vtk_9_withQt5; + vtkWithQt6 = vtk.override { qtVersion = "6"; }; vulkan-caps-viewer = libsForQt5.callPackage ../tools/graphics/vulkan-caps-viewer { }; diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 477ae39ee372..fc86c50cf5a4 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -240,6 +240,7 @@ mapAliases ({ ev3dev2 = python-ev3dev2; # added 2023-06-19 evernote = throw "evernote is intended for use with Python 2.X"; eyeD3 = eyed3; # added 2024-01-03 + f3d_egl = lib.warnOnInstantiate "'f3d' now build with egl support by default, so `f3d_egl` is deprecated, consider using 'f3d' instead." f3d; # added 2025-07-18 Fabric = fabric; # addedd 2023-02-19 face_recognition = face-recognition; # added 2022-10-15 face_recognition_models = face-recognition-models; # added 2022-10-15 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6c334e2c6269..1a7e0d922c3f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4870,13 +4870,6 @@ self: super: with self; { } ); - f3d_egl = toPythonModule ( - pkgs.f3d_egl.override { - withPythonBinding = true; - python3Packages = self; - } - ); - f5-icontrol-rest = callPackage ../development/python-modules/f5-icontrol-rest { }; f5-sdk = callPackage ../development/python-modules/f5-sdk { }; @@ -19389,12 +19382,7 @@ self: super: with self; { vtjp = callPackage ../development/python-modules/vtjp { }; - vtk = toPythonModule ( - pkgs.vtk_9.override { - inherit python; - enablePython = true; - } - ); + vtk = toPythonModule (pkgs.vtk-full.override { python3Packages = self; }); vttlib = callPackage ../development/python-modules/vttlib { }; From 9b615580583a072b1fb8018fe92f622554afc11a Mon Sep 17 00:00:00 2001 From: qbisi Date: Mon, 28 Jul 2025 21:25:41 +0800 Subject: [PATCH 07/17] python3Packages.pyvista: relax dependency of vtk --- pkgs/development/python-modules/pyvista/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/pyvista/default.nix b/pkgs/development/python-modules/pyvista/default.nix index 28717a49bfc1..f969cde19663 100644 --- a/pkgs/development/python-modules/pyvista/default.nix +++ b/pkgs/development/python-modules/pyvista/default.nix @@ -25,6 +25,9 @@ buildPythonPackage rec { hash = "sha256-9N1dF/zwjzoxX4xYIr5084M9pAk3YK3T48OUnCoC0NU="; }; + # remove this line once pyvista 0.46 is released + pythonRelaxDeps = [ "vtk" ]; + build-system = [ setuptools ]; dependencies = [ @@ -43,7 +46,6 @@ buildPythonPackage rec { pythonImportsCheck = [ "pyvista" ]; meta = with lib; { - broken = pythonAtLeast "3.13"; # segfault description = "Easier Pythonic interface to VTK"; homepage = "https://pyvista.org"; changelog = "https://github.com/pyvista/pyvista/releases/tag/${src.tag}"; From 6977180caaf209250cf876812b4ed161828dc736 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 28 Jul 2025 13:35:42 +0000 Subject: [PATCH 08/17] snort: 3.9.1.0 -> 3.9.2.0 --- pkgs/by-name/sn/snort/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/sn/snort/package.nix b/pkgs/by-name/sn/snort/package.nix index 8ea13297dd28..cf46356b6a79 100644 --- a/pkgs/by-name/sn/snort/package.nix +++ b/pkgs/by-name/sn/snort/package.nix @@ -19,13 +19,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "snort"; - version = "3.9.1.0"; + version = "3.9.2.0"; src = fetchFromGitHub { owner = "snort3"; repo = "snort3"; tag = finalAttrs.version; - hash = "sha256-Ciseo0mYmgyfZB44zeudEst98XnM8E2vTG5J6snA3q0="; + hash = "sha256-LVAsCps5XLsj4acYWI42qdbvX6h9JTJJfM33FvVfWK0="; }; nativeBuildInputs = [ From 46781694fe05103a17da4a0ce5047f355a26df56 Mon Sep 17 00:00:00 2001 From: Chris Moultrie <821688+tebriel@users.noreply.github.com> Date: Mon, 28 Jul 2025 13:07:03 -0400 Subject: [PATCH 09/17] forgejo-runner: 8.0.0 -> 8.0.1 changelog: https://code.forgejo.org/forgejo/runner/releases/tag/v8.0.1 --- pkgs/by-name/fo/forgejo-runner/package.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/fo/forgejo-runner/package.nix b/pkgs/by-name/fo/forgejo-runner/package.nix index 530dd6000e5b..074651c946b2 100644 --- a/pkgs/by-name/fo/forgejo-runner/package.nix +++ b/pkgs/by-name/fo/forgejo-runner/package.nix @@ -17,17 +17,17 @@ let in buildGoModule rec { pname = "forgejo-runner"; - version = "8.0.0"; + version = "8.0.1"; src = fetchFromGitea { domain = "code.forgejo.org"; owner = "forgejo"; repo = "runner"; rev = "v${version}"; - hash = "sha256-ORFmCvKFbNQ1MGHifNhPmrPDep+WE603+xkIqMF/w6g="; + hash = "sha256-6FTJYs1dqIAHPxMzRNOHHZQv4be9LaR1wxMJsW3t5kg="; }; - vendorHash = "sha256-4TX1ol2WwvZ4WYIzLFfVlYkcT5eLduESc+jg4Ysas2o="; + vendorHash = "sha256-NykeBR2dnWQaqJuY73i9KLIqehLHniaMqf9oTqUDstQ="; # See upstream Makefile # https://code.forgejo.org/forgejo/runner/src/branch/main/Makefile @@ -39,7 +39,7 @@ buildGoModule rec { ldflags = [ "-s" "-w" - "-X runner.forgejo.org/internal/pkg/ver.version=${src.rev}" + "-X code.forgejo.org/forgejo/runner/internal/pkg/ver.version=${src.rev}" ]; checkFlags = [ @@ -49,7 +49,7 @@ buildGoModule rec { postInstall = '' # fix up go-specific executable naming derived from package name, upstream # also calls it `forgejo-runner` - mv $out/bin/runner.forgejo.org $out/bin/forgejo-runner + mv $out/bin/runner $out/bin/forgejo-runner # provide old binary name for compatibility ln -s $out/bin/forgejo-runner $out/bin/act_runner ''; From 02204a0834ce43aa4ea11e4d61c24203d9cf7871 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 28 Jul 2025 18:22:35 +0000 Subject: [PATCH 10/17] aaaaxy: 1.6.257 -> 1.6.271 --- pkgs/by-name/aa/aaaaxy/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/aa/aaaaxy/package.nix b/pkgs/by-name/aa/aaaaxy/package.nix index 1ccc5b39015e..331a6f1c98d6 100644 --- a/pkgs/by-name/aa/aaaaxy/package.nix +++ b/pkgs/by-name/aa/aaaaxy/package.nix @@ -22,17 +22,17 @@ buildGoModule rec { pname = "aaaaxy"; - version = "1.6.257"; + version = "1.6.271"; src = fetchFromGitHub { owner = "divVerent"; repo = "aaaaxy"; tag = "v${version}"; - hash = "sha256-l+4nlL8gUnLoBbKWlwOiis3s8svKMq9IjrbKyaBE0kk="; + hash = "sha256-/nSJ1FT9FE856yrupbouRzqpRzZhKfYAq1fVBBvMVmY="; fetchSubmodules = true; }; - vendorHash = "sha256-iP/7WQZ+BNqtoigRADKlYGEAEZpzSKttY4lVq7v8gR8="; + vendorHash = "sha256-DJvlyfCynz+M5BQ4XDYcdzb3QP5ycDPcF4B+fQ4FRRA="; buildInputs = [ alsa-lib From c24e3d433be2ffad763dcbf9aaa85f25be3ec0fb Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 28 Jul 2025 19:15:02 +0000 Subject: [PATCH 11/17] patch2pr: 0.36.0 -> 0.37.0 --- pkgs/by-name/pa/patch2pr/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/pa/patch2pr/package.nix b/pkgs/by-name/pa/patch2pr/package.nix index 5cb7ae1ff519..7c87662cc6d9 100644 --- a/pkgs/by-name/pa/patch2pr/package.nix +++ b/pkgs/by-name/pa/patch2pr/package.nix @@ -8,16 +8,16 @@ buildGoModule rec { pname = "patch2pr"; - version = "0.36.0"; + version = "0.37.0"; src = fetchFromGitHub { owner = "bluekeyes"; repo = "patch2pr"; rev = "v${version}"; - hash = "sha256-KaU77UYJJqcTJZrFPiqcdzYIVoih6oSeaPWiQdDiZ2s="; + hash = "sha256-dijSa6BXV8hXuRDeXIHcijPzQKFkmATrlAX0uiDDYjo="; }; - vendorHash = "sha256-MO6LrUvSu7pYidtjaDgjIEAxoIKM/U9hcePZr336Mbw="; + vendorHash = "sha256-QEgGq5/JQUIWWmJKoQ832eKhiF5xF8Jivpn1uFDERTA="; ldflags = [ "-X main.version=${version}" From 0755fa944d5242ee92a92bbc7d95695a388de431 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 28 Jul 2025 20:21:10 +0000 Subject: [PATCH 12/17] cargo-shuttle: 0.56.0 -> 0.56.6 --- pkgs/by-name/ca/cargo-shuttle/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ca/cargo-shuttle/package.nix b/pkgs/by-name/ca/cargo-shuttle/package.nix index b1e4097a4672..0a6b16bff04f 100644 --- a/pkgs/by-name/ca/cargo-shuttle/package.nix +++ b/pkgs/by-name/ca/cargo-shuttle/package.nix @@ -9,16 +9,16 @@ rustPlatform.buildRustPackage rec { pname = "cargo-shuttle"; - version = "0.56.0"; + version = "0.56.6"; src = fetchFromGitHub { owner = "shuttle-hq"; repo = "shuttle"; rev = "v${version}"; - hash = "sha256-Fr31BNTI8pVXHSSu46XPvlb0ic/S011OLWsLEfAZI4M="; + hash = "sha256-IBQExHPJUE16syyRkPOgh7jHONp1XDsAfCYLvZ6CLPs="; }; - cargoHash = "sha256-2YnwBAt2M2MkMhraKlk+BXxaNQ+iZSKzlUER1GBPbCI="; + cargoHash = "sha256-i6Xof5uzVOmdDFZw/J/x8eOqH/iAt2ZJXkOABLSR8Ss="; nativeBuildInputs = [ pkg-config ]; From 992621a27058f50db56cab4741b4641d7260c140 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 28 Jul 2025 22:52:00 +0000 Subject: [PATCH 13/17] sticky: 1.24 -> 1.25 --- pkgs/by-name/st/sticky/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/st/sticky/package.nix b/pkgs/by-name/st/sticky/package.nix index 43788cc9ea15..42c8ad6666ad 100644 --- a/pkgs/by-name/st/sticky/package.nix +++ b/pkgs/by-name/st/sticky/package.nix @@ -16,13 +16,13 @@ stdenv.mkDerivation rec { pname = "sticky"; - version = "1.24"; + version = "1.25"; src = fetchFromGitHub { owner = "linuxmint"; repo = "sticky"; rev = version; - hash = "sha256-Mj14S4M7NMQE17SN8uED4UIJN6nwTo3E+D3j0tGKXc4="; + hash = "sha256-lM9R89CNj8ZXeOciwn/ax9wcsf3J4yPmzrgAntp8Fsg="; }; postPatch = '' From 6451cf7f4559173b1e29ab3e55e2c40ab36194eb Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 28 Jul 2025 20:21:56 +0000 Subject: [PATCH 14/17] telegraf: 1.35.2 -> 1.35.3 --- pkgs/by-name/te/telegraf/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/te/telegraf/package.nix b/pkgs/by-name/te/telegraf/package.nix index 6dcdf7a3e66d..f0808cbad3b0 100644 --- a/pkgs/by-name/te/telegraf/package.nix +++ b/pkgs/by-name/te/telegraf/package.nix @@ -10,7 +10,7 @@ buildGoModule rec { pname = "telegraf"; - version = "1.35.2"; + version = "1.35.3"; subPackages = [ "cmd/telegraf" ]; @@ -18,10 +18,10 @@ buildGoModule rec { owner = "influxdata"; repo = "telegraf"; rev = "v${version}"; - hash = "sha256-x1PUDe5sMtg7VjFmjZ1rtk1SjglkEtbhVOfDYL/kikA="; + hash = "sha256-EwO7dvPJkLCxO9xZCW7gX57tCO7RIpJ23vqwOkMOVnw="; }; - vendorHash = "sha256-pTJqf00JdF+6ixU23zBLrNZquB02fP+BBX6JXgxthSw="; + vendorHash = "sha256-DHtgN8yf+4YYrDJKnFasICScYqq65iPGi7pFoxQawv8="; proxyVendor = true; ldflags = [ From 66e035f4117b6b51e3ee00f1b5c5d93bd6ae18b9 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sat, 26 Jul 2025 04:16:11 +0200 Subject: [PATCH 15/17] kea: 2.6.3 -> 3.0.0 https://gitlab.isc.org/isc-projects/kea/-/wikis/Release-Notes/release-notes-3.0.0 --- nixos/modules/services/networking/kea.nix | 74 +++++++++----- .../ke/kea/dont-create-system-paths.patch | 15 +++ pkgs/by-name/ke/kea/dont-create-var.patch | 34 ------- pkgs/by-name/ke/kea/package.nix | 97 +++++++++++-------- 4 files changed, 125 insertions(+), 95 deletions(-) create mode 100644 pkgs/by-name/ke/kea/dont-create-system-paths.patch delete mode 100644 pkgs/by-name/ke/kea/dont-create-var.patch diff --git a/nixos/modules/services/networking/kea.nix b/nixos/modules/services/networking/kea.nix index 9d19b9ec3d06..9f3e5aec5c74 100644 --- a/nixos/modules/services/networking/kea.nix +++ b/nixos/modules/services/networking/kea.nix @@ -2,6 +2,7 @@ config, lib, pkgs, + utils, ... }: let @@ -34,11 +35,11 @@ let DhcpDdns = cfg.dhcp-ddns.settings; } ); - - package = pkgs.kea; in { options.services.kea = with lib.types; { + package = lib.mkPackageOption pkgs "kea" { }; + ctrl-agent = lib.mkOption { description = '' Kea Control Agent configuration @@ -60,7 +61,7 @@ in type = nullOr path; default = null; description = '' - Kea Control Agent configuration as a path, see . + Kea Control Agent configuration as a path, see . Takes preference over [settings](#opt-services.kea.ctrl-agent.settings). Most users should prefer using [settings](#opt-services.kea.ctrl-agent.settings) instead. @@ -71,7 +72,7 @@ in type = format.type; default = null; description = '' - Kea Control Agent configuration as an attribute set, see . + Kea Control Agent configuration as an attribute set, see . ''; }; }; @@ -99,7 +100,7 @@ in type = nullOr path; default = null; description = '' - Kea DHCP4 configuration as a path, see . + Kea DHCP4 configuration as a path, see . Takes preference over [settings](#opt-services.kea.dhcp4.settings). Most users should prefer using [settings](#opt-services.kea.dhcp4.settings) instead. @@ -136,7 +137,7 @@ in ]; }; description = '' - Kea DHCP4 configuration as an attribute set, see . + Kea DHCP4 configuration as an attribute set, see . ''; }; }; @@ -164,7 +165,7 @@ in type = nullOr path; default = null; description = '' - Kea DHCP6 configuration as a path, see . + Kea DHCP6 configuration as a path, see . Takes preference over [settings](#opt-services.kea.dhcp6.settings). Most users should prefer using [settings](#opt-services.kea.dhcp6.settings) instead. @@ -202,7 +203,7 @@ in ]; }; description = '' - Kea DHCP6 configuration as an attribute set, see . + Kea DHCP6 configuration as an attribute set, see . ''; }; }; @@ -230,7 +231,7 @@ in type = nullOr path; default = null; description = '' - Kea DHCP-DDNS configuration as a path, see . + Kea DHCP-DDNS configuration as a path, see . Takes preference over [settings](#opt-services.kea.dhcp-ddns.settings). Most users should prefer using [settings](#opt-services.kea.dhcp-ddns.settings) instead. @@ -255,7 +256,7 @@ in }; }; description = '' - Kea DHCP-DDNS configuration as an attribute set, see . + Kea DHCP-DDNS configuration as an attribute set, see . ''; }; }; @@ -266,9 +267,10 @@ in config = let commonEnvironment = { - KEA_CONTROL_SOCKET_DIR = "/run/kea"; - KEA_LOCKFILE_DIR = "/run/kea"; - KEA_PIDFILE_DIR = "/run/kea"; + # Allow hook scripts only when they originate from the system configuration + KEA_HOOK_SCRIPTS_PATH = lib.mkDefault "/nix/store"; + # Allow hooks to originate from the configured package + KEA_HOOKS_PATH = lib.mkDefault "${cfg.package}/lib/kea/hooks"; }; commonServiceConfig = { @@ -291,7 +293,7 @@ in lib.mkIf (cfg.ctrl-agent.enable || cfg.dhcp4.enable || cfg.dhcp6.enable || cfg.dhcp-ddns.enable) ( lib.mkMerge [ { - environment.systemPackages = [ package ]; + environment.systemPackages = [ cfg.package ]; users.users.kea = { isSystemUser = true; @@ -314,7 +316,7 @@ in description = "Kea Control Agent"; documentation = [ "man:kea-ctrl-agent(8)" - "https://kea.readthedocs.io/en/kea-${package.version}/arm/agent.html" + "https://kea.readthedocs.io/en/kea-${cfg.package.version}/arm/agent.html" ]; wants = [ @@ -337,7 +339,14 @@ in ]; serviceConfig = { - ExecStart = "${package}/bin/kea-ctrl-agent -c /etc/kea/ctrl-agent.conf ${lib.escapeShellArgs cfg.ctrl-agent.extraArgs}"; + ExecStart = utils.escapeSystemdExecArgs ( + [ + (lib.getExe' cfg.package "kea-ctrl-agent") + "-c" + "/etc/kea/ctrl-agent.conf" + ] + ++ cfg.ctrl-agent.extraArgs + ); KillMode = "process"; Restart = "on-failure"; } @@ -359,7 +368,7 @@ in description = "Kea DHCP4 Server"; documentation = [ "man:kea-dhcp4(8)" - "https://kea.readthedocs.io/en/kea-${package.version}/arm/dhcp4-srv.html" + "https://kea.readthedocs.io/en/kea-${cfg.package.version}/arm/dhcp4-srv.html" ]; after = [ @@ -380,7 +389,14 @@ in ]; serviceConfig = { - ExecStart = "${package}/bin/kea-dhcp4 -c /etc/kea/dhcp4-server.conf ${lib.escapeShellArgs cfg.dhcp4.extraArgs}"; + ExecStart = utils.escapeSystemdExecArgs ( + [ + (lib.getExe' cfg.package "kea-dhcp4") + "-c" + "etc/kea/dhcp4-server.conf" + ] + ++ cfg.dhcp4.extraArgs + ); # Kea does not request capabilities by itself AmbientCapabilities = [ "CAP_NET_BIND_SERVICE" @@ -409,7 +425,7 @@ in description = "Kea DHCP6 Server"; documentation = [ "man:kea-dhcp6(8)" - "https://kea.readthedocs.io/en/kea-${package.version}/arm/dhcp6-srv.html" + "https://kea.readthedocs.io/en/kea-${cfg.package.version}/arm/dhcp6-srv.html" ]; after = [ @@ -430,7 +446,14 @@ in ]; serviceConfig = { - ExecStart = "${package}/bin/kea-dhcp6 -c /etc/kea/dhcp6-server.conf ${lib.escapeShellArgs cfg.dhcp6.extraArgs}"; + ExecStart = utils.escapeSystemdExecArgs ( + [ + (lib.getExe' cfg.package "kea-dhcp6") + "-c" + "/etc/kea/dhcp6-server.conf" + ] + ++ cfg.dhcp6.extraArgs + ); # Kea does not request capabilities by itself AmbientCapabilities = [ "CAP_NET_BIND_SERVICE" @@ -457,7 +480,7 @@ in description = "Kea DHCP-DDNS Server"; documentation = [ "man:kea-dhcp-ddns(8)" - "https://kea.readthedocs.io/en/kea-${package.version}/arm/ddns.html" + "https://kea.readthedocs.io/en/kea-${cfg.package.version}/arm/ddns.html" ]; wants = [ "network-online.target" ]; @@ -476,7 +499,14 @@ in ]; serviceConfig = { - ExecStart = "${package}/bin/kea-dhcp-ddns -c /etc/kea/dhcp-ddns.conf ${lib.escapeShellArgs cfg.dhcp-ddns.extraArgs}"; + ExecStart = utils.escapeSystemdExecArgs ( + [ + (lib.getExe' cfg.package "kea-dhcp-ddns") + "-c" + "/etc/kea/dhcp-ddns.conf" + ] + ++ cfg.dhcp-ddns.extraArgs + ); AmbientCapabilities = [ "CAP_NET_BIND_SERVICE" ]; diff --git a/pkgs/by-name/ke/kea/dont-create-system-paths.patch b/pkgs/by-name/ke/kea/dont-create-system-paths.patch new file mode 100644 index 000000000000..a22ee8815ce0 --- /dev/null +++ b/pkgs/by-name/ke/kea/dont-create-system-paths.patch @@ -0,0 +1,15 @@ +diff --git a/meson.build b/meson.build +index 24ab9b5bd7..8f44076cf7 100644 +--- a/meson.build ++++ b/meson.build +@@ -1118,10 +1118,6 @@ top_docs = [ + ] + install_data(top_docs, install_dir: DATADIR / 'doc/kea') + +-install_emptydir(LOGDIR) +-install_emptydir(RUNSTATEDIR) +-install_emptydir(SHAREDSTATEDIR) +- + # Meson is annoying with its opinionated alteration of certain paths based on whether prefix is default or not. + # So we revert what it does.. + # In case prefix is default, install to hardcoded path. diff --git a/pkgs/by-name/ke/kea/dont-create-var.patch b/pkgs/by-name/ke/kea/dont-create-var.patch deleted file mode 100644 index 9b7c451e1878..000000000000 --- a/pkgs/by-name/ke/kea/dont-create-var.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff --git a/Makefile.am b/Makefile.am -index a81f4cc..5d61407 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -173,18 +173,6 @@ cppcheck: - docs: - $(MAKE) -C doc/sphinx - -- --# These steps are necessary during installation. chmod is for reinstallation/upgrade. --install-exec-hook: -- mkdir -m 750 -p "$(DESTDIR)${localstatedir}/lib/${PACKAGE_NAME}" -- chmod 750 "$(DESTDIR)${localstatedir}/lib/${PACKAGE_NAME}" -- mkdir -m 750 -p "$(DESTDIR)${localstatedir}/log/${PACKAGE_NAME}" -- chmod 750 "$(DESTDIR)${localstatedir}/log/${PACKAGE_NAME}" -- mkdir -m 750 -p "$(DESTDIR)${runstatedir}/${PACKAGE_NAME}" -- chmod 750 "$(DESTDIR)${runstatedir}/${PACKAGE_NAME}" -- mkdir -m 750 -p "$(DESTDIR)${sysconfdir}/${PACKAGE_NAME}" -- chmod 750 "$(DESTDIR)${sysconfdir}/${PACKAGE_NAME}" -- - EXTRA_DIST = tools/path_replacer.sh - EXTRA_DIST += tools/mk_cfgrpt.sh - -diff --git a/src/lib/dhcpsrv/Makefile.am b/src/lib/dhcpsrv/Makefile.am -index 7e0f3c4..08c53d8 100644 ---- a/src/lib/dhcpsrv/Makefile.am -+++ b/src/lib/dhcpsrv/Makefile.am -@@ -420,6 +420,3 @@ libkea_dhcpsrv_parsers_include_HEADERS = \ - parsers/shared_networks_list_parser.h \ - parsers/simple_parser4.h \ - parsers/simple_parser6.h -- --install-data-local: -- $(mkinstalldirs) $(DESTDIR)$(dhcp_data_dir) diff --git a/pkgs/by-name/ke/kea/package.nix b/pkgs/by-name/ke/kea/package.nix index 7a1e38448ea7..f31dfb6f12b9 100644 --- a/pkgs/by-name/ke/kea/package.nix +++ b/pkgs/by-name/ke/kea/package.nix @@ -4,87 +4,108 @@ fetchurl, # build time - autoreconfHook, + bison, + flex, + meson, + ninja, pkg-config, python3Packages, # runtime - withMysql ? stdenv.buildPlatform.system == stdenv.hostPlatform.system, - withPostgres ? stdenv.buildPlatform.system == stdenv.hostPlatform.system, - boost186, - libmysqlclient, + boost, log4cplus, openssl, - libpq, python3, + withKrb5 ? true, + krb5, + withMysql ? stdenv.buildPlatform.system == stdenv.hostPlatform.system, + libmysqlclient, + withPostgresql ? stdenv.buildPlatform.system == stdenv.hostPlatform.system, + libpq, # tests nixosTests, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "kea"; - version = "2.6.3"; # only even minor versions are stable + version = "3.0.0"; # only even minor versions are stable src = fetchurl { - url = "https://ftp.isc.org/isc/${pname}/${version}/${pname}-${version}.tar.gz"; - hash = "sha256-ACQaWVX/09IVosCYxFJ/nX9LIDGIsnb5o2JQ3T2d1hI="; + url = "https://ftp.isc.org/isc/kea/${finalAttrs.version}/kea-${finalAttrs.version}.tar.xz"; + hash = "sha256-v5Y9HhCVHYxXDGBCr8zyfHCdReA4E70mOde7HPxP7nY="; }; patches = [ - ./dont-create-var.patch + ./dont-create-system-paths.patch ]; postPatch = '' - substituteInPlace ./src/bin/keactrl/Makefile.am --replace-fail '@sysconfdir@' "$out/etc" - # darwin special-casing just causes trouble - substituteInPlace ./m4macros/ax_crypto.m4 --replace-fail 'apple-darwin' 'nope' + patchShebangs \ + scripts/grabber.py \ + doc/sphinx/*.sh.in ''; outputs = [ "out" "doc" - "man" + "python" ]; - configureFlags = [ - "--enable-perfdhcp" - "--enable-shell" - "--localstatedir=/var" - "--with-openssl=${lib.getDev openssl}" - ] - ++ lib.optional withPostgres "--with-pgsql=${libpq.pg_config}/bin/pg_config" - ++ lib.optional withMysql "--with-mysql=${lib.getDev libmysqlclient}/bin/mysql_config"; + mesonFlags = [ + (lib.mesonOption "crypto" "openssl") + (lib.mesonEnable "krb5" withKrb5) + (lib.mesonEnable "mysql" withMysql) + (lib.mesonEnable "netconf" false) # missing libyang-cpp, sysinfo, libsysrepo-cpp + (lib.mesonEnable "postgresql" withPostgresql) + (lib.mesonOption "localstatedir" "/var") + (lib.mesonOption "runstatedir" "/run") + ]; postConfigure = '' # Mangle embedded paths to dev-only inputs. - sed -e "s|$NIX_STORE/[a-z0-9]\{32\}-|$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-|g" -i config.report + for file in config.report meson-info/intro*.json; do + sed -e "s|$NIX_STORE/[a-z0-9]\{32\}-|$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-|g" -i "$file" + done ''; nativeBuildInputs = [ - autoreconfHook + bison + flex + meson + ninja pkg-config + python3 ] ++ (with python3Packages; [ - sphinxHook + sphinx sphinx-rtd-theme ]); - sphinxBuilders = [ - "html" - "man" - ]; - sphinxRoot = "doc/sphinx"; - buildInputs = [ - boost186 # does not build with 1.87 yet, see https://gitlab.isc.org/isc-projects/kea/-/merge_requests/2523 - libmysqlclient + boost log4cplus openssl python3 + ] + ++ lib.optionals withMysql [ + libmysqlclient + ] + ++ lib.optionals withPostgresql [ + libpq + ] + ++ lib.optionals withKrb5 [ + krb5 ]; - enableParallelBuilding = true; + postBuild = '' + ninja doc + ''; + + postFixup = '' + mkdir -p $python/lib + mv $out/lib/python* $python/lib/ + ''; passthru.tests = { kea = nixosTests.kea; @@ -98,9 +119,7 @@ stdenv.mkDerivation rec { }; meta = { - # error: implicit instantiation of undefined template 'std::char_traits' - broken = stdenv.hostPlatform.isDarwin; - changelog = "https://downloads.isc.org/isc/kea/${version}/Kea-${version}-ReleaseNotes.txt"; + changelog = "https://gitlab.isc.org/isc-projects/kea/-/wikis/Release-Notes/release-notes-${finalAttrs.version}"; homepage = "https://kea.isc.org/"; description = "High-performance, extensible DHCP server by ISC"; longDescription = '' @@ -117,4 +136,4 @@ stdenv.mkDerivation rec { hexa ]; }; -} +}) From 6a1bee7a29c5b1f5c3f4c33505ef5a06e706c6f0 Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Thu, 17 Jul 2025 10:21:41 +1000 Subject: [PATCH 16/17] nix-eval-jobs: 2.29.0 -> 2.30.0 Diff: https://github.com/nix-community/nix-eval-jobs/compare/v2.29.0...v2.30.0 --- pkgs/tools/package-management/nix-eval-jobs/default.nix | 4 ++-- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/package-management/nix-eval-jobs/default.nix b/pkgs/tools/package-management/nix-eval-jobs/default.nix index 7a9e4772917a..05eec1673097 100644 --- a/pkgs/tools/package-management/nix-eval-jobs/default.nix +++ b/pkgs/tools/package-management/nix-eval-jobs/default.nix @@ -13,13 +13,13 @@ }: stdenv.mkDerivation rec { pname = "nix-eval-jobs"; - version = "2.29.0"; + version = "2.30.0"; src = fetchFromGitHub { owner = "nix-community"; repo = "nix-eval-jobs"; tag = "v${version}"; - hash = "sha256-AJ22q6yWc1hPkqssXMxQqD6QUeJ6hbx52xWHhKsmuP0="; + hash = "sha256-urOFgqXzs+cgd1CKFuN245vOeVx7rIldlS9Q5WcemCw="; }; buildInputs = [ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0e946deefeeb..b495db757c3a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16050,7 +16050,7 @@ with pkgs; ); nix-eval-jobs = callPackage ../tools/package-management/nix-eval-jobs { - nix = nixVersions.nix_2_29; + nix = nixVersions.nix_2_30; }; nix-delegate = haskell.lib.compose.justStaticExecutables haskellPackages.nix-delegate; From c7a9ebc430e388a7f2911d643789502e31f4c04e Mon Sep 17 00:00:00 2001 From: qbisi Date: Tue, 29 Jul 2025 11:29:33 +0800 Subject: [PATCH 17/17] gdcm: remove unused patch --- pkgs/development/libraries/gdcm/default.nix | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pkgs/development/libraries/gdcm/default.nix b/pkgs/development/libraries/gdcm/default.nix index 561bf5d697e7..9bbd2f7600c7 100644 --- a/pkgs/development/libraries/gdcm/default.nix +++ b/pkgs/development/libraries/gdcm/default.nix @@ -34,13 +34,6 @@ stdenv.mkDerivation (finalAttrs: { # Fix vtk deprecated api, See https://docs.vtk.org/en/latest/release_details/9.3.html#id13. # Upstream mailing list: https://sourceforge.net/p/gdcm/mailman/message/59197515. ./fix-vtk-deprecated-api.patch - ] - ++ lib.optionals (lib.versionOlder vtk.version "9.3") [ - (fetchpatch2 { - url = "https://github.com/malaterre/GDCM/commit/3be6c2fa0945c91889bcf06e8c20e88f69692dd5.patch?full_index=1"; - hash = "sha256-Yt5f4mxhP5n+L0A/CRq3CxKCqUT7LZ8uKdbCf9P71Zc="; - revert = true; - }) ]; cmakeFlags = [