From 2865b8f2a320daad30021e39df3f3d70f1af4d76 Mon Sep 17 00:00:00 2001 From: Lorenz Brun Date: Tue, 28 Mar 2023 00:34:10 +0200 Subject: [PATCH 01/32] udisks: backport patch for crash on exit With modern versions of glib udisks reliably crashes when being shut down. The patch has been merged in 2021 [1] but there hasn't been a release including that patch yet [2]. Backport it to avoid crashes. [1] https://github.com/storaged-project/udisks/pull/926 [2] https://github.com/storaged-project/udisks/issues/1024#issuecomment-1296159423 --- pkgs/os-specific/linux/udisks/2-default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/udisks/2-default.nix b/pkgs/os-specific/linux/udisks/2-default.nix index 5aff6e969705..9b56695e212b 100644 --- a/pkgs/os-specific/linux/udisks/2-default.nix +++ b/pkgs/os-specific/linux/udisks/2-default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, substituteAll, pkg-config, gnused, autoreconfHook +{ lib, stdenv, fetchFromGitHub, substituteAll, fetchpatch, pkg-config, gnused, autoreconfHook , gtk-doc, acl, systemd, glib, libatasmart, polkit, coreutils, bash, which , expat, libxslt, docbook_xsl, util-linux, mdadm, libgudev, libblockdev, parted , gobject-introspection, docbook_xml_dtd_412, docbook_xml_dtd_43 @@ -40,6 +40,11 @@ stdenv.mkDerivation rec { xfsprogs ntfs3g parted util-linux ]; }) + # Fix crash on exit, remove on upgrade to 2.10. + (fetchpatch { + url = "https://github.com/storaged-project/udisks/commit/6464e3083c27b9e4d97848b9e69e862f265511d5.patch"; + hash = "sha256-XGprXjJLIL8l4P5MRTHV8GOQR1hpaaFiLgexGnO9Lvg="; + }) ]; strictDeps = true; From 5fbdef572082948ca9c4aefffb9d09dbd50aedb8 Mon Sep 17 00:00:00 2001 From: illustris Date: Sat, 18 Mar 2023 11:08:55 +0530 Subject: [PATCH 02/32] python3Packages.lightgbm: add GPU support --- .../python-modules/lightgbm/default.nix | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/lightgbm/default.nix b/pkgs/development/python-modules/lightgbm/default.nix index 1be852daa157..71604af72977 100644 --- a/pkgs/development/python-modules/lightgbm/default.nix +++ b/pkgs/development/python-modules/lightgbm/default.nix @@ -8,6 +8,11 @@ , scikit-learn , llvmPackages ? null , pythonOlder +, python +, ocl-icd +, opencl-headers +, boost +, gpuSupport ? true }: buildPythonPackage rec { @@ -28,9 +33,13 @@ buildPythonPackage rec { dontUseCmakeConfigure = true; - buildInputs = lib.optionals stdenv.cc.isClang [ + buildInputs = (lib.optionals stdenv.cc.isClang [ llvmPackages.openmp - ]; + ]) ++ (lib.optionals gpuSupport [ + boost + ocl-icd + opencl-headers + ]); propagatedBuildInputs = [ numpy @@ -38,6 +47,10 @@ buildPythonPackage rec { scikit-learn ]; + buildPhase = '' + ${python.pythonForBuild.interpreter} setup.py bdist_wheel ${lib.optionalString gpuSupport "--gpu"} + ''; + postConfigure = '' export HOME=$(mktemp -d) ''; @@ -51,11 +64,11 @@ buildPythonPackage rec { "lightgbm" ]; - meta = with lib; { + meta = { description = "A fast, distributed, high performance gradient boosting (GBDT, GBRT, GBM or MART) framework"; homepage = "https://github.com/Microsoft/LightGBM"; changelog = "https://github.com/microsoft/LightGBM/releases/tag/v${version}"; - license = licenses.mit; - maintainers = with maintainers; [ teh costrouc ]; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ teh costrouc ]; }; } From 58af20bd05b6f1258505a4213ba9782f30bfbf2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=B1=E4=B8=8B?= Date: Tue, 4 Apr 2023 08:51:41 +0900 Subject: [PATCH 03/32] elasticsearchPlugins: add analysis-kuromoji plugin --- pkgs/servers/search/elasticsearch/plugins.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pkgs/servers/search/elasticsearch/plugins.nix b/pkgs/servers/search/elasticsearch/plugins.nix index cb595de6a13e..7952cf4fc081 100644 --- a/pkgs/servers/search/elasticsearch/plugins.nix +++ b/pkgs/servers/search/elasticsearch/plugins.nix @@ -49,6 +49,23 @@ in }; }; + analysis-kuromoji = esPlugin rec { + pluginName = "analysis-kuromoji"; + version = esVersion; + src = fetchurl { + url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${version}.zip"; + sha256 = + if version == "7.17.3" then "1pwirciqzz092a30rys2y97mh62pwhlnk4mvv1a8g4640qmql2jx" + else if version == "6.8.21" then "0ywvqicxwcd5bn1j6gsdqhiagjmpha373p76p4lc2ric3in4dz3p" + else throw "unsupported version ${version} for plugin ${pluginName}"; + }; + meta = with lib; { + homepage = "https://github.com/elastic/elasticsearch/tree/master/plugins/analysis-kuromoji"; + description = "The Japanese (kuromoji) Analysis plugin integrates Lucene kuromoji analysis module into Elasticsearch."; + license = licenses.asl20; + }; + }; + analysis-lemmagen = esPlugin rec { pluginName = "analysis-lemmagen"; version = esVersion; From 69510f467e33a48fd1ffd19f486671609c305a95 Mon Sep 17 00:00:00 2001 From: yvt Date: Fri, 7 Apr 2023 22:06:05 +0900 Subject: [PATCH 04/32] fuse-7z-ng: set `meta.homepage` --- pkgs/tools/filesystems/fuse-7z-ng/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/filesystems/fuse-7z-ng/default.nix b/pkgs/tools/filesystems/fuse-7z-ng/default.nix index d400891a2054..6aecd4022946 100644 --- a/pkgs/tools/filesystems/fuse-7z-ng/default.nix +++ b/pkgs/tools/filesystems/fuse-7z-ng/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { - inherit (src.homepage); + inherit (src.meta) homepage; description = "A FUSE-based filesystem that uses the p7zip library"; longDescription = '' fuse-7z-ng is a FUSE file system that uses the p7zip From e37ea2f136dc6437d2eced540896e69484771525 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 11 Apr 2023 02:05:56 +0000 Subject: [PATCH 05/32] python310Packages.nibabel: 5.0.1 -> 5.1.0 --- pkgs/development/python-modules/nibabel/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/nibabel/default.nix b/pkgs/development/python-modules/nibabel/default.nix index 2c1f0b2ae27c..34066a583646 100644 --- a/pkgs/development/python-modules/nibabel/default.nix +++ b/pkgs/development/python-modules/nibabel/default.nix @@ -20,14 +20,14 @@ buildPythonPackage rec { pname = "nibabel"; - version = "5.0.1"; + version = "5.1.0"; format = "pyproject"; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-SvZQFbTMmZQEyvA04cFcGrZ1h5XCXWkH/3T127/p9D4="; + hash = "sha256-znPKXpVyCechmiI8tx93I1yd8qz00/J/hhujjpSBrFM="; }; nativeBuildInputs = [ From ecde48723a5d91a0f98ea4816f115345edf94441 Mon Sep 17 00:00:00 2001 From: surfaceflinger Date: Mon, 23 Jan 2023 18:11:53 +0100 Subject: [PATCH 06/32] maintainers: add surfaceflinger --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 2b7272fe496f..269ccc47996f 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -14716,6 +14716,12 @@ githubId = 187109; name = "Bjarki Ágúst Guðmundsson"; }; + surfaceflinger = { + email = "nat@nekopon.pl"; + github = "surfaceflinger"; + githubId = 44725111; + name = "nat"; + }; suryasr007 = { email = "94suryateja@gmail.com"; github = "suryasr007"; From 8b0eecfb96c5cf1323dd1ffc61f9801d20e7cf88 Mon Sep 17 00:00:00 2001 From: surfaceflinger Date: Thu, 23 Feb 2023 13:09:53 +0100 Subject: [PATCH 07/32] jazz2: init at 1.8.0 --- pkgs/games/jazz2/content.nix | 20 ++++++++++++++ pkgs/games/jazz2/game.nix | 47 ++++++++++++++++++++++++++++++++ pkgs/games/jazz2/nocontent.patch | 12 ++++++++ pkgs/top-level/all-packages.nix | 4 +++ 4 files changed, 83 insertions(+) create mode 100644 pkgs/games/jazz2/content.nix create mode 100644 pkgs/games/jazz2/game.nix create mode 100644 pkgs/games/jazz2/nocontent.patch diff --git a/pkgs/games/jazz2/content.nix b/pkgs/games/jazz2/content.nix new file mode 100644 index 000000000000..0a0e72075635 --- /dev/null +++ b/pkgs/games/jazz2/content.nix @@ -0,0 +1,20 @@ +{ jazz2 +, lib +, runCommand +}: + +runCommand "jazz2-content" +{ + inherit (jazz2) version src; + + preferLocalBuild = true; + + meta = with lib; { + description = "Assets needed for jazz2"; + homepage = "https://github.com/deathkiller/jazz2-native"; + license = licenses.gpl3; + maintainers = with maintainers; [ surfaceflinger ]; + }; +} '' + cp -r $src/Content $out +'' diff --git a/pkgs/games/jazz2/game.nix b/pkgs/games/jazz2/game.nix new file mode 100644 index 000000000000..fab888b6178c --- /dev/null +++ b/pkgs/games/jazz2/game.nix @@ -0,0 +1,47 @@ +{ cmake +, fetchFromGitHub +, glew +, glfw +, jazz2-content +, lib +, libGL +, libopenmpt +, libvorbis +, openal +, SDL2 +, stdenv +, xorg +, zlib +}: + +stdenv.mkDerivation rec { + pname = "jazz2"; + version = "1.8.0"; + + src = fetchFromGitHub { + owner = "deathkiller"; + repo = "jazz2-native"; + rev = version; + sha256 = "fi1waoLAcnZB0lX+8+wQFoBYOSvVXYK3JKiu81GGF4U="; + }; + + patches = [ ./nocontent.patch ]; + + buildInputs = [ libGL SDL2 zlib glew glfw openal libvorbis libopenmpt xorg.libSM xorg.libICE xorg.libXext ]; + nativeBuildInputs = [ cmake ]; + + cmakeFlags = [ + "-DNCINE_DOWNLOAD_DEPENDENCIES=OFF" + "-DGLFW_INCLUDE_DIR=${glfw}/include/GLFW" + "-DLIBOPENMPT_INCLUDE_DIR=${libopenmpt.dev}/include/libopenmpt" + "-DNCINE_OVERRIDE_CONTENT_PATH=${jazz2-content}" + ]; + + meta = with lib; { + description = "Open-source Jazz Jackrabbit 2 reimplementation"; + homepage = "https://github.com/deathkiller/jazz2-native"; + license = licenses.gpl3; + maintainers = with maintainers; [ surfaceflinger ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/games/jazz2/nocontent.patch b/pkgs/games/jazz2/nocontent.patch new file mode 100644 index 000000000000..28ced9426b49 --- /dev/null +++ b/pkgs/games/jazz2/nocontent.patch @@ -0,0 +1,12 @@ +diff --git a/cmake/ncine_installation.cmake b/cmake/ncine_installation.cmake +index 9ccb707..89c350f 100644 +--- a/cmake/ncine_installation.cmake ++++ b/cmake/ncine_installation.cmake +@@ -195,7 +195,6 @@ endif() + #endif() + + if(NOT EMSCRIPTEN) +- install(DIRECTORY "${NCINE_ROOT}/Content/" DESTINATION ${DATA_INSTALL_DESTINATION}) + else() + install(FILES "${CMAKE_BINARY_DIR}/${CPACK_EXECUTABLE_NAME}.html" DESTINATION ".") + install(FILES "${CMAKE_BINARY_DIR}/${CPACK_EXECUTABLE_NAME}.data" DESTINATION ".") diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 189bbc677e86..0497157a786a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -35877,6 +35877,10 @@ with pkgs; fish-fillets-ng = callPackage ../games/fish-fillets-ng { }; + jazz2 = callPackage ../games/jazz2/game.nix { }; + + jazz2-content = callPackage ../games/jazz2/content.nix { }; + jumpy = callPackage ../games/jumpy { }; flightgear = libsForQt5.callPackage ../games/flightgear { }; From 21a773c671453cadc508bdda884afcbd81435ea9 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Wed, 12 Apr 2023 09:54:46 +0800 Subject: [PATCH 08/32] qt6: drop cmake patch used for fixing cmake file generation The "multiple-outputs.sh" setup hook moves "include", "lib/cmake" and other folders into the "dev" output if it exists, thus breaking the invariants expected by the qt build system and we used to patch cmake to fixup the generated cmake files. In a series of changes to rework qt packaging, we are now setting "moveToDev" to false to suppress that behavior, and the cmake patch is no longer required. --- pkgs/development/libraries/qt-6/default.nix | 6 - .../libraries/qt-6/patches/cmake.patch | 123 ------------------ 2 files changed, 129 deletions(-) delete mode 100644 pkgs/development/libraries/qt-6/patches/cmake.patch diff --git a/pkgs/development/libraries/qt-6/default.nix b/pkgs/development/libraries/qt-6/default.nix index c608e859d10f..1126c520acc3 100644 --- a/pkgs/development/libraries/qt-6/default.nix +++ b/pkgs/development/libraries/qt-6/default.nix @@ -5,7 +5,6 @@ , fetchpatch , makeSetupHook , makeWrapper -, cmake , gst_all_1 , libglvnd , darwin @@ -27,11 +26,6 @@ let callPackage = self.newScope ({ inherit qtModule srcs; stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; - cmake = cmake.overrideAttrs (attrs: { - patches = attrs.patches ++ [ - ./patches/cmake.patch - ]; - }); }); in { diff --git a/pkgs/development/libraries/qt-6/patches/cmake.patch b/pkgs/development/libraries/qt-6/patches/cmake.patch deleted file mode 100644 index 84192f669696..000000000000 --- a/pkgs/development/libraries/qt-6/patches/cmake.patch +++ /dev/null @@ -1,123 +0,0 @@ -commit bd8f6ecea0663bdd150aa48941cbd47d25874396 -Author: Nick Cao -Date: Tue Apr 19 13:49:59 2022 +0800 - - patch cmake file generation for nixpkgs packaging - - As of qt 6.3.0, installing components into different prefixes is not - supported. To workaround that, we move files to their designated in the - postInstall hook. However the generated cmake files still have - references to the original prefix, and would cause issues when using - said components as the dependency of other packages. The purpose of this - patch is to closely match the output layout of qt, and rewrite the - generated cmake files to point to the corrected pathes. - -diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx -index 5a33349b19..677a6084d6 100644 ---- a/Source/cmExportFileGenerator.cxx -+++ b/Source/cmExportFileGenerator.cxx -@@ -7,6 +7,7 @@ - #include - #include - #include -+#include - - #include - -@@ -330,9 +331,21 @@ static void prefixItems(std::string& exportDirs) - for (std::string const& e : entries) { - exportDirs += sep; - sep = ";"; -- if (!cmSystemTools::FileIsFullPath(e) && -- e.find("${_IMPORT_PREFIX}") == std::string::npos) { -- exportDirs += "${_IMPORT_PREFIX}/"; -+ if (!cmSystemTools::FileIsFullPath(e)) { -+ if (std::getenv("dev")) { -+ if (cmHasLiteralPrefix(e, "include") || cmHasLiteralPrefix(e, "./include")) { -+ exportDirs += std::getenv("dev"); -+ } else if (cmHasLiteralPrefix(e, "mkspecs") || cmHasLiteralPrefix(e, "./mkspecs")) { -+ exportDirs += std::getenv("dev"); -+ } else if (cmHasLiteralPrefix(e, "libexec") || cmHasLiteralPrefix(e, "./libexec")) { -+ exportDirs += std::getenv("dev"); -+ } else { -+ exportDirs += std::getenv("out"); -+ } -+ } else { -+ exportDirs += std::getenv("out"); -+ } -+ exportDirs += "/"; - } - exportDirs += e; - } -diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx -index adccdfeece..ba248305bd 100644 ---- a/Source/cmExportInstallFileGenerator.cxx -+++ b/Source/cmExportInstallFileGenerator.cxx -@@ -6,6 +6,7 @@ - #include - #include - #include -+#include - - #include "cmExportSet.h" - #include "cmFileSet.h" -@@ -266,7 +267,7 @@ void cmExportInstallFileGenerator::LoadConfigFiles(std::ostream& os) - - void cmExportInstallFileGenerator::ReplaceInstallPrefix(std::string& input) - { -- cmGeneratorExpression::ReplaceInstallPrefix(input, "${_IMPORT_PREFIX}"); -+ cmGeneratorExpression::ReplaceInstallPrefix(input, std::getenv("out")); - } - - bool cmExportInstallFileGenerator::GenerateImportFileConfig( -@@ -382,9 +383,22 @@ void cmExportInstallFileGenerator::SetImportLocationProperty( - // Construct the installed location of the target. - std::string dest = itgen->GetDestination(config); - std::string value; -+ - if (!cmSystemTools::FileIsFullPath(dest)) { -- // The target is installed relative to the installation prefix. -- value = "${_IMPORT_PREFIX}/"; -+ if (std::getenv("dev")) { -+ if (cmHasLiteralPrefix(dest, "include") || cmHasLiteralPrefix(dest, "./include")) { -+ value = std::getenv("dev"); -+ } else if (cmHasLiteralPrefix(dest, "mkspecs") || cmHasLiteralPrefix(dest, "./mkspecs")) { -+ value = std::getenv("dev"); -+ } else if (cmHasLiteralPrefix(dest, "libexec") || cmHasLiteralPrefix(dest, "./libexec")) { -+ value = std::getenv("dev"); -+ } else { -+ value = std::getenv("out"); -+ } -+ } else { -+ value = std::getenv("out"); -+ } -+ value += "/"; - } - value += dest; - value += "/"; -diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx -index f988e54a19..cc5c7ac9fd 100644 ---- a/Source/cmGeneratorExpression.cxx -+++ b/Source/cmGeneratorExpression.cxx -@@ -192,7 +192,20 @@ static void prefixItems(const std::string& content, std::string& result, - sep = ";"; - if (!cmSystemTools::FileIsFullPath(e) && - cmGeneratorExpression::Find(e) != 0) { -- result += prefix; -+ if (std::getenv("dev")) { -+ if (cmHasLiteralPrefix(e, "include") || cmHasLiteralPrefix(e, "./include")) { -+ result += std::getenv("dev"); -+ } else if (cmHasLiteralPrefix(e, "mkspecs") || cmHasLiteralPrefix(e, "./mkspecs")) { -+ result += std::getenv("dev"); -+ } else if (cmHasLiteralPrefix(e, "libexec") || cmHasLiteralPrefix(e, "./libexec")) { -+ result += std::getenv("dev"); -+ } else { -+ result += std::getenv("out"); -+ } -+ } else { -+ result += std::getenv("out"); -+ } -+ result += "/"; - } - result += e; - } From 97a538791c925979065b7f11d1676ef585360773 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Wed, 12 Apr 2023 09:55:29 +0800 Subject: [PATCH 09/32] qt6: set "moveToDev" to false The qt build system locates header files, libraries and other installed components with paths relative to the cmake files. Thus the default behavior of moving them to the "dev" output breaks these expectations and is now disabled. --- pkgs/development/libraries/qt-6/modules/qtbase.nix | 2 ++ pkgs/development/libraries/qt-6/qtModule.nix | 2 ++ 2 files changed, 4 insertions(+) diff --git a/pkgs/development/libraries/qt-6/modules/qtbase.nix b/pkgs/development/libraries/qt-6/modules/qtbase.nix index 3a4e6d8c8901..592ca15bcab9 100644 --- a/pkgs/development/libraries/qt-6/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-6/modules/qtbase.nix @@ -259,6 +259,8 @@ stdenv.mkDerivation rec { "bin/uic" ]; + moveToDev = false; + postFixup = '' moveToOutput "mkspecs" "$dev" moveToOutput "modules" "$dev" diff --git a/pkgs/development/libraries/qt-6/qtModule.nix b/pkgs/development/libraries/qt-6/qtModule.nix index 8efbfdece4c3..d7952db753e7 100644 --- a/pkgs/development/libraries/qt-6/qtModule.nix +++ b/pkgs/development/libraries/qt-6/qtModule.nix @@ -26,6 +26,8 @@ stdenv.mkDerivation (args // { nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ cmake ninja perl ]; propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or [ ]); + moveToDev = false; + outputs = args.outputs or [ "out" "dev" ]; dontWrapQtApps = args.dontWrapQtApps or true; From d94ae302c69be52021d6b688679ac7b86d148712 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Thu, 13 Apr 2023 21:10:50 +0800 Subject: [PATCH 10/32] qt6.qtbase: do not embed compiler information into generated cmake files The qt build system embeds information about compilers used during building qtbase into the generated cmake files, to avoid mixing different compilers when building qt modules, however this greatly bloats the closure size of qtbase and the mixed use of compilers is sometimes desired in Nixpkgs. --- pkgs/development/libraries/qt-6/modules/qtbase.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/libraries/qt-6/modules/qtbase.nix b/pkgs/development/libraries/qt-6/modules/qtbase.nix index 592ca15bcab9..0babdbc6094c 100644 --- a/pkgs/development/libraries/qt-6/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-6/modules/qtbase.nix @@ -212,6 +212,7 @@ stdenv.mkDerivation rec { qtQmlPrefix = "lib/qt-6/qml"; cmakeFlags = [ + "-DQT_EMBED_TOOLCHAIN_COMPILER=OFF" "-DINSTALL_PLUGINSDIR=${qtPluginPrefix}" "-DINSTALL_QMLDIR=${qtQmlPrefix}" "-DQT_FEATURE_libproxy=ON" From 5aa78f89f029200ce4e882e29389fb6d58ccdee5 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Fri, 14 Apr 2023 18:52:06 +0800 Subject: [PATCH 11/32] qt6.qtbase: refresh patches Apart from the previous ones, two new patches are added. One for reducing the runtime closure size by removing reference to cmake, the other for fixing the linker flags in generated qmake files. --- pkgs/development/libraries/qt-6/default.nix | 10 ++-- ...ays-use-libname-instead-of-absolute-.patch | 50 +++++++++++++++++++ ...qtbase-qmake-fix-mkspecs-for-darwin.patch} | 29 ++++++++--- ...-includedir-in-generated-pkg-config.patch} | 14 +++++- ...-qtbase-fix-locating-tzdir-on-NixOS.patch} | 16 +++++- ...a-font-face-at-index-0-as-Regular-f.patch} | 6 +-- ...-qt-cmake-always-use-cmake-from-path.patch | 32 ++++++++++++ 7 files changed, 141 insertions(+), 16 deletions(-) create mode 100644 pkgs/development/libraries/qt-6/patches/0001-qtbase-qmake-always-use-libname-instead-of-absolute-.patch rename pkgs/development/libraries/qt-6/patches/{qtbase-qmake-mkspecs-mac.patch => 0002-qtbase-qmake-fix-mkspecs-for-darwin.patch} (96%) rename pkgs/development/libraries/qt-6/patches/{qtbase-qmake-pkg-config.patch => 0003-qtbase-qmake-fix-includedir-in-generated-pkg-config.patch} (58%) rename pkgs/development/libraries/qt-6/patches/{qtbase-tzdir.patch => 0004-qtbase-fix-locating-tzdir-on-NixOS.patch} (84%) rename pkgs/development/libraries/qt-6/patches/{qtbase-variable-fonts.patch => 0005-qtbase-deal-with-a-font-face-at-index-0-as-Regular-f.patch} (83%) create mode 100644 pkgs/development/libraries/qt-6/patches/0006-qtbase-qt-cmake-always-use-cmake-from-path.patch diff --git a/pkgs/development/libraries/qt-6/default.nix b/pkgs/development/libraries/qt-6/default.nix index 1126c520acc3..074da9adb401 100644 --- a/pkgs/development/libraries/qt-6/default.nix +++ b/pkgs/development/libraries/qt-6/default.nix @@ -40,10 +40,12 @@ let inherit developerBuild; inherit (darwin.apple_sdk_11_0.frameworks) AGL AVFoundation AppKit GSS MetalKit; patches = [ - ./patches/qtbase-qmake-mkspecs-mac.patch - ./patches/qtbase-qmake-pkg-config.patch - ./patches/qtbase-tzdir.patch - ./patches/qtbase-variable-fonts.patch + ./patches/0001-qtbase-qmake-always-use-libname-instead-of-absolute-.patch + ./patches/0002-qtbase-qmake-fix-mkspecs-for-darwin.patch + ./patches/0003-qtbase-qmake-fix-includedir-in-generated-pkg-config.patch + ./patches/0004-qtbase-fix-locating-tzdir-on-NixOS.patch + ./patches/0005-qtbase-deal-with-a-font-face-at-index-0-as-Regular-f.patch + ./patches/0006-qtbase-qt-cmake-always-use-cmake-from-path.patch # Remove symlink check causing build to bail out and fail. # https://gitlab.kitware.com/cmake/cmake/-/issues/23251 (fetchpatch { diff --git a/pkgs/development/libraries/qt-6/patches/0001-qtbase-qmake-always-use-libname-instead-of-absolute-.patch b/pkgs/development/libraries/qt-6/patches/0001-qtbase-qmake-always-use-libname-instead-of-absolute-.patch new file mode 100644 index 000000000000..5a13930024fb --- /dev/null +++ b/pkgs/development/libraries/qt-6/patches/0001-qtbase-qmake-always-use-libname-instead-of-absolute-.patch @@ -0,0 +1,50 @@ +From 8880bc263a366aeb82056f0bf3f1b17b6ec26900 Mon Sep 17 00:00:00 2001 +From: Nick Cao +Date: Thu, 13 Apr 2023 23:42:29 +0800 +Subject: [PATCH 1/6] qtbase: qmake: always use libname instead of absolute + path in qmake files + +In generated qmake files, absolute paths to qt libraries are embedded +and then used in linker flags. However as the libraries can be provided +by qt modules other than the one currently being built, the ebedded +paths can be incorrect. +--- + cmake/QtFinishPrlFile.cmake | 7 ++++--- + cmake/QtGenerateLibHelpers.cmake | 3 --- + 2 files changed, 4 insertions(+), 6 deletions(-) + +diff --git a/cmake/QtFinishPrlFile.cmake b/cmake/QtFinishPrlFile.cmake +index 32169e418c..4e754af367 100644 +--- a/cmake/QtFinishPrlFile.cmake ++++ b/cmake/QtFinishPrlFile.cmake +@@ -61,9 +61,10 @@ foreach(line ${lines}) + endif() + list(APPEND adjusted_libs "-framework" "${CMAKE_MATCH_1}") + else() +- # Not a framework, transform the Qt module into relocatable relative path. +- qt_strip_library_version_suffix(relative_lib "${relative_lib}") +- list(APPEND adjusted_libs "$$[QT_INSTALL_LIBS]/${relative_lib}") ++ # Not a framework, extract the library name and prepend an -l to make ++ # it relocatable. ++ qt_transform_absolute_library_paths_to_link_flags(lib_with_link_flag "${lib}") ++ list(APPEND adjusted_libs "${lib_with_link_flag}") + endif() + endif() + else() +diff --git a/cmake/QtGenerateLibHelpers.cmake b/cmake/QtGenerateLibHelpers.cmake +index e3f4bbf881..f8bd26acc7 100644 +--- a/cmake/QtGenerateLibHelpers.cmake ++++ b/cmake/QtGenerateLibHelpers.cmake +@@ -70,9 +70,6 @@ function(qt_transform_absolute_library_paths_to_link_flags out_var library_path_ + string(TOLOWER "${dir}" dir_lower) + # If library_path isn't in default link directories, we should add it to link flags. + list(FIND IMPLICIT_LINK_DIRECTORIES_LOWER "${dir_lower}" index) +- if(${index} EQUAL -1) +- list(APPEND out_list "-L\"${dir}\"") +- endif() + list(APPEND out_list "${lib_name_with_link_flag}") + else() + list(APPEND out_list "${library_path}") +-- +2.39.2 + diff --git a/pkgs/development/libraries/qt-6/patches/qtbase-qmake-mkspecs-mac.patch b/pkgs/development/libraries/qt-6/patches/0002-qtbase-qmake-fix-mkspecs-for-darwin.patch similarity index 96% rename from pkgs/development/libraries/qt-6/patches/qtbase-qmake-mkspecs-mac.patch rename to pkgs/development/libraries/qt-6/patches/0002-qtbase-qmake-fix-mkspecs-for-darwin.patch index 0830a4432bf2..c628f9f25071 100644 --- a/pkgs/development/libraries/qt-6/patches/qtbase-qmake-mkspecs-mac.patch +++ b/pkgs/development/libraries/qt-6/patches/0002-qtbase-qmake-fix-mkspecs-for-darwin.patch @@ -1,5 +1,19 @@ +From 034db4e75ec749ac78fcf8235fa659b0eca83c30 Mon Sep 17 00:00:00 2001 +From: Nick Cao +Date: Fri, 14 Apr 2023 09:34:08 +0800 +Subject: [PATCH 2/6] qtbase: qmake: fix mkspecs for darwin + +--- + mkspecs/common/mac.conf | 2 +- + mkspecs/features/mac/default_post.prf | 263 -------------------------- + mkspecs/features/mac/default_pre.prf | 58 ------ + mkspecs/features/mac/sdk.mk | 27 --- + mkspecs/features/mac/sdk.prf | 61 ------ + mkspecs/features/mac/toolchain.prf | 5 - + 6 files changed, 1 insertion(+), 415 deletions(-) + diff --git a/mkspecs/common/mac.conf b/mkspecs/common/mac.conf -index 61bea952..9909dae7 100644 +index 61bea952b2..9909dae726 100644 --- a/mkspecs/common/mac.conf +++ b/mkspecs/common/mac.conf @@ -23,7 +23,7 @@ QMAKE_INCDIR_OPENGL = \ @@ -12,7 +26,7 @@ index 61bea952..9909dae7 100644 QMAKE_LFLAGS_REL_RPATH = diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf -index 09db1764..aadfce87 100644 +index 09db1764b1..aadfce875e 100644 --- a/mkspecs/features/mac/default_post.prf +++ b/mkspecs/features/mac/default_post.prf @@ -1,9 +1,5 @@ @@ -299,7 +313,7 @@ index 09db1764..aadfce87 100644 generate_xcode_project.commands = @$(QMAKE) -spec macx-xcode \"$(EXPORT__PRO_FILE_)\" $$QMAKE_ARGS generate_xcode_project.target = xcodeproj diff --git a/mkspecs/features/mac/default_pre.prf b/mkspecs/features/mac/default_pre.prf -index e3534561..3b01424e 100644 +index e3534561a5..3b01424e67 100644 --- a/mkspecs/features/mac/default_pre.prf +++ b/mkspecs/features/mac/default_pre.prf @@ -1,60 +1,2 @@ @@ -364,7 +378,7 @@ index e3534561..3b01424e 100644 -xcode_copy_phase_strip_setting.value = NO -QMAKE_MAC_XCODE_SETTINGS += xcode_copy_phase_strip_setting diff --git a/mkspecs/features/mac/sdk.mk b/mkspecs/features/mac/sdk.mk -index a32ceacb..e69de29b 100644 +index a32ceacb6c..e69de29bb2 100644 --- a/mkspecs/features/mac/sdk.mk +++ b/mkspecs/features/mac/sdk.mk @@ -1,27 +0,0 @@ @@ -396,7 +410,7 @@ index a32ceacb..e69de29b 100644 - endif -endif diff --git a/mkspecs/features/mac/sdk.prf b/mkspecs/features/mac/sdk.prf -index 3a9c2778..e69de29b 100644 +index 3a9c2778bb..e69de29bb2 100644 --- a/mkspecs/features/mac/sdk.prf +++ b/mkspecs/features/mac/sdk.prf @@ -1,61 +0,0 @@ @@ -462,7 +476,7 @@ index 3a9c2778..e69de29b 100644 - cache($$tool_variable, set stash, $$tool) -} diff --git a/mkspecs/features/mac/toolchain.prf b/mkspecs/features/mac/toolchain.prf -index df191eb1..e69de29b 100644 +index df191eb13c..e69de29bb2 100644 --- a/mkspecs/features/mac/toolchain.prf +++ b/mkspecs/features/mac/toolchain.prf @@ -1,5 +0,0 @@ @@ -471,3 +485,6 @@ index df191eb1..e69de29b 100644 -sdk: load(sdk) - -load(toolchain) +-- +2.39.2 + diff --git a/pkgs/development/libraries/qt-6/patches/qtbase-qmake-pkg-config.patch b/pkgs/development/libraries/qt-6/patches/0003-qtbase-qmake-fix-includedir-in-generated-pkg-config.patch similarity index 58% rename from pkgs/development/libraries/qt-6/patches/qtbase-qmake-pkg-config.patch rename to pkgs/development/libraries/qt-6/patches/0003-qtbase-qmake-fix-includedir-in-generated-pkg-config.patch index 90caaea1cf4d..df1effff83ef 100644 --- a/pkgs/development/libraries/qt-6/patches/qtbase-qmake-pkg-config.patch +++ b/pkgs/development/libraries/qt-6/patches/0003-qtbase-qmake-fix-includedir-in-generated-pkg-config.patch @@ -1,7 +1,17 @@ +From bc91f05db85b774f26d6bce86e2e618dfc7a6883 Mon Sep 17 00:00:00 2001 +From: Nick Cao +Date: Fri, 14 Apr 2023 09:34:46 +0800 +Subject: [PATCH 3/6] qtbase: qmake: fix includedir in generated pkg-config + +--- + qmake/generators/makefile.cpp | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp +index da585bd9b2..3abf9cee83 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp -@@ -3390,8 +3390,7 @@ MakefileGenerator::writePkgConfigFile() +@@ -3402,8 +3402,7 @@ MakefileGenerator::writePkgConfigFile() << varGlue("QMAKE_PKGCONFIG_CFLAGS", "", " ", " ") // << varGlue("DEFINES","-D"," -D"," ") ; @@ -11,4 +21,6 @@ diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp if (target_mode == TARG_MAC_MODE && project->isActiveConfig("lib_bundle") && libDir != QLatin1String("/Library/Frameworks")) { t << " -F${libdir}"; +-- +2.39.2 diff --git a/pkgs/development/libraries/qt-6/patches/qtbase-tzdir.patch b/pkgs/development/libraries/qt-6/patches/0004-qtbase-fix-locating-tzdir-on-NixOS.patch similarity index 84% rename from pkgs/development/libraries/qt-6/patches/qtbase-tzdir.patch rename to pkgs/development/libraries/qt-6/patches/0004-qtbase-fix-locating-tzdir-on-NixOS.patch index fc36130c7aad..1e66804a5c10 100644 --- a/pkgs/development/libraries/qt-6/patches/qtbase-tzdir.patch +++ b/pkgs/development/libraries/qt-6/patches/0004-qtbase-fix-locating-tzdir-on-NixOS.patch @@ -1,5 +1,14 @@ +From d612c1d7161f95864b9383df84b16d8c24fbcc9b Mon Sep 17 00:00:00 2001 +From: Nick Cao +Date: Fri, 14 Apr 2023 09:35:25 +0800 +Subject: [PATCH 4/6] qtbase: fix locating tzdir on NixOS + +--- + src/corelib/time/qtimezoneprivate_tz.cpp | 27 +++++++++++++++--------- + 1 file changed, 17 insertions(+), 10 deletions(-) + diff --git a/src/corelib/time/qtimezoneprivate_tz.cpp b/src/corelib/time/qtimezoneprivate_tz.cpp -index 627a4a81..a5f50acc 100644 +index e87e34f76d..39bd79d4a4 100644 --- a/src/corelib/time/qtimezoneprivate_tz.cpp +++ b/src/corelib/time/qtimezoneprivate_tz.cpp @@ -51,7 +51,11 @@ typedef QHash QTzTimeZoneHash; @@ -15,7 +24,7 @@ index 627a4a81..a5f50acc 100644 if (!QFile::exists(path)) path = QStringLiteral("/usr/lib/zoneinfo/zone.tab"); -@@ -727,18 +731,21 @@ QTzTimeZoneCacheEntry QTzTimeZoneCache::findEntry(const QByteArray &ianaId) +@@ -729,18 +733,21 @@ QTzTimeZoneCacheEntry QTzTimeZoneCache::findEntry(const QByteArray &ianaId) if (!tzif.open(QIODevice::ReadOnly)) return ret; } else { @@ -46,3 +55,6 @@ index 627a4a81..a5f50acc 100644 } } } +-- +2.39.2 + diff --git a/pkgs/development/libraries/qt-6/patches/qtbase-variable-fonts.patch b/pkgs/development/libraries/qt-6/patches/0005-qtbase-deal-with-a-font-face-at-index-0-as-Regular-f.patch similarity index 83% rename from pkgs/development/libraries/qt-6/patches/qtbase-variable-fonts.patch rename to pkgs/development/libraries/qt-6/patches/0005-qtbase-deal-with-a-font-face-at-index-0-as-Regular-f.patch index 96952d1ad160..121fc09b6451 100644 --- a/pkgs/development/libraries/qt-6/patches/qtbase-variable-fonts.patch +++ b/pkgs/development/libraries/qt-6/patches/0005-qtbase-deal-with-a-font-face-at-index-0-as-Regular-f.patch @@ -1,8 +1,8 @@ -From 9ba9c690fb16188ff524b53def104e68e45cf5c3 Mon Sep 17 00:00:00 2001 +From 5bd3672c7870b2e46e2a734dc9a9cb1837375a1c Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Tue, 21 Mar 2023 15:48:49 +0800 -Subject: [PATCH] Deal with a font face at index 0 as Regular for Variable - fonts +Subject: [PATCH 5/6] qtbase: deal with a font face at index 0 as Regular for + Variable fonts Reference: https://bugreports.qt.io/browse/QTBUG-111994 --- diff --git a/pkgs/development/libraries/qt-6/patches/0006-qtbase-qt-cmake-always-use-cmake-from-path.patch b/pkgs/development/libraries/qt-6/patches/0006-qtbase-qt-cmake-always-use-cmake-from-path.patch new file mode 100644 index 000000000000..addd7a868317 --- /dev/null +++ b/pkgs/development/libraries/qt-6/patches/0006-qtbase-qt-cmake-always-use-cmake-from-path.patch @@ -0,0 +1,32 @@ +From f0017e872297168ab616096180891c7f312ef1a1 Mon Sep 17 00:00:00 2001 +From: Nick Cao +Date: Wed, 12 Apr 2023 10:13:50 +0800 +Subject: [PATCH 6/6] qtbase: qt-cmake: always use cmake from path + +The generated qt-cmake scripts embeds the absolute path of cmake used +during the build of qtbase, bloating the runtime closure of qtbase. +--- + bin/qt-cmake.in | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +diff --git a/bin/qt-cmake.in b/bin/qt-cmake.in +index f719257f60..571ffe788f 100755 +--- a/bin/qt-cmake.in ++++ b/bin/qt-cmake.in +@@ -4,12 +4,7 @@ + script_dir_path=`dirname $0` + script_dir_path=`(cd "$script_dir_path"; /bin/pwd)` + +-# Try to use original cmake, otherwise to make it relocatable, use any cmake found in PATH. +-original_cmake_path="@CMAKE_COMMAND@" +-cmake_path=$original_cmake_path +-if ! test -f "$cmake_path"; then +- cmake_path="cmake" +-fi ++cmake_path="cmake" + + toolchain_path="$script_dir_path/@__GlobalConfig_relative_path_from_bin_dir_to_cmake_config_dir@/qt.toolchain.cmake" + +-- +2.39.2 + From d84e2bf05653e277c74afc1077f3126d403bf720 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Thu, 13 Apr 2023 21:11:49 +0800 Subject: [PATCH 12/32] qt6: do not move devTools to dev output --- .../libraries/qt-6/hooks/move-qt-dev-tools.sh | 34 ------------------- .../libraries/qt-6/modules/qtbase.nix | 27 ++------------- pkgs/development/libraries/qt-6/qtModule.nix | 9 ----- 3 files changed, 2 insertions(+), 68 deletions(-) delete mode 100644 pkgs/development/libraries/qt-6/hooks/move-qt-dev-tools.sh diff --git a/pkgs/development/libraries/qt-6/hooks/move-qt-dev-tools.sh b/pkgs/development/libraries/qt-6/hooks/move-qt-dev-tools.sh deleted file mode 100644 index 85489c85105b..000000000000 --- a/pkgs/development/libraries/qt-6/hooks/move-qt-dev-tools.sh +++ /dev/null @@ -1,34 +0,0 @@ -updateToolPath() { - local tool="$1" - local target="$2" - local original="${!outputBin}/$tool" - local actual="${!outputDev}/$tool" - if grep -q "$original" "$target"; then - echo "updateToolPath: Updating \`$original' in \`$target\'..." - sed -i "$target" -e "s|$original|$actual|" - fi -} - -moveQtDevTools() { - if [ -n "$devTools" ]; then - for tool in $devTools; do - moveToOutput "$tool" "${!outputDev}" - done - - if [ -d "${!outputDev}/mkspecs" ]; then - find "${!outputDev}/mkspecs" -name '*.pr?' | while read pr_; do - for tool in $devTools; do - updateToolPath "$tool" "$pr_" - done - done - fi - - if [ -d "${!outputDev}/lib/cmake" ]; then - find "${!outputDev}/lib/cmake" -name '*.cmake' | while read cmake; do - for tool in $devTools; do - updateToolPath "$tool" "$cmake" - done - done - fi - fi -} diff --git a/pkgs/development/libraries/qt-6/modules/qtbase.nix b/pkgs/development/libraries/qt-6/modules/qtbase.nix index 0babdbc6094c..b529bd7b9684 100644 --- a/pkgs/development/libraries/qt-6/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-6/modules/qtbase.nix @@ -204,7 +204,6 @@ stdenv.mkDerivation rec { preHook = '' . "$fix_qt_builtin_paths" . "$fix_qt_module_paths" - . ${../hooks/move-qt-dev-tools.sh} . ${../hooks/fix-qmake-libtool.sh} ''; @@ -263,30 +262,8 @@ stdenv.mkDerivation rec { moveToDev = false; postFixup = '' - moveToOutput "mkspecs" "$dev" - moveToOutput "modules" "$dev" - moveToOutput "lib/*.prl" "$dev" - - fixQtModulePaths "$dev/mkspecs/modules" - fixQtBuiltinPaths "$dev" '*.pr?' - - # Move development tools to $dev - moveQtDevTools - moveToOutput libexec "$dev" - - # fixup .pc file (where to find 'moc' etc.) - if [ -f "$dev/lib/pkgconfig/Qt6Core.pc" ]; then - sed -i "$dev/lib/pkgconfig/Qt6Core.pc" \ - -e "/^bindir=/ c bindir=$dev/bin" \ - -e "/^libexecdir=/ c libexecdir=$dev/libexec" - fi - - patchShebangs $out $dev - - # QTEST_ASSERT and other macros keeps runtime reference to qtbase.dev - if [ -f "$dev/include/QtTest/qtestassert.h" ]; then - substituteInPlace "$dev/include/QtTest/qtestassert.h" --replace "__FILE__" "__BASE_FILE__" - fi + fixQtModulePaths "$out/mkspecs/modules" + fixQtBuiltinPaths "$out" '*.pr?' ''; dontStrip = debugSymbols; diff --git a/pkgs/development/libraries/qt-6/qtModule.nix b/pkgs/development/libraries/qt-6/qtModule.nix index d7952db753e7..2f7de7502379 100644 --- a/pkgs/development/libraries/qt-6/qtModule.nix +++ b/pkgs/development/libraries/qt-6/qtModule.nix @@ -18,10 +18,6 @@ stdenv.mkDerivation (args // { inherit pname version src; patches = args.patches or patches.${pname} or [ ]; - preHook = '' - . ${./hooks/move-qt-dev-tools.sh} - ''; - buildInputs = args.buildInputs or [ ]; nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ cmake ninja perl ]; propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or [ ]); @@ -32,11 +28,6 @@ stdenv.mkDerivation (args // { dontWrapQtApps = args.dontWrapQtApps or true; - postFixup = '' - moveToOutput "libexec" "''${!outputDev}" - moveQtDevTools - '' + args.postFixup or ""; - meta = with lib; { homepage = "https://www.qt.io/"; description = "A cross-platform application framework for C++"; From f9f2b3ae42732f69abaf277bb6a0e2152a5a11c0 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Fri, 14 Apr 2023 09:06:44 +0800 Subject: [PATCH 13/32] qt6: fix references to qmake As devTools are no longer moved to the dev output, paths to qmake has to be updated. --- .../development/libraries/qt-6/hooks/qtbase-setup-hook.sh | 8 ++++---- pkgs/development/libraries/qt-6/qt-env.nix | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/qt-6/hooks/qtbase-setup-hook.sh b/pkgs/development/libraries/qt-6/hooks/qtbase-setup-hook.sh index 16d9f31dbadf..f0fa226e06ae 100644 --- a/pkgs/development/libraries/qt-6/hooks/qtbase-setup-hook.sh +++ b/pkgs/development/libraries/qt-6/hooks/qtbase-setup-hook.sh @@ -1,13 +1,13 @@ if [[ -n "${__nix_qtbase-}" ]]; then # Throw an error if a different version of Qt was already set up. - if [[ "$__nix_qtbase" != "@dev@" ]]; then + if [[ "$__nix_qtbase" != "@out@" ]]; then echo >&2 "Error: detected mismatched Qt dependencies:" - echo >&2 " @dev@" + echo >&2 " @out@" echo >&2 " $__nix_qtbase" exit 1 fi else # Only set up Qt once. - __nix_qtbase="@dev@" + __nix_qtbase="@out@" qtPluginPrefix=@qtPluginPrefix@ qtQmlPrefix=@qtQmlPrefix@ @@ -30,7 +30,7 @@ else # Only set up Qt once. fi # Build tools are often confused if QMAKE is unset. - export QMAKE=@dev@/bin/qmake + export QMAKE=@out@/bin/qmake export QMAKEPATH= diff --git a/pkgs/development/libraries/qt-6/qt-env.nix b/pkgs/development/libraries/qt-6/qt-env.nix index 0b41f0c07351..0202783a9d8e 100644 --- a/pkgs/development/libraries/qt-6/qt-env.nix +++ b/pkgs/development/libraries/qt-6/qt-env.nix @@ -9,7 +9,7 @@ buildEnv { postBuild = '' rm "$out/bin/qmake" - cp "${qtbase.dev}/bin/qmake" "$out/bin" + cp "${qtbase}/bin/qmake" "$out/bin" cat >"$out/bin/qt.conf" < Date: Thu, 13 Apr 2023 23:45:44 +0800 Subject: [PATCH 14/32] qt6.qtbase: remove fixQmakeLibtool hook As we are now building qt modules with cmake, libtool libraries are no longer generated, the fixQmakeLibtool hook can be droppped. --- pkgs/development/libraries/qt-6/modules/qtbase.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/development/libraries/qt-6/modules/qtbase.nix b/pkgs/development/libraries/qt-6/modules/qtbase.nix index b529bd7b9684..9e22ae67c606 100644 --- a/pkgs/development/libraries/qt-6/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-6/modules/qtbase.nix @@ -204,7 +204,6 @@ stdenv.mkDerivation rec { preHook = '' . "$fix_qt_builtin_paths" . "$fix_qt_module_paths" - . ${../hooks/fix-qmake-libtool.sh} ''; qtPluginPrefix = "lib/qt-6/plugins"; From d25348517e1e98cc1023b3b233f488c519c1cd77 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Thu, 13 Apr 2023 21:16:30 +0800 Subject: [PATCH 15/32] qt6.qtbase: fixup paths in setup hooks --- .../qt-6/hooks/fix-qt-builtin-paths.sh | 51 +++++++++---------- .../qt-6/hooks/fix-qt-module-paths.sh | 13 +---- .../libraries/qt-6/hooks/qtbase-setup-hook.sh | 19 +++---- 3 files changed, 32 insertions(+), 51 deletions(-) diff --git a/pkgs/development/libraries/qt-6/hooks/fix-qt-builtin-paths.sh b/pkgs/development/libraries/qt-6/hooks/fix-qt-builtin-paths.sh index 0fd0aee7dbf9..d6f8ab32f799 100644 --- a/pkgs/development/libraries/qt-6/hooks/fix-qt-builtin-paths.sh +++ b/pkgs/development/libraries/qt-6/hooks/fix-qt-builtin-paths.sh @@ -7,9 +7,6 @@ fixQtBuiltinPaths() { local dir="$1" local pattern="$2" - local bin="${!outputBin}" - local dev="${!outputDev}" - local doc="${!outputDoc}" local lib="${!outputLib}" if [ -d "$dir" ]; then @@ -17,48 +14,48 @@ fixQtBuiltinPaths() { if grep -q '\$\$\[QT_' "${pr_:?}"; then echo "fixQtBuiltinPaths: Fixing Qt builtin paths in \`${pr_:?}'..." sed -i "${pr_:?}" \ - -e "s|\\\$\\\$\\[QT_HOST_BINS[^]]*\\]|$dev/bin|g" \ - -e "s|\\\$\\\$\\[QT_HOST_LIBEXECS[^]]*\\]|$dev/libexec|g" \ - -e "s|\\\$\\\$\\[QT_HOST_DATA[^]]*\\]/mkspecs|$dev/mkspecs|g" \ - -e "s|\\\$\\\$\\[QT_HOST_PREFIX[^]]*\\]|$dev|g" \ + -e "s|\\\$\\\$\\[QT_HOST_BINS[^]]*\\]|$lib/bin|g" \ + -e "s|\\\$\\\$\\[QT_HOST_LIBEXECS[^]]*\\]|$lib/libexec|g" \ + -e "s|\\\$\\\$\\[QT_HOST_DATA[^]]*\\]/mkspecs|$lib/mkspecs|g" \ + -e "s|\\\$\\\$\\[QT_HOST_PREFIX[^]]*\\]|$lib|g" \ -e "s|\\\$\\\$\\[QT_INSTALL_ARCHDATA[^]]*\\]|$lib|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_BINS[^]]*\\]|$bin/bin|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_CONFIGURATION[^]]*\\]|$bin|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_BINS[^]]*\\]|$lib/bin|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_CONFIGURATION[^]]*\\]|$lib|g" \ -e "s|\\\$\\\$\\[QT_INSTALL_DATA[^]]*\\]|$lib|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_DOCS[^]]*\\]|$doc/share/doc|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_EXAMPLES[^]]*\\]|$doc/examples|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_HEADERS[^]]*\\]|$dev/include|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_DOCS[^]]*\\]|$lib/share/doc|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_EXAMPLES[^]]*\\]|$lib/examples|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_HEADERS[^]]*\\]|$lib/include|g" \ -e "s|\\\$\\\$\\[QT_INSTALL_LIBS[^]]*\\]|$lib/lib|g" \ -e "s|\\\$\\\$\\[QT_INSTALL_LIBEXECS[^]]*\\]|$lib/libexec|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_PLUGINS[^]]*\\]|$bin/$qtPluginPrefix|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_PLUGINS[^]]*\\]|$lib/$qtPluginPrefix|g" \ -e "s|\\\$\\\$\\[QT_INSTALL_PREFIX[^]]*\\]|$lib|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_TESTS[^]]*\\]|$dev/tests|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_TESTS[^]]*\\]|$lib/tests|g" \ -e "s|\\\$\\\$\\[QT_INSTALL_TRANSLATIONS[^]]*\\]|$lib/translations|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_QML[^]]*\\]|$bin/$qtQmlPrefix|g" + -e "s|\\\$\\\$\\[QT_INSTALL_QML[^]]*\\]|$lib/$qtQmlPrefix|g" fi done elif [ -e "$dir" ]; then if grep -q '\$\$\[QT_' "${dir:?}"; then echo "fixQtBuiltinPaths: Fixing Qt builtin paths in \`${dir:?}'..." sed -i "${dir:?}" \ - -e "s|\\\$\\\$\\[QT_HOST_BINS[^]]*\\]|$dev/bin|g" \ - -e "s|\\\$\\\$\\[QT_HOST_LIBEXECS[^]]*\\]|$dev/libexec|g" \ - -e "s|\\\$\\\$\\[QT_HOST_DATA[^]]*\\]/mkspecs|$dev/mkspecs|g" \ - -e "s|\\\$\\\$\\[QT_HOST_PREFIX[^]]*\\]|$dev|g" \ + -e "s|\\\$\\\$\\[QT_HOST_BINS[^]]*\\]|$lib/bin|g" \ + -e "s|\\\$\\\$\\[QT_HOST_LIBEXECS[^]]*\\]|$lib/libexec|g" \ + -e "s|\\\$\\\$\\[QT_HOST_DATA[^]]*\\]/mkspecs|$lib/mkspecs|g" \ + -e "s|\\\$\\\$\\[QT_HOST_PREFIX[^]]*\\]|$lib|g" \ -e "s|\\\$\\\$\\[QT_INSTALL_ARCHDATA[^]]*\\]|$lib|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_BINS[^]]*\\]|$bin/bin|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_CONFIGURATION[^]]*\\]|$bin|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_BINS[^]]*\\]|$lib/bin|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_CONFIGURATION[^]]*\\]|$lib|g" \ -e "s|\\\$\\\$\\[QT_INSTALL_DATA[^]]*\\]|$lib|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_DOCS[^]]*\\]|$doc/share/doc|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_EXAMPLES[^]]*\\]|$doc/examples|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_HEADERS[^]]*\\]|$dev/include|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_DOCS[^]]*\\]|$lib/share/doc|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_EXAMPLES[^]]*\\]|$lib/examples|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_HEADERS[^]]*\\]|$lib/include|g" \ -e "s|\\\$\\\$\\[QT_INSTALL_LIBS[^]]*\\]|$lib/lib|g" \ -e "s|\\\$\\\$\\[QT_INSTALL_LIBEXECS[^]]*\\]|$lib/libexec|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_PLUGINS[^]]*\\]|$bin/$qtPluginPrefix|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_PLUGINS[^]]*\\]|$lib/$qtPluginPrefix|g" \ -e "s|\\\$\\\$\\[QT_INSTALL_PREFIX[^]]*\\]|$lib|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_TESTS[^]]*\\]|$dev/tests|g" \ + -e "s|\\\$\\\$\\[QT_INSTALL_TESTS[^]]*\\]|$lib/tests|g" \ -e "s|\\\$\\\$\\[QT_INSTALL_TRANSLATIONS[^]]*\\]|$lib/translations|g" \ - -e "s|\\\$\\\$\\[QT_INSTALL_QML[^]]*\\]|$bin/$qtQmlPrefix|g" + -e "s|\\\$\\\$\\[QT_INSTALL_QML[^]]*\\]|$lib/$qtQmlPrefix|g" fi else echo "fixQtBuiltinPaths: Warning: \`$dir' does not exist" diff --git a/pkgs/development/libraries/qt-6/hooks/fix-qt-module-paths.sh b/pkgs/development/libraries/qt-6/hooks/fix-qt-module-paths.sh index 0a0e0d51e27d..4884f45b9930 100644 --- a/pkgs/development/libraries/qt-6/hooks/fix-qt-module-paths.sh +++ b/pkgs/development/libraries/qt-6/hooks/fix-qt-module-paths.sh @@ -6,8 +6,6 @@ # fixQtModulePaths() { local dir="$1" - local bin="${!outputBin}" - local dev="${!outputDev}" local lib="${!outputLib}" if [ -d "$dir" ]; then @@ -17,8 +15,8 @@ fixQtModulePaths() { sed -i "${pr:?}" \ -e "s|\\\$\\\$QT_MODULE_LIB_BASE|$lib/lib|g" \ -e "s|\\\$\\\$QT_MODULE_HOST_LIB_BASE|$lib/lib|g" \ - -e "s|\\\$\\\$QT_MODULE_INCLUDE_BASE|$dev/include|g" \ - -e "s|\\\$\\\$QT_MODULE_BIN_BASE|$dev/bin|g" + -e "s|\\\$\\\$QT_MODULE_INCLUDE_BASE|$lib/include|g" \ + -e "s|\\\$\\\$QT_MODULE_BIN_BASE|$lib/bin|g" fi done elif [ -e "$dir" ]; then @@ -26,11 +24,4 @@ fixQtModulePaths() { else echo "fixQtModulePaths: Warning: \`$dir' does not exist" fi - - if [ "z$bin" != "z$dev" ]; then - if [ -d "$bin/bin" ]; then - mkdir -p "$dev/bin" - lndir -silent "$bin/bin" "$dev/bin" - fi - fi } diff --git a/pkgs/development/libraries/qt-6/hooks/qtbase-setup-hook.sh b/pkgs/development/libraries/qt-6/hooks/qtbase-setup-hook.sh index f0fa226e06ae..38a0a1d0530c 100644 --- a/pkgs/development/libraries/qt-6/hooks/qtbase-setup-hook.sh +++ b/pkgs/development/libraries/qt-6/hooks/qtbase-setup-hook.sh @@ -53,25 +53,18 @@ else # Only set up Qt once. # Prevent this hook from running multiple times dontPatchMkspecs=1 - local bin="${!outputBin}" - local dev="${!outputDev}" - local doc="${!outputDoc}" local lib="${!outputLib}" - moveToOutput "mkspecs" "$dev" - moveToOutput "modules" "$dev" - moveToOutput "lib/*.prl" "$dev" - - if [ -d "$dev/mkspecs/modules" ]; then - fixQtModulePaths "$dev/mkspecs/modules" + if [ -d "$lib/mkspecs/modules" ]; then + fixQtModulePaths "$lib/mkspecs/modules" fi - if [ -d "$dev/mkspecs" ]; then - fixQtBuiltinPaths "$dev/mkspecs" '*.pr?' + if [ -d "$lib/mkspecs" ]; then + fixQtBuiltinPaths "$lib/mkspecs" '*.pr?' fi - if [ -d "$dev/lib" ]; then - fixQtBuiltinPaths "$dev/lib" '*.pr?' + if [ -d "$lib/lib" ]; then + fixQtBuiltinPaths "$lib/lib" '*.pr?' fi } if [ -z "${dontPatchMkspecs-}" ]; then From d69d20baa363b977fcac1f72a5b416303e29796b Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Thu, 13 Apr 2023 23:23:16 +0800 Subject: [PATCH 16/32] libsForQt5.fcitx5-qt: fix reference to qt6.qtbase --- pkgs/tools/inputmethods/fcitx5/fcitx5-qt.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/inputmethods/fcitx5/fcitx5-qt.nix b/pkgs/tools/inputmethods/fcitx5/fcitx5-qt.nix index 9c63e1877c7b..24019041eb19 100644 --- a/pkgs/tools/inputmethods/fcitx5/fcitx5-qt.nix +++ b/pkgs/tools/inputmethods/fcitx5/fcitx5-qt.nix @@ -31,7 +31,7 @@ mkDerivation rec { cmakeFlags = [ # adding qt6 to buildInputs would result in error: detected mismatched Qt dependencies - "-DCMAKE_PREFIX_PATH=${qt6.qtbase.dev}" + "-DCMAKE_PREFIX_PATH=${qt6.qtbase}" "-DENABLE_QT4=0" "-DENABLE_QT6=1" ]; From 91fb53dce30b0c886c1b9d276eadfb08b419f403 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Thu, 13 Apr 2023 21:37:47 +0800 Subject: [PATCH 17/32] qt6.qtwebengine: remove outdated postFixup phase --- pkgs/development/libraries/qt-6/modules/qtwebengine.nix | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pkgs/development/libraries/qt-6/modules/qtwebengine.nix b/pkgs/development/libraries/qt-6/modules/qtwebengine.nix index a8f69a5659eb..7a177054b0f0 100644 --- a/pkgs/development/libraries/qt-6/modules/qtwebengine.nix +++ b/pkgs/development/libraries/qt-6/modules/qtwebengine.nix @@ -226,12 +226,6 @@ qtModule { export NINJAFLAGS="-j$NIX_BUILD_CORES" ''; - postFixup = '' - # This is required at runtime - mkdir -p $out/libexec - mv $dev/libexec/QtWebEngineProcess $out/libexec - ''; - meta = with lib; { description = "A web engine based on the Chromium web browser"; platforms = platforms.linux; From 37e3fafb41b16c8060a1c45cc984d4eefeb87855 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Thu, 13 Apr 2023 21:12:35 +0800 Subject: [PATCH 18/32] qt6.qtdeclarative: drop outdated workarounds --- .../libraries/qt-6/modules/qtdeclarative.nix | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/pkgs/development/libraries/qt-6/modules/qtdeclarative.nix b/pkgs/development/libraries/qt-6/modules/qtdeclarative.nix index 48855377f2ff..e720abd3d604 100644 --- a/pkgs/development/libraries/qt-6/modules/qtdeclarative.nix +++ b/pkgs/development/libraries/qt-6/modules/qtdeclarative.nix @@ -10,21 +10,10 @@ qtModule { pname = "qtdeclarative"; qtInputs = [ qtbase qtlanguageserver qtshadertools ]; propagatedBuildInputs = [ openssl python3 ]; - preConfigure = '' - export LD_LIBRARY_PATH="$PWD/build/lib''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" - ''; - cmakeFlags = [ - "-DQT6_INSTALL_PREFIX=${placeholder "out"}" - "-DQT_INSTALL_PREFIX=${placeholder "out"}" - ]; patches = [ # prevent headaches from stale qmlcache data ../patches/qtdeclarative-default-disable-qmlcache.patch ]; - postInstall = '' - substituteInPlace "$out/lib/cmake/Qt6Qml/Qt6QmlMacros.cmake" \ - --replace ''\'''${QT6_INSTALL_PREFIX}' "$dev" - ''; devTools = [ "bin/qml" "bin/qmlcachegen" From e5ba8e7113e24828ee6ea94cad4f3ea89afbfb41 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Thu, 13 Apr 2023 21:12:17 +0800 Subject: [PATCH 19/32] qt6.qttools: fix embedded path to tools --- pkgs/development/libraries/qt-6/modules/qttools.nix | 2 +- pkgs/development/libraries/qt-6/patches/qttools-paths.patch | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/qt-6/modules/qttools.nix b/pkgs/development/libraries/qt-6/modules/qttools.nix index e913cee041f4..bce5841521f9 100644 --- a/pkgs/development/libraries/qt-6/modules/qttools.nix +++ b/pkgs/development/libraries/qt-6/modules/qttools.nix @@ -15,7 +15,7 @@ qtModule { ../patches/qttools-paths.patch ]; env.NIX_CFLAGS_COMPILE = toString [ - "-DNIX_OUTPUT_DEV=\"${placeholder "dev"}\"" + "-DNIX_OUTPUT_OUT=\"${placeholder "out"}\"" ]; devTools = [ diff --git a/pkgs/development/libraries/qt-6/patches/qttools-paths.patch b/pkgs/development/libraries/qt-6/patches/qttools-paths.patch index 9a0acb70b0f4..6e7b8488fa54 100644 --- a/pkgs/development/libraries/qt-6/patches/qttools-paths.patch +++ b/pkgs/development/libraries/qt-6/patches/qttools-paths.patch @@ -10,9 +10,9 @@ index d355b9dc..94fef33f 100644 +{ + switch (location) { + case QLibraryInfo::BinariesPath: -+ return QLatin1String(NIX_OUTPUT_DEV) + QLatin1String("/bin"); ++ return QLatin1String(NIX_OUTPUT_OUT) + QLatin1String("/bin"); + case QLibraryInfo::LibraryExecutablesPath: -+ return QLatin1String(NIX_OUTPUT_DEV) + QLatin1String("/libexec"); ++ return QLatin1String(NIX_OUTPUT_OUT) + QLatin1String("/libexec"); + default: + return QLibraryInfo::path(location); + } From 0bad2288a751fc4023da1cf70902a2847100616d Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Thu, 13 Apr 2023 23:27:03 +0800 Subject: [PATCH 20/32] qt6.qttools: symlink bin to dev output There are several reference to "${qttools.dev}/bin" treewide, adding the symlink to fix compatibility with these packages. --- pkgs/development/libraries/qt-6/modules/qttools.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/libraries/qt-6/modules/qttools.nix b/pkgs/development/libraries/qt-6/modules/qttools.nix index bce5841521f9..441e080653b8 100644 --- a/pkgs/development/libraries/qt-6/modules/qttools.nix +++ b/pkgs/development/libraries/qt-6/modules/qttools.nix @@ -41,4 +41,8 @@ qtModule { "bin/macdeployqt" ]; + postInstall = '' + mkdir -p "$dev" + ln -s "$out/bin" "$dev/bin" + ''; } From a1a3813f7bdb163139f6b74a9892108013b869a3 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Fri, 14 Apr 2023 19:08:07 +0800 Subject: [PATCH 21/32] qt6: drop devTools attribute as they are no longer moved to the dev output --- .../libraries/qt-6/modules/qtbase.nix | 26 ------------------- .../libraries/qt-6/modules/qtdeclarative.nix | 12 --------- .../libraries/qt-6/modules/qttools.nix | 24 ----------------- 3 files changed, 62 deletions(-) diff --git a/pkgs/development/libraries/qt-6/modules/qtbase.nix b/pkgs/development/libraries/qt-6/modules/qtbase.nix index 9e22ae67c606..f82d2193a383 100644 --- a/pkgs/development/libraries/qt-6/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-6/modules/qtbase.nix @@ -232,32 +232,6 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; - devTools = [ - "libexec/moc" - "libexec/rcc" - "libexec/syncqt.pl" - "libexec/qlalr" - "libexec/ensure_pro_file.cmake" - "libexec/cmake_automoc_parser" - "libexec/qvkgen" - "libexec/tracegen" - "libexec/uic" - "bin/fixqt4headers.pl" - "bin/moc" - "bin/qdbuscpp2xml" - "bin/qdbusxml2cpp" - "bin/qlalr" - "bin/qmake" - "bin/qmake6" - "bin/qt-cmake" - "bin/qt-cmake-private" - "bin/qt-cmake-private-install.cmake" - "bin/qt-cmake-standalone-test" - "bin/rcc" - "bin/syncqt.pl" - "bin/uic" - ]; - moveToDev = false; postFixup = '' diff --git a/pkgs/development/libraries/qt-6/modules/qtdeclarative.nix b/pkgs/development/libraries/qt-6/modules/qtdeclarative.nix index e720abd3d604..d78a886109af 100644 --- a/pkgs/development/libraries/qt-6/modules/qtdeclarative.nix +++ b/pkgs/development/libraries/qt-6/modules/qtdeclarative.nix @@ -14,16 +14,4 @@ qtModule { # prevent headaches from stale qmlcache data ../patches/qtdeclarative-default-disable-qmlcache.patch ]; - devTools = [ - "bin/qml" - "bin/qmlcachegen" - "bin/qmleasing" - "bin/qmlimportscanner" - "bin/qmllint" - "bin/qmlmin" - "bin/qmlplugindump" - "bin/qmlprofiler" - "bin/qmlscene" - "bin/qmltestrunner" - ]; } diff --git a/pkgs/development/libraries/qt-6/modules/qttools.nix b/pkgs/development/libraries/qt-6/modules/qttools.nix index 441e080653b8..42bf495134a4 100644 --- a/pkgs/development/libraries/qt-6/modules/qttools.nix +++ b/pkgs/development/libraries/qt-6/modules/qttools.nix @@ -17,30 +17,6 @@ qtModule { env.NIX_CFLAGS_COMPILE = toString [ "-DNIX_OUTPUT_OUT=\"${placeholder "out"}\"" ]; - - devTools = [ - "bin/qcollectiongenerator" - "bin/linguist" - "bin/assistant" - "bin/qdoc" - "bin/lconvert" - "bin/designer" - "bin/qtattributionsscanner" - "bin/lrelease" - "bin/lrelease-pro" - "bin/pixeltool" - "bin/lupdate" - "bin/lupdate-pro" - "bin/qtdiag" - "bin/qhelpgenerator" - "bin/qtplugininfo" - "bin/qthelpconverter" - "bin/lprodump" - "bin/qdistancefieldgenerator" - ] ++ lib.optionals stdenv.isDarwin [ - "bin/macdeployqt" - ]; - postInstall = '' mkdir -p "$dev" ln -s "$out/bin" "$dev/bin" From 78cdc66d62a60128c38b9f41a0c36906e1741be0 Mon Sep 17 00:00:00 2001 From: Malo Bourgon Date: Fri, 14 Apr 2023 10:18:02 -0700 Subject: [PATCH 22/32] signalbackup-tools: 20230413 -> 20230414 Diff: https://github.com/bepaald/signalbackup-tools/compare/20230413...20230414 --- .../instant-messengers/signalbackup-tools/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/signalbackup-tools/default.nix b/pkgs/applications/networking/instant-messengers/signalbackup-tools/default.nix index 649259dc7437..b352f4b7322f 100644 --- a/pkgs/applications/networking/instant-messengers/signalbackup-tools/default.nix +++ b/pkgs/applications/networking/instant-messengers/signalbackup-tools/default.nix @@ -2,13 +2,13 @@ (if stdenv.isDarwin then darwin.apple_sdk_11_0.clang14Stdenv else stdenv).mkDerivation rec { pname = "signalbackup-tools"; - version = "20230413"; + version = "20230414"; src = fetchFromGitHub { owner = "bepaald"; repo = pname; rev = version; - hash = "sha256-7jIltC7YlnsvwADwKItFKKw5LUKDHux+b7frZfcNDyE="; + hash = "sha256-0pCItZCYdwX/Bl20HHc/FhIF4ZHsqz9aadfFYNdQ71M="; }; postPatch = '' From 4c5fa94f8a55dffb42c63a6a136be5eccbc35859 Mon Sep 17 00:00:00 2001 From: Ben Siraphob Date: Fri, 14 Apr 2023 13:01:14 -0500 Subject: [PATCH 23/32] fq: 0.4.0 -> 0.5.0 --- pkgs/development/tools/fq/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/fq/default.nix b/pkgs/development/tools/fq/default.nix index 3506c66810ef..fc4b42910458 100644 --- a/pkgs/development/tools/fq/default.nix +++ b/pkgs/development/tools/fq/default.nix @@ -7,16 +7,16 @@ buildGoModule rec { pname = "fq"; - version = "0.4.0"; + version = "0.5.0"; src = fetchFromGitHub { owner = "wader"; repo = "fq"; rev = "v${version}"; - hash = "sha256-2Sif6LUv99u/R4SrvsJoJ08aS5G/o34IC+4qAoRvX/g="; + hash = "sha256-Fg5J/iLxGUwb2QRZJMHLqK9dBECW9VsiZGX+LyUtyhw="; }; - vendorHash = "sha256-8YJ52stnRHyTfiEHVvUgzLMd14WHI5ZeNAPk77oXSlA="; + vendorHash = "sha256-sjzGtSBgRybcJvOXM4wKN5pTgihNrjUCMPsc62n3tLk="; ldflags = [ "-s" From ddd8604a3bd33c3a25f56d613d458c26a84d42d2 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Fri, 14 Apr 2023 14:43:39 +0300 Subject: [PATCH 24/32] moveBuildTree: init --- pkgs/build-support/setup-hooks/move-build-tree.sh | 12 ++++++++++++ pkgs/top-level/all-packages.nix | 4 ++++ 2 files changed, 16 insertions(+) create mode 100644 pkgs/build-support/setup-hooks/move-build-tree.sh diff --git a/pkgs/build-support/setup-hooks/move-build-tree.sh b/pkgs/build-support/setup-hooks/move-build-tree.sh new file mode 100644 index 000000000000..2718070f3933 --- /dev/null +++ b/pkgs/build-support/setup-hooks/move-build-tree.sh @@ -0,0 +1,12 @@ +prePhases+=" moveBuildDir" + +moveBuildDir() { + mkdir -p $out/.build + cd $out/.build +} + +postPhases+=" removeBuildDir" + +removeBuildDir() { + rm -rf $out/.build +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1373cef64c77..05e237d283b3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1173,6 +1173,10 @@ with pkgs; name = "keep-build-tree-hook"; } ../build-support/setup-hooks/keep-build-tree.sh; + moveBuildTree = makeSetupHook { + name = "move-build-tree-hook"; + } ../build-support/setup-hooks/move-build-tree.sh; + enableGCOVInstrumentation = makeSetupHook { name = "enable-gcov-instrumentation-hook"; } ../build-support/setup-hooks/enable-coverage-instrumentation.sh; From bd8c68fdec9d0999bf11ac8f6860ed4c85b8769b Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Fri, 14 Apr 2023 21:11:09 +0300 Subject: [PATCH 25/32] qt6: avoid building under /tmp on darwin --- pkgs/development/libraries/qt-6/default.nix | 9 ++------- pkgs/development/libraries/qt-6/modules/qtbase.nix | 10 +++++++++- pkgs/development/libraries/qt-6/qtModule.nix | 4 +++- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/pkgs/development/libraries/qt-6/default.nix b/pkgs/development/libraries/qt-6/default.nix index 074da9adb401..68481b65a145 100644 --- a/pkgs/development/libraries/qt-6/default.nix +++ b/pkgs/development/libraries/qt-6/default.nix @@ -38,7 +38,8 @@ let withGtk3 = true; inherit (srcs.qtbase) src version; inherit developerBuild; - inherit (darwin.apple_sdk_11_0.frameworks) AGL AVFoundation AppKit GSS MetalKit; + inherit (darwin.apple_sdk_11_0.frameworks) + AGL AVFoundation AppKit Contacts CoreBluetooth EventKit GSS MetalKit; patches = [ ./patches/0001-qtbase-qmake-always-use-libname-instead-of-absolute-.patch ./patches/0002-qtbase-qmake-fix-mkspecs-for-darwin.patch @@ -46,12 +47,6 @@ let ./patches/0004-qtbase-fix-locating-tzdir-on-NixOS.patch ./patches/0005-qtbase-deal-with-a-font-face-at-index-0-as-Regular-f.patch ./patches/0006-qtbase-qt-cmake-always-use-cmake-from-path.patch - # Remove symlink check causing build to bail out and fail. - # https://gitlab.kitware.com/cmake/cmake/-/issues/23251 - (fetchpatch { - url = "https://github.com/Homebrew/formula-patches/raw/c363f0edf9e90598d54bc3f4f1bacf95abbda282/qt/qt_internal_check_if_path_has_symlinks.patch"; - sha256 = "sha256-Gv2L8ymZSbJxcmUijKlT2NnkIB3bVH9D7YSsDX2noTU="; - }) ]; }; env = callPackage ./qt-env.nix { }; diff --git a/pkgs/development/libraries/qt-6/modules/qtbase.nix b/pkgs/development/libraries/qt-6/modules/qtbase.nix index f82d2193a383..dfd51f26587b 100644 --- a/pkgs/development/libraries/qt-6/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-6/modules/qtbase.nix @@ -71,10 +71,14 @@ , unixODBC , unixODBCDrivers # darwin +, moveBuildTree , xcbuild , AGL , AVFoundation , AppKit +, Contacts +, CoreBluetooth +, EventKit , GSS , MetalKit # optional dependencies @@ -166,6 +170,9 @@ stdenv.mkDerivation rec { AGL AVFoundation AppKit + Contacts + CoreBluetooth + EventKit GSS MetalKit ] ++ lib.optional libGLSupported libGL; @@ -184,7 +191,8 @@ stdenv.mkDerivation rec { ++ lib.optional (libmysqlclient != null) libmysqlclient ++ lib.optional (postgresql != null) postgresql; - nativeBuildInputs = [ bison flex gperf lndir perl pkg-config which cmake xmlstarlet ninja ]; + nativeBuildInputs = [ bison flex gperf lndir perl pkg-config which cmake xmlstarlet ninja ] + ++ lib.optionals stdenv.isDarwin [ moveBuildTree ]; propagatedNativeBuildInputs = [ lndir ]; diff --git a/pkgs/development/libraries/qt-6/qtModule.nix b/pkgs/development/libraries/qt-6/qtModule.nix index 2f7de7502379..98606d24a968 100644 --- a/pkgs/development/libraries/qt-6/qtModule.nix +++ b/pkgs/development/libraries/qt-6/qtModule.nix @@ -3,6 +3,7 @@ , cmake , ninja , perl +, moveBuildTree , srcs , patches ? [ ] }: @@ -19,7 +20,8 @@ stdenv.mkDerivation (args // { patches = args.patches or patches.${pname} or [ ]; buildInputs = args.buildInputs or [ ]; - nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ cmake ninja perl ]; + nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ cmake ninja perl ] + ++ lib.optionals stdenv.isDarwin [ moveBuildTree ]; propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or [ ]); moveToDev = false; From 75f03610bac483a6883c529704af15a3609ef5ea Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Fri, 14 Apr 2023 21:34:17 +0300 Subject: [PATCH 26/32] qt6.qtwebengine: separate linux-only parts --- .../libraries/qt-6/modules/qtwebengine.nix | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/pkgs/development/libraries/qt-6/modules/qtwebengine.nix b/pkgs/development/libraries/qt-6/modules/qtwebengine.nix index 7a177054b0f0..54823fdecd1c 100644 --- a/pkgs/development/libraries/qt-6/modules/qtwebengine.nix +++ b/pkgs/development/libraries/qt-6/modules/qtwebengine.nix @@ -110,6 +110,13 @@ qtModule { substituteInPlace cmake/Functions.cmake \ --replace "/bin/bash" "${buildPackages.bash}/bin/bash" + # Patch library paths in sources + substituteInPlace src/core/web_engine_library_info.cpp \ + --replace "QLibraryInfo::path(QLibraryInfo::DataPath)" "\"$out\"" \ + --replace "QLibraryInfo::path(QLibraryInfo::TranslationsPath)" "\"$out/translations\"" \ + --replace "QLibraryInfo::path(QLibraryInfo::LibraryExecutablesPath)" "\"$out/libexec\"" + '' + + lib.optionalString stdenv.isLinux '' sed -i -e '/lib_loader.*Load/s!"\(libudev\.so\)!"${lib.getLib systemd}/lib/\1!' \ src/3rdparty/chromium/device/udev_linux/udev?_loader.cc @@ -118,12 +125,6 @@ qtModule { substituteInPlace src/3rdparty/chromium/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc \ --replace "/usr/share/X11/xkb" "${xkeyboard_config}/share/X11/xkb" - - # Patch library paths in sources - substituteInPlace src/core/web_engine_library_info.cpp \ - --replace "QLibraryInfo::path(QLibraryInfo::DataPath)" "\"$out\"" \ - --replace "QLibraryInfo::path(QLibraryInfo::TranslationsPath)" "\"$out/translations\"" \ - --replace "QLibraryInfo::path(QLibraryInfo::LibraryExecutablesPath)" "\"$out/libexec\"" ''; cmakeFlags = [ @@ -143,9 +144,12 @@ qtModule { # android only. https://bugreports.qt.io/browse/QTBUG-100293 # "-DQT_FEATURE_webengine_native_spellchecker=ON" "-DQT_FEATURE_webengine_sanitizer=ON" - "-DQT_FEATURE_webengine_webrtc_pipewire=ON" "-DQT_FEATURE_webengine_kerberos=ON" - ] ++ lib.optional enableProprietaryCodecs "-DQT_FEATURE_webengine_proprietary_codecs=ON"; + ] ++ lib.optionals stdenv.isLinux [ + "-DQT_FEATURE_webengine_webrtc_pipewire=ON" + ] ++ lib.optionals enableProprietaryCodecs [ + "-DQT_FEATURE_webengine_proprietary_codecs=ON" + ]; propagatedBuildInputs = [ # Image formats @@ -174,7 +178,7 @@ qtModule { libevent ffmpeg_4 - + ] ++ lib.optionals stdenv.isLinux [ dbus zlib minizip From 9600a18dc2d9cc75c2f64a94150f23acd35a1f71 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 5 Apr 2023 16:02:45 -0700 Subject: [PATCH 27/32] girara: fix cross compilation --- pkgs/applications/misc/girara/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/applications/misc/girara/default.nix b/pkgs/applications/misc/girara/default.nix index a6736c7a2dd3..20ea300d127c 100644 --- a/pkgs/applications/misc/girara/default.nix +++ b/pkgs/applications/misc/girara/default.nix @@ -43,6 +43,7 @@ stdenv.mkDerivation rec { gettext check dbus + glib # for glib-compile-resources ]; buildInputs = [ @@ -64,6 +65,7 @@ stdenv.mkDerivation rec { mesonFlags = [ "-Ddocs=disabled" # docs do not seem to be installed + (lib.mesonEnable "tests" (stdenv.buildPlatform.canExecute stdenv.hostPlatform)) ]; checkPhase = '' From 3824e9627c0542a3f9c3988ec68e54178f8a26dc Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 14 Apr 2023 19:40:34 +0200 Subject: [PATCH 28/32] tts: 0.12.0 -> 0.13.2 https://github.com/coqui-ai/TTS/releases/tag/v0.13.0 https://github.com/coqui-ai/TTS/releases/tag/v0.13.1 https://github.com/coqui-ai/TTS/releases/tag/v0.13.2 --- pkgs/tools/audio/tts/default.nix | 39 +++++++++++--------------------- 1 file changed, 13 insertions(+), 26 deletions(-) diff --git a/pkgs/tools/audio/tts/default.nix b/pkgs/tools/audio/tts/default.nix index 5e8d4240e14d..687c214f6b36 100644 --- a/pkgs/tools/audio/tts/default.nix +++ b/pkgs/tools/audio/tts/default.nix @@ -1,6 +1,7 @@ { lib , python3 , fetchFromGitHub +, fetchpatch , espeak-ng , tts }: @@ -8,37 +9,12 @@ let python = python3.override { packageOverrides = self: super: { - # API breakage with 0.9.0 - # TypeError: mel() takes 0 positional arguments but 2 positional arguments (and 3 keyword-only arguments) were given - librosa = super.librosa.overridePythonAttrs (oldAttrs: rec { - version = "0.8.1"; - src = super.fetchPypi { - pname = "librosa"; - inherit version; - hash = "sha256-xT0F52iuSj5VOuIcLlAVKT5e+/1cEtSX8RBMtRnMprM="; - }; - propagatedBuildInputs = oldAttrs.propagatedBuildInputs ++ (with super; [ - resampy - ]); - doCheck = false; - }); - - numpy = super.numpy.overridePythonAttrs (oldAttrs: rec { - version = "1.23.5"; - src = super.fetchPypi { - pname = "numpy"; - inherit version; - extension = "tar.gz"; - hash = "sha256-Gxdm1vOXwYFT1AAV3fx53bcVyrrcBNLSKNTlqLxN7Ro="; - }; - doCheck = false; - }); }; }; in python.pkgs.buildPythonApplication rec { pname = "tts"; - version = "0.12.0"; + version = "0.13.2"; format = "pyproject"; src = fetchFromGitHub { @@ -48,6 +24,17 @@ python.pkgs.buildPythonApplication rec { hash = "sha256-3t4JYEwQ+puGLhGl3nn93qsL8IeOwlYtHXTrnZ5Cf+w="; }; + patches = [ + (fetchpatch { + # upgrade librosa to 0.10.0 + url = "https://github.com/coqui-ai/TTS/commit/4c829e74a1399ab083b566a70c1b7e879eda6e1e.patch"; + hash = "sha256-QP9AnMbdEpGJywiZBreojHUjq29ihqy6HxvUtS5OKvQ="; + excludes = [ + "requirements.txt" + ]; + }) + ]; + postPatch = let relaxedConstraints = [ "cython" From 351cec5db3b7ca839779316a8b7c524ea8941f0f Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Fri, 14 Apr 2023 22:02:17 +0200 Subject: [PATCH 29/32] use subcommands in plugin updaters (#223164) * update.py: introduce subparsers for plugin updaters This is preliminary work to help create more powerful plugin updaters. Namely I would like to be able to "just add" plugins without refreshing the older ones (helpful when github temporarily removes a user from github due to automated bot detection). Also concerning the lua updater, we pin some of the dependencies, and I would like to be able to unpin the package without editing the csv (coming in later PRs). * doc/updaters: update command to update editor plugins including vim, kakoune and lua packages Co-authored-by: figsoda --- doc/languages-frameworks/lua.section.md | 15 ++- doc/languages-frameworks/vim.section.md | 4 +- maintainers/scripts/pluginupdate.py | 127 +++++++++++++----- maintainers/scripts/update-luarocks-packages | 6 +- .../editors/kakoune/plugins/update.py | 5 +- .../editors/vim/plugins/get-plugins.nix | 19 +++ .../editors/vim/plugins/update.py | 63 ++++----- 7 files changed, 150 insertions(+), 89 deletions(-) create mode 100644 pkgs/applications/editors/vim/plugins/get-plugins.nix diff --git a/doc/languages-frameworks/lua.section.md b/doc/languages-frameworks/lua.section.md index 92ce8af1331b..2ed02ab9d6c7 100644 --- a/doc/languages-frameworks/lua.section.md +++ b/doc/languages-frameworks/lua.section.md @@ -129,16 +129,21 @@ Let's present the luarocks way first and the manual one in a second time. ### Packaging a library on luarocks {#packaging-a-library-on-luarocks} [Luarocks.org](https://luarocks.org/) is the main repository of lua packages. -The site proposes two types of packages, the rockspec and the src.rock +The site proposes two types of packages, the `rockspec` and the `src.rock` (equivalent of a [rockspec](https://github.com/luarocks/luarocks/wiki/Rockspec-format) but with the source). -These packages can have different build types such as `cmake`, `builtin` etc . -Luarocks-based packages are generated in pkgs/development/lua-modules/generated-packages.nix from -the whitelist maintainers/scripts/luarocks-packages.csv and updated by running maintainers/scripts/update-luarocks-packages. +Luarocks-based packages are generated in [pkgs/development/lua-modules/generated-packages.nix](https://github.com/NixOS/nixpkgs/tree/master/pkgs/development/lua-modules/generated-packages.nix) from +the whitelist maintainers/scripts/luarocks-packages.csv and updated by running +the script +[maintainers/scripts/update-luarocks-packages](https://github.com/NixOS/nixpkgs/tree/master/maintainers/scripts/update-luarocks-packages): + +```sh +./maintainers/scripts/update-luarocks-packages update +``` [luarocks2nix](https://github.com/nix-community/luarocks) is a tool capable of generating nix derivations from both rockspec and src.rock (and favors the src.rock). The automation only goes so far though and some packages need to be customized. -These customizations go in `pkgs/development/lua-modules/overrides.nix`. +These customizations go in [pkgs/development/lua-modules/overrides.nix](https://github.com/NixOS/nixpkgs/tree/master/pkgs/development/lua-modules/overrides.nix). For instance if the rockspec defines `external_dependencies`, these need to be manually added to the overrides.nix. You can try converting luarocks packages to nix packages with the command `nix-shell -p luarocks-nix` and then `luarocks nix PKG_NAME`. diff --git a/doc/languages-frameworks/vim.section.md b/doc/languages-frameworks/vim.section.md index 39e38c6a123d..bf0d663179b9 100644 --- a/doc/languages-frameworks/vim.section.md +++ b/doc/languages-frameworks/vim.section.md @@ -212,7 +212,7 @@ Note: this is not possible anymore for Neovim. ## Adding new plugins to nixpkgs {#adding-new-plugins-to-nixpkgs} -Nix expressions for Vim plugins are stored in [pkgs/applications/editors/vim/plugins](https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/editors/vim/plugins). For the vast majority of plugins, Nix expressions are automatically generated by running [`./update.py`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/update.py). This creates a [generated.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/generated.nix) file based on the plugins listed in [vim-plugin-names](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/vim-plugin-names). Plugins are listed in alphabetical order in `vim-plugin-names` using the format `[github username]/[repository]@[gitref]`. For example https://github.com/scrooloose/nerdtree becomes `scrooloose/nerdtree`. +Nix expressions for Vim plugins are stored in [pkgs/applications/editors/vim/plugins](https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/editors/vim/plugins). For the vast majority of plugins, Nix expressions are automatically generated by running [`./update.py`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/update.py). This creates a [generated.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/generated.nix) file based on the plugins listed in [vim-plugin-names](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/vim-plugin-names). After running `./update.py`, if nvim-treesitter received an update, also run [`nvim-treesitter/update.py`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/update.py) to update the tree sitter grammars for `nvim-treesitter`. @@ -226,7 +226,7 @@ deoplete-fish = super.deoplete-fish.overrideAttrs(old: { Sometimes plugins require an override that must be changed when the plugin is updated. This can cause issues when Vim plugins are auto-updated but the associated override isn't updated. For these plugins, the override should be written so that it specifies all information required to install the plugin, and running `./update.py` doesn't change the derivation for the plugin. Manually updating the override is required to update these types of plugins. An example of such a plugin is `LanguageClient-neovim`. -To add a new plugin, run `./update.py --add "[owner]/[name]"`. **NOTE**: This script automatically commits to your git repository. Be sure to check out a fresh branch before running. +To add a new plugin, run `./update.py add "[owner]/[name]"`. **NOTE**: This script automatically commits to your git repository. Be sure to check out a fresh branch before running. Finally, there are some plugins that are also packaged in nodePackages because they have Javascript-related build steps, such as running webpack. Those plugins are not listed in `vim-plugin-names` or managed by `update.py` at all, and are included separately in `overrides.nix`. Currently, all these plugins are related to the `coc.nvim` ecosystem of the Language Server Protocol integration with Vim/Neovim. diff --git a/maintainers/scripts/pluginupdate.py b/maintainers/scripts/pluginupdate.py index 3341fea29106..7c6cfd4fed7f 100644 --- a/maintainers/scripts/pluginupdate.py +++ b/maintainers/scripts/pluginupdate.py @@ -1,4 +1,7 @@ -# Used by pkgs/applications/editors/vim/plugins/update.py and pkgs/applications/editors/kakoune/plugins/update.py +# python library used to update plugins: +# - pkgs/applications/editors/vim/plugins/update.py +# - pkgs/applications/editors/kakoune/plugins/update.py +# - maintainers/scripts/update-luarocks-packages # format: # $ nix run nixpkgs.python3Packages.black -c black update.py @@ -315,10 +318,10 @@ def run_nix_expr(expr): with CleanEnvironment(): cmd = ["nix", "eval", "--extra-experimental-features", "nix-command", "--impure", "--json", "--expr", expr] - log.debug("Running command %s", cmd) + log.debug("Running command %s", " ".join(cmd)) out = subprocess.check_output(cmd) - data = json.loads(out) - return data + data = json.loads(out) + return data class Editor: @@ -344,12 +347,39 @@ class Editor: self.cache_file = cache_file or f"{name}-plugin-cache.json" self.nixpkgs_repo = None + def add(self, args): + '''CSV spec''' + log.debug("called the 'add' command") + fetch_config = FetchConfig(args.proc, args.github_token) + editor = self + for plugin_line in args.add_plugins: + log.debug("using plugin_line", plugin_line) + pdesc = PluginDesc.load_from_string(fetch_config, plugin_line) + log.debug("loaded as pdesc", pdesc) + append = [ pdesc ] + editor.rewrite_input(fetch_config, args.input_file, editor.deprecated, append=append) + plugin, _ = prefetch_plugin(pdesc, ) + autocommit = not args.no_commit + if autocommit: + commit( + editor.nixpkgs_repo, + "{drv_name}: init at {version}".format( + drv_name=editor.get_drv_name(plugin.normalized_name), + version=plugin.version + ), + [args.outfile, args.input_file], + ) + + # Expects arguments generated by 'update' subparser + def update(self, args ): + '''CSV spec''' + print("the update member function should be overriden in subclasses") + def get_current_plugins(self) -> List[Plugin]: """To fill the cache""" data = run_nix_expr(self.get_plugins) plugins = [] for name, attr in data.items(): - print("get_current_plugins: name %s" % name) p = Plugin(name, attr["rev"], attr["submodules"], attr["sha256"]) plugins.append(p) return plugins @@ -358,7 +388,7 @@ class Editor: '''CSV spec''' return load_plugins_from_csv(config, plugin_file) - def generate_nix(self, plugins, outfile: str): + def generate_nix(self, _plugins, _outfile: str): '''Returns nothing for now, writes directly to outfile''' raise NotImplementedError() @@ -395,34 +425,28 @@ class Editor: return rewrite_input(*args, **kwargs) def create_parser(self): - parser = argparse.ArgumentParser( + common = argparse.ArgumentParser( + add_help=False, description=(f""" Updates nix derivations for {self.name} plugins.\n By default from {self.default_in} to {self.default_out}""" ) ) - parser.add_argument( - "--add", - dest="add_plugins", - default=[], - action="append", - help=f"Plugin to add to {self.attr_path} from Github in the form owner/repo", - ) - parser.add_argument( + common.add_argument( "--input-names", "-i", dest="input_file", default=self.default_in, help="A list of plugins in the form owner/repo", ) - parser.add_argument( + common.add_argument( "--out", "-o", dest="outfile", default=self.default_out, help="Filename to save generated nix code", ) - parser.add_argument( + common.add_argument( "--proc", "-p", dest="proc", @@ -430,7 +454,7 @@ class Editor: default=30, help="Number of concurrent processes to spawn. Setting --github-token allows higher values.", ) - parser.add_argument( + common.add_argument( "--github-token", "-t", type=str, @@ -438,16 +462,61 @@ class Editor: help="""Allows to set --proc to higher values. Uses GITHUB_API_TOKEN environment variables as the default value.""", ) - parser.add_argument( + common.add_argument( "--no-commit", "-n", action="store_true", default=False, help="Whether to autocommit changes" ) - parser.add_argument( + common.add_argument( "--debug", "-d", choices=LOG_LEVELS.keys(), default=logging.getLevelName(logging.WARN), help="Adjust log level" ) - return parser + + main = argparse.ArgumentParser( + parents=[common], + description=(f""" + Updates nix derivations for {self.name} plugins.\n + By default from {self.default_in} to {self.default_out}""" + ) + ) + + subparsers = main.add_subparsers(dest="command", required=False) + padd = subparsers.add_parser( + "add", parents=[], + description="Add new plugin", + add_help=False, + ) + padd.set_defaults(func=self.add) + padd.add_argument( + "add_plugins", + default=None, + nargs="+", + help=f"Plugin to add to {self.attr_path} from Github in the form owner/repo", + ) + + pupdate = subparsers.add_parser( + "update", + description="Update all or a subset of existing plugins", + add_help=False, + ) + pupdate.set_defaults(func=self.update) + return main + + def run(self,): + ''' + Convenience function + ''' + parser = self.create_parser() + args = parser.parse_args() + command = args.command or "update" + log.setLevel(LOG_LEVELS[args.debug]) + log.info("Chose to run command: %s", command) + + if not args.no_commit: + self.nixpkgs_repo = git.Repo(self.root, search_parent_directories=True) + + getattr(self, command)(args) + @@ -661,7 +730,6 @@ def commit(repo: git.Repo, message: str, files: List[Path]) -> None: def update_plugins(editor: Editor, args): """The main entry function of this module. All input arguments are grouped in the `Editor`.""" - log.setLevel(LOG_LEVELS[args.debug]) log.info("Start updating plugins") fetch_config = FetchConfig(args.proc, args.github_token) update = editor.get_update(args.input_file, args.outfile, fetch_config) @@ -684,18 +752,3 @@ def update_plugins(editor: Editor, args): [args.outfile, args.input_file, editor.deprecated], ) - for plugin_line in args.add_plugins: - pdesc = PluginDesc.load_from_string(fetch_config, plugin_line) - append = [ pdesc ] - editor.rewrite_input(fetch_config, args.input_file, editor.deprecated, append=append) - update() - plugin, _ = prefetch_plugin(pdesc, ) - if autocommit: - commit( - editor.nixpkgs_repo, - "{drv_name}: init at {version}".format( - drv_name=editor.get_drv_name(plugin.normalized_name), - version=plugin.version - ), - [args.outfile, args.input_file], - ) diff --git a/maintainers/scripts/update-luarocks-packages b/maintainers/scripts/update-luarocks-packages index f34aa53626da..0e1e188e0b33 100755 --- a/maintainers/scripts/update-luarocks-packages +++ b/maintainers/scripts/update-luarocks-packages @@ -203,11 +203,7 @@ def main(): default_out = ROOT.joinpath(GENERATED_NIXFILE) ) - parser = editor.create_parser() - args = parser.parse_args() - - update_plugins(editor, args) - + editor.run() if __name__ == "__main__": diff --git a/pkgs/applications/editors/kakoune/plugins/update.py b/pkgs/applications/editors/kakoune/plugins/update.py index 49662a0e8e2e..ab5aa9242839 100755 --- a/pkgs/applications/editors/kakoune/plugins/update.py +++ b/pkgs/applications/editors/kakoune/plugins/update.py @@ -81,10 +81,7 @@ in lib.fix' (lib.extends overrides packages) def main(): editor = KakouneEditor("kakoune", ROOT, GET_PLUGINS) - parser = editor.create_parser() - args = parser.parse_args() - - pluginupdate.update_plugins(editor, args) + editor.run() if __name__ == "__main__": diff --git a/pkgs/applications/editors/vim/plugins/get-plugins.nix b/pkgs/applications/editors/vim/plugins/get-plugins.nix new file mode 100644 index 000000000000..0aaec333c2d7 --- /dev/null +++ b/pkgs/applications/editors/vim/plugins/get-plugins.nix @@ -0,0 +1,19 @@ +with import {}; +let + inherit (vimUtils.override {inherit vim;}) buildVimPluginFrom2Nix; + inherit (neovimUtils) buildNeovimPluginFrom2Nix; + + generated = callPackage { + inherit buildNeovimPluginFrom2Nix buildVimPluginFrom2Nix; + } {} {}; + hasChecksum = value: + lib.isAttrs value && lib.hasAttrByPath ["src" "outputHash"] value; + getChecksum = name: value: + if hasChecksum value then { + submodules = value.src.fetchSubmodules or false; + sha256 = value.src.outputHash; + rev = value.src.rev; + } else null; + checksums = lib.mapAttrs getChecksum generated; +in + lib.filterAttrs (n: v: v != null) checksums diff --git a/pkgs/applications/editors/vim/plugins/update.py b/pkgs/applications/editors/vim/plugins/update.py index 20336c66ed6e..09606634f9e5 100755 --- a/pkgs/applications/editors/vim/plugins/update.py +++ b/pkgs/applications/editors/vim/plugins/update.py @@ -42,28 +42,14 @@ sys.path.insert(0, os.path.join(ROOT.parent.parent.parent.parent.parent, "mainta import pluginupdate from pluginupdate import run_nix_expr, PluginDesc -GET_PLUGINS = f"""(with import {{}}; -let - inherit (vimUtils.override {{inherit vim;}}) buildNeovimPluginFrom2Nix buildVimPluginFrom2Nix; - generated = callPackage {ROOT}/generated.nix {{ - inherit buildNeovimPluginFrom2Nix buildVimPluginFrom2Nix; - }}; - hasChecksum = value: lib.isAttrs value && lib.hasAttrByPath ["src" "outputHash"] value; - getChecksum = name: value: - if hasChecksum value then {{ - submodules = value.src.fetchSubmodules or false; - sha256 = value.src.outputHash; - rev = value.src.rev; - }} else null; - checksums = lib.mapAttrs getChecksum generated; -in lib.filterAttrs (n: v: v != null) checksums)""" + GET_PLUGINS_LUA = """ with import {}; lib.attrNames lua51Packages""" HEADER = ( - "# This file has been generated by ./pkgs/applications/editors/vim/plugins/update.py. Do not edit!" + "# GENERATED by ./pkgs/applications/editors/vim/plugins/update.py. Do not edit!" ) def isNeovimPlugin(plug: pluginupdate.Plugin) -> bool: @@ -118,34 +104,39 @@ class VimEditor(pluginupdate.Editor): """.format( buildFn="buildNeovimPluginFrom2Nix" if isNeovim else "buildVimPluginFrom2Nix", plugin=plugin, src_nix=src_nix, repo=repo) - print(content) + log.debug(content) return content + + def update(self, args): + pluginupdate.update_plugins(self, args) + + if self.nvim_treesitter_updated: + print("updating nvim-treesitter grammars") + nvim_treesitter_dir = ROOT.joinpath("nvim-treesitter") + subprocess.check_call([nvim_treesitter_dir.joinpath("update.py")]) + + if self.nixpkgs_repo: + index = self.nixpkgs_repo.index + for diff in index.diff(None): + if diff.a_path == "pkgs/applications/editors/vim/plugins/nvim-treesitter/generated.nix": + msg = "vimPlugins.nvim-treesitter: update grammars" + print(f"committing to nixpkgs: {msg}") + index.add([str(nvim_treesitter_dir.joinpath("generated.nix"))]) + index.commit(msg) + return + print("no updates to nvim-treesitter grammars") + + def main(): global luaPlugins luaPlugins = run_nix_expr(GET_PLUGINS_LUA) + with open(f"{ROOT}/get-plugins.nix") as f: + GET_PLUGINS = f.read() editor = VimEditor("vim", ROOT, GET_PLUGINS) - parser = editor.create_parser() - args = parser.parse_args() - pluginupdate.update_plugins(editor, args) - - if editor.nvim_treesitter_updated: - print("updating nvim-treesitter grammars") - nvim_treesitter_dir = ROOT.joinpath("nvim-treesitter") - subprocess.check_call([nvim_treesitter_dir.joinpath("update.py")]) - - if editor.nixpkgs_repo: - index = editor.nixpkgs_repo.index - for diff in index.diff(None): - if diff.a_path == "pkgs/applications/editors/vim/plugins/nvim-treesitter/generated.nix": - msg = "vimPlugins.nvim-treesitter: update grammars" - print(f"committing to nixpkgs: {msg}") - index.add([str(nvim_treesitter_dir.joinpath("generated.nix"))]) - index.commit(msg) - return - print("no updates to nvim-treesitter grammars") + editor.run() if __name__ == "__main__": From 944a4d5aa053e2939055b6a0784f180a95614849 Mon Sep 17 00:00:00 2001 From: happysalada Date: Fri, 14 Apr 2023 15:27:43 -0400 Subject: [PATCH 30/32] qdrant: 1.1.0 -> 1.1.1 --- pkgs/servers/search/qdrant/Cargo.lock | 818 ++++++++++++++++++------- pkgs/servers/search/qdrant/default.nix | 7 +- 2 files changed, 603 insertions(+), 222 deletions(-) diff --git a/pkgs/servers/search/qdrant/Cargo.lock b/pkgs/servers/search/qdrant/Cargo.lock index 222a09900900..c342aec30a35 100644 --- a/pkgs/servers/search/qdrant/Cargo.lock +++ b/pkgs/servers/search/qdrant/Cargo.lock @@ -66,6 +66,7 @@ dependencies = [ "actix-codec", "actix-rt", "actix-service", + "actix-tls", "actix-utils", "ahash 0.7.6", "base64 0.21.0", @@ -103,7 +104,45 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "465a6172cf69b960917811022d8f29bc0b7fa1398bc4f78b3c466673db1213b6" dependencies = [ "quote", - "syn", + "syn 1.0.107", +] + +[[package]] +name = "actix-multipart" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dee489e3c01eae4d1c35b03c4493f71cb40d93f66b14558feb1b1a807671cc4e" +dependencies = [ + "actix-multipart-derive", + "actix-utils", + "actix-web", + "bytes", + "derive_more", + "futures-core", + "futures-util", + "httparse", + "local-waker", + "log", + "memchr", + "mime", + "serde", + "serde_json", + "serde_plain", + "tempfile", + "tokio", +] + +[[package]] +name = "actix-multipart-derive" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ec592f234db8a253cf80531246a4407c8a70530423eea80688a6c5a44a110e7" +dependencies = [ + "darling", + "parse-size", + "proc-macro2", + "quote", + "syn 1.0.107", ] [[package]] @@ -158,6 +197,24 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "actix-tls" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fde0cf292f7cdc7f070803cb9a0d45c018441321a78b1042ffbbb81ec333297" +dependencies = [ + "actix-codec", + "actix-rt", + "actix-service", + "actix-utils", + "futures-core", + "log", + "openssl", + "pin-project-lite", + "tokio-openssl", + "tokio-util", +] + [[package]] name = "actix-utils" version = "3.0.1" @@ -181,6 +238,7 @@ dependencies = [ "actix-rt", "actix-server", "actix-service", + "actix-tls", "actix-utils", "actix-web-codegen", "ahash 0.7.6", @@ -218,7 +276,29 @@ dependencies = [ "actix-router", "proc-macro2", "quote", - "syn", + "syn 1.0.107", +] + +[[package]] +name = "actix-web-validator" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ee5ed4e266dad8d980f964c5ddd746f1f4f85b7f3b54f7099ab861ec6d746" +dependencies = [ + "actix-http", + "actix-router", + "actix-web", + "bytes", + "futures", + "futures-util", + "log", + "mime", + "serde", + "serde_json", + "serde_qs", + "serde_urlencoded", + "thiserror", + "validator", ] [[package]] @@ -299,18 +379,59 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] -name = "anyhow" -version = "1.0.69" +name = "anstream" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800" +checksum = "342258dd14006105c2b75ab1bd7543a03bdf0cfc94383303ac212a04939dff6f" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-wincon", + "concolor-override", + "concolor-query", + "is-terminal", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23ea9e81bd02e310c216d080f6223c179012256e5151c41db88d12c88a1684d2" + +[[package]] +name = "anstyle-parse" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7d1bb534e9efed14f3e5f44e7dd1a4f709384023a4165199a4241e18dff0116" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-wincon" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3127af6145b149f3287bb9a0d10ad9c5692dba8c53ad48285e5bec4063834fa" +dependencies = [ + "anstyle", + "windows-sys 0.45.0", +] + +[[package]] +name = "anyhow" +version = "1.0.70" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4" [[package]] name = "api" -version = "1.1.0" +version = "1.1.1" dependencies = [ "chrono", "env_logger", "log", + "parking_lot", "prost", "prost-types", "rand 0.8.5", @@ -324,6 +445,7 @@ dependencies = [ "tonic-build", "tower", "uuid", + "validator", ] [[package]] @@ -380,18 +502,18 @@ checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] name = "async-trait" -version = "0.1.66" +version = "0.1.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b84f9ebcc6c1f5b8cb160f6990096a5c127f423fcb6e1ccc46c370cbdfb75dfc" +checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.11", ] [[package]] @@ -415,7 +537,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09a580bfc0fc2370333eddb71de8c8614d5972e3a327438eb3acc22824a638bf" dependencies = [ - "rustix", + "rustix 0.36.5", "tempfile", "windows-sys 0.45.0", ] @@ -439,9 +561,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "axum" -version = "0.6.1" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08b108ad2665fa3f6e6a517c3d80ec3e77d224c47d605167aefaa5d7ef97fa48" +checksum = "349f8ccfd9221ee7d1f3d4b33e1f8319b3a81ed8f61f2ea40b37b859794b4491" dependencies = [ "async-trait", "axum-core", @@ -461,16 +583,15 @@ dependencies = [ "serde", "sync_wrapper", "tower", - "tower-http", "tower-layer", "tower-service", ] [[package]] name = "axum-core" -version = "0.3.0" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79b8558f5a0581152dc94dcd289132a1d377494bdeafcd41869b3258e3e2ad92" +checksum = "b2f958c80c248b34b9a877a643811be8dbca03ca5ba827f2b63baf3a81e5fc4e" dependencies = [ "async-trait", "bytes", @@ -536,7 +657,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn", + "syn 1.0.107", ] [[package]] @@ -763,30 +884,38 @@ dependencies = [ [[package]] name = "clap" -version = "4.1.8" +version = "4.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d7ae14b20b94cb02149ed21a86c423859cbe18dc7ed69845cace50e52b40a5" +checksum = "046ae530c528f252094e4a77886ee1374437744b2bff1497aa898bbddbbb29b3" dependencies = [ - "bitflags", + "clap_builder", "clap_derive", - "clap_lex 0.3.0", - "is-terminal", "once_cell", +] + +[[package]] +name = "clap_builder" +version = "4.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "223163f58c9a40c3b0a43e1c4b50a9ce09f007ea2cb1ec258a687945b4b7929f" +dependencies = [ + "anstream", + "anstyle", + "bitflags", + "clap_lex 0.4.0", "strsim", - "termcolor", ] [[package]] name = "clap_derive" -version = "4.1.8" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44bec8e5c9d09e439c4335b1af0abaab56dcf3b94999a936e1bb47b9134288f0" +checksum = "3f9644cd56d6b87dbe899ef8b053e331c0637664e9e21a33dfcdc36093f5c5c4" dependencies = [ "heck", - "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 2.0.11", ] [[package]] @@ -800,12 +929,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d4198f73e42b4936b35b5bb248d81d2b595ecb170da0bac7655c54eedfa8da8" -dependencies = [ - "os_str_bytes", -] +checksum = "4f0807fb6f644c83f3e4ec014fec9858c1c8b26a7db8eb5f0bde5817df9c1df7" [[package]] name = "codespan-reporting" @@ -821,6 +947,7 @@ dependencies = [ name = "collection" version = "0.4.2" dependencies = [ + "actix-web-validator", "api", "arc-swap", "async-trait", @@ -836,7 +963,7 @@ dependencies = [ "log", "merge", "num_cpus", - "ordered-float 3.4.0", + "ordered-float 3.6.0", "parking_lot", "pprof", "rand 0.8.5", @@ -856,6 +983,7 @@ dependencies = [ "tower", "url", "uuid", + "validator", "wal", ] @@ -870,6 +998,21 @@ dependencies = [ "winapi", ] +[[package]] +name = "concolor-override" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a855d4a1978dc52fb0536a04d384c2c0c1aa273597f08b77c8c4d3b2eec6037f" + +[[package]] +name = "concolor-query" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88d11d52c3d7ca2e6d0040212be9e4dbbcd78b6447f535b6b561f449427944cf" +dependencies = [ + "windows-sys 0.45.0", +] + [[package]] name = "config" version = "0.13.3" @@ -1103,7 +1246,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn", + "syn 1.0.107", ] [[package]] @@ -1120,7 +1263,42 @@ checksum = "3e7e2adeb6a0d4a282e581096b06e1791532b7d576dcde5ccd9382acf55db8e6" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", +] + +[[package]] +name = "darling" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 1.0.107", +] + +[[package]] +name = "darling_macro" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +dependencies = [ + "darling_core", + "quote", + "syn 1.0.107", ] [[package]] @@ -1142,7 +1320,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn", + "syn 1.0.107", ] [[package]] @@ -1234,6 +1412,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "errno" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50d6a0976c999d473fe89ad888d5a284e55366d9dc9038b1ba2aa15128c4afa0" +dependencies = [ + "errno-dragonfly", + "libc", + "windows-sys 0.45.0", +] + [[package]] name = "errno-dragonfly" version = "0.1.2" @@ -1261,7 +1450,7 @@ checksum = "4e884668cd0c7480504233e951174ddc3b382f7c2666e3b7310b5c4e7b0c37f9" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.2.16", "windows-sys 0.42.0", ] @@ -1330,12 +1519,13 @@ dependencies = [ ] [[package]] -name = "fs2" -version = "0.4.3" +name = "fs4" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" +checksum = "8ea55201cc351fdb478217c0fb641b59813da9b4efe4c414a9d8f989a657d149" dependencies = [ "libc", + "rustix 0.35.13", "winapi", ] @@ -1359,9 +1549,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "531ac96c6ff5fd7c62263c5e3c67a603af4fcaee2e1a0ae5565ba3a11e69e549" +checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" dependencies = [ "futures-channel", "futures-core", @@ -1374,9 +1564,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "164713a5a0dcc3e7b4b1ed7d3b433cabc18025386f9339346e8daf15963cf7ac" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" dependencies = [ "futures-core", "futures-sink", @@ -1384,15 +1574,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86d7a0c1aa76363dac491de0ee99faf6941128376f1cf96f07db7603b7de69dd" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" [[package]] name = "futures-executor" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1997dd9df74cdac935c76252744c1ed5794fac083242ea4fe77ef3ed60ba0f83" +checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" dependencies = [ "futures-core", "futures-task", @@ -1401,38 +1591,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d422fa3cbe3b40dca574ab087abb5bc98258ea57eea3fd6f1fa7162c778b91" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" [[package]] name = "futures-macro" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eb14ed937631bd8b8b8977f2c198443447a8355b6e3ca599f38c975e5a963b6" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.11", ] [[package]] name = "futures-sink" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec93083a4aecafb2a80a885c9de1f0ccae9dbd32c2bb54b0c3a65690e0b8d2f2" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" [[package]] name = "futures-task" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd65540d33b37b16542a0438c12e6aeead10d4ac5d05bd3f805b8f35ab592879" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" [[package]] name = "futures-util" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ef6b17e481503ec85211fed8f39d1970f128935ca1f814cd32ac4a6842e84ab" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ "futures-channel", "futures-core", @@ -1467,9 +1657,9 @@ dependencies = [ [[package]] name = "geo" -version = "0.24.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce129b525496519c00321a00772d4532d2229071699c6dc6c9cefa5fa7d2b9ae" +checksum = "c7d640a4dd1d1c98b45f4653c841a8ec15f461a71b86bc30533ae64c6f20f268" dependencies = [ "float_next_after", "geo-types", @@ -1551,7 +1741,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -1655,6 +1845,12 @@ dependencies = [ "libc", ] +[[package]] +name = "hermit-abi" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" + [[package]] name = "http" version = "0.2.9" @@ -1683,12 +1879,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21dec9db110f5f872ed9699c3ecf50cf16f423502706ba5c72462e28d3157573" -[[package]] -name = "http-range-header" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29" - [[package]] name = "httparse" version = "1.8.0" @@ -1709,9 +1899,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.23" +version = "0.14.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "034711faac9d2166cb1baf1a2fb0b60b1f277f8492fd72176c17f3515e1abd3c" +checksum = "cc5e554ff619822309ffd57d8734d77cd5ce6238bc956f037ea06c58238c9899" dependencies = [ "bytes", "futures-channel", @@ -1739,9 +1929,9 @@ checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" dependencies = [ "http", "hyper", - "rustls", + "rustls 0.20.7", "tokio", - "tokio-rustls", + "tokio-rustls 0.23.4", ] [[package]] @@ -1793,6 +1983,23 @@ dependencies = [ "cxx-build", ] +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +dependencies = [ + "matches", + "unicode-bidi", + "unicode-normalization", +] + [[package]] name = "idna" version = "0.3.0" @@ -1803,6 +2010,12 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "if_chain" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb56e1aa765b4b4f3aadfab769793b7087bb03a4ea4920644a6d238e2df5b9ed" + [[package]] name = "indexmap" version = "1.9.2" @@ -1853,6 +2066,12 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "io-lifetimes" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ce5ef949d49ee85593fc4d3f3f95ad61657076395cbbce23e2121fc5542074" + [[package]] name = "io-lifetimes" version = "1.0.3" @@ -1871,14 +2090,14 @@ checksum = "11b0d96e660696543b251e58030cf9787df56da39dab19ad60eae7353040917e" [[package]] name = "is-terminal" -version = "0.4.1" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927609f78c2913a6f6ac3c27a4fe87f43e2a35367c0c4b0f8265e8f49a104330" +checksum = "256017f749ab3117e93acb91063009e1f1bb56d03965b14c2c8df4eb02c524d8" dependencies = [ - "hermit-abi 0.2.6", - "io-lifetimes", - "rustix", - "windows-sys 0.42.0", + "hermit-abi 0.3.1", + "io-lifetimes 1.0.3", + "rustix 0.37.4", + "windows-sys 0.45.0", ] [[package]] @@ -1945,9 +2164,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.138" +version = "0.2.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8" +checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" [[package]] name = "libloading" @@ -2005,12 +2224,24 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" +[[package]] +name = "linux-raw-sys" +version = "0.0.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4d2456c373231a208ad294c33dc5bff30051eafd954cd4caae83a712b12854d" + [[package]] name = "linux-raw-sys" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" +[[package]] +name = "linux-raw-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd550e73688e6d578f0ac2119e32b797a327631a42f9433e59d02e139c8df60d" + [[package]] name = "local-channel" version = "0.1.3" @@ -2049,6 +2280,12 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "matches" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" + [[package]] name = "matchit" version = "0.7.0" @@ -2098,7 +2335,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -2210,7 +2447,7 @@ checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -2282,9 +2519,9 @@ checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" [[package]] name = "openssl" -version = "0.10.46" +version = "0.10.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd2523381e46256e40930512c7fd25562b9eae4812cb52078f155e87217c9d1e" +checksum = "7e30d8bc91859781f0a943411186324d580f2bbeb71b452fe91ae344806af3f1" dependencies = [ "bitflags", "cfg-if", @@ -2303,7 +2540,7 @@ checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -2323,11 +2560,10 @@ dependencies = [ [[package]] name = "openssl-sys" -version = "0.9.81" +version = "0.9.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176be2629957c157240f68f61f2d0053ad3a4ecfdd9ebf1e6521d18d9635cf67" +checksum = "0d3d193fb1488ad46ffe3aaabc912cc931d02ee8518fe2959aea8ef52718b0c0" dependencies = [ - "autocfg", "cc", "libc", "openssl-src", @@ -2346,9 +2582,9 @@ dependencies = [ [[package]] name = "ordered-float" -version = "3.4.0" +version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d84eb1409416d254e4a9c8fa56cc24701755025b458f0fcd8e59e1f5f40c23bf" +checksum = "13a384337e997e6860ffbaa83708b2ef329fd8c54cb67a5f64d421e0f943254f" dependencies = [ "num-traits", ] @@ -2389,12 +2625,18 @@ dependencies = [ "cfg-if", "libc", "petgraph", - "redox_syscall", + "redox_syscall 0.2.16", "smallvec", "thread-id", "windows-sys 0.42.0", ] +[[package]] +name = "parse-size" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "944553dd59c802559559161f9816429058b869003836120e262e8caec061b7ae" + [[package]] name = "paste" version = "1.0.11" @@ -2459,7 +2701,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -2500,7 +2742,7 @@ checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -2593,7 +2835,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c8992a85d8e93a28bdf76137db888d3874e3b230dee5ed8bebac4c9f7617773" dependencies = [ "proc-macro2", - "syn", + "syn 1.0.107", ] [[package]] @@ -2605,7 +2847,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", - "syn", + "syn 1.0.107", "version_check", ] @@ -2622,9 +2864,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.49" +version = "1.0.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57a8eca9f9c4ffde41714334dee777596264c7825420f521abc92b5b5deb63a5" +checksum = "e472a104799c74b514a57226160104aa483546de37e839ec50e3c2e41dd87534" dependencies = [ "unicode-ident", ] @@ -2676,9 +2918,9 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.11.4" +version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "276470f7f281b0ed53d2ae42dd52b4a8d08853a3c70e7fe95882acbb98a6ae94" +checksum = "2c828f93f5ca4826f97fedcbd3f9a536c16b12cff3dbbb4a007f932bbad95b12" dependencies = [ "bytes", "heck", @@ -2691,7 +2933,7 @@ dependencies = [ "prost", "prost-types", "regex", - "syn", + "syn 1.0.107", "tempfile", "which", ] @@ -2706,7 +2948,7 @@ dependencies = [ "itertools", "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -2734,21 +2976,23 @@ dependencies = [ "proc-macro2", "prost-build", "quote", - "syn", + "syn 1.0.107", ] [[package]] name = "qdrant" -version = "1.1.0" +version = "1.1.1" dependencies = [ "actix-cors", "actix-files", + "actix-multipart", "actix-web", + "actix-web-validator", "anyhow", "api", "atty", "chrono", - "clap 4.1.8", + "clap 4.2.1", "collection", "colored", "config", @@ -2786,6 +3030,7 @@ dependencies = [ "tower", "tower-layer", "uuid", + "validator", ] [[package]] @@ -2822,9 +3067,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.23" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" dependencies = [ "proc-macro2", ] @@ -2838,7 +3083,8 @@ checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" [[package]] name = "raft" version = "0.7.0" -source = "git+https://github.com/tikv/raft-rs?rev=5ce52b480065ff31ecef16b9b77c7c3b7c57c8c7#5ce52b480065ff31ecef16b9b77c7c3b7c57c8c7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f12688b23a649902762d4c11d854d73c49c9b93138f2de16403ef9f571ad5bae" dependencies = [ "fxhash", "getset", @@ -2852,7 +3098,8 @@ dependencies = [ [[package]] name = "raft-proto" version = "0.7.0" -source = "git+https://github.com/tikv/raft-rs?rev=5ce52b480065ff31ecef16b9b77c7c3b7c57c8c7#5ce52b480065ff31ecef16b9b77c7c3b7c57c8c7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb6884896294f553e8d5cfbdb55080b9f5f2f43394afff59c9f077e0f4b46d6b" dependencies = [ "lazy_static", "prost", @@ -2981,6 +3228,15 @@ dependencies = [ "bitflags", ] +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags", +] + [[package]] name = "regex" version = "1.7.0" @@ -3000,9 +3256,9 @@ checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" [[package]] name = "reqwest" -version = "0.11.14" +version = "0.11.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21eed90ec8570952d53b772ecf8f206aa1ec9a3d76b2521c56c42973f2d91ee9" +checksum = "27b71749df584b7f4cac2c426c127a7c785a5106cc98f7a8feb044115f0fa254" dependencies = [ "base64 0.21.0", "bytes", @@ -3023,14 +3279,14 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls", + "rustls 0.20.7", "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", "tokio", "tokio-native-tls", - "tokio-rustls", + "tokio-rustls 0.23.4", "tokio-util", "tower-service", "url", @@ -3157,6 +3413,20 @@ dependencies = [ "semver", ] +[[package]] +name = "rustix" +version = "0.35.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "727a1a6d65f786ec22df8a81ca3121107f235970dc1705ed681d3e6e8b9cd5f9" +dependencies = [ + "bitflags", + "errno 0.2.8", + "io-lifetimes 0.7.5", + "libc", + "linux-raw-sys 0.0.46", + "windows-sys 0.42.0", +] + [[package]] name = "rustix" version = "0.36.5" @@ -3164,13 +3434,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3807b5d10909833d3e9acd1eb5fb988f79376ff10fce42937de71a449c4c588" dependencies = [ "bitflags", - "errno", - "io-lifetimes", + "errno 0.2.8", + "io-lifetimes 1.0.3", "libc", - "linux-raw-sys", + "linux-raw-sys 0.1.4", "windows-sys 0.42.0", ] +[[package]] +name = "rustix" +version = "0.37.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c348b5dc624ecee40108aa2922fed8bad89d7fcc2b9f8cb18f632898ac4a37f9" +dependencies = [ + "bitflags", + "errno 0.3.0", + "io-lifetimes 1.0.3", + "libc", + "linux-raw-sys 0.3.0", + "windows-sys 0.45.0", +] + [[package]] name = "rustls" version = "0.20.7" @@ -3183,6 +3467,18 @@ dependencies = [ "webpki", ] +[[package]] +name = "rustls" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07180898a28ed6a7f7ba2311594308f595e3dd2e3c3812fa0a80a47b45f17e5d" +dependencies = [ + "log", + "ring", + "rustls-webpki", + "sct", +] + [[package]] name = "rustls-pemfile" version = "1.0.1" @@ -3192,6 +3488,16 @@ dependencies = [ "base64 0.13.1", ] +[[package]] +name = "rustls-webpki" +version = "0.100.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6207cd5ed3d8dca7816f8f3725513a34609c0c765bf652b8c3cb4cfd87db46b" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "rustversion" version = "1.0.11" @@ -3272,7 +3578,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn", + "syn 1.0.107", ] [[package]] @@ -3334,6 +3640,7 @@ dependencies = [ "atomicwrites", "bincode", "bitvec", + "chrono", "criterion", "fs_extra", "geo", @@ -3344,7 +3651,7 @@ dependencies = [ "num-derive", "num-traits", "num_cpus", - "ordered-float 3.4.0", + "ordered-float 3.6.0", "parking_lot", "pprof", "quantization", @@ -3365,6 +3672,7 @@ dependencies = [ "thiserror", "tinyvec", "uuid", + "validator", "walkdir", ] @@ -3376,9 +3684,9 @@ checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" [[package]] name = "serde" -version = "1.0.156" +version = "1.0.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "314b5b092c0ade17c00142951e50ced110ec27cea304b1037c6969246c2469a4" +checksum = "3c04e8343c3daeec41f58990b9d77068df31209f2af111e059e9fe9646693065" dependencies = [ "serde_derive", ] @@ -3405,13 +3713,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.156" +version = "1.0.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7e29c4601e36bcec74a223228dce795f4cd3616341a4af93520ca1a837c087d" +checksum = "4c614d17805b093df4b147b51339e7e44bf05ef59fba1e45d83500bcfb4d8585" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.11", ] [[package]] @@ -3422,20 +3730,42 @@ checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] name = "serde_json" -version = "1.0.94" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c533a59c9d8a93a09c6ab31f0fd5e5f4dd1b8fc9434804029839884765d04ea" +checksum = "d721eca97ac802aa7777b701877c8004d950fc142651367300d21c1cc0194744" dependencies = [ "itoa", "ryu", "serde", ] +[[package]] +name = "serde_plain" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6018081315db179d0ce57b1fe4b62a12a0028c9cf9bbef868c9cf477b3c34ae" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_qs" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cac3f1e2ca2fe333923a1ae72caca910b98ed0630bb35ef6f8c8517d6e81afa" +dependencies = [ + "actix-web", + "futures", + "percent-encoding", + "serde", + "thiserror", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -3536,9 +3866,9 @@ checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "socket2" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" dependencies = [ "libc", "winapi", @@ -3606,6 +3936,7 @@ dependencies = [ "tonic", "url", "uuid", + "validator", "wal", ] @@ -3655,6 +3986,17 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21e3787bb71465627110e7d87ed4faaa36c1f61042ee67badb9e2ef173accc40" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "sync_wrapper" version = "0.1.1" @@ -3690,15 +4032,15 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.4.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af18f7ae1acd354b992402e9ec5864359d693cd8a79dcbef59f76891701c1e95" +checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" dependencies = [ "cfg-if", "fastrand", - "redox_syscall", - "rustix", - "windows-sys 0.42.0", + "redox_syscall 0.3.5", + "rustix 0.37.4", + "windows-sys 0.45.0", ] [[package]] @@ -3728,22 +4070,22 @@ checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.39" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5ab016db510546d856297882807df8da66a16fb8c4101cb8b30054b0d5b2d9c" +checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.39" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5420d42e90af0c38c3290abcca25b9b3bdf379fc9f55c528f53a269d9c9a267e" +checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.11", ] [[package]] @@ -3753,7 +4095,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5fdfe0627923f7411a43ec9ec9c39c3a9b4151be313e0922042581fb6c9b717f" dependencies = [ "libc", - "redox_syscall", + "redox_syscall 0.2.16", "winapi", ] @@ -3843,14 +4185,13 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.26.0" +version = "1.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64" +checksum = "d0de47a4eecbe11f498978a9b29d792f0d2692d1dd003650c24c76510e3bc001" dependencies = [ "autocfg", "bytes", "libc", - "memchr", "mio", "num_cpus", "parking_lot", @@ -3873,13 +4214,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "1.8.2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" +checksum = "61a573bdc87985e9d6ddeed1b3d864e8a302c847e40d647746df2f1de209d1ce" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.11", ] [[package]] @@ -3892,17 +4233,39 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-openssl" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08f9ffb7809f1b20c1b398d92acf4cc719874b3b2b2d9ea2f09b4a80350878a" +dependencies = [ + "futures-util", + "openssl", + "openssl-sys", + "tokio", +] + [[package]] name = "tokio-rustls" version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" dependencies = [ - "rustls", + "rustls 0.20.7", "tokio", "webpki", ] +[[package]] +name = "tokio-rustls" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0d409377ff5b1e3ca6437aa86c1eb7d40c134bfec254e44c830defa92669db5" +dependencies = [ + "rustls 0.21.0", + "tokio", +] + [[package]] name = "tokio-stream" version = "0.1.11" @@ -3939,14 +4302,14 @@ dependencies = [ [[package]] name = "tonic" -version = "0.8.3" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f219fad3b929bef19b1f86fbc0358d35daed8f2cac972037ac0dc10bbb8d5fb" +checksum = "38bd8e87955eb13c1986671838177d6792cdc52af9bffced0d2c8a9a7f741ab3" dependencies = [ "async-stream", "async-trait", "axum", - "base64 0.13.1", + "base64 0.21.0", "bytes", "flate2", "futures-core", @@ -3959,28 +4322,27 @@ dependencies = [ "percent-encoding", "pin-project", "prost", - "prost-derive", + "rustls-pemfile", "tokio", + "tokio-rustls 0.24.0", "tokio-stream", - "tokio-util", "tower", "tower-layer", "tower-service", "tracing", - "tracing-futures", ] [[package]] name = "tonic-build" -version = "0.8.4" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bf5e9b9c0f7e0a7c027dcfaba7b2c60816c7049171f679d99ee2ff65d0de8c4" +checksum = "0f60a933bbea70c95d633c04c951197ddf084958abaa2ed502a3743bdd8d8dd7" dependencies = [ "prettyplease", "proc-macro2", "prost-build", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -4003,25 +4365,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "tower-http" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" -dependencies = [ - "bitflags", - "bytes", - "futures-core", - "futures-util", - "http", - "http-body", - "http-range-header", - "pin-project-lite", - "tower", - "tower-layer", - "tower-service", -] - [[package]] name = "tower-layer" version = "0.3.2" @@ -4055,7 +4398,7 @@ checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -4067,16 +4410,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "tracing-futures" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" -dependencies = [ - "pin-project", - "tracing", -] - [[package]] name = "try-lock" version = "0.2.3" @@ -4150,21 +4483,69 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" dependencies = [ "form_urlencoded", - "idna", + "idna 0.3.0", "percent-encoding", "serde", ] [[package]] -name = "uuid" -version = "1.3.0" +name = "utf8parse" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1674845326ee10d37ca60470760d4288a6f80f304007d92e5c53bab78c9cfd79" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + +[[package]] +name = "uuid" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b55a3fef2a1e3b3a00ce878640918820d3c51081576ac657d23af9fc7928fdb" dependencies = [ "getrandom 0.2.8", "serde", ] +[[package]] +name = "validator" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32ad5bf234c7d3ad1042e5252b7eddb2c4669ee23f32c7dd0e9b7705f07ef591" +dependencies = [ + "idna 0.2.3", + "lazy_static", + "regex", + "serde", + "serde_derive", + "serde_json", + "url", + "validator_derive", +] + +[[package]] +name = "validator_derive" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc44ca3088bb3ba384d9aecf40c6a23a676ce23e09bdaca2073d99c207f864af" +dependencies = [ + "if_chain", + "lazy_static", + "proc-macro-error", + "proc-macro2", + "quote", + "regex", + "syn 1.0.107", + "validator_types", +] + +[[package]] +name = "validator_types" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "111abfe30072511849c5910134e8baf8dc05de4c0e5903d681cbd5c9c4d611e3" +dependencies = [ + "proc-macro2", + "syn 1.0.107", +] + [[package]] name = "vcpkg" version = "0.2.15" @@ -4189,18 +4570,19 @@ dependencies = [ [[package]] name = "wal" version = "0.1.2" -source = "git+https://github.com/qdrant/wal.git?rev=7536f9e222d55cc53f7f7507a3028b0e303976cc#7536f9e222d55cc53f7f7507a3028b0e303976cc" +source = "git+https://github.com/qdrant/wal.git?rev=9fe5a0c97c148152adacca0df238be6b1bf7d704#9fe5a0c97c148152adacca0df238be6b1bf7d704" dependencies = [ "byteorder", "crc", "crossbeam-channel", "docopt", "env_logger", - "fs2", + "fs4", "log", "memmap2", "rand 0.8.5", "rand_distr", + "rustix 0.37.4", "serde", ] @@ -4263,7 +4645,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn", + "syn 1.0.107", "wasm-bindgen-shared", ] @@ -4297,7 +4679,7 @@ checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4412,12 +4794,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.42.1", - "windows_i686_gnu 0.42.1", - "windows_i686_msvc 0.42.1", - "windows_x86_64_gnu 0.42.1", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.42.1", + "windows_x86_64_msvc 0.42.2", ] [[package]] @@ -4431,24 +4813,24 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" dependencies = [ "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.42.1", - "windows_i686_gnu 0.42.1", - "windows_i686_msvc 0.42.1", - "windows_x86_64_gnu 0.42.1", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.42.1", + "windows_x86_64_msvc 0.42.2", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_msvc" @@ -4458,9 +4840,9 @@ checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" [[package]] name = "windows_aarch64_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_i686_gnu" @@ -4470,9 +4852,9 @@ checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" [[package]] name = "windows_i686_gnu" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_msvc" @@ -4482,9 +4864,9 @@ checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" [[package]] name = "windows_i686_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_x86_64_gnu" @@ -4494,15 +4876,15 @@ checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" [[package]] name = "windows_x86_64_gnu" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_msvc" @@ -4512,9 +4894,9 @@ checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" [[package]] name = "windows_x86_64_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "winreg" diff --git a/pkgs/servers/search/qdrant/default.nix b/pkgs/servers/search/qdrant/default.nix index 52381bf3d4b1..692b26863e8d 100644 --- a/pkgs/servers/search/qdrant/default.nix +++ b/pkgs/servers/search/qdrant/default.nix @@ -10,21 +10,20 @@ rustPlatform.buildRustPackage rec { pname = "qdrant"; - version = "1.1.0"; + version = "1.1.1"; src = fetchFromGitHub { owner = "qdrant"; repo = "qdrant"; rev = "refs/tags/v${version}"; - sha256 = "sha256-mNprwomTVg/C75tPciQ4J8bb42ejpVKy/RSRcQySdvU="; + sha256 = "sha256-Kjao5TjVT8QVV2tKt7TTt9cYmYXRl/oPLi8UK1tc/nA="; }; cargoLock = { lockFile = ./Cargo.lock; outputHashes = { "quantization-0.1.0" = "sha256-4TY08ScRbL4zVG428BTZu42ocAsPk/8wM+zzI8EFSrs="; - "raft-0.7.0" = "sha256-NflESS+CoTFMkCC2SYWgyMRHBe7+sMIbuElhUL5uMcg="; - "wal-0.1.2" = "sha256-vaPQff8pBqCJhACj4/t3AyPhnddHwsGWCI3IUr5uWro="; + "wal-0.1.2" = "sha256-EfCvwgHMfyiId8VjV+yFyNqoIv6fxF8UFcw1s46hF5k="; }; }; From 3a776e1e30bc6d45847c9c7614788417a0a78097 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Fri, 7 Apr 2023 09:58:19 +0000 Subject: [PATCH 31/32] nixosTests.cage: fix OCR properly The underlying problem with OCR in this test has been that the only font installed was DejaVu Sans, a proportional font, which xterm would try to render as monospace. This produced very broken looking text, which the OCR understandably had trouble with. With an actual monospace font installed, there are no more problems and we don't need the hacks. --- nixos/tests/cage.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nixos/tests/cage.nix b/nixos/tests/cage.nix index 39c8d0441b6d..db1b7854673d 100644 --- a/nixos/tests/cage.nix +++ b/nixos/tests/cage.nix @@ -10,11 +10,13 @@ import ./make-test-python.nix ({ pkgs, ...} : { imports = [ ./common/user-account.nix ]; + + fonts.fonts = with pkgs; [ dejavu_fonts ]; + services.cage = { enable = true; user = "alice"; - # Disable color and bold and use a larger font to make OCR easier: - program = "${pkgs.xterm}/bin/xterm -cm -pc -fa Monospace -fs 24"; + program = "${pkgs.xterm}/bin/xterm"; }; # Need to switch to a different GPU driver than the default one (-vga std) so that Cage can launch: From bfc75c749141bd8272b9c68ca1d678dfe789f3cb Mon Sep 17 00:00:00 2001 From: Christoph Neidahl Date: Sat, 15 Apr 2023 00:42:03 +0200 Subject: [PATCH 32/32] libsForQt5.qtsystems: init at unstable-2019-01-03 (#214179) --- .../libraries/qt-5/5.15/default.nix | 8 +++ pkgs/development/libraries/qt-5/5.15/srcs.nix | 11 ++++ .../libraries/qt-5/modules/qtsystems.nix | 54 +++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 pkgs/development/libraries/qt-5/modules/qtsystems.nix diff --git a/pkgs/development/libraries/qt-5/5.15/default.nix b/pkgs/development/libraries/qt-5/5.15/default.nix index 3b2979d3abce..70083fe56f4b 100644 --- a/pkgs/development/libraries/qt-5/5.15/default.nix +++ b/pkgs/development/libraries/qt-5/5.15/default.nix @@ -54,6 +54,13 @@ let ]; qtscript = [ ./qtscript.patch ]; qtserialport = [ ./qtserialport.patch ]; + qtsystems = [ + # Enable building with udisks support + (fetchpatch { + url = "https://salsa.debian.org/qt-kde-team/qt/qtsystems/-/raw/a23fd92222c33479d7f3b59e48116def6b46894c/debian/patches/2001_build_with_udisk.patch"; + hash = "sha256-B/z/+tai01RU/bAJSCp5a0/dGI8g36nwso8MiJv27YM="; + }) + ]; qtwebengine = [ (fetchpatch { url = "https://raw.githubusercontent.com/Homebrew/formula-patches/a6f16c6daea3b5a1f7bc9f175d1645922c131563/qt5/qt5-webengine-python3.patch"; @@ -166,6 +173,7 @@ let qtserialport = callPackage ../modules/qtserialport.nix {}; qtspeech = callPackage ../modules/qtspeech.nix {}; qtsvg = callPackage ../modules/qtsvg.nix {}; + qtsystems = callPackage ../modules/qtsystems.nix {}; qtscxml = callPackage ../modules/qtscxml.nix {}; qttools = callPackage ../modules/qttools.nix {}; qttranslations = callPackage ../modules/qttranslations.nix {}; diff --git a/pkgs/development/libraries/qt-5/5.15/srcs.nix b/pkgs/development/libraries/qt-5/5.15/srcs.nix index 0603ae077e47..a650955795a0 100644 --- a/pkgs/development/libraries/qt-5/5.15/srcs.nix +++ b/pkgs/development/libraries/qt-5/5.15/srcs.nix @@ -34,6 +34,17 @@ lib.mapAttrs mk (lib.importJSON ./srcs-generated.json) version = "5.212.0-alpha4"; }; + # qtsystems has no official releases + qtsystems = { + version = "unstable-2019-01-03"; + src = fetchFromGitHub { + owner = "qt"; + repo = "qtsystems"; + rev = "e3332ee38d27a134cef6621fdaf36687af1b6f4a"; + hash = "sha256-P8MJgWiDDBCYo+icbNva0LODy0W+bmQTS87ggacuMP0="; + }; + }; + catapult = fetchgit { url = "https://chromium.googlesource.com/catapult"; rev = "5eedfe23148a234211ba477f76fc2ea2e8529189"; diff --git a/pkgs/development/libraries/qt-5/modules/qtsystems.nix b/pkgs/development/libraries/qt-5/modules/qtsystems.nix new file mode 100644 index 000000000000..32974bdecc67 --- /dev/null +++ b/pkgs/development/libraries/qt-5/modules/qtsystems.nix @@ -0,0 +1,54 @@ +{ qtModule +, stdenv +, lib +, bluez +, libevdev +, libX11 +, pkg-config +, qtbase +, udev +, wrapQtAppsHook +}: + +qtModule { + pname = "qtsystems"; + + outputs = [ + "out" + "dev" + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ + "bin" + ]; + + qtInputs = [ + qtbase + ]; + + nativeBuildInputs = [ + pkg-config + wrapQtAppsHook + ]; + + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ + bluez + libevdev + libX11 + udev + ]; + + qmakeFlags = [ + "CONFIG+=git_build" + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ + "CONFIG+=ofono" + "CONFIG+=udisks" + "CONFIG+=upower" + ]; + + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' + wrapQtApp $bin/bin/servicefw + ''; + + meta = { + maintainers = with lib.maintainers; [ OPNA2608 ]; + }; +}