From 3a21a46ed12b054b2f9ee90452405e3e3170d6b7 Mon Sep 17 00:00:00 2001 From: revol-xut Date: Mon, 18 Apr 2022 16:05:29 +0200 Subject: [PATCH 01/28] lingua-franca: 0.1.0 -> 0.2.0 (cherry picked from commit 2c54c0602d739b684b5b8dbf9496cdd4de5b226a) --- .../compilers/lingua-franca/default.nix | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/pkgs/development/compilers/lingua-franca/default.nix b/pkgs/development/compilers/lingua-franca/default.nix index bb25853ee36d..b37bffdfd3bc 100644 --- a/pkgs/development/compilers/lingua-franca/default.nix +++ b/pkgs/development/compilers/lingua-franca/default.nix @@ -1,24 +1,22 @@ -{ lib, pkgs, stdenv, fetchFromGitHub, jdk11_headless }: +{ lib, pkgs, stdenv, fetchzip, jdk17_headless }: -stdenv.mkDerivation { +stdenv.mkDerivation rec { pname = "lfc"; - version = "0.1.0"; + version = "0.2.0"; - src = fetchFromGitHub { - owner = "revol-xut"; - repo = "lingua-franca-nix-releases"; - rev = "d37bbfa530f0189c3e86ce0191134cdf42c6aec7"; - sha256 = "/qMBOjffvShCPcbh9rJ7aVgdgZQ1hilHakjLyEhSmgs="; + src = fetchzip { + url = "https://github.com/lf-lang/lingua-franca/releases/download/v${version}/lfc_${version}.zip"; + sha256 = "rBx7UnPLufZBO7lG0In5upHqYCyRtI4kQv0V83CZHew="; }; - buildInputs = [ jdk11_headless ]; + buildInputs = [ jdk17_headless ]; - _JAVA_HOME = "${jdk11_headless}/"; + _JAVA_HOME = "${jdk17_headless}/"; postPatch = '' substituteInPlace bin/lfc \ --replace 'base=`dirname $(dirname ''${abs_path})`' "base='$out'" \ - --replace "run_lfc_with_args" "${jdk11_headless}/bin/java -jar $out/lib/jars/org.lflang.lfc-0.1.0-SNAPSHOT-all.jar" + --replace "run_lfc_with_args" "${jdk17_headless}/bin/java -jar $out/lib/jars/org.lflang.lfc-${version}-SNAPSHOT-all.jar" ''; installPhase = '' From 8cbf8c966953664f6b8fbe976586b7f57c3f7464 Mon Sep 17 00:00:00 2001 From: milahu Date: Sat, 16 Oct 2021 14:22:24 +0200 Subject: [PATCH 02/28] qt6: init at 6.3.0 (cherry picked from commit 5baa20d7c8bd2b04ac30316d4c8ee4d8f4db3ad6) --- pkgs/build-support/fetchurl/mirrors.nix | 5 + pkgs/development/libraries/qt-6/cmake.patch | 129 +++++++++ pkgs/development/libraries/qt-6/default.nix | 94 +++++++ pkgs/development/libraries/qt-6/fetch.sh | 1 + .../libraries/qt-6/hooks/qtbase-setup-hook.sh | 43 +++ .../libraries/qt-6/hooks/wrap-qt-apps-hook.sh | 107 +++++++ .../libraries/qt-6/modules/qt3d.nix | 12 + .../libraries/qt-6/modules/qt5compat.nix | 13 + .../libraries/qt-6/modules/qtbase.nix | 222 +++++++++++++++ .../libraries/qt-6/modules/qtcharts.nix | 9 + .../libraries/qt-6/modules/qtconnectivity.nix | 15 + .../libraries/qt-6/modules/qtdatavis3d.nix | 9 + .../libraries/qt-6/modules/qtdeclarative.nix | 19 ++ .../libraries/qt-6/modules/qtdoc.nix | 9 + .../libraries/qt-6/modules/qtimageformats.nix | 13 + .../qt-6/modules/qtlanguageserver.nix | 8 + .../libraries/qt-6/modules/qtlottie.nix | 9 + .../libraries/qt-6/modules/qtmultimedia.nix | 24 ++ .../libraries/qt-6/modules/qtnetworkauth.nix | 6 + .../libraries/qt-6/modules/qtpositioning.nix | 14 + .../libraries/qt-6/modules/qtquick3d.nix | 11 + .../qt-6/modules/qtquicktimeline.nix | 9 + .../qt-6/modules/qtremoteobjects.nix | 9 + .../libraries/qt-6/modules/qtscxml.nix | 6 + .../libraries/qt-6/modules/qtsensors.nix | 10 + .../libraries/qt-6/modules/qtserialbus.nix | 6 + .../libraries/qt-6/modules/qtserialport.nix | 14 + .../libraries/qt-6/modules/qtshadertools.nix | 8 + .../libraries/qt-6/modules/qtsvg.nix | 15 + .../libraries/qt-6/modules/qttools.nix | 11 + .../libraries/qt-6/modules/qttranslations.nix | 8 + .../qt-6/modules/qtvirtualkeyboard.nix | 15 + .../libraries/qt-6/modules/qtwayland.nix | 16 ++ .../libraries/qt-6/modules/qtwebchannel.nix | 12 + .../libraries/qt-6/modules/qtwebengine.nix | 234 ++++++++++++++++ .../libraries/qt-6/modules/qtwebsockets.nix | 11 + .../libraries/qt-6/modules/qtwebview.nix | 11 + pkgs/development/libraries/qt-6/qtModule.nix | 45 +++ pkgs/development/libraries/qt-6/srcs.nix | 262 ++++++++++++++++++ pkgs/top-level/all-packages.nix | 17 ++ pkgs/top-level/qt6-packages.nix | 20 ++ 41 files changed, 1511 insertions(+) create mode 100644 pkgs/development/libraries/qt-6/cmake.patch create mode 100644 pkgs/development/libraries/qt-6/default.nix create mode 100644 pkgs/development/libraries/qt-6/fetch.sh create mode 100644 pkgs/development/libraries/qt-6/hooks/qtbase-setup-hook.sh create mode 100644 pkgs/development/libraries/qt-6/hooks/wrap-qt-apps-hook.sh create mode 100644 pkgs/development/libraries/qt-6/modules/qt3d.nix create mode 100644 pkgs/development/libraries/qt-6/modules/qt5compat.nix create mode 100644 pkgs/development/libraries/qt-6/modules/qtbase.nix create mode 100644 pkgs/development/libraries/qt-6/modules/qtcharts.nix create mode 100644 pkgs/development/libraries/qt-6/modules/qtconnectivity.nix create mode 100644 pkgs/development/libraries/qt-6/modules/qtdatavis3d.nix create mode 100644 pkgs/development/libraries/qt-6/modules/qtdeclarative.nix create mode 100644 pkgs/development/libraries/qt-6/modules/qtdoc.nix create mode 100644 pkgs/development/libraries/qt-6/modules/qtimageformats.nix create mode 100644 pkgs/development/libraries/qt-6/modules/qtlanguageserver.nix create mode 100644 pkgs/development/libraries/qt-6/modules/qtlottie.nix create mode 100644 pkgs/development/libraries/qt-6/modules/qtmultimedia.nix create mode 100644 pkgs/development/libraries/qt-6/modules/qtnetworkauth.nix create mode 100644 pkgs/development/libraries/qt-6/modules/qtpositioning.nix create mode 100644 pkgs/development/libraries/qt-6/modules/qtquick3d.nix create mode 100644 pkgs/development/libraries/qt-6/modules/qtquicktimeline.nix create mode 100644 pkgs/development/libraries/qt-6/modules/qtremoteobjects.nix create mode 100644 pkgs/development/libraries/qt-6/modules/qtscxml.nix create mode 100644 pkgs/development/libraries/qt-6/modules/qtsensors.nix create mode 100644 pkgs/development/libraries/qt-6/modules/qtserialbus.nix create mode 100644 pkgs/development/libraries/qt-6/modules/qtserialport.nix create mode 100644 pkgs/development/libraries/qt-6/modules/qtshadertools.nix create mode 100644 pkgs/development/libraries/qt-6/modules/qtsvg.nix create mode 100644 pkgs/development/libraries/qt-6/modules/qttools.nix create mode 100644 pkgs/development/libraries/qt-6/modules/qttranslations.nix create mode 100644 pkgs/development/libraries/qt-6/modules/qtvirtualkeyboard.nix create mode 100644 pkgs/development/libraries/qt-6/modules/qtwayland.nix create mode 100644 pkgs/development/libraries/qt-6/modules/qtwebchannel.nix create mode 100644 pkgs/development/libraries/qt-6/modules/qtwebengine.nix create mode 100644 pkgs/development/libraries/qt-6/modules/qtwebsockets.nix create mode 100644 pkgs/development/libraries/qt-6/modules/qtwebview.nix create mode 100644 pkgs/development/libraries/qt-6/qtModule.nix create mode 100644 pkgs/development/libraries/qt-6/srcs.nix create mode 100644 pkgs/top-level/qt6-packages.nix diff --git a/pkgs/build-support/fetchurl/mirrors.nix b/pkgs/build-support/fetchurl/mirrors.nix index 2c6ba2b02448..d69468958276 100644 --- a/pkgs/build-support/fetchurl/mirrors.nix +++ b/pkgs/build-support/fetchurl/mirrors.nix @@ -165,6 +165,11 @@ "https://ftp.postgresql.org/pub/" ]; + # Qt + qt = [ + "https://download.qt.io/" + ]; + # Roy marples mirrors roy = [ "https://roy.marples.name/downloads/" diff --git a/pkgs/development/libraries/qt-6/cmake.patch b/pkgs/development/libraries/qt-6/cmake.patch new file mode 100644 index 000000000000..1fb2ea26c35d --- /dev/null +++ b/pkgs/development/libraries/qt-6/cmake.patch @@ -0,0 +1,129 @@ +commit 4f497c358e0386b65df1c1d636aadf72f8647134 +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 8b0f64e23b..03291e2ee2 100644 +--- a/Source/cmExportFileGenerator.cxx ++++ b/Source/cmExportFileGenerator.cxx +@@ -6,6 +6,7 @@ + #include + #include + #include ++#include + + #include + +@@ -325,9 +326,23 @@ 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, "bin") || cmHasLiteralPrefix(e, "./bin")) { ++ 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 4a3c565bce..5afa9e5e50 100644 +--- a/Source/cmExportInstallFileGenerator.cxx ++++ b/Source/cmExportInstallFileGenerator.cxx +@@ -5,6 +5,7 @@ + #include + #include + #include ++#include + + #include "cmExportSet.h" + #include "cmGeneratedFileStream.h" +@@ -263,7 +264,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( +@@ -381,9 +382,24 @@ 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, "bin") || cmHasLiteralPrefix(dest, "./bin")) { ++ 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 840f5112d6..7bb4ab41aa 100644 +--- a/Source/cmGeneratorExpression.cxx ++++ b/Source/cmGeneratorExpression.cxx +@@ -197,7 +197,22 @@ 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, "bin") || cmHasLiteralPrefix(e, "./bin")) { ++ 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; + } diff --git a/pkgs/development/libraries/qt-6/default.nix b/pkgs/development/libraries/qt-6/default.nix new file mode 100644 index 000000000000..231c82cf6e76 --- /dev/null +++ b/pkgs/development/libraries/qt-6/default.nix @@ -0,0 +1,94 @@ +{ newScope +, lib +, stdenv +, fetchurl +, fetchgit +, fetchpatch +, fetchFromGitHub +, makeSetupHook +, makeWrapper +, bison +, cups +, harfbuzz +, libGL +, perl +, cmake +, ninja +, writeText +, gstreamer +, gst-plugins-base +, gtk3 +, dconf + + # options +, developerBuild ? false +, debug ? false +}: + +let + srcs = import ./srcs.nix { + inherit fetchurl; + mirror = "mirror://qt"; + }; + + qtModule = + import ./qtModule.nix + { inherit stdenv lib perl cmake ninja writeText; } + { inherit self srcs; }; + + addPackages = self: with self; + let + callPackage = self.newScope { inherit qtModule srcs; }; + in + { + + inherit callPackage qtModule srcs; + + qtbase = callPackage ./modules/qtbase.nix { + withGtk3 = true; + inherit (srcs.qtbase) src version; + inherit bison cups harfbuzz libGL dconf gtk3 developerBuild cmake; + }; + + qt3d = callPackage ./modules/qt3d.nix { }; + qt5compat = callPackage ./modules/qt5compat.nix { }; + qtcharts = callPackage ./modules/qtcharts.nix { }; + qtconnectivity = callPackage ./modules/qtconnectivity.nix { }; + qtdatavis3d = callPackage ./modules/qtdatavis3d.nix { }; + qtdeclarative = callPackage ./modules/qtdeclarative.nix { }; + qtdoc = callPackage ./modules/qtdoc.nix { }; + qtimageformats = callPackage ./modules/qtimageformats.nix { }; + qtlanguageserver = callPackage ./modules/qtlanguageserver.nix { }; + qtlottie = callPackage ./modules/qtlottie.nix { }; + qtmultimedia = callPackage ./modules/qtmultimedia.nix { + inherit gstreamer gst-plugins-base; + }; + qtnetworkauth = callPackage ./modules/qtnetworkauth.nix { }; + qtpositioning = callPackage ./modules/qtpositioning.nix { }; + qtsensors = callPackage ./modules/qtsensors.nix { }; + qtserialbus = callPackage ./modules/qtserialbus.nix { }; + qtserialport = callPackage ./modules/qtserialport.nix { }; + qtshadertools = callPackage ./modules/qtshadertools.nix { }; + qtquick3d = callPackage ./modules/qtquick3d.nix { }; + qtquicktimeline = callPackage ./modules/qtquicktimeline.nix { }; + qtremoteobjects = callPackage ./modules/qtremoteobjects.nix { }; + qtsvg = callPackage ./modules/qtsvg.nix { }; + qtscxml = callPackage ./modules/qtscxml.nix { }; + qttools = callPackage ./modules/qttools.nix { }; + qttranslations = callPackage ./modules/qttranslations.nix { }; + qtvirtualkeyboard = callPackage ./modules/qtvirtualkeyboard.nix { }; + qtwayland = callPackage ./modules/qtwayland.nix { }; + qtwebchannel = callPackage ./modules/qtwebchannel.nix { }; + qtwebengine = callPackage ./modules/qtwebengine.nix { }; + qtwebsockets = callPackage ./modules/qtwebsockets.nix { }; + qtwebview = callPackage ./modules/qtwebview.nix { }; + + wrapQtAppsHook = makeSetupHook + { + deps = [ self.qtbase.dev self.qtwayland.dev makeWrapper ]; + } ./hooks/wrap-qt-apps-hook.sh; + }; + + self = lib.makeScope newScope addPackages; +in +self diff --git a/pkgs/development/libraries/qt-6/fetch.sh b/pkgs/development/libraries/qt-6/fetch.sh new file mode 100644 index 000000000000..19cfebaa28b6 --- /dev/null +++ b/pkgs/development/libraries/qt-6/fetch.sh @@ -0,0 +1 @@ +WGET_ARGS=( http://download.qt.io/official_releases/qt/6.3/6.3.0/submodules/ -A '*.tar.xz' ) diff --git a/pkgs/development/libraries/qt-6/hooks/qtbase-setup-hook.sh b/pkgs/development/libraries/qt-6/hooks/qtbase-setup-hook.sh new file mode 100644 index 000000000000..0ae969e8f8fc --- /dev/null +++ b/pkgs/development/libraries/qt-6/hooks/qtbase-setup-hook.sh @@ -0,0 +1,43 @@ +if [[ -n "${__nix_qtbase-}" ]]; then + # Throw an error if a different version of Qt was already set up. + if [[ "$__nix_qtbase" != "@dev@" ]]; then + echo >&2 "Error: detected mismatched Qt dependencies:" + echo >&2 " @dev@" + echo >&2 " $__nix_qtbase" + exit 1 + fi +else # Only set up Qt once. +__nix_qtbase="@dev@" + +qtPluginPrefix=@qtPluginPrefix@ +qtQmlPrefix=@qtQmlPrefix@ + +# Disable debug symbols if qtbase was built without debugging. +# This stops -dev paths from leaking into other outputs. +if [ -z "@debug@" ]; then + NIX_CFLAGS_COMPILE="${NIX_CFLAGS_COMPILE-}${NIX_CFLAGS_COMPILE:+ }-DQT_NO_DEBUG" +fi + +# Integration with CMake: +# Set the CMake build type corresponding to how qtbase was built. +if [ -n "@debug@" ]; then + cmakeBuildType="Debug" +else + cmakeBuildType="Release" +fi + +qtPreHook() { + # Check that wrapQtAppsHook is used, or it is explicitly disabled. + if [[ -z "$__nix_wrapQtAppsHook" && -z "$dontWrapQtApps" ]]; then + echo >&2 "Error: wrapQtAppsHook is not used, and dontWrapQtApps is not set." + exit 1 + fi +} +prePhases+=" qtPreHook" + +addQtModulePrefix () { + addToSearchPath QT_ADDITIONAL_PACKAGES_PREFIX_PATH $1 +} +addEnvHooks "$hostOffset" addQtModulePrefix + +fi diff --git a/pkgs/development/libraries/qt-6/hooks/wrap-qt-apps-hook.sh b/pkgs/development/libraries/qt-6/hooks/wrap-qt-apps-hook.sh new file mode 100644 index 000000000000..c085cdaca52e --- /dev/null +++ b/pkgs/development/libraries/qt-6/hooks/wrap-qt-apps-hook.sh @@ -0,0 +1,107 @@ +if [[ -z "${__nix_wrapQtAppsHook-}" ]]; then +__nix_wrapQtAppsHook=1 # Don't run this hook more than once. + +# Inherit arguments given in mkDerivation +qtWrapperArgs=( ${qtWrapperArgs-} ) + +qtHostPathSeen=() + +qtUnseenHostPath() { + for pkg in "${qtHostPathSeen[@]}" + do + if [ "${pkg:?}" == "$1" ] + then + return 1 + fi + done + + qtHostPathSeen+=("$1") + return 0 +} + +qtHostPathHook() { + qtUnseenHostPath "$1" || return 0 + + local pluginDir="$1/${qtPluginPrefix:?}" + if [ -d "$pluginDir" ] + then + qtWrapperArgs+=(--prefix QT_PLUGIN_PATH : "$pluginDir") + fi + + local qmlDir="$1/${qtQmlPrefix:?}" + if [ -d "$qmlDir" ] + then + qtWrapperArgs+=(--prefix QML2_IMPORT_PATH : "$qmlDir") + fi +} +addEnvHooks "$hostOffset" qtHostPathHook + +makeQtWrapper() { + local original="$1" + local wrapper="$2" + shift 2 + makeWrapper "$original" "$wrapper" "${qtWrapperArgs[@]}" "$@" +} + +wrapQtApp() { + local program="$1" + shift 1 + wrapProgram "$program" "${qtWrapperArgs[@]}" "$@" +} + +qtOwnPathsHook() { + local xdgDataDir="${!outputBin}/share" + if [ -d "$xdgDataDir" ] + then + qtWrapperArgs+=(--prefix XDG_DATA_DIRS : "$xdgDataDir") + fi + + local xdgConfigDir="${!outputBin}/etc/xdg" + if [ -d "$xdgConfigDir" ] + then + qtWrapperArgs+=(--prefix XDG_CONFIG_DIRS : "$xdgConfigDir") + fi + + qtHostPathHook "${!outputBin}" +} + +preFixupPhases+=" qtOwnPathsHook" + +# Note: $qtWrapperArgs still gets defined even if ${dontWrapQtApps-} is set. +wrapQtAppsHook() { + # skip this hook when requested + [ -z "${dontWrapQtApps-}" ] || return 0 + + # guard against running multiple times (e.g. due to propagation) + [ -z "$wrapQtAppsHookHasRun" ] || return 0 + wrapQtAppsHookHasRun=1 + + local targetDirs=( "$prefix/bin" "$prefix/sbin" "$prefix/libexec" "$prefix/Applications" "$prefix/"*.app ) + echo "wrapping Qt applications in ${targetDirs[@]}" + + for targetDir in "${targetDirs[@]}" + do + [ -d "$targetDir" ] || continue + + find "$targetDir" ! -type d -executable -print0 | while IFS= read -r -d '' file + do + isELF "$file" || isMachO "$file" || continue + + if [ -f "$file" ] + then + echo "wrapping $file" + wrapQtApp "$file" + elif [ -h "$file" ] + then + target="$(readlink -e "$file")" + echo "wrapping $file -> $target" + rm "$file" + makeQtWrapper "$target" "$file" + fi + done + done +} + +fixupOutputHooks+=(wrapQtAppsHook) + +fi diff --git a/pkgs/development/libraries/qt-6/modules/qt3d.nix b/pkgs/development/libraries/qt-6/modules/qt3d.nix new file mode 100644 index 000000000000..2f3a45f67d85 --- /dev/null +++ b/pkgs/development/libraries/qt-6/modules/qt3d.nix @@ -0,0 +1,12 @@ +{ qtModule +, qtbase +, qtdeclarative +, qtmultimedia +, assimp +}: + +qtModule { + pname = "qt3d"; + qtInputs = [ qtbase qtdeclarative qtmultimedia ]; + propagatedBuildInputs = [ assimp ]; +} diff --git a/pkgs/development/libraries/qt-6/modules/qt5compat.nix b/pkgs/development/libraries/qt-6/modules/qt5compat.nix new file mode 100644 index 000000000000..cba0651a2c46 --- /dev/null +++ b/pkgs/development/libraries/qt-6/modules/qt5compat.nix @@ -0,0 +1,13 @@ +{ qtModule +, qtbase +, qtdeclarative +, libiconv +, icu +, openssl +}: + +qtModule { + pname = "qt5compat"; + qtInputs = [ qtbase qtdeclarative ]; + buildInputs = [ libiconv icu openssl openssl ]; +} diff --git a/pkgs/development/libraries/qt-6/modules/qtbase.nix b/pkgs/development/libraries/qt-6/modules/qtbase.nix new file mode 100644 index 000000000000..f5ca3497a242 --- /dev/null +++ b/pkgs/development/libraries/qt-6/modules/qtbase.nix @@ -0,0 +1,222 @@ +{ stdenv +, lib +, src +, patches ? [ ] +, version +, coreutils +, bison +, flex +, gdb +, gperf +, lndir +, perl +, pkg-config +, python3 +, which +, cmake +, ninja +, ccache +, xmlstarlet +, libproxy +, xlibsWrapper +, xorg +, zstd +, double-conversion +, util-linux +, systemd +, libb2 +, md4c +, mtdev +, lksctp-tools +, libselinux +, libsepol +, vulkan-headers +, vulkan-loader +, valgrind +, libthai +, libdrm +, libdatrie +, lttng-ust +, epoxy +, libiconv +, dbus +, fontconfig +, freetype +, glib +, harfbuzz +, icu +, libX11 +, libXcomposite +, libXcursor +, libXext +, libXi +, libXrender +, libinput +, libjpeg +, libpng +, libxcb +, libxkbcommon +, libxml2 +, libxslt +, openssl +, pcre +, pcre2 +, sqlite +, udev +, xcbutil +, xcbutilimage +, xcbutilkeysyms +, xcbutilrenderutil +, xcbutilwm +, zlib +, at-spi2-core +, unixODBC +, unixODBCDrivers + # optional dependencies +, cups +, libmysqlclient +, postgresql +, withGtk3 ? false +, dconf +, gtk3 + # options +, libGLSupported ? true +, libGL +, debug ? false +, developerBuild ? false +}: + +let + debugSymbols = debug || developerBuild; +in +stdenv.mkDerivation rec { + pname = "qtbase"; + + inherit src version; + + debug = debugSymbols; + + propagatedBuildInputs = [ + libxml2 + libxslt + openssl + sqlite + zlib + unixODBC + # Text rendering + harfbuzz + icu + # Image formats + libjpeg + libpng + pcre2 + pcre + libproxy + xlibsWrapper + zstd + double-conversion + util-linux + systemd + libb2 + md4c + mtdev + lksctp-tools + libselinux + libsepol + lttng-ust + vulkan-headers + vulkan-loader + libthai + libdrm + libdatrie + valgrind + dbus + glib + udev + # Text rendering + fontconfig + freetype + # X11 libs + libX11 + libXcomposite + libXext + libXi + libXrender + libxcb + libxkbcommon + xcbutil + xcbutilimage + xcbutilkeysyms + xcbutilrenderutil + xcbutilwm + xorg.libXdmcp + xorg.libXtst + xorg.xcbutilcursor + epoxy + ] ++ (with unixODBCDrivers; [ + psql + sqlite + mariadb + ]) ++ lib.optional libGLSupported libGL; + + buildInputs = [ + python3 + at-spi2-core + libinput + ] + ++ lib.optional withGtk3 gtk3 + ++ lib.optional developerBuild gdb + ++ lib.optional (cups != null) cups + ++ lib.optional (libmysqlclient != null) libmysqlclient + ++ lib.optional (postgresql != null) postgresql; + + nativeBuildInputs = [ bison flex gperf lndir perl pkg-config which cmake xmlstarlet ninja ]; + + propagatedNativeBuildInputs = [ lndir ]; + + enableParallelBuilding = true; + + inherit patches; + + # https://bugreports.qt.io/browse/QTBUG-97568 + postPatch = '' + substituteInPlace src/corelib/CMakeLists.txt --replace /bin/ls ${coreutils}/bin/ls + ''; + + preConfigure = '' + export LD_LIBRARY_PATH="$PWD/build/lib:$PWD/build/plugins/platforms''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" + ''; + + qtPluginPrefix = "lib/qt-6/plugins"; + qtQmlPrefix = "lib/qt-6/qml"; + + cmakeFlags = [ + "-DINSTALL_PLUGINSDIR=${qtPluginPrefix}" + "-DINSTALL_QMLDIR=${qtQmlPrefix}" + "-DQT_FEATURE_journald=ON" + "-DQT_FEATURE_sctp=ON" + "-DQT_FEATURE_libproxy=ON" + "-DQT_FEATURE_system_sqlite=ON" + "-DQT_FEATURE_vulkan=ON" + "-DQT_FEATURE_openssl_linked=ON" + ]; + + outputs = [ "out" "dev" ]; + + postInstall = '' + mkdir -p $dev + mv $out/mkspecs $out/bin $out/libexec $dev/ + ''; + + dontStrip = debugSymbols; + + setupHook = ../hooks/qtbase-setup-hook.sh; + + meta = with lib; { + homepage = "https://www.qt.io/"; + description = "A cross-platform application framework for C++"; + license = with licenses; [ fdl13 gpl2 lgpl21 lgpl3 ]; + maintainers = with maintainers; [ milahu nickcao ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/development/libraries/qt-6/modules/qtcharts.nix b/pkgs/development/libraries/qt-6/modules/qtcharts.nix new file mode 100644 index 000000000000..917697c38623 --- /dev/null +++ b/pkgs/development/libraries/qt-6/modules/qtcharts.nix @@ -0,0 +1,9 @@ +{ qtModule +, qtbase +, qtdeclarative +}: + +qtModule { + pname = "qtcharts"; + qtInputs = [ qtbase qtdeclarative ]; +} diff --git a/pkgs/development/libraries/qt-6/modules/qtconnectivity.nix b/pkgs/development/libraries/qt-6/modules/qtconnectivity.nix new file mode 100644 index 000000000000..33fbd7231548 --- /dev/null +++ b/pkgs/development/libraries/qt-6/modules/qtconnectivity.nix @@ -0,0 +1,15 @@ +{ qtModule +, lib +, stdenv +, qtbase +, qtdeclarative +, bluez +, pkg-config +}: + +qtModule { + pname = "qtconnectivity"; + qtInputs = [ qtbase qtdeclarative ]; + buildInputs = [ bluez ]; + nativeBuildInputs = [ pkg-config ]; +} diff --git a/pkgs/development/libraries/qt-6/modules/qtdatavis3d.nix b/pkgs/development/libraries/qt-6/modules/qtdatavis3d.nix new file mode 100644 index 000000000000..1d0f9711e588 --- /dev/null +++ b/pkgs/development/libraries/qt-6/modules/qtdatavis3d.nix @@ -0,0 +1,9 @@ +{ qtModule +, qtbase +, qtdeclarative +}: + +qtModule { + pname = "qtdatavis3d"; + qtInputs = [ qtbase qtdeclarative ]; +} diff --git a/pkgs/development/libraries/qt-6/modules/qtdeclarative.nix b/pkgs/development/libraries/qt-6/modules/qtdeclarative.nix new file mode 100644 index 000000000000..3f691894ff86 --- /dev/null +++ b/pkgs/development/libraries/qt-6/modules/qtdeclarative.nix @@ -0,0 +1,19 @@ +{ qtModule +, qtbase +, qtshadertools +, openssl +, python3 +}: + +qtModule { + pname = "qtdeclarative"; + qtInputs = [ qtbase qtshadertools ]; + propagatedBuildInputs = [ openssl python3 ]; + preConfigure = '' + export LD_LIBRARY_PATH="$PWD/build/lib''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" + ''; + postInstall = '' + substituteInPlace "$out/lib/cmake/Qt6Qml/Qt6QmlMacros.cmake" \ + --replace ''\'''${QT6_INSTALL_PREFIX}' "$out" + ''; +} diff --git a/pkgs/development/libraries/qt-6/modules/qtdoc.nix b/pkgs/development/libraries/qt-6/modules/qtdoc.nix new file mode 100644 index 000000000000..cde9af30ab93 --- /dev/null +++ b/pkgs/development/libraries/qt-6/modules/qtdoc.nix @@ -0,0 +1,9 @@ +{ qtModule +, qtdeclarative +}: + +qtModule { + pname = "qtdoc"; + qtInputs = [ qtdeclarative ]; + outputs = [ "out" ]; +} diff --git a/pkgs/development/libraries/qt-6/modules/qtimageformats.nix b/pkgs/development/libraries/qt-6/modules/qtimageformats.nix new file mode 100644 index 000000000000..b28adbc7295b --- /dev/null +++ b/pkgs/development/libraries/qt-6/modules/qtimageformats.nix @@ -0,0 +1,13 @@ +{ qtModule +, qtbase +, libwebp +, jasper +, libmng +, libtiff +}: + +qtModule { + pname = "qtimageformats"; + qtInputs = [ qtbase ]; + buildInputs = [ libwebp jasper libmng libtiff ]; +} diff --git a/pkgs/development/libraries/qt-6/modules/qtlanguageserver.nix b/pkgs/development/libraries/qt-6/modules/qtlanguageserver.nix new file mode 100644 index 000000000000..b2e6e450d5f7 --- /dev/null +++ b/pkgs/development/libraries/qt-6/modules/qtlanguageserver.nix @@ -0,0 +1,8 @@ +{ qtModule +, qtbase +}: + +qtModule { + pname = "qtlanguageserver"; + qtInputs = [ qtbase ]; +} diff --git a/pkgs/development/libraries/qt-6/modules/qtlottie.nix b/pkgs/development/libraries/qt-6/modules/qtlottie.nix new file mode 100644 index 000000000000..d94c289953d0 --- /dev/null +++ b/pkgs/development/libraries/qt-6/modules/qtlottie.nix @@ -0,0 +1,9 @@ +{ qtModule +, qtbase +, qtdeclarative +}: + +qtModule { + pname = "qtlottie"; + qtInputs = [ qtbase qtdeclarative ]; +} diff --git a/pkgs/development/libraries/qt-6/modules/qtmultimedia.nix b/pkgs/development/libraries/qt-6/modules/qtmultimedia.nix new file mode 100644 index 000000000000..5e6dace906dc --- /dev/null +++ b/pkgs/development/libraries/qt-6/modules/qtmultimedia.nix @@ -0,0 +1,24 @@ +{ qtModule +, lib +, stdenv +, qtbase +, qtdeclarative +, qtshadertools +, qtsvg +, pkg-config +, alsa-lib +, gstreamer +, gst-plugins-base +, libpulseaudio +, wayland +, elfutils +, libunwind +, orc +}: + +qtModule { + pname = "qtmultimedia"; + qtInputs = [ qtbase qtdeclarative qtsvg qtshadertools ]; + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ gstreamer gst-plugins-base libpulseaudio elfutils libunwind alsa-lib wayland orc ]; +} diff --git a/pkgs/development/libraries/qt-6/modules/qtnetworkauth.nix b/pkgs/development/libraries/qt-6/modules/qtnetworkauth.nix new file mode 100644 index 000000000000..148ed890fc9e --- /dev/null +++ b/pkgs/development/libraries/qt-6/modules/qtnetworkauth.nix @@ -0,0 +1,6 @@ +{ qtModule, qtbase }: + +qtModule { + pname = "qtnetworkauth"; + qtInputs = [ qtbase ]; +} diff --git a/pkgs/development/libraries/qt-6/modules/qtpositioning.nix b/pkgs/development/libraries/qt-6/modules/qtpositioning.nix new file mode 100644 index 000000000000..99b06bbf2536 --- /dev/null +++ b/pkgs/development/libraries/qt-6/modules/qtpositioning.nix @@ -0,0 +1,14 @@ +{ qtModule +, qtbase +, qtdeclarative +, qtserialport +, pkg-config +, openssl +}: + +qtModule { + pname = "qtpositioning"; + qtInputs = [ qtbase qtdeclarative qtserialport ]; + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ openssl ]; +} diff --git a/pkgs/development/libraries/qt-6/modules/qtquick3d.nix b/pkgs/development/libraries/qt-6/modules/qtquick3d.nix new file mode 100644 index 000000000000..d19a8e725a16 --- /dev/null +++ b/pkgs/development/libraries/qt-6/modules/qtquick3d.nix @@ -0,0 +1,11 @@ +{ qtModule +, qtbase +, qtdeclarative +, openssl +}: + +qtModule { + pname = "qtquick3d"; + qtInputs = [ qtbase qtdeclarative ]; + buildInputs = [ openssl ]; +} diff --git a/pkgs/development/libraries/qt-6/modules/qtquicktimeline.nix b/pkgs/development/libraries/qt-6/modules/qtquicktimeline.nix new file mode 100644 index 000000000000..7458515dba26 --- /dev/null +++ b/pkgs/development/libraries/qt-6/modules/qtquicktimeline.nix @@ -0,0 +1,9 @@ +{ qtModule +, qtbase +, qtdeclarative +}: + +qtModule { + pname = "qtquicktimeline"; + qtInputs = [ qtbase qtdeclarative ]; +} diff --git a/pkgs/development/libraries/qt-6/modules/qtremoteobjects.nix b/pkgs/development/libraries/qt-6/modules/qtremoteobjects.nix new file mode 100644 index 000000000000..888ec33b461a --- /dev/null +++ b/pkgs/development/libraries/qt-6/modules/qtremoteobjects.nix @@ -0,0 +1,9 @@ +{ qtModule +, qtbase +, qtdeclarative +}: + +qtModule { + pname = "qtremoteobjects"; + qtInputs = [ qtbase qtdeclarative ]; +} diff --git a/pkgs/development/libraries/qt-6/modules/qtscxml.nix b/pkgs/development/libraries/qt-6/modules/qtscxml.nix new file mode 100644 index 000000000000..c49064c5e579 --- /dev/null +++ b/pkgs/development/libraries/qt-6/modules/qtscxml.nix @@ -0,0 +1,6 @@ +{ qtModule, qtbase, qtdeclarative }: + +qtModule { + pname = "qtscxml"; + qtInputs = [ qtbase qtdeclarative ]; +} diff --git a/pkgs/development/libraries/qt-6/modules/qtsensors.nix b/pkgs/development/libraries/qt-6/modules/qtsensors.nix new file mode 100644 index 000000000000..73ddc394cc46 --- /dev/null +++ b/pkgs/development/libraries/qt-6/modules/qtsensors.nix @@ -0,0 +1,10 @@ +{ qtModule +, qtbase +, qtdeclarative +, qtsvg +}: + +qtModule { + pname = "qtsensors"; + qtInputs = [ qtbase qtdeclarative qtsvg ]; +} diff --git a/pkgs/development/libraries/qt-6/modules/qtserialbus.nix b/pkgs/development/libraries/qt-6/modules/qtserialbus.nix new file mode 100644 index 000000000000..4fd6d7cb83c3 --- /dev/null +++ b/pkgs/development/libraries/qt-6/modules/qtserialbus.nix @@ -0,0 +1,6 @@ +{ qtModule, qtbase, qtserialport }: + +qtModule { + pname = "qtserialbus"; + qtInputs = [ qtbase qtserialport ]; +} diff --git a/pkgs/development/libraries/qt-6/modules/qtserialport.nix b/pkgs/development/libraries/qt-6/modules/qtserialport.nix new file mode 100644 index 000000000000..96b7a25bb3b4 --- /dev/null +++ b/pkgs/development/libraries/qt-6/modules/qtserialport.nix @@ -0,0 +1,14 @@ +{ qtModule +, stdenv +, lib +, qtbase +, udev +, pkg-config +}: + +qtModule { + pname = "qtserialport"; + qtInputs = [ qtbase ]; + nativeBuildInputs = [ pkg-config ]; + propagatedBuildInputs = [ udev ]; +} diff --git a/pkgs/development/libraries/qt-6/modules/qtshadertools.nix b/pkgs/development/libraries/qt-6/modules/qtshadertools.nix new file mode 100644 index 000000000000..47102896f7e6 --- /dev/null +++ b/pkgs/development/libraries/qt-6/modules/qtshadertools.nix @@ -0,0 +1,8 @@ +{ qtModule +, qtbase +}: + +qtModule { + pname = "qtshadertools"; + qtInputs = [ qtbase ]; +} diff --git a/pkgs/development/libraries/qt-6/modules/qtsvg.nix b/pkgs/development/libraries/qt-6/modules/qtsvg.nix new file mode 100644 index 000000000000..9031f8805ac9 --- /dev/null +++ b/pkgs/development/libraries/qt-6/modules/qtsvg.nix @@ -0,0 +1,15 @@ +{ qtModule +, qtbase +, libwebp +, jasper +, libmng +, zlib +, pkg-config +}: + +qtModule { + pname = "qtsvg"; + qtInputs = [ qtbase ]; + buildInputs = [ libwebp jasper libmng zlib ]; + nativeBuildInputs = [ pkg-config ]; +} diff --git a/pkgs/development/libraries/qt-6/modules/qttools.nix b/pkgs/development/libraries/qt-6/modules/qttools.nix new file mode 100644 index 000000000000..b1cf5dd2c146 --- /dev/null +++ b/pkgs/development/libraries/qt-6/modules/qttools.nix @@ -0,0 +1,11 @@ +{ qtModule +, stdenv +, lib +, qtbase +, qtdeclarative +}: + +qtModule { + pname = "qttools"; + qtInputs = [ qtbase qtdeclarative ]; +} diff --git a/pkgs/development/libraries/qt-6/modules/qttranslations.nix b/pkgs/development/libraries/qt-6/modules/qttranslations.nix new file mode 100644 index 000000000000..4795cd9e1bfe --- /dev/null +++ b/pkgs/development/libraries/qt-6/modules/qttranslations.nix @@ -0,0 +1,8 @@ +{ qtModule +, qttools +}: + +qtModule { + pname = "qttranslations"; + qtInputs = [ qttools ]; +} diff --git a/pkgs/development/libraries/qt-6/modules/qtvirtualkeyboard.nix b/pkgs/development/libraries/qt-6/modules/qtvirtualkeyboard.nix new file mode 100644 index 000000000000..bb868dc61829 --- /dev/null +++ b/pkgs/development/libraries/qt-6/modules/qtvirtualkeyboard.nix @@ -0,0 +1,15 @@ +{ qtModule +, qtbase +, qtdeclarative +, qtsvg +, hunspell +, pkg-config +}: + +qtModule { + pname = "qtvirtualkeyboard"; + qtInputs = [ qtbase qtdeclarative qtsvg ]; + propagatedBuildInputs = [ hunspell ]; + nativeBuildInputs = [ pkg-config ]; + outputs = [ "out" ]; +} diff --git a/pkgs/development/libraries/qt-6/modules/qtwayland.nix b/pkgs/development/libraries/qt-6/modules/qtwayland.nix new file mode 100644 index 000000000000..3ac23d28a798 --- /dev/null +++ b/pkgs/development/libraries/qt-6/modules/qtwayland.nix @@ -0,0 +1,16 @@ +{ qtModule +, qtbase +, qtquick3d +, qtdeclarative +, wayland +, pkg-config +, xlibsWrapper +, libdrm +}: + +qtModule { + pname = "qtwayland"; + qtInputs = [ qtbase qtdeclarative ]; + buildInputs = [ wayland xlibsWrapper libdrm ]; + nativeBuildInputs = [ pkg-config ]; +} diff --git a/pkgs/development/libraries/qt-6/modules/qtwebchannel.nix b/pkgs/development/libraries/qt-6/modules/qtwebchannel.nix new file mode 100644 index 000000000000..49b959c5dea7 --- /dev/null +++ b/pkgs/development/libraries/qt-6/modules/qtwebchannel.nix @@ -0,0 +1,12 @@ +{ qtModule +, qtbase +, qtdeclarative +, qtwebsockets +, openssl +}: + +qtModule { + pname = "qtwebchannel"; + qtInputs = [ qtbase qtdeclarative qtwebsockets ]; + buildInputs = [ openssl ]; +} diff --git a/pkgs/development/libraries/qt-6/modules/qtwebengine.nix b/pkgs/development/libraries/qt-6/modules/qtwebengine.nix new file mode 100644 index 000000000000..88254ab15890 --- /dev/null +++ b/pkgs/development/libraries/qt-6/modules/qtwebengine.nix @@ -0,0 +1,234 @@ +{ qtModule +, qtdeclarative +, qtwebchannel +, qtpositioning +, qtwebsockets +, bison +, coreutils +, flex +, git +, gperf +, ninja +, pkg-config +, python3 +, which +, nodejs +, qtbase +, perl +, xorg +, libXcursor +, libXScrnSaver +, libXrandr +, libXtst +, libxshmfence +, libXi +, fontconfig +, freetype +, harfbuzz +, icu +, dbus +, libdrm +, zlib +, minizip +, libjpeg +, libpng +, libtiff +, libwebp +, libopus +, jsoncpp +, protobuf +, libvpx +, srtp +, snappy +, nss +, libevent +, openssl +, alsa-lib +, pulseaudio +, libcap +, pciutils +, systemd +, pipewire +, gn +, cups +, openbsm +, runCommand +, writeScriptBin +, ffmpeg +, lib +, stdenv +, fetchpatch +, glib +, libxml2 +, libxslt +, lcms2 +, re2 +, kerberos +, enableProprietaryCodecs ? true +}: + +qtModule rec { + pname = "qtwebengine"; + qtInputs = [ qtdeclarative qtwebchannel qtwebsockets qtpositioning ]; + nativeBuildInputs = [ + bison + coreutils + flex + git + gperf + ninja + pkg-config + (python3.withPackages (ps: with ps; [ html5lib ])) + which + gn + nodejs + ]; + doCheck = true; + outputs = [ "out" "dev" ]; + + dontUseGnConfigure = true; + + # ninja builds some components with -Wno-format, + # which cannot be set at the same time as -Wformat-security + hardeningDisable = [ "format" ]; + + patches = [ + # drop UCHAR_TYPE override to fix build with system ICU + (fetchpatch { + url = "https://code.qt.io/cgit/qt/qtwebengine-chromium.git/patch/?id=75f0f4eb"; + stripLen = 1; + extraPrefix = "src/3rdparty/"; + sha256 = "sha256-3aMcVXJg+v+UbsSO27g6MA6/uVkWUxyQsMD1EzlzXDs="; + }) + ]; + + postPatch = '' + # Patch Chromium build tools + ( + cd src/3rdparty/chromium; + + # Manually fix unsupported shebangs + substituteInPlace third_party/harfbuzz-ng/src/src/update-unicode-tables.make \ + --replace "/usr/bin/env -S make -f" "/usr/bin/make -f" || true + substituteInPlace third_party/webgpu-cts/src/tools/deno \ + --replace "/usr/bin/env -S deno" "/usr/bin/deno" || true + patchShebangs . + ) + + # Patch library paths in sources + sed -i \ + -e "s,QLibraryInfo::location(QLibraryInfo::DataPath),QLatin1String(\"$out\"),g" \ + -e "s,QLibraryInfo::location(QLibraryInfo::TranslationsPath),QLatin1String(\"$out/translations\"),g" \ + -e "s,QLibraryInfo::location(QLibraryInfo::LibraryExecutablesPath),QLatin1String(\"$out/libexec\"),g" \ + src/core/web_engine_library_info.cpp + + sed -i -e '/lib_loader.*Load/s!"\(libudev\.so\)!"${lib.getLib systemd}/lib/\1!' \ + src/3rdparty/chromium/device/udev_linux/udev?_loader.cc + + sed -i -e '/libpci_loader.*Load/s!"\(libpci\.so\)!"${pciutils}/lib/\1!' \ + src/3rdparty/chromium/gpu/config/gpu_info_collector_linux.cc + ''; + + cmakeFlags = [ + "-DQT_FEATURE_qtpdf_build=ON" + "-DQT_FEATURE_qtpdf_widgets_build=ON" + "-DQT_FEATURE_qtpdf_quick_build=ON" + "-DQT_FEATURE_pdf_v8=ON" + "-DQT_FEATURE_pdf_xfa=ON" + "-DQT_FEATURE_pdf_xfa_bmp=ON" + "-DQT_FEATURE_pdf_xfa_gif=ON" + "-DQT_FEATURE_pdf_xfa_png=ON" + "-DQT_FEATURE_pdf_xfa_tiff=ON" + "-DQT_FEATURE_webengine_system_icu=ON" + "-DQT_FEATURE_webengine_system_libevent=ON" + "-DQT_FEATURE_webengine_system_libxml=ON" + "-DQT_FEATURE_webengine_system_ffmpeg=ON" + # 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"; + + propagatedBuildInputs = [ + # Image formats + libjpeg + libpng + libtiff + libwebp + + # Video formats + srtp + libvpx + + # Audio formats + libopus + + # Text rendering + harfbuzz + icu + + openssl + glib + libxml2 + libxslt + lcms2 + re2 + + libevent + ffmpeg + + dbus + zlib + minizip + snappy + nss + protobuf + jsoncpp + + # Audio formats + alsa-lib + pulseaudio + + # Text rendering + fontconfig + freetype + + libcap + pciutils + + # X11 libs + xorg.xrandr + libXScrnSaver + libXcursor + libXrandr + xorg.libpciaccess + libXtst + xorg.libXcomposite + xorg.libXdamage + libdrm + xorg.libxkbfile + libxshmfence + libXi + xorg.libXext + + # Pipewire + pipewire + + kerberos + ]; + + buildInputs = [ + cups + ]; + + requiredSystemFeatures = [ "big-parallel" ]; + + meta = with lib; { + description = "A web engine based on the Chromium web browser"; + platforms = platforms.linux; + # This build takes a long time; particularly on slow architectures + # 1 hour on 32x3.6GHz -> maybe 12 hours on 4x2.4GHz + timeout = 24 * 3600; + }; +} diff --git a/pkgs/development/libraries/qt-6/modules/qtwebsockets.nix b/pkgs/development/libraries/qt-6/modules/qtwebsockets.nix new file mode 100644 index 000000000000..f81cd64596eb --- /dev/null +++ b/pkgs/development/libraries/qt-6/modules/qtwebsockets.nix @@ -0,0 +1,11 @@ +{ qtModule +, qtbase +, qtdeclarative +, openssl +}: + +qtModule { + pname = "qtwebsockets"; + qtInputs = [ qtbase qtdeclarative ]; + buildInputs = [ openssl ]; +} diff --git a/pkgs/development/libraries/qt-6/modules/qtwebview.nix b/pkgs/development/libraries/qt-6/modules/qtwebview.nix new file mode 100644 index 000000000000..ba784f73ad45 --- /dev/null +++ b/pkgs/development/libraries/qt-6/modules/qtwebview.nix @@ -0,0 +1,11 @@ +{ lib +, stdenv +, qtModule +, qtdeclarative +, qtwebengine +}: + +qtModule { + pname = "qtwebview"; + qtInputs = [ qtdeclarative qtwebengine ]; +} diff --git a/pkgs/development/libraries/qt-6/qtModule.nix b/pkgs/development/libraries/qt-6/qtModule.nix new file mode 100644 index 000000000000..04349ed68ad2 --- /dev/null +++ b/pkgs/development/libraries/qt-6/qtModule.nix @@ -0,0 +1,45 @@ +{ stdenv, lib, perl, cmake, ninja, writeText }: + +{ self, srcs, patches ? [ ] }: + +args: + +let + inherit (args) pname; + version = args.version or srcs.${pname}.version; + src = args.src or srcs.${pname}.src; +in +stdenv.mkDerivation (args // { + inherit pname version src; + patches = args.patches or patches.${pname} or [ ]; + + buildInputs = args.buildInputs or [ ]; + nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ + perl + cmake + ninja + ]; + propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or [ ]); + + outputs = args.outputs or [ "out" "dev" ]; + + dontWrapQtApps = args.dontWrapQtApps or true; + postInstall = '' + if [ ! -z "$dev" ]; then + mkdir "$dev" + for dir in bin libexec mkspecs + do + moveToOutput "$dir" "$dev" + done + fi + ${args.postInstall or ""} + ''; + + meta = with lib; { + homepage = "https://www.qt.io/"; + description = "A cross-platform application framework for C++"; + license = with licenses; [ fdl13 gpl2 lgpl21 lgpl3 ]; + maintainers = with maintainers; [ milahu nickcao ]; + platforms = platforms.linux; + } // (args.meta or { }); +}) diff --git a/pkgs/development/libraries/qt-6/srcs.nix b/pkgs/development/libraries/qt-6/srcs.nix new file mode 100644 index 000000000000..0846f4403cd2 --- /dev/null +++ b/pkgs/development/libraries/qt-6/srcs.nix @@ -0,0 +1,262 @@ +# DO NOT EDIT! This file is generated automatically. +# Command: ./maintainers/scripts/fetch-kde-qt.sh pkgs/development/libraries/qt-6/6.3 +{ fetchurl, mirror }: + +{ + qt3d = { + version = "6.3.0"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.3/6.3.0/submodules/qt3d-everywhere-src-6.3.0.tar.xz"; + sha256 = "1qadnm2i2cgzigzq2wl0id5wzmc1p6zls4mrg1w8hd5d1lw65rvl"; + name = "qt3d-everywhere-src-6.3.0.tar.xz"; + }; + }; + qt5compat = { + version = "6.3.0"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.3/6.3.0/submodules/qt5compat-everywhere-src-6.3.0.tar.xz"; + sha256 = "0gkis7504qdpavimkx33zl9082r4rfa2v4iba4a943f5h3krn69b"; + name = "qt5compat-everywhere-src-6.3.0.tar.xz"; + }; + }; + qtactiveqt = { + version = "6.3.0"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.3/6.3.0/submodules/qtactiveqt-everywhere-src-6.3.0.tar.xz"; + sha256 = "01sziyhzmvqn1flw6y73aszqll1yijxxc7hyzkd269zbmpm42l4c"; + name = "qtactiveqt-everywhere-src-6.3.0.tar.xz"; + }; + }; + qtbase = { + version = "6.3.0"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.3/6.3.0/submodules/qtbase-everywhere-src-6.3.0.tar.xz"; + sha256 = "168g39xiasriwpny9rf4alx3k8gnkffqjqm1n2rr5xsp6gjalrdq"; + name = "qtbase-everywhere-src-6.3.0.tar.xz"; + }; + }; + qtcharts = { + version = "6.3.0"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.3/6.3.0/submodules/qtcharts-everywhere-src-6.3.0.tar.xz"; + sha256 = "1k9ngvl94xd5xr34ycwvchvzih037yvfzvdf625cik21yv2n49v7"; + name = "qtcharts-everywhere-src-6.3.0.tar.xz"; + }; + }; + qtconnectivity = { + version = "6.3.0"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.3/6.3.0/submodules/qtconnectivity-everywhere-src-6.3.0.tar.xz"; + sha256 = "06p6n23y2a6nca0rzdli6zl7m2i42h2pm28092zb4vd578p17xwq"; + name = "qtconnectivity-everywhere-src-6.3.0.tar.xz"; + }; + }; + qtdatavis3d = { + version = "6.3.0"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.3/6.3.0/submodules/qtdatavis3d-everywhere-src-6.3.0.tar.xz"; + sha256 = "138dkvarvh45j4524y1piw0dm2j16s3lk5pazbggi3xjnbrjwl89"; + name = "qtdatavis3d-everywhere-src-6.3.0.tar.xz"; + }; + }; + qtdeclarative = { + version = "6.3.0"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.3/6.3.0/submodules/qtdeclarative-everywhere-src-6.3.0.tar.xz"; + sha256 = "0dxa9j8cxfd86nqpvxvzxd1jdlw8h0xxqvsiv9jlyb9bvhlv156j"; + name = "qtdeclarative-everywhere-src-6.3.0.tar.xz"; + }; + }; + qtdoc = { + version = "6.3.0"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.3/6.3.0/submodules/qtdoc-everywhere-src-6.3.0.tar.xz"; + sha256 = "0r9giv6xpg6zhghrrv4chlk1cimmiw93cj6rdf4rkf2g3qmgv6d8"; + name = "qtdoc-everywhere-src-6.3.0.tar.xz"; + }; + }; + qtimageformats = { + version = "6.3.0"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.3/6.3.0/submodules/qtimageformats-everywhere-src-6.3.0.tar.xz"; + sha256 = "1vxbjdfy1zya4pgcl4483912aw7ip0d768xmnrz2md3mxlbhsp82"; + name = "qtimageformats-everywhere-src-6.3.0.tar.xz"; + }; + }; + qtlanguageserver = { + version = "6.3.0"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.3/6.3.0/submodules/qtlanguageserver-everywhere-src-6.3.0.tar.xz"; + sha256 = "1apfkq5grxkx69d8x7gmj19klr3jypsz1csw6r00q7hf0vvxiakh"; + name = "qtlanguageserver-everywhere-src-6.3.0.tar.xz"; + }; + }; + qtlottie = { + version = "6.3.0"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.3/6.3.0/submodules/qtlottie-everywhere-src-6.3.0.tar.xz"; + sha256 = "1svxz5ndljhrn52vyyr1yziar63ksjz78mvaxfhjgdd5pc5mgnrr"; + name = "qtlottie-everywhere-src-6.3.0.tar.xz"; + }; + }; + qtmultimedia = { + version = "6.3.0"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.3/6.3.0/submodules/qtmultimedia-everywhere-src-6.3.0.tar.xz"; + sha256 = "0gpylyrjkks27y5bfaxqs7idj0wyscpn1kh51i4ahx19z1zj8l6h"; + name = "qtmultimedia-everywhere-src-6.3.0.tar.xz"; + }; + }; + qtnetworkauth = { + version = "6.3.0"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.3/6.3.0/submodules/qtnetworkauth-everywhere-src-6.3.0.tar.xz"; + sha256 = "17q6v4d2qglw88gd2i9m4cvvacpfsw6a544g0ch8a0hr56a9hfi0"; + name = "qtnetworkauth-everywhere-src-6.3.0.tar.xz"; + }; + }; + qtpositioning = { + version = "6.3.0"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.3/6.3.0/submodules/qtpositioning-everywhere-src-6.3.0.tar.xz"; + sha256 = "0vi3123pa9pc4xqh6rgxwz40xvvl4w0x09fn6kdld8s5nbv51vg9"; + name = "qtpositioning-everywhere-src-6.3.0.tar.xz"; + }; + }; + qtquick3d = { + version = "6.3.0"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.3/6.3.0/submodules/qtquick3d-everywhere-src-6.3.0.tar.xz"; + sha256 = "0zijxf33v5b2hrwppp4gr1i1dscdxqjjcb8a48c4ny0zxv8mpl0a"; + name = "qtquick3d-everywhere-src-6.3.0.tar.xz"; + }; + }; + qtquicktimeline = { + version = "6.3.0"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.3/6.3.0/submodules/qtquicktimeline-everywhere-src-6.3.0.tar.xz"; + sha256 = "06hwygywqc6kqs2ss8ng6ymjs3m72r51x2lzppjnpz4y2lqskw4z"; + name = "qtquicktimeline-everywhere-src-6.3.0.tar.xz"; + }; + }; + qtremoteobjects = { + version = "6.3.0"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.3/6.3.0/submodules/qtremoteobjects-everywhere-src-6.3.0.tar.xz"; + sha256 = "0v2ax6xynv13z1dqnklnvfxxdhh9fallrjdmqpkmkydgy163zckm"; + name = "qtremoteobjects-everywhere-src-6.3.0.tar.xz"; + }; + }; + qtscxml = { + version = "6.3.0"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.3/6.3.0/submodules/qtscxml-everywhere-src-6.3.0.tar.xz"; + sha256 = "1w3hi9c5v0lji59pkk0dhaq3xly9skf3jsm93gxj0y9nmkbdpc09"; + name = "qtscxml-everywhere-src-6.3.0.tar.xz"; + }; + }; + qtsensors = { + version = "6.3.0"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.3/6.3.0/submodules/qtsensors-everywhere-src-6.3.0.tar.xz"; + sha256 = "0j4ppqn8m04hfqrzrmp80fmwpr474arcycf58jypm17fnlrwfmy7"; + name = "qtsensors-everywhere-src-6.3.0.tar.xz"; + }; + }; + qtserialbus = { + version = "6.3.0"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.3/6.3.0/submodules/qtserialbus-everywhere-src-6.3.0.tar.xz"; + sha256 = "1mi76sxh21wj1b1myqrzaaspf1iwa4bxr342p1b6krrnrf4ckxnj"; + name = "qtserialbus-everywhere-src-6.3.0.tar.xz"; + }; + }; + qtserialport = { + version = "6.3.0"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.3/6.3.0/submodules/qtserialport-everywhere-src-6.3.0.tar.xz"; + sha256 = "0kxnblyk8bw02bdjsnjbblczg0dvj7ys95bpr2w49h4cshs6kggf"; + name = "qtserialport-everywhere-src-6.3.0.tar.xz"; + }; + }; + qtshadertools = { + version = "6.3.0"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.3/6.3.0/submodules/qtshadertools-everywhere-src-6.3.0.tar.xz"; + sha256 = "0v5xmyc9d3vacvdm2zpancqqmsvaz0635cba2aym9hipkndrb62l"; + name = "qtshadertools-everywhere-src-6.3.0.tar.xz"; + }; + }; + qtsvg = { + version = "6.3.0"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.3/6.3.0/submodules/qtsvg-everywhere-src-6.3.0.tar.xz"; + sha256 = "1qxhilxbk7wgnah7qlfcr5gsn19626dp6dc260wh8r1zgr6m0r1i"; + name = "qtsvg-everywhere-src-6.3.0.tar.xz"; + }; + }; + qttools = { + version = "6.3.0"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.3/6.3.0/submodules/qttools-everywhere-src-6.3.0.tar.xz"; + sha256 = "175is0yf74vdxlmcb9nvm86n6m7qj54mhiwkhyi84mwjxa44dsgw"; + name = "qttools-everywhere-src-6.3.0.tar.xz"; + }; + }; + qttranslations = { + version = "6.3.0"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.3/6.3.0/submodules/qttranslations-everywhere-src-6.3.0.tar.xz"; + sha256 = "1cs06kiv34zdkicxdjhxydv5rn1ylf4z2f4jl4a9ajm3jbw4xpg4"; + name = "qttranslations-everywhere-src-6.3.0.tar.xz"; + }; + }; + qtvirtualkeyboard = { + version = "6.3.0"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.3/6.3.0/submodules/qtvirtualkeyboard-everywhere-src-6.3.0.tar.xz"; + sha256 = "0wv54zmr9chwx1bds5b2j1436ynq6b5lbv7lbj7sycjlrxdg3al9"; + name = "qtvirtualkeyboard-everywhere-src-6.3.0.tar.xz"; + }; + }; + qtwayland = { + version = "6.3.0"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.3/6.3.0/submodules/qtwayland-everywhere-src-6.3.0.tar.xz"; + sha256 = "1411l2rc399bj6r36wd8n06a0rpdxkhmr0mashc5kz1zwkv6gdg7"; + name = "qtwayland-everywhere-src-6.3.0.tar.xz"; + }; + }; + qtwebchannel = { + version = "6.3.0"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.3/6.3.0/submodules/qtwebchannel-everywhere-src-6.3.0.tar.xz"; + sha256 = "03p4ggi9dk11q3zqw29awwxvddgfb3nsrrm58q053y0zlclc9i7b"; + name = "qtwebchannel-everywhere-src-6.3.0.tar.xz"; + }; + }; + qtwebengine = { + version = "6.3.0"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.3/6.3.0/submodules/qtwebengine-everywhere-src-6.3.0.tar.xz"; + sha256 = "0g899mn6fx9w0mb9dm7y25x3d9gcy8ramwbcpk8pmjqxv1fv8090"; + name = "qtwebengine-everywhere-src-6.3.0.tar.xz"; + }; + }; + qtwebsockets = { + version = "6.3.0"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.3/6.3.0/submodules/qtwebsockets-everywhere-src-6.3.0.tar.xz"; + sha256 = "0qb39qnli5wshrnzr9kbdrbddzi2l0y9vg3b1mbdkdv0x6gs0670"; + name = "qtwebsockets-everywhere-src-6.3.0.tar.xz"; + }; + }; + qtwebview = { + version = "6.3.0"; + src = fetchurl { + url = "${mirror}/official_releases/qt/6.3/6.3.0/submodules/qtwebview-everywhere-src-6.3.0.tar.xz"; + sha256 = "0mi1fkxz4mags32ld8km4svsnvbai0i81398f435sd1n9ach3gfy"; + name = "qtwebview-everywhere-src-6.3.0.tar.xz"; + }; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 281b0fd328dd..32ff96510596 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20235,6 +20235,23 @@ with pkgs; qtEnv = qt5.env; qt5Full = qt5.full; + qt6 = recurseIntoAttrs (makeOverridable + (import ../development/libraries/qt-6) { + inherit newScope; + inherit lib stdenv fetchurl fetchpatch fetchgit fetchFromGitHub makeSetupHook makeWrapper writeText; + inherit bison cups dconf harfbuzz libGL perl gtk3 ninja; + inherit (gst_all_1) gstreamer gst-plugins-base; + cmake = cmake.overrideAttrs (attrs: { + patches = attrs.patches ++ [ + ../development/libraries/qt-6/cmake.patch + ]; + }); + }); + + qt6Packages = recurseIntoAttrs (import ./qt6-packages.nix { + inherit lib pkgs qt6; + }); + qtscriptgenerator = callPackage ../development/libraries/qtscriptgenerator { }; quark-engine = callPackage ../tools/security/quark-engine { }; diff --git a/pkgs/top-level/qt6-packages.nix b/pkgs/top-level/qt6-packages.nix new file mode 100644 index 000000000000..9ef47c873ba5 --- /dev/null +++ b/pkgs/top-level/qt6-packages.nix @@ -0,0 +1,20 @@ +# Qt packages set. +# +# Attributes in this file are packages requiring Qt and will be made available +# for every Qt version. Qt applications are called from `all-packages.nix` via +# this file. + +{ lib +, pkgs +, qt6 +}: + +(lib.makeScope pkgs.newScope ( self: + +let + libsForQt6 = self; + callPackage = self.callPackage; +in + +(qt6 // { +}))) From 4cb5527a444ae961a7676b5e10b4a820d4350f63 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Mon, 18 Apr 2022 21:04:35 +0800 Subject: [PATCH 03/28] tdesktop: 3.6.0 -> 3.7.3 (cherry picked from commit 33775ec9a2173a08e46edf9f46c9febadbf743e8) --- .../telegram/tdesktop/default.nix | 23 +++----- .../telegram/tdesktop/kf594.diff | 57 ------------------- .../telegram/tdesktop/tg_owt.nix | 6 +- pkgs/top-level/all-packages.nix | 2 +- 4 files changed, 11 insertions(+), 77 deletions(-) delete mode 100644 pkgs/applications/networking/instant-messengers/telegram/tdesktop/kf594.diff diff --git a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix index b5b30b083486..df86ccd062bb 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix @@ -1,5 +1,4 @@ -{ mkDerivation -, lib +{ lib , fetchFromGitHub , callPackage , pkg-config @@ -10,9 +9,10 @@ , wrapQtAppsHook , extra-cmake-modules , qtbase +, qtsvg , qtimageformats +, qt5compat , gtk3 -, kwayland , libdbusmenu , lz4 , xxHash @@ -70,7 +70,7 @@ let in env.mkDerivation rec { pname = "telegram-desktop"; - version = "3.6.0"; + version = "3.7.3"; # Note: Update via pkgs/applications/networking/instant-messengers/telegram/tdesktop/update.py # Telegram-Desktop with submodules @@ -79,17 +79,9 @@ env.mkDerivation rec { repo = "tdesktop"; rev = "v${version}"; fetchSubmodules = true; - sha256 = "0zcjm08nfdlxrsv0fi6dqg3lk52bcvsxnsf6jm5fv6gf5v9ia3hq"; + sha256 = "01b3nrhfbxhq4w63nsjnrhyfsdq3fm4l7sfkasbh8ib4qk3c9vwz"; }; - patches = [ - # fix build with KWayland 5.94+ - # cf. https://invent.kde.org/frameworks/kwayland/-/commit/de442e4a94e249a29cf2e005db8e0a5e4a6a13ed - # upstream bug: https://github.com/telegramdesktop/tdesktop/issues/24375 - # FIXME remove when no longer necessary - ./kf594.diff - ]; - postPatch = '' substituteInPlace Telegram/CMakeLists.txt \ --replace '"''${TDESKTOP_LAUNCHER_BASENAME}.appdata.xml"' '"''${TDESKTOP_LAUNCHER_BASENAME}.metainfo.xml"' @@ -120,9 +112,10 @@ env.mkDerivation rec { buildInputs = [ qtbase + qtsvg qtimageformats + qt5compat gtk3 - kwayland libdbusmenu lz4 xxHash @@ -166,8 +159,6 @@ env.mkDerivation rec { "-DTDESKTOP_API_HASH=d524b414d21f4d37f08684c1df41ac9c" # See: https://github.com/NixOS/nixpkgs/pull/130827#issuecomment-885212649 "-DDESKTOP_APP_USE_PACKAGED_FONTS=OFF" - # TODO: Remove once QT6 is available in nixpkgs - "-DDESKTOP_APP_QT6=OFF" ]; postFixup = '' diff --git a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/kf594.diff b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/kf594.diff deleted file mode 100644 index 0fa2d8bc8f6e..000000000000 --- a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/kf594.diff +++ /dev/null @@ -1,57 +0,0 @@ -diff --git a/Telegram/SourceFiles/platform/linux/linux_wayland_integration.cpp b/Telegram/SourceFiles/platform/linux/linux_wayland_integration.cpp -index 7641579aa..3c195e397 100644 ---- a/Telegram/SourceFiles/platform/linux/linux_wayland_integration.cpp -+++ b/Telegram/SourceFiles/platform/linux/linux_wayland_integration.cpp -@@ -9,10 +9,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL - - #include "base/platform/base_platform_info.h" - --#include --#include --#include --#include -+#include -+#include -+#include -+#include - - using namespace KWayland::Client; - -Submodule Telegram/lib_base contains modified content -diff --git a/Telegram/lib_base/base/platform/linux/base_linux_wayland_integration.cpp b/Telegram/lib_base/base/platform/linux/base_linux_wayland_integration.cpp -index 32f0de6..30a087f 100644 ---- a/Telegram/lib_base/base/platform/linux/base_linux_wayland_integration.cpp -+++ b/Telegram/lib_base/base/platform/linux/base_linux_wayland_integration.cpp -@@ -13,11 +13,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL - #include - #include - --#include --#include --#include --#include --#include -+#include -+#include -+#include -+#include -+#include - - using namespace KWayland::Client; - -Submodule Telegram/lib_ui contains modified content -diff --git a/Telegram/lib_ui/ui/platform/linux/ui_linux_wayland_integration.cpp b/Telegram/lib_ui/ui/platform/linux/ui_linux_wayland_integration.cpp -index 01f1e80..163cb6a 100644 ---- a/Telegram/lib_ui/ui/platform/linux/ui_linux_wayland_integration.cpp -+++ b/Telegram/lib_ui/ui/platform/linux/ui_linux_wayland_integration.cpp -@@ -24,8 +24,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL - #include - #include - --#include --#include -+#include -+#include - - Q_DECLARE_METATYPE(QMargins); - diff --git a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/tg_owt.nix b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/tg_owt.nix index 200e0e887e3e..bb0798953146 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/tg_owt.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/tg_owt.nix @@ -9,13 +9,13 @@ stdenv.mkDerivation { pname = "tg_owt"; - version = "unstable-2022-02-25"; + version = "unstable-2022-04-14"; src = fetchFromGitHub { owner = "desktop-app"; repo = "tg_owt"; - rev = "a264028ec71d9096e0aa629113c49c25db89d260"; - sha256 = "10p3x8z3ps8s1ivi9y8px2gsg4pvsvz6g9wbgh5w8hilikxqq7r5"; + rev = "63a934db1ed212ebf8aaaa20f0010dd7b0d7b396"; + sha256 = "sha256-WddSsQ9KW1zYyYckzdUOvfFZArYAbyvXmABQNMtK6cM="; fetchSubmodules = true; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 32ff96510596..d0d4b74cd624 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -29857,7 +29857,7 @@ with pkgs; taskopen = callPackage ../applications/misc/taskopen { }; - tdesktop = libsForQt5.callPackage ../applications/networking/instant-messengers/telegram/tdesktop { + tdesktop = qt6Packages.callPackage ../applications/networking/instant-messengers/telegram/tdesktop { abseil-cpp = abseil-cpp_202111; }; From 173a99a56a65425c9d7c37cef337b5b4dc0391ca Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 23 May 2022 18:24:16 +0200 Subject: [PATCH 04/28] python39Packages.manticore: relax crytic-compile constraint (cherry picked from commit fd044175314798d06d142089cd98c6d32e5d35d2) --- pkgs/development/python-modules/manticore/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/manticore/default.nix b/pkgs/development/python-modules/manticore/default.nix index 2e1bff7e21ef..e41edb488d27 100644 --- a/pkgs/development/python-modules/manticore/default.nix +++ b/pkgs/development/python-modules/manticore/default.nix @@ -32,7 +32,7 @@ buildPythonPackage rec { owner = "trailofbits"; repo = "manticore"; rev = version; - sha256 = "sha256-+17VBfAtkZZIi3SF5Num1Uqg3WjIpgbz3Jx65rD5zkM="; + hash = "sha256-+17VBfAtkZZIi3SF5Num1Uqg3WjIpgbz3Jx65rD5zkM="; }; propagatedBuildInputs = [ @@ -52,9 +52,11 @@ buildPythonPackage rec { unicorn ]; - # Python API is not used in the code, only z3 from PATH postPatch = '' - sed -ie s/z3-solver// setup.py + # Python API is not used in the code, only z3 from PATH + substituteInPlace setup.py \ + --replace "z3-solver" "" \ + --replace "crytic-compile==0.2.2" "crytic-compile>=0.2.2" ''; checkInputs = [ From c5b2704fcd097d9dca601eccb8888a2c32c38706 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 23 May 2022 22:52:03 +0200 Subject: [PATCH 05/28] python39Packages.manticore: mark as broken on darwin (cherry picked from commit 36ea50ffe5e9882185874823405882157c45b5e8) --- pkgs/development/python-modules/manticore/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/manticore/default.nix b/pkgs/development/python-modules/manticore/default.nix index e41edb488d27..8b2be2626601 100644 --- a/pkgs/development/python-modules/manticore/default.nix +++ b/pkgs/development/python-modules/manticore/default.nix @@ -130,5 +130,7 @@ buildPythonPackage rec { license = licenses.agpl3Only; platforms = platforms.unix; maintainers = with maintainers; [ arturcygan ]; + # m.c.manticore:WARNING: Manticore is only supported on Linux. Proceed at your own risk! + broken = stdenv.isDarwin; }; } From e5aaa1f2f471e6dc554db1ae18fe66154acb8f3b Mon Sep 17 00:00:00 2001 From: 06kellyjac Date: Sat, 21 May 2022 13:39:32 +0100 Subject: [PATCH 06/28] tracee: init at 0.7.0 (cherry picked from commit e2917e019bd88d87581e381516fe9e6cb67bac91) --- .../security/tracee/bpf-core-clang-bpf.patch | 13 ++ pkgs/tools/security/tracee/default.nix | 113 ++++++++++++++++++ .../tracee/disable-go-symbol-table.patch | 22 ++++ pkgs/top-level/all-packages.nix | 2 + 4 files changed, 150 insertions(+) create mode 100644 pkgs/tools/security/tracee/bpf-core-clang-bpf.patch create mode 100644 pkgs/tools/security/tracee/default.nix create mode 100644 pkgs/tools/security/tracee/disable-go-symbol-table.patch diff --git a/pkgs/tools/security/tracee/bpf-core-clang-bpf.patch b/pkgs/tools/security/tracee/bpf-core-clang-bpf.patch new file mode 100644 index 000000000000..f73e52841d3e --- /dev/null +++ b/pkgs/tools/security/tracee/bpf-core-clang-bpf.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile b/Makefile +index d5cd754..db1c1d3 100644 +--- a/Makefile ++++ b/Makefile +@@ -411,7 +411,7 @@ $(OUTPUT_DIR)/tracee.bpf.core.o: \ + $(TRACEE_EBPF_OBJ_CORE_HEADERS) + # + $(MAKE) $(OUTPUT_DIR)/tracee.bpf +- $(CMD_CLANG) \ ++ $(CMD_CLANG_BPF) \ + -D__TARGET_ARCH_$(LINUX_ARCH) \ + -D__BPF_TRACING__ \ + -DCORE \ diff --git a/pkgs/tools/security/tracee/default.nix b/pkgs/tools/security/tracee/default.nix new file mode 100644 index 000000000000..48d102e619d4 --- /dev/null +++ b/pkgs/tools/security/tracee/default.nix @@ -0,0 +1,113 @@ +{ lib +, buildGoModule +, fetchFromGitHub + +, llvmPackages_13 +, pkg-config + +, zlib +, libelf +}: + +let + inherit (llvmPackages_13) clang; + clang-with-bpf = + (clang.overrideAttrs (o: { pname = o.pname + "-with-bpf"; })).override (o: { + extraBuildCommands = o.extraBuildCommands + '' + # make a separate wrapped clang we can target at bpf + cp $out/bin/clang $out/bin/clang-bpf + # extra flags to append after the cc-cflags + echo '-target bpf -fno-stack-protector' > $out/nix-support/cc-cflags-bpf + # use sed to attach the cc-cflags-bpf after cc-cflags + sed -i -E "s@^(extraAfter=\(\\$\NIX_CFLAGS_COMPILE_.*)(\))\$@\1 $(cat $out/nix-support/cc-cflags-bpf)\2@" $out/bin/clang-bpf + ''; + }); +in +buildGoModule rec { + pname = "tracee"; + version = "0.7.0"; + + src = fetchFromGitHub { + owner = "aquasecurity"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-Y++FWxADnj1W5S3VrAlJAnotFYb6biCPJ6dpQ0Nin8o="; + # Once libbpf hits 1.0 we will migrate to the nixpkgs libbpf rather than the + # pinned copy in submodules + fetchSubmodules = true; + }; + vendorSha256 = "sha256-C2RExp67qax8+zJIgyMJ18sBtn/xEYj4tAvGCCpBssQ="; + + patches = [ + # bpf-core can't be compiled with wrapped clang since it forces the target + # we need to be able to replace it with another wrapped clang that has + # it's target as bpf + ./bpf-core-clang-bpf.patch + # add -s to ldflags for smaller binaries + ./disable-go-symbol-table.patch + ]; + + + enableParallelBuilding = true; + + strictDeps = true; + nativeBuildInputs = [ pkg-config clang-with-bpf ]; + buildInputs = [ zlib libelf ]; + + makeFlags = [ + "VERSION=v${version}" + "CMD_CLANG_BPF=clang-bpf" + # don't actually need git but the Makefile checks for it + "CMD_GIT=echo" + ]; + + buildPhase = '' + runHook preBuild + make $makeFlags ''${enableParallelBuilding:+-j$NIX_BUILD_CORES -l$NIX_BUILD_CORES} + runHook postBuild + ''; + + doCheck = false; + + installPhase = '' + runHook preInstall + + mkdir -p $out/{bin,share/tracee} + + cp ./dist/tracee-ebpf $out/bin + cp ./dist/tracee-rules $out/bin + + cp -r ./dist/rules $out/share/tracee/ + cp -r ./cmd/tracee-rules/templates $out/share/tracee/ + + runHook postInstall + ''; + + doInstallCheck = true; + installCheckPhase = '' + runHook preInstallCheck + + $out/bin/tracee-ebpf --help + $out/bin/tracee-ebpf --version | grep "v${version}" + + $out/bin/tracee-rules --help + + runHook postInstallCheck + ''; + + meta = with lib; { + homepage = "https://aquasecurity.github.io/tracee/latest/"; + changelog = "https://github.com/aquasecurity/tracee/releases/tag/v${version}"; + description = "Linux Runtime Security and Forensics using eBPF"; + longDescription = '' + Tracee is a Runtime Security and forensics tool for Linux. It is using + Linux eBPF technology to trace your system and applications at runtime, + and analyze collected events to detect suspicious behavioral patterns. It + is delivered as a Docker image that monitors the OS and detects suspicious + behavior based on a pre-defined set of behavioral patterns. + ''; + license = licenses.asl20; + maintainers = with maintainers; [ jk ]; + platforms = [ "x86_64-linux" ]; + }; +} diff --git a/pkgs/tools/security/tracee/disable-go-symbol-table.patch b/pkgs/tools/security/tracee/disable-go-symbol-table.patch new file mode 100644 index 000000000000..2aba5f5c338f --- /dev/null +++ b/pkgs/tools/security/tracee/disable-go-symbol-table.patch @@ -0,0 +1,22 @@ +diff --git a/Makefile b/Makefile +index d5cd754..0b74a79 100644 +--- a/Makefile ++++ b/Makefile +@@ -471,7 +471,7 @@ ifeq ($(BTFHUB), 1) + endif + $(GO_ENV_EBPF) $(CMD_GO) build \ + -tags $(GO_TAGS_EBPF) \ +- -ldflags="-w \ ++ -ldflags="-s -w \ + -extldflags \"$(CGO_EXT_LDFLAGS_EBPF)\" \ + -X main.version=\"$(VERSION)\" \ + " \ +@@ -552,7 +552,7 @@ $(OUTPUT_DIR)/tracee-rules: \ + # + $(GO_ENV_RULES) $(CMD_GO) build \ + -tags $(GO_TAGS_RULES) \ +- -ldflags="-w \ ++ -ldflags="-s -w \ + -extldflags \"$(CGO_EXT_LDFLAGS_RULES)\" \ + " \ + -v -o $@ \ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 281b0fd328dd..3835a62f2763 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11014,6 +11014,8 @@ with pkgs; tracebox = callPackage ../tools/networking/tracebox { }; + tracee = callPackage ../tools/security/tracee { }; + tracefilegen = callPackage ../development/tools/analysis/garcosim/tracefilegen { }; tracefilesim = callPackage ../development/tools/analysis/garcosim/tracefilesim { }; From 7a96cc6b2ca57bad6d52d4619463eb1fd58ce14e Mon Sep 17 00:00:00 2001 From: 06kellyjac Date: Sat, 21 May 2022 13:41:10 +0100 Subject: [PATCH 07/28] tracee: add manual nixosTest for integration testing (cherry picked from commit c68803fe317ae500bf3c64d635ac24b50d7b21e8) --- .../security/tracee/skip-init-test.patch | 12 ++++++ .../tracee/skip-magic_write-test.patch | 12 ++++++ pkgs/tools/security/tracee/test.nix | 41 +++++++++++++++++++ 3 files changed, 65 insertions(+) create mode 100644 pkgs/tools/security/tracee/skip-init-test.patch create mode 100644 pkgs/tools/security/tracee/skip-magic_write-test.patch create mode 100644 pkgs/tools/security/tracee/test.nix diff --git a/pkgs/tools/security/tracee/skip-init-test.patch b/pkgs/tools/security/tracee/skip-init-test.patch new file mode 100644 index 000000000000..612e56e4446f --- /dev/null +++ b/pkgs/tools/security/tracee/skip-init-test.patch @@ -0,0 +1,12 @@ +diff --git a/tests/integration/integration_test.go b/tests/integration/integration_test.go +index 8601eb9..57088d2 100644 +--- a/tests/integration/integration_test.go ++++ b/tests/integration/integration_test.go +@@ -149,6 +149,7 @@ func checkUidzero(t *testing.T, gotOutput *bytes.Buffer) { + + // only capture pids of 1 + func checkPidOne(t *testing.T, gotOutput *bytes.Buffer) { ++ t.Skip("Not compatible with systemd init") + _, _ = exec.Command("init", "q").CombinedOutput() + + waitForTraceeOutput(gotOutput, time.Now()) diff --git a/pkgs/tools/security/tracee/skip-magic_write-test.patch b/pkgs/tools/security/tracee/skip-magic_write-test.patch new file mode 100644 index 000000000000..99869a18f0e8 --- /dev/null +++ b/pkgs/tools/security/tracee/skip-magic_write-test.patch @@ -0,0 +1,12 @@ +diff --git a/tests/integration/integration_test.go b/tests/integration/integration_test.go +index 8601eb9..a8a3eed 100644 +--- a/tests/integration/integration_test.go ++++ b/tests/integration/integration_test.go +@@ -75,6 +75,7 @@ func waitForTraceeOutput(gotOutput *bytes.Buffer, now time.Time) { + + // small set of actions to trigger a magic write event + func checkMagicwrite(t *testing.T, gotOutput *bytes.Buffer) { ++ t.Skip() + // create a temp dir for testing + d, err := ioutil.TempDir("", "Test_MagicWrite-dir-*") + require.NoError(t, err) diff --git a/pkgs/tools/security/tracee/test.nix b/pkgs/tools/security/tracee/test.nix new file mode 100644 index 000000000000..cb639ed03173 --- /dev/null +++ b/pkgs/tools/security/tracee/test.nix @@ -0,0 +1,41 @@ +{ pkgs ? import ../../../../. { } }: + +# manually run `nix-build ./pkgs/tools/security/tracee/test.nix` to test +pkgs.nixosTest ({ + name = "tracee-test"; + nodes = { + machine = { config, pkgs, ... }: { + environment.systemPackages = [ + pkgs.tracee + # build the go integration tests as a binary + (pkgs.tracee.overrideAttrs (oa: { + pname = oa.pname + "-integration"; + patches = oa.patches or [] ++ [ + # skip test that runs `init -q` which is incompatible with systemd init + ./skip-init-test.patch + # skip magic_write test that currently fails + ./skip-magic_write-test.patch + ]; + # just build the static lib we need for the go test binary + makeFlags = oa.makeFlags ++ [ "./dist/libbpf/libbpf.a" ]; + postBuild = '' + # by default the tests are disabled and this is intended to be commented out + sed -i '/t.Skip("This test requires root privileges")/d' ./tests/integration/integration_test.go + CGO_CFLAGS="-I$PWD/dist/libbpf" CGO_LDFLAGS="-lelf -lz $PWD/dist/libbpf/libbpf.a" go test -tags ebpf,integration -c -o $GOPATH/tracee-integration ./tests/integration + ''; + doCheck = false; + installPhase = '' + mkdir -p $out/bin + cp $GOPATH/tracee-integration $out/bin + ''; + doInstallCheck = false; + })) + ]; + }; + }; + + testScript = '' + with subtest("run integration tests"): + print(machine.succeed('TRC_BIN="$(which tracee-ebpf)" tracee-integration -test.v -test.run "Test_Events"')) + ''; +}) From aa9efbf1ff71935f81b440c0177a151086b7a6eb Mon Sep 17 00:00:00 2001 From: midchildan Date: Fri, 27 May 2022 00:09:32 +0900 Subject: [PATCH 08/28] noto-fonts-cjk: Revert "switch back to variable font" This reverts commit 32c0743a2016cbb30133949cd4ca384a28dee721. Fixes #171976. Some non-free packages happend to include the problematic version of Harfbuzz that made the variable Noto CJK to not render. --- pkgs/data/fonts/noto-fonts/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/data/fonts/noto-fonts/default.nix b/pkgs/data/fonts/noto-fonts/default.nix index 4d91bf8905d5..248d076b997a 100644 --- a/pkgs/data/fonts/noto-fonts/default.nix +++ b/pkgs/data/fonts/noto-fonts/default.nix @@ -71,11 +71,11 @@ let owner = "googlefonts"; repo = "noto-cjk"; inherit rev sha256; - sparseCheckout = "${typeface}/Variable/OTC"; + sparseCheckout = "${typeface}/OTC"; }; installPhase = '' - install -m444 -Dt $out/share/fonts/opentype/noto-cjk ${typeface}/Variable/OTC/*.otf.ttc + install -m444 -Dt $out/share/fonts/opentype/noto-cjk ${typeface}/OTC/*.ttc ''; passthru.tests.noto-fonts = nixosTests.noto-fonts; @@ -117,14 +117,14 @@ in typeface = "Sans"; version = "2.004"; rev = "9f7f3c38eab63e1d1fddd8d50937fe4f1eacdb1d"; - sha256 = "sha256-11d/78i21yuzxrfB5t2VQN9OBz/qZKeozuS6BrLFjzw="; + sha256 = "sha256-pNC/WJCYHSlU28E/CSFsrEMbyCe/6tjevDlOvDK9RwU="; }; noto-fonts-cjk-serif = mkNotoCJK { typeface = "Serif"; version = "2.000"; rev = "9f7f3c38eab63e1d1fddd8d50937fe4f1eacdb1d"; - sha256 = "sha256-G+yl3LZvSFpbEUuuvattPDctKTzBCshOi970DcbPliE="; + sha256 = "sha256-Iy4lmWj5l+/Us/dJJ/Jl4MEojE9mrFnhNQxX2zhVngY="; }; noto-fonts-emoji = let From 09e3091aaefd9fb43cecf9524352955574bd7bc4 Mon Sep 17 00:00:00 2001 From: Guillaume Girol Date: Fri, 27 May 2022 12:00:00 +0000 Subject: [PATCH 09/28] release-notes: don't encourage people to copy secrets to the store (cherry picked from commit 2fdd23c154e28d3d735c84585914fb9f2277eac6) --- nixos/doc/manual/from_md/release-notes/rl-2205.section.xml | 6 ++++-- nixos/doc/manual/release-notes/rl-2205.section.md | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml index b291d38da671..92a859fe94ed 100644 --- a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml +++ b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml @@ -919,7 +919,7 @@ }; extraConfigFiles = [ - /run/keys/matrix-synapse/secrets.yaml + "/run/keys/matrix-synapse/secrets.yaml" ]; }; } @@ -927,7 +927,9 @@ The secrets in your original config should be migrated into a YAML file that is included via - extraConfigFiles. + extraConfigFiles. The filename must be + quoted to prevent nix from copying it to the (world readable) + store. Additionally a few option defaults have been synced up with diff --git a/nixos/doc/manual/release-notes/rl-2205.section.md b/nixos/doc/manual/release-notes/rl-2205.section.md index 4f4643e505bc..19695a0bceab 100644 --- a/nixos/doc/manual/release-notes/rl-2205.section.md +++ b/nixos/doc/manual/release-notes/rl-2205.section.md @@ -368,13 +368,13 @@ In addition to numerous new and upgraded packages, this release has the followin }; extraConfigFiles = [ - /run/keys/matrix-synapse/secrets.yaml + "/run/keys/matrix-synapse/secrets.yaml" ]; }; } ``` - The secrets in your original config should be migrated into a YAML file that is included via `extraConfigFiles`. + The secrets in your original config should be migrated into a YAML file that is included via `extraConfigFiles`. The filename must be quoted to prevent nix from copying it to the (world readable) store. Additionally a few option defaults have been synced up with upstream default values, for example the `max_upload_size` grew from `10M` to `50M`. For the same reason, the default `media_store_path` was changed from `${dataDir}/media` to `${dataDir}/media_store` if `system.stateVersion` is at least `22.05`. Files will need to be manually moved to the new From 33a272452590f9c236977446d870674aacae46d8 Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Fri, 27 May 2022 21:47:14 +0300 Subject: [PATCH 10/28] mars: fix build Bumps the revision and fixes https://hydra.nixos.org/build/178082390 Mark the version as "unstable" because the latest official version does not build and there are no new releases. (cherry picked from commit f35a5e2479d9c57132a8ba73e8cd5816f2af0865) --- pkgs/games/mars/default.nix | 13 +-- pkgs/games/mars/fix-gluortho2d.patch | 113 --------------------------- pkgs/games/mars/unbind_fix.patch | 19 ----- 3 files changed, 4 insertions(+), 141 deletions(-) delete mode 100644 pkgs/games/mars/fix-gluortho2d.patch delete mode 100644 pkgs/games/mars/unbind_fix.patch diff --git a/pkgs/games/mars/default.nix b/pkgs/games/mars/default.nix index 0fa744677d83..9b715b02ae09 100644 --- a/pkgs/games/mars/default.nix +++ b/pkgs/games/mars/default.nix @@ -1,27 +1,22 @@ { lib, stdenv, fetchFromGitHub, cmake, libGLU, libGL, sfml, fribidi, taglib }: stdenv.mkDerivation rec { pname = "mars"; - version = "0.7.5"; + version = "unstable-17.10.2021"; src = fetchFromGitHub { owner = "thelaui"; repo = "M.A.R.S."; - rev = "c855d044094a1d92317e38935d81ba938946132e"; - sha256 = "1r4c5gap1z2zsv4yjd34qriqkxaq4lb4rykapyzkkdf4g36lc3nh"; + rev = "84664cda094efe6e49d9b1550e4f4f98c33eefa2"; + sha256 = "sha256-SWLP926SyVTjn+UT1DCaJSo4Ue0RbyzImVnlNJQksS0="; }; nativeBuildInputs = [ cmake ]; buildInputs = [ libGLU libGL sfml fribidi taglib ]; - patches = [ - ./unbind_fix.patch - ./fix-gluortho2d.patch - ]; installPhase = '' cd .. - find -name '*.svn' -exec rm -rf {} \; mkdir -p "$out/share/mars/" mkdir -p "$out/bin/" cp -rv data resources credits.txt license.txt "$out/share/mars/" - cp -v mars "$out/bin/mars.bin" + cp -v marsshooter "$out/bin/mars.bin" cat << EOF > "$out/bin/mars" #! ${stdenv.shell} cd "$out/share/mars/" diff --git a/pkgs/games/mars/fix-gluortho2d.patch b/pkgs/games/mars/fix-gluortho2d.patch deleted file mode 100644 index 15a5c07060e2..000000000000 --- a/pkgs/games/mars/fix-gluortho2d.patch +++ /dev/null @@ -1,113 +0,0 @@ -From 33d5affabf8ff84f2c028b9303c6a9e83cc824ad Mon Sep 17 00:00:00 2001 -From: James Cowgill -Date: Sat, 9 May 2015 01:54:14 +0100 -Subject: [PATCH] Remove dependency on GLU - fixes build with SFML 2.3 - ---- - premake4.lua | 8 ++++---- - src/Shaders/postFX.cpp | 2 +- - src/System/window.cpp | 12 ++++++------ - 3 files changed, 11 insertions(+), 11 deletions(-) - -diff --git a/premake4.lua b/premake4.lua -index 023dddd..5af4495 100755 ---- a/premake4.lua -+++ b/premake4.lua -@@ -11,11 +11,11 @@ project "mars" - defines { "NDEBUG" } - flags { "Optimize" } - if os.get() == "windows" then -- links { "sfml-graphics", "sfml-audio", "sfml-system", "sfml-window", "glu32", "opengl32", "fribidi-0", "tag" } -+ links { "sfml-graphics", "sfml-audio", "sfml-system", "sfml-window", "opengl32", "fribidi-0", "tag" } - elseif os.get() == "macosx" then - links { "sfml-graphics.framework", "sfml-audio.framework", "sfml-system.framework", "sfml-window.framework", "opengl.framework", "fribidi", "tag" } - else -- links { "GLU", "sfml-graphics", "sfml-audio", "sfml-system", "sfml-window", "fribidi", "tag" } -+ links { "sfml-graphics", "sfml-audio", "sfml-system", "sfml-window", "fribidi", "tag" } - libdirs { "/usr/lib", "/usr/local/lib" } - end - -@@ -23,10 +23,10 @@ project "mars" - defines { "_DEBUG", "DEBUG" } - flags { "Symbols" } - if os.get() == "windows" then -- links { "sfml-graphics", "sfml-audio", "sfml-system", "sfml-window", "glu32", "opengl32", "fribidi-0", "tag" } -+ links { "sfml-graphics", "sfml-audio", "sfml-system", "sfml-window", "opengl32", "fribidi-0", "tag" } - elseif os.get() == "macosx" then - links { "sfml-graphics.framework", "sfml-audio.framework", "sfml-system.framework", "sfml-window.framework", "opengl.framework", "fribidi", "tag" } - else -- links { "GLU", "sfml-graphics", "sfml-audio", "sfml-system", "sfml-window", "fribidi", "tag" } -+ links { "sfml-graphics", "sfml-audio", "sfml-system", "sfml-window", "fribidi", "tag" } - libdirs { "/usr/lib", "/usr/local/lib" } - end -diff --git a/src/Shaders/postFX.cpp b/src/Shaders/postFX.cpp -index 987f411..f767a47 100644 ---- a/src/Shaders/postFX.cpp -+++ b/src/Shaders/postFX.cpp -@@ -78,7 +78,7 @@ namespace postFX { - postFX_.loadFromFile(settings::C_dataPath + "shaders/bump.frag", sf::Shader::Fragment); - bumpMap_.create(SPACE_X_RESOLUTION*0.5f, SPACE_Y_RESOLUTION*0.5f); - glViewport(0,0,SPACE_X_RESOLUTION*0.5f,SPACE_Y_RESOLUTION*0.5f); -- gluOrtho2D(0, SPACE_X_RESOLUTION, SPACE_Y_RESOLUTION, 0); -+ glOrtho(0, SPACE_X_RESOLUTION, SPACE_Y_RESOLUTION, 0, -1, 1); - glEnable(GL_BLEND); - glMatrixMode(GL_MODELVIEW); - postFX_.setParameter("BumpMap", bumpMap_.getTexture()); -diff --git a/src/System/window.cpp b/src/System/window.cpp -index e9a099a..8e12dcc 100644 ---- a/src/System/window.cpp -+++ b/src/System/window.cpp -@@ -222,7 +222,7 @@ namespace window { - glLoadIdentity(); - - // Setup translation (according to left-upper corner) -- gluOrtho2D(0.f, SPACE_X_RESOLUTION, SPACE_Y_RESOLUTION, 0.f); -+ glOrtho(0.f, SPACE_X_RESOLUTION, SPACE_Y_RESOLUTION, 0.f, -1, 1); - - // probably improves performance... - glDisable(GL_LIGHTING); -@@ -247,7 +247,7 @@ namespace window { - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); -- gluOrtho2D(0.f, viewPort_.x_, viewPort_.y_, 0.f); -+ glOrtho(0.f, viewPort_.x_, viewPort_.y_, 0.f, -1, 1); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - -@@ -255,7 +255,7 @@ namespace window { - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); -- gluOrtho2D(0.f, SPACE_X_RESOLUTION, SPACE_Y_RESOLUTION, 0.f); -+ glOrtho(0.f, SPACE_X_RESOLUTION, SPACE_Y_RESOLUTION, 0.f, -1, 1); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - } -@@ -270,7 +270,7 @@ namespace window { - glLoadIdentity(); - setViewPort(); - -- gluOrtho2D(0.f, viewPort_.x_, viewPort_.y_, 0.f); -+ glOrtho(0.f, viewPort_.x_, viewPort_.y_, 0.f, -1, 1); - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -@@ -284,7 +284,7 @@ namespace window { - glLoadIdentity(); - setViewPort(); - -- gluOrtho2D(0.f, viewPort_.x_, viewPort_.y_, 0.f); -+ glOrtho(0.f, viewPort_.x_, viewPort_.y_, 0.f, -1, 1); - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); -@@ -294,7 +294,7 @@ namespace window { - else { - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); -- gluOrtho2D(0.f, viewPort_.x_, viewPort_.y_, 0.f); -+ glOrtho(0.f, viewPort_.x_, viewPort_.y_, 0.f, -1, 1); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - } diff --git a/pkgs/games/mars/unbind_fix.patch b/pkgs/games/mars/unbind_fix.patch deleted file mode 100644 index 2aef6eb5cf66..000000000000 --- a/pkgs/games/mars/unbind_fix.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/src/System/window.cpp b/src/System/window.cpp -index e9a099a..e3f6de9 100644 ---- a/src/System/window.cpp -+++ b/src/System/window.cpp -@@ -308,12 +308,12 @@ namespace window { - glEnable(GL_TEXTURE_2D); - - if (shader) -- shader->bind(); -+ sf::Shader::bind(shader); - - window_.draw(toBeDrawn, states); - - if (shader) -- shader->unbind(); -+ sf::Shader::bind(NULL); - - window_.popGLStates(); - glPopMatrix(); From eb03e084e3706ba344bfa99b42bcd10c932d903c Mon Sep 17 00:00:00 2001 From: Rouven Czerwinski Date: Tue, 24 May 2022 06:31:14 +0200 Subject: [PATCH 11/28] seatd: 0.6.4 -> 0.7.0 Package bump to 0.7.0. The most important change for NixOS is a polling bug fix for the logind backend. Previously sway would receive the DRM FD pause event only after the DRM FD was unpaused, this is fixed in this release. Signed-off-by: Rouven Czerwinski (cherry picked from commit a16d56e7b4067315a65cc5f7a5e9886fc21e4e6e) --- pkgs/applications/misc/seatd/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/seatd/default.nix b/pkgs/applications/misc/seatd/default.nix index 177476900aa9..22a1b9e74b78 100644 --- a/pkgs/applications/misc/seatd/default.nix +++ b/pkgs/applications/misc/seatd/default.nix @@ -10,13 +10,13 @@ stdenv.mkDerivation rec { pname = "seatd"; - version = "0.6.4"; + version = "0.7.0"; src = fetchFromSourcehut { owner = "~kennylevinsen"; repo = "seatd"; rev = version; - sha256 = "1k0wz68aqr9xgpyrfrsmrjn5b634qmm7fwv2d73w112hjmgvjxk5"; + sha256 = "sha256-m8xoL90GI822FTgCXuVr3EejLAMUStkPKVoV7w8ayIE="; }; outputs = [ "bin" "out" "dev" "man" ]; From 61ef2043dfca8c73d55013182932d63f7bd02470 Mon Sep 17 00:00:00 2001 From: Thomas Gerbet Date: Fri, 27 May 2022 14:56:30 +0200 Subject: [PATCH 12/28] zlog: fixes CVE-2021-43521 (cherry picked from commit a0a5f90ef209f058ee19d7cb5693faec2bfe56a4) --- pkgs/development/libraries/zlog/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/zlog/default.nix b/pkgs/development/libraries/zlog/default.nix index 99163ae5dc6c..82c08b46bc8b 100644 --- a/pkgs/development/libraries/zlog/default.nix +++ b/pkgs/development/libraries/zlog/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub }: +{ lib, stdenv, fetchFromGitHub, fetchpatch }: stdenv.mkDerivation rec { version = "1.2.15"; @@ -11,6 +11,14 @@ stdenv.mkDerivation rec { sha256 = "10hzifgpml7jm43y6v8c8q0cr9ziyx9qxznafxyw6glhnlqnb7pb"; }; + patches = [ + (fetchpatch { + name = "CVE-2021-43521.patch"; + url = "https://github.com/HardySimpson/zlog/commit/a5be8b3a8ddc498de4ad041757285136a55d97e3.patch"; + sha256 = "sha256-igHXUHN2Ke8Gb5AeDrDwG2aUNRpispgqVlGuASute+8="; + }) + ]; + makeFlags = [ "PREFIX=${placeholder "out"}" ]; meta = with lib; { From 804a6d1c63dc5ebbc016ab424b137bb322db649b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 30 May 2022 23:35:38 +0200 Subject: [PATCH 13/28] python310Packages.pyramid_jinja2: disable failing tests - switch to pytestCheckHook - disable on older Python releases (cherry picked from commit c9098ff0bb3f08ada15b0b2a47095a34488e0ef0) --- .../python-modules/pyramid_jinja2/default.nix | 43 ++++++++++++++++--- 1 file changed, 37 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/pyramid_jinja2/default.nix b/pkgs/development/python-modules/pyramid_jinja2/default.nix index 34e17024ee78..8543a950a8cd 100644 --- a/pkgs/development/python-modules/pyramid_jinja2/default.nix +++ b/pkgs/development/python-modules/pyramid_jinja2/default.nix @@ -3,23 +3,54 @@ , buildPythonPackage , fetchPypi , webtest +, markupsafe , jinja2 +, pytestCheckHook +, zope_deprecation , pyramid +, pythonOlder }: buildPythonPackage rec { - pname = "pyramid_jinja2"; + pname = "pyramid-jinja2"; version = "2.10"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { - inherit pname version; - sha256 = "sha256-8nEGnZ6ay6x622kSGQqEj2M49+V6+68+lSN/6DzI9NI="; + pname = "pyramid_jinja2"; + inherit version; + hash = "sha256-8nEGnZ6ay6x622kSGQqEj2M49+V6+68+lSN/6DzI9NI="; }; - buildInputs = [ webtest ]; - propagatedBuildInputs = [ jinja2 pyramid ]; + propagatedBuildInputs = [ + markupsafe + jinja2 + pyramid + zope_deprecation + ]; - pythonImportsCheck = [ "pyramid_jinja2" ]; + checkInputs = [ + webtest + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace setup.cfg \ + --replace " --cov" "" + ''; + + pythonImportsCheck = [ + "pyramid_jinja2" + ]; + + disabledTests = [ + # AssertionError: Lists differ: ['pyramid_jinja2-2.10',... + "test_it_relative_to_package" + # AssertionError: False is not true + "test_options" + ]; meta = with lib; { broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin; From 5776ccd20acacf7578ba7e02c1653a997c7d80f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?PedroHLC=20=E2=98=AD?= Date: Sat, 21 May 2022 10:15:01 -0300 Subject: [PATCH 14/28] Add @PedroHLC to maintainer-list (cherry picked from commit df38903e7985d5aff55f9111bac5fa6e4a0a65c7) --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index a102231919e4..65d8d81cca74 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -9820,6 +9820,12 @@ githubId = 8641; name = "Pierre Carrier"; }; + pedrohlc = { + email = "root@pedrohlc.com"; + github = "PedroHLC"; + githubId = 1368952; + name = "Pedro Lara Campos"; + }; penguwin = { email = "penguwin@penguwin.eu"; github = "penguwin"; From 471ab8e5a06be2a481df5b2c369c732caf274c05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?PedroHLC=20=E2=98=AD?= Date: Sat, 28 May 2022 13:16:35 -0300 Subject: [PATCH 15/28] airgeddon: init at 11.01 (cherry picked from commit 1e5b8da09de9dcb6ee56744d86a31de247fbe829) --- pkgs/tools/networking/airgeddon/default.nix | 166 ++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 168 insertions(+) create mode 100644 pkgs/tools/networking/airgeddon/default.nix diff --git a/pkgs/tools/networking/airgeddon/default.nix b/pkgs/tools/networking/airgeddon/default.nix new file mode 100644 index 000000000000..2effd5508522 --- /dev/null +++ b/pkgs/tools/networking/airgeddon/default.nix @@ -0,0 +1,166 @@ +{ lib +, stdenv +, fetchFromGitHub +, makeWrapper + # Required +, aircrack-ng +, bash +, coreutils-full +, gawk +, gnugrep +, gnused +, iproute2 +, iw +, pciutils +, procps +, tmux + # X11 Front +, xterm +, xorg + # what the author calls "Internals" +, usbutils +, wget +, ethtool +, util-linux +, ccze + # Optionals + # Missing in nixpkgs: beef, hostapd-wpe, asleap +, bettercap +, bully +, crunch +, dhcp +, dnsmasq +, ettercap +, hashcat +, hcxdumptool +, hcxtools +, hostapd +, john +, lighttpd +, mdk4 +, nftables +, openssl +, pixiewps +, reaverwps-t6x # Could be the upstream version too +, wireshark-cli + # Undocumented requirements (there is also ping) +, apparmor-bin-utils +, curl +, glibc +, ncurses +, networkmanager +, systemd + # Support groups +, supportWpaWps ? true # Most common use-case +, supportHashCracking ? false +, supportEvilTwin ? false +, supportX11 ? false # Allow using xterm instead of tmux, hard to test +}: +let + deps = [ + aircrack-ng + bash + coreutils-full + curl + gawk + glibc + gnugrep + gnused + iproute2 + iw + networkmanager + ncurses + pciutils + procps + tmux + usbutils + wget + ethtool + util-linux + ccze + systemd + ] ++ lib.optionals supportWpaWps [ + bully + pixiewps + reaverwps-t6x + ] ++ lib.optionals supportHashCracking [ + crunch + hashcat + hcxdumptool + hcxtools + john + wireshark-cli + ] ++ lib.optionals supportEvilTwin [ + bettercap + dhcp + dnsmasq + ettercap + hostapd + lighttpd + openssl + mdk4 + nftables + apparmor-bin-utils + ] ++ lib.optionals supportX11 [ + xterm + xorg.xset + xorg.xdpyinfo + ]; +in +stdenv.mkDerivation rec { + pname = "airgeddon"; + version = "11.01"; + + src = fetchFromGitHub { + owner = "v1s1t0r1sh3r3"; + repo = "airgeddon"; + rev = "v${version}"; + sha256 = "3TjaLEcerRk69Ys4kj7vOMCRUd0ifFJzL4MB5ifoK68="; + }; + + strictDeps = true; + nativeBuildInputs = [ makeWrapper ]; + + # What these replacings do? + # - Disable the auto-updates (we'll run from a read-only directory); + # - Silence the checks (NixOS will enforce the PATH, it will only see the tools as we listed); + # - Use "tmux", we're not patching XTerm commands; + # - Remove PWD and $0 references, forcing it to use the paths from store; + # - Force our PATH to all tmux sessions. + postPatch = '' + patchShebangs airgeddon.sh + sed -i ' + s|AIRGEDDON_AUTO_UPDATE=true|AIRGEDDON_AUTO_UPDATE=false| + s|AIRGEDDON_SILENT_CHECKS=false|AIRGEDDON_SILENT_CHECKS=true| + s|AIRGEDDON_WINDOWS_HANDLING=xterm|AIRGEDDON_WINDOWS_HANDLING=tmux| + ' .airgeddonrc + + sed -Ei ' + s|\$\(pwd\)|${placeholder "out"}/share/airgeddon;scriptfolder=${placeholder "out"}/share/airgeddon/| + s|\$\{0\}|${placeholder "out"}/bin/airgeddon| + s|tmux send-keys -t "([^"]+)" "|tmux send-keys -t "\1" "export PATH=\\"$PATH\\"; | + ' airgeddon.sh + ''; + + # ATTENTION: No need to chdir around, we're removing the occurrences of "$(pwd)" + postInstall = '' + wrapProgram $out/bin/airgeddon --prefix PATH : ${lib.makeBinPath deps} + ''; + + # Install only the interesting files + installPhase = '' + runHook preInstall + install -Dm 755 airgeddon.sh "$out/bin/airgeddon" + install -dm 755 "$out/share/airgeddon" + cp -dr .airgeddonrc known_pins.db language_strings.sh plugins/ "$out/share/airgeddon/" + runHook postInstall + ''; + + meta = with lib; { + description = "Multi-use TUI to audit wireless networks. "; + homepage = "https://github.com/v1s1t0r1sh3r3/airgeddon"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ pedrohlc ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 328ee220848e..165e9c75dd0b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1065,6 +1065,8 @@ with pkgs; airfield = callPackage ../tools/networking/airfield { }; + airgeddon = callPackage ../tools/networking/airgeddon { }; + apache-airflow = with python3.pkgs; toPythonApplication apache-airflow; airsonic = callPackage ../servers/misc/airsonic { }; From 135cf7fca6ee482296c91b3d09822cb0f4dd5d87 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Sun, 22 May 2022 13:10:24 +0200 Subject: [PATCH 16/28] ocamlPackages.sedlex: remove at 1.99.5 (cherry picked from commit 3668b3613b14d9862e90481cf7800ccba6d1fdfe) --- .../ocaml-modules/sedlex/default.nix | 37 ------------------- pkgs/top-level/ocaml-packages.nix | 2 - 2 files changed, 39 deletions(-) delete mode 100644 pkgs/development/ocaml-modules/sedlex/default.nix diff --git a/pkgs/development/ocaml-modules/sedlex/default.nix b/pkgs/development/ocaml-modules/sedlex/default.nix deleted file mode 100644 index 685d4426cfc3..000000000000 --- a/pkgs/development/ocaml-modules/sedlex/default.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ stdenv, lib, fetchFromGitHub, ocaml, findlib, gen, ppx_tools_versioned, ocaml-migrate-parsetree }: - -if lib.versionOlder ocaml.version "4.02" -then throw "sedlex is not available for OCaml ${ocaml.version}" -else - -stdenv.mkDerivation rec { - pname = "ocaml${ocaml.version}-sedlex"; - version = "1.99.5"; - - src = fetchFromGitHub { - owner = "ocaml-community"; - repo = "sedlex"; - rev = "fb84e1766fc4b29e79ec40029ffee5cdb37b392f"; - sha256 = "sha256-VhzlDTYBFXgKWT69PqZYLuHkiaDwzhmyX2XfaqzHFl4="; - }; - - nativeBuildInputs = [ ocaml findlib ]; - - propagatedBuildInputs = [ gen ocaml-migrate-parsetree ppx_tools_versioned ]; - - strictDeps = true; - - buildFlags = [ "all" "opt" ]; - - createFindlibDestdir = true; - - dontStrip = true; - - meta = { - homepage = "https://github.com/ocaml-community/sedlex"; - description = "An OCaml lexer generator for Unicode"; - license = lib.licenses.mit; - inherit (ocaml.meta) platforms; - maintainers = [ lib.maintainers.vbgl ]; - }; -} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index a1effc538b60..18753b6138c6 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1312,8 +1312,6 @@ let safepass = callPackage ../development/ocaml-modules/safepass { }; - sedlex = callPackage ../development/ocaml-modules/sedlex { }; - sedlex_2 = callPackage ../development/ocaml-modules/sedlex/2.nix { }; semaphore-compat = callPackage ../development/ocaml-modules/semaphore-compat { }; From 7e78ab82a588c1eca2923d771d8ad14e13617f90 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Sun, 22 May 2022 13:28:08 +0200 Subject: [PATCH 17/28] ocamlPackages: rename sedlex_2 into sedlex (cherry picked from commit 4d795dc1b289cf05f2c5304f4514b4a419c94e63) --- pkgs/applications/science/logic/beluga/default.nix | 2 +- pkgs/development/compilers/fstar/default.nix | 2 +- pkgs/development/compilers/haxe/default.nix | 4 ++-- pkgs/development/ocaml-modules/higlo/default.nix | 4 ++-- pkgs/development/ocaml-modules/iri/default.nix | 4 ++-- pkgs/development/ocaml-modules/piqi/default.nix | 4 ++-- pkgs/development/ocaml-modules/sedlex/{2.nix => default.nix} | 0 pkgs/development/ocaml-modules/xtmpl/default.nix | 4 ++-- pkgs/development/tools/analysis/flow/default.nix | 2 +- pkgs/tools/audio/liquidsoap/full.nix | 2 +- pkgs/top-level/ocaml-packages.nix | 2 +- 11 files changed, 15 insertions(+), 15 deletions(-) rename pkgs/development/ocaml-modules/sedlex/{2.nix => default.nix} (100%) diff --git a/pkgs/applications/science/logic/beluga/default.nix b/pkgs/applications/science/logic/beluga/default.nix index 66cfd306128b..9af0cd694b70 100644 --- a/pkgs/applications/science/logic/beluga/default.nix +++ b/pkgs/applications/science/logic/beluga/default.nix @@ -14,7 +14,7 @@ ocamlPackages.buildDunePackage rec { useDune2 = true; buildInputs = with ocamlPackages; [ - gen sedlex_2 ocaml_extlib dune-build-info linenoise + gen sedlex ocaml_extlib dune-build-info linenoise ]; postPatch = '' diff --git a/pkgs/development/compilers/fstar/default.nix b/pkgs/development/compilers/fstar/default.nix index eb81efe2de0c..a269edd6668a 100644 --- a/pkgs/development/compilers/fstar/default.nix +++ b/pkgs/development/compilers/fstar/default.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { fileutils menhirLib pprint - sedlex_2 + sedlex ppxlib ppx_deriving ppx_deriving_yojson diff --git a/pkgs/development/compilers/haxe/default.nix b/pkgs/development/compilers/haxe/default.nix index 4ac022be6a9f..c362abbc1f63 100644 --- a/pkgs/development/compilers/haxe/default.nix +++ b/pkgs/development/compilers/haxe/default.nix @@ -6,7 +6,7 @@ let then with ocaml-ng.ocamlPackages_4_12; [ ocaml findlib - sedlex_2 + sedlex xml-light ptmap camlp5 @@ -18,7 +18,7 @@ let then with ocaml-ng.ocamlPackages_4_10; [ ocaml findlib - sedlex_2 + sedlex xml-light ptmap camlp5 diff --git a/pkgs/development/ocaml-modules/higlo/default.nix b/pkgs/development/ocaml-modules/higlo/default.nix index 19b2fa8942a5..87a4186a68c3 100644 --- a/pkgs/development/ocaml-modules/higlo/default.nix +++ b/pkgs/development/ocaml-modules/higlo/default.nix @@ -1,4 +1,4 @@ -{ lib, buildDunePackage, fetchFromGitLab, sedlex_2, xtmpl }: +{ lib, buildDunePackage, fetchFromGitLab, sedlex, xtmpl }: buildDunePackage rec { pname = "higlo"; @@ -12,7 +12,7 @@ buildDunePackage rec { sha256 = "sha256:09hsbwy5asacgh4gdj0vjpy4kzfnq3qji9szbsbyswsf1nbyczir"; }; - propagatedBuildInputs = [ sedlex_2 xtmpl ]; + propagatedBuildInputs = [ sedlex xtmpl ]; meta = with lib; { description = "OCaml library for syntax highlighting"; diff --git a/pkgs/development/ocaml-modules/iri/default.nix b/pkgs/development/ocaml-modules/iri/default.nix index 6a00fb453dfd..22f106975868 100644 --- a/pkgs/development/ocaml-modules/iri/default.nix +++ b/pkgs/development/ocaml-modules/iri/default.nix @@ -1,5 +1,5 @@ { lib, buildDunePackage, fetchFromGitLab -, sedlex_2, uunf, uutf +, sedlex, uunf, uutf }: buildDunePackage rec { @@ -15,7 +15,7 @@ buildDunePackage rec { sha256 = "sha256:0zk8nnwcyljkc1a556byncv6cn1vqhk4267z1lm15flh1k7chyax"; }; - propagatedBuildInputs = [ sedlex_2 uunf uutf ]; + propagatedBuildInputs = [ sedlex uunf uutf ]; meta = { description = "IRI (RFC3987) native OCaml implementation"; diff --git a/pkgs/development/ocaml-modules/piqi/default.nix b/pkgs/development/ocaml-modules/piqi/default.nix index 45d65a5be04f..f9eb09987fb9 100644 --- a/pkgs/development/ocaml-modules/piqi/default.nix +++ b/pkgs/development/ocaml-modules/piqi/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, ocaml, findlib, which, sedlex_2, easy-format, xmlm, base64 }: +{ lib, stdenv, fetchFromGitHub, ocaml, findlib, which, sedlex, easy-format, xmlm, base64 }: stdenv.mkDerivation rec { version = "0.6.15"; @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ ocaml findlib which ]; - propagatedBuildInputs = [ sedlex_2 xmlm easy-format base64 ]; + propagatedBuildInputs = [ sedlex xmlm easy-format base64 ]; strictDeps = true; diff --git a/pkgs/development/ocaml-modules/sedlex/2.nix b/pkgs/development/ocaml-modules/sedlex/default.nix similarity index 100% rename from pkgs/development/ocaml-modules/sedlex/2.nix rename to pkgs/development/ocaml-modules/sedlex/default.nix diff --git a/pkgs/development/ocaml-modules/xtmpl/default.nix b/pkgs/development/ocaml-modules/xtmpl/default.nix index 7c2f0a01e53c..6b4771fe1ff4 100644 --- a/pkgs/development/ocaml-modules/xtmpl/default.nix +++ b/pkgs/development/ocaml-modules/xtmpl/default.nix @@ -1,4 +1,4 @@ -{ lib, buildDunePackage, fetchFromGitLab, iri, re, sedlex_2, uutf }: +{ lib, buildDunePackage, fetchFromGitLab, iri, re, sedlex, uutf }: buildDunePackage rec { pname = "xtmpl"; @@ -12,7 +12,7 @@ buildDunePackage rec { sha256 = "sha256:0vwj0aayg60wm98d91fg3hmj90730liljy4cn8771dpxvz8m07bw"; }; - propagatedBuildInputs = [ iri re sedlex_2 uutf ]; + propagatedBuildInputs = [ iri re sedlex uutf ]; meta = with lib; { description = "XML templating library for OCaml"; diff --git a/pkgs/development/tools/analysis/flow/default.nix b/pkgs/development/tools/analysis/flow/default.nix index 2325ab03c96b..37241a953403 100644 --- a/pkgs/development/tools/analysis/flow/default.nix +++ b/pkgs/development/tools/analysis/flow/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { install -Dm644 resources/shell/bash-completion $out/share/bash-completion/completions/flow ''; - buildInputs = (with ocamlPackages; [ ocaml findlib ocamlbuild ocaml-migrate-parsetree-2 dtoa core_kernel sedlex_2 ocaml_lwt lwt_log lwt_ppx ppx_deriving ppx_gen_rec visitors wtf8 ]) + buildInputs = (with ocamlPackages; [ ocaml findlib ocamlbuild ocaml-migrate-parsetree-2 dtoa core_kernel sedlex ocaml_lwt lwt_log lwt_ppx ppx_deriving ppx_gen_rec visitors wtf8 ]) ++ lib.optionals stdenv.isDarwin [ CoreServices ]; meta = with lib; { diff --git a/pkgs/tools/audio/liquidsoap/full.nix b/pkgs/tools/audio/liquidsoap/full.nix index 1c52e6796b7b..94cc353dd1c4 100644 --- a/pkgs/tools/audio/liquidsoap/full.nix +++ b/pkgs/tools/audio/liquidsoap/full.nix @@ -59,7 +59,7 @@ stdenv.mkDerivation { ocamlPackages.xmlm ocamlPackages.ocaml_pcre ocamlPackages.camomile ocamlPackages.fdkaac - ocamlPackages.srt ocamlPackages.sedlex_2 ocamlPackages.menhir ocamlPackages.menhirLib + ocamlPackages.srt ocamlPackages.sedlex ocamlPackages.menhir ocamlPackages.menhirLib ]; hardeningDisable = [ "format" "fortify" ]; diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 18753b6138c6..406cfe25225d 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1312,7 +1312,7 @@ let safepass = callPackage ../development/ocaml-modules/safepass { }; - sedlex_2 = callPackage ../development/ocaml-modules/sedlex/2.nix { }; + sedlex = callPackage ../development/ocaml-modules/sedlex { }; semaphore-compat = callPackage ../development/ocaml-modules/semaphore-compat { }; From fed87a59759d589b4b3879f27b4940248b636e80 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Sun, 22 May 2022 13:35:38 +0200 Subject: [PATCH 18/28] =?UTF-8?q?ocamlPackages.sedlex:=202.4=20=E2=86=92?= =?UTF-8?q?=202.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 138f2534513cc0449d9524773476f9fa0aad2431) --- .../ocaml-modules/sedlex/default.nix | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/pkgs/development/ocaml-modules/sedlex/default.nix b/pkgs/development/ocaml-modules/sedlex/default.nix index 9f4badbc7cad..0a18424acac2 100644 --- a/pkgs/development/ocaml-modules/sedlex/default.nix +++ b/pkgs/development/ocaml-modules/sedlex/default.nix @@ -8,38 +8,34 @@ , uchar }: -if lib.versionOlder ocaml.version "4.08" -then throw "sedlex is not available for OCaml ${ocaml.version}" -else - let - unicodeVersion = "13.0.0"; + unicodeVersion = "14.0.0"; baseUrl = "https://www.unicode.org/Public/${unicodeVersion}"; DerivedCoreProperties = fetchurl { url = "${baseUrl}/ucd/DerivedCoreProperties.txt"; - sha256 = "0j12x112cd8fpgazkc8izxnhhpia44p1m36ff8yapslxndcmzm55"; + sha256 = "sha256:1g77s8g9443dd92f82pbkim7rk51s7xdwa3mxpzb1lcw8ryxvvg3"; }; DerivedGeneralCategory = fetchurl { url = "${baseUrl}/ucd/extracted/DerivedGeneralCategory.txt"; - sha256 = "0w6mkz4w79k23bnmwgfxc4yqc2ypv8ilrjn6nk25hrafksbg00j5"; + sha256 = "sha256:080l3bwwppm7gnyga1hzhd07b55viklimxpdsx0fsxhr8v47krnd"; }; PropList = fetchurl { url = "${baseUrl}/ucd/PropList.txt"; - sha256 = "1ks0585wimygbk2wqi9hqg8gyl25iffvdad5vya1zgsxs8z5lns8"; + sha256 = "sha256:08k75jzl7ws9l3sm1ywsj24qa4qvzn895wggdpp5nyj1a2wgvpbb"; }; in buildDunePackage rec { pname = "sedlex"; - version = "2.4"; + version = "2.5"; - useDune2 = true; + minimalOCamlVersion = "4.08"; src = fetchFromGitHub { owner = "ocaml-community"; repo = "sedlex"; rev = "v${version}"; - sha256 = "13g8az4zqg6hrnxmy3qrasslppzlag13dd1dsr8vlpg2vpfmfv6i"; + sha256 = "sha256:062a5dvrzvb81l3a9phljrhxfw9nlb61q341q0a6xn65hll3z2wy"; }; propagatedBuildInputs = [ From 3e044ceeccaf1c7eac2012283bb3369e196c064d Mon Sep 17 00:00:00 2001 From: Eduardo Quiros Date: Fri, 3 Jun 2022 18:07:07 -0600 Subject: [PATCH 19/28] signal-desktop: 5.44.1 -> 5.45.0 (cherry picked from commit 1a931f6eca1503bcd5ce8340850a7879f9155abd) --- .../networking/instant-messengers/signal-desktop/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/signal-desktop/default.nix b/pkgs/applications/networking/instant-messengers/signal-desktop/default.nix index 972a427c1753..3133ec9dde1d 100644 --- a/pkgs/applications/networking/instant-messengers/signal-desktop/default.nix +++ b/pkgs/applications/networking/instant-messengers/signal-desktop/default.nix @@ -24,7 +24,7 @@ let in stdenv.mkDerivation rec { pname = "signal-desktop"; - version = "5.44.1"; # Please backport all updates to the stable channel. + version = "5.45.0"; # Please backport all updates to the stable channel. # All releases have a limited lifetime and "expire" 90 days after the release. # When releases "expire" the application becomes unusable until an update is # applied. The expiration date for the current release can be extracted with: @@ -34,7 +34,7 @@ in stdenv.mkDerivation rec { src = fetchurl { url = "https://updates.signal.org/desktop/apt/pool/main/s/signal-desktop/signal-desktop_${version}_amd64.deb"; - sha256 = "sha256-r9jCN8amX4ipv8V+i2j1CkZRJXun17EFi3wr8yMfXgQ="; + sha256 = "sha256-RqzFUE43wbz8Hw7hXxqqX9iEatjIHe0SbHD1+ieIR34="; }; nativeBuildInputs = [ From dcfb7d8aa2eabeacbe889dca9accc54fadb0d7d6 Mon Sep 17 00:00:00 2001 From: FliegendeWurst <2012gdwu+github@posteo.de> Date: Sat, 4 Jun 2022 22:45:04 +0200 Subject: [PATCH 20/28] marp: add known vulnerability Co-Authored-By: Jan Tojnar --- pkgs/applications/office/marp/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/applications/office/marp/default.nix b/pkgs/applications/office/marp/default.nix index c223fa40cc4b..e7565f49fbda 100644 --- a/pkgs/applications/office/marp/default.nix +++ b/pkgs/applications/office/marp/default.nix @@ -30,6 +30,9 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Markdown presentation writer, powered by Electron"; homepage = "https://yhatt.github.io/marp/"; + knownVulnerabilities = [ + "Remote code execution: https://github.com/yhatt/marp/issues/276" + ]; license = licenses.mit; maintainers = [ maintainers.puffnfresh ]; platforms = [ "x86_64-linux" ]; From f3d83a18996193e9bb13cb9ec5caf89484bd54ab Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Wed, 25 May 2022 09:51:34 +0800 Subject: [PATCH 21/28] qt6: remove all references to aliases (cherry picked from commit 3688fe70f4ddece54a8a468fa90209066675f0e0) --- pkgs/development/libraries/qt-6/modules/qtbase.nix | 4 ++-- pkgs/development/libraries/qt-6/modules/qtwebengine.nix | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/qt-6/modules/qtbase.nix b/pkgs/development/libraries/qt-6/modules/qtbase.nix index f5ca3497a242..bf210633fc4f 100644 --- a/pkgs/development/libraries/qt-6/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-6/modules/qtbase.nix @@ -37,7 +37,7 @@ , libdrm , libdatrie , lttng-ust -, epoxy +, libepoxy , libiconv , dbus , fontconfig @@ -152,7 +152,7 @@ stdenv.mkDerivation rec { xorg.libXdmcp xorg.libXtst xorg.xcbutilcursor - epoxy + libepoxy ] ++ (with unixODBCDrivers; [ psql sqlite diff --git a/pkgs/development/libraries/qt-6/modules/qtwebengine.nix b/pkgs/development/libraries/qt-6/modules/qtwebengine.nix index 88254ab15890..400fe6aba125 100644 --- a/pkgs/development/libraries/qt-6/modules/qtwebengine.nix +++ b/pkgs/development/libraries/qt-6/modules/qtwebengine.nix @@ -63,7 +63,7 @@ , libxslt , lcms2 , re2 -, kerberos +, libkrb5 , enableProprietaryCodecs ? true }: @@ -215,7 +215,7 @@ qtModule rec { # Pipewire pipewire - kerberos + libkrb5 ]; buildInputs = [ From ccbf17612d5acdaae2de386af5539b64493110d3 Mon Sep 17 00:00:00 2001 From: Brian Leung Date: Sat, 28 May 2022 18:11:34 -0700 Subject: [PATCH 22/28] universal-ctags: 5.9.20220220.0 -> 5.9.20220529.0 (cherry picked from commit 06f3bb21cde622fb6ffe08e85253ea3a18a81ef1) --- pkgs/development/tools/misc/universal-ctags/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/misc/universal-ctags/default.nix b/pkgs/development/tools/misc/universal-ctags/default.nix index 240d8a1f10d4..7b097d221262 100644 --- a/pkgs/development/tools/misc/universal-ctags/default.nix +++ b/pkgs/development/tools/misc/universal-ctags/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "universal-ctags"; - version = "5.9.20220220.0"; + version = "5.9.20220529.0"; src = fetchFromGitHub { owner = "universal-ctags"; repo = "ctags"; rev = "p${version}"; - sha256 = "1118iq33snxyw1jk8nwvsl08f3zdainksh0yiapzvg0y5906jjjd"; + sha256 = "sha256-Lu4eYMA5Uf/A8r11W6v7xTAnj0gtCjKQ4aX5IbV0dbo="; }; depsBuildBuild = [ buildPackages.stdenv.cc ]; From 3e7031b70f8ff76a24c781691665056a367011ea Mon Sep 17 00:00:00 2001 From: Brian Leung Date: Sat, 28 May 2022 18:17:45 -0700 Subject: [PATCH 23/28] universal-ctags: set meta.mainProgram (cherry picked from commit 58fabf558bf98a6436674ba75aaaa2b98684c78d) --- pkgs/development/tools/misc/universal-ctags/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/tools/misc/universal-ctags/default.nix b/pkgs/development/tools/misc/universal-ctags/default.nix index 7b097d221262..c3bf856bc9bc 100644 --- a/pkgs/development/tools/misc/universal-ctags/default.nix +++ b/pkgs/development/tools/misc/universal-ctags/default.nix @@ -49,6 +49,7 @@ stdenv.mkDerivation rec { platforms = platforms.unix; # universal-ctags is preferred over emacs's ctags priority = 1; + mainProgram = "ctags"; maintainers = [ maintainers.mimame ]; }; } From f0a7f2ef8b5ba9f421f65aea62632740abcf1e23 Mon Sep 17 00:00:00 2001 From: "Bryan A. S" Date: Sun, 29 May 2022 00:16:28 -0300 Subject: [PATCH 24/28] argocd: 2.3.3 -> 2.3.4 - bump version - add ldflag kubectlVersion, this introduces a new thing to change when upgrading this package (cherry picked from commit 5f45f1cd289f0219642ae0f43f55996fdb6e246d) --- .../networking/cluster/argocd/default.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/networking/cluster/argocd/default.nix b/pkgs/applications/networking/cluster/argocd/default.nix index 9ce9286e610c..3500b1b75542 100644 --- a/pkgs/applications/networking/cluster/argocd/default.nix +++ b/pkgs/applications/networking/cluster/argocd/default.nix @@ -2,19 +2,19 @@ buildGoModule rec { pname = "argocd"; - version = "2.3.3"; + version = "2.3.4"; src = fetchFromGitHub { owner = "argoproj"; repo = "argo-cd"; rev = "v${version}"; - sha256 = "sha256-ChgWqhkzVKhbyEA+g2flWK/WMxur7UHWXJUcLzp9RTE="; + sha256 = "sha256-pWDwmsLCXoK8EzipOPXUdYu75hPm5AIExXmgoA102Dg="; }; vendorSha256 = "sha256-XrIIMnn65Y10KnVTsmw6vLE53Zra1lWNFgklmaj3gF8="; - # Set target as ./cmd per release-cli - # https://github.com/argoproj/argo-cd/blob/master/Makefile#L222 + # Set target as ./cmd per cli-local + # https://github.com/argoproj/argo-cd/blob/master/Makefile#L227 subPackages = [ "cmd" ]; ldflags = @@ -26,6 +26,11 @@ buildGoModule rec { "-X ${package_url}.gitCommit=${src.rev}" "-X ${package_url}.gitTag=${src.rev}" "-X ${package_url}.gitTreeState=clean" + "-X ${package_url}.kubectlVersion=v0.23.1" + # NOTE: Update kubectlVersion when upgrading this package with + # go list -m k8s.io/client-go | head -n 1 | rev | cut -d' ' -f1 | rev + # Per https://github.com/argoproj/argo-cd/blob/master/Makefile#L18 + # Will need a way to automate it :P ]; nativeBuildInputs = [ installShellFiles ]; From 045c345362a5090d53396eb367e3d7501a68bd65 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Sun, 5 Jun 2022 13:23:08 +0100 Subject: [PATCH 25/28] python3Packages.manticore: remove duplicate meta.broken --- pkgs/development/python-modules/manticore/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/development/python-modules/manticore/default.nix b/pkgs/development/python-modules/manticore/default.nix index 1fe290d47e9d..c645a070e4b1 100644 --- a/pkgs/development/python-modules/manticore/default.nix +++ b/pkgs/development/python-modules/manticore/default.nix @@ -132,7 +132,5 @@ buildPythonPackage rec { license = licenses.agpl3Only; platforms = platforms.unix; maintainers = with maintainers; [ arturcygan ]; - # m.c.manticore:WARNING: Manticore is only supported on Linux. Proceed at your own risk! - broken = stdenv.isDarwin; }; } From 5ef70710e242c8da330d92f549b4b579d61aee65 Mon Sep 17 00:00:00 2001 From: Denbeigh Stevens Date: Sat, 4 Jun 2022 19:35:37 -0700 Subject: [PATCH 26/28] noisetorch: 0.11.5 -> 0.12.0 (cherry picked from commit 74ed89f2439f1ccc12da0517fe7a573a4143c9ed) --- pkgs/applications/audio/noisetorch/default.nix | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/pkgs/applications/audio/noisetorch/default.nix b/pkgs/applications/audio/noisetorch/default.nix index 067263032b0d..1015829709eb 100644 --- a/pkgs/applications/audio/noisetorch/default.nix +++ b/pkgs/applications/audio/noisetorch/default.nix @@ -2,20 +2,21 @@ buildGoModule rec { pname = "NoiseTorch"; - version = "0.11.5"; + version = "0.12.0"; src = fetchFromGitHub { - owner = "lawl"; + owner = "noisetorch"; repo = "NoiseTorch"; - rev = version; - sha256 = "sha256-j/6XB3vA5LvTuCxmeB0HONqEDzYg210AWW/h3nCGOD8="; + rev = "v${version}"; + sha256 = "sha256-A6cX1ck47/ZIn9cnV/Ow4CxVFfOX5J0K0Q+B70jCFdQ="; + fetchSubmodules = true; }; vendorSha256 = null; doCheck = false; - ldflags = [ "-X main.version=${version}" "-X main.distribution=nix" ]; + ldflags = [ "-X main.version=${version}" "-X main.distribution=nix" ]; subPackages = [ "." ]; @@ -34,9 +35,10 @@ buildGoModule rec { meta = with lib; { insecure = true; - knownVulnerabilities = [ "https://github.com/lawl/NoiseTorch/releases/tag/0.11.6" ]; + knownVulnerabilities = + lib.optional (lib.versionOlder version "0.12") "https://github.com/noisetorch/NoiseTorch/releases/tag/v0.12.0"; description = "Virtual microphone device with noise supression for PulseAudio"; - homepage = "https://github.com/lawl/NoiseTorch"; + homepage = "https://github.com/noisetorch/NoiseTorch"; license = licenses.gpl3Plus; platforms = platforms.linux; maintainers = with maintainers; [ panaeon lom ]; From 14876f0dab1152018d3a67300ae21f07794b8288 Mon Sep 17 00:00:00 2001 From: zimbatm Date: Mon, 30 May 2022 12:29:16 +0200 Subject: [PATCH 27/28] exiftool: fix mainProgram By default `lib.getExe` and `nix run` assume there is a binary at "$out/bin/$pname" unless "meta.mainProgram" is specified. Since the pname here is "perl5.34.1-Image-ExifTool", pass the "meta.mainProgram". (cherry picked from commit e58688ff18dfcdd452968005e7944c74d3a1acc7) --- pkgs/top-level/perl-packages.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index b51d39157bb7..6f1973d0e737 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -11495,6 +11495,8 @@ let description = "A tool to read, write and edit EXIF meta information"; homepage = "https://exiftool.org/"; + mainProgram = "exiftool"; + longDescription = '' ExifTool is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in a wide From 33736f6dbb43fde9179deef03672e7b9d0826641 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 5 Jun 2022 16:19:55 +0000 Subject: [PATCH 28/28] imagemagick: 7.1.0-36 -> 7.1.0-37 (cherry picked from commit 2badffbd9983350effe3a5fae7e46f2644e26d3d) --- pkgs/applications/graphics/ImageMagick/7.0.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/graphics/ImageMagick/7.0.nix b/pkgs/applications/graphics/ImageMagick/7.0.nix index c7385a3452fc..c63d9d982a0f 100644 --- a/pkgs/applications/graphics/ImageMagick/7.0.nix +++ b/pkgs/applications/graphics/ImageMagick/7.0.nix @@ -45,13 +45,13 @@ in stdenv.mkDerivation rec { pname = "imagemagick"; - version = "7.1.0-36"; + version = "7.1.0-37"; src = fetchFromGitHub { owner = "ImageMagick"; repo = "ImageMagick"; rev = version; - hash = "sha256-fl83O3vVHp12+Vj3WT0NOWe5a6ufmtFlxVlbUhIzfB0="; + hash = "sha256-Okp3oPIAEXl+fTnEw0jufSxcRU6ip+on5/IyGEjzx2E="; }; outputs = [ "out" "dev" "doc" ]; # bin/ isn't really big