From 13e13349bd961fcb85b79bd25a642fe85001178f Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Sun, 23 May 2021 11:37:15 +0200 Subject: [PATCH 01/17] Revert "signal-desktop: Add a Python wrapper to re-encrypt DBs" This reverts commit 45bd7b39a444c904986324b5f7c46ba867612575. The database for users on NixOS 20.09 is still encrypted so we don't need this wrapper for users that upgrade from NixOS 20.09 to 21.05. --- .../signal-desktop/db-reencryption-wrapper.py | 92 ------------------- .../signal-desktop/default.nix | 15 +-- 2 files changed, 1 insertion(+), 106 deletions(-) delete mode 100755 pkgs/applications/networking/instant-messengers/signal-desktop/db-reencryption-wrapper.py diff --git a/pkgs/applications/networking/instant-messengers/signal-desktop/db-reencryption-wrapper.py b/pkgs/applications/networking/instant-messengers/signal-desktop/db-reencryption-wrapper.py deleted file mode 100755 index 8556ee1e4d7..00000000000 --- a/pkgs/applications/networking/instant-messengers/signal-desktop/db-reencryption-wrapper.py +++ /dev/null @@ -1,92 +0,0 @@ -#!@PYTHON@ - -import json -import os -import re -import shlex -import sqlite3 -import subprocess -import sys - - -DB_PATH = os.path.join(os.environ['HOME'], '.config/Signal/sql/db.sqlite') -DB_COPY = os.path.join(os.environ['HOME'], '.config/Signal/sql/db.tmp') -CONFIG_PATH = os.path.join(os.environ['HOME'], '.config/Signal/config.json') - - -def zenity_askyesno(title, text): - args = [ - '@ZENITY@', - '--question', - '--title', - shlex.quote(title), - '--text', - shlex.quote(text) - ] - return subprocess.run(args).returncode == 0 - - -def start_signal(): - os.execvp('@SIGNAL-DESKTOP@', ['@SIGNAL-DESKTOP@'] + sys.argv[1:]) - - -def copy_pragma(name): - result = subprocess.run([ - '@SQLCIPHER@', - DB_PATH, - f"PRAGMA {name};" - ], check=True, capture_output=True).stdout - result = re.search(r'[0-9]+', result.decode()).group(0) - subprocess.run([ - '@SQLCIPHER@', - DB_COPY, - f"PRAGMA key = \"x'{key}'\"; PRAGMA {name} = {result};" - ], check=True, capture_output=True) - - -try: - # Test if DB is encrypted: - con = sqlite3.connect(f'file:{DB_PATH}?mode=ro', uri=True) - cursor = con.cursor() - cursor.execute("SELECT name FROM sqlite_master WHERE type='table';") - con.close() -except: - # DB is encrypted, everything ok: - start_signal() - - -# DB is unencrypted! -answer = zenity_askyesno( - "Error: Signal-Desktop database is not encrypted", - "Should we try to fix this automatically?" - + "You likely want to backup ~/.config/Signal/ first." -) -if not answer: - answer = zenity_askyesno( - "Launch Signal-Desktop", - "DB is unencrypted, should we still launch Signal-Desktop?" - + "Warning: This could result in data loss!" - ) - if not answer: - print('Aborted') - sys.exit(0) - start_signal() - -# Re-encrypt the DB: -with open(CONFIG_PATH) as json_file: - key = json.load(json_file)['key'] -result = subprocess.run([ - '@SQLCIPHER@', - DB_PATH, - f" ATTACH DATABASE '{DB_COPY}' AS signal_db KEY \"x'{key}'\";" - + " SELECT sqlcipher_export('signal_db');" - + " DETACH DATABASE signal_db;" -]).returncode -if result != 0: - print('DB encryption failed') - sys.exit(1) -# Need to copy user_version and schema_version manually: -copy_pragma('user_version') -copy_pragma('schema_version') -os.rename(DB_COPY, DB_PATH) -start_signal() diff --git a/pkgs/applications/networking/instant-messengers/signal-desktop/default.nix b/pkgs/applications/networking/instant-messengers/signal-desktop/default.nix index 0f95d1639e1..ac035335b24 100644 --- a/pkgs/applications/networking/instant-messengers/signal-desktop/default.nix +++ b/pkgs/applications/networking/instant-messengers/signal-desktop/default.nix @@ -10,9 +10,6 @@ , hunspellDicts, spellcheckerLanguage ? null # E.g. "de_DE" # For a full list of available languages: # $ cat pkgs/development/libraries/hunspell/dictionaries.nix | grep "dictFileName =" | awk '{ print $3 }' -, python3 -, gnome -, sqlcipher }: let @@ -115,7 +112,7 @@ in stdenv.mkDerivation rec { # Symlink to bin mkdir -p $out/bin - ln -s $out/lib/Signal/signal-desktop $out/bin/signal-desktop-unwrapped + ln -s $out/lib/Signal/signal-desktop $out/bin/signal-desktop runHook postInstall ''; @@ -140,16 +137,6 @@ in stdenv.mkDerivation rec { patchelf --add-needed ${libpulseaudio}/lib/libpulse.so $out/lib/Signal/resources/app.asar.unpacked/node_modules/ringrtc/build/linux/libringrtc.node ''; - postFixup = '' - # This hack is temporarily required to avoid data-loss for users: - cp ${./db-reencryption-wrapper.py} $out/bin/signal-desktop - substituteInPlace $out/bin/signal-desktop \ - --replace '@PYTHON@' '${python3}/bin/python3' \ - --replace '@ZENITY@' '${gnome.zenity}/bin/zenity' \ - --replace '@SQLCIPHER@' '${sqlcipher}/bin/sqlcipher' \ - --replace '@SIGNAL-DESKTOP@' "$out/bin/signal-desktop-unwrapped" - ''; - # Tests if the application launches and waits for "Link your phone to Signal Desktop": passthru.tests.application-launch = nixosTests.signal-desktop; From 075ab49dc24be2bacafef932b070cdd0973aa517 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sun, 23 May 2021 00:26:16 +0200 Subject: [PATCH 02/17] qtwebengine: only set -webengine-webrtc-pipewire with qt >= 5.15 This fails the build of qt514.qtwebengine otherwise: ``` QMAKEPATH=/nix/store/29n056mi3pji6si51b128pa67b1qr7wq-qtbase-5.14.2-dev:/nix/store/g7wady1f1r23wlmy4q1f3b8j2fj5q2sq-qtdeclarative-dev:/nix/store/xfqnh2pma99915d4gsanls68z1jikcpx-qtsvg-dev:/nix/store/zlnsjdj5yv1ivi1miq49j9gp382byl35-qtlocation-dev:/nix/store/lb7cidi60cabpa7swv51xnss9045vqzi-qtmultimedia-dev:/nix/store/jrk6bcqihxwsszwy6rwy2vnfc2sb4rv9-qtwebchannel-dev qmake PREFIX=/nix/store/pa3jhipp59f6ykh9k8l8z8jf88k52bz8-qtwebengine NIX_OUTPUT_OUT=/nix/store/pa3jhipp59f6ykh9k8l8z8jf88k52bz8-qtwebengine NIX_OUTPUT_DEV=/nix/store/jngs3qilw9iiv97rawb9sb9sd6qdbp2s-qtwebengine-dev NIX_OUTPUT_BIN=/nix/store/91hqv88qvg2wb91lv1h1pd4d8wwrkd5d-qtwebengine-bin NIX_OUTPUT_DOC=/nix/store/jngs3qilw9iiv97rawb9sb9sd6qdbp2s-qtwebengine-dev/share/doc/qt-5.14.2 NIX_OUTPUT_QML=/nix/store/91hqv88qvg2wb91lv1h1pd4d8wwrkd5d-qtwebengine-bin/lib/qt-5.14.2/qml NIX_OUTPUT_PLUGIN=/nix/store/91hqv88qvg2wb91lv1h1pd4d8wwrkd5d-qtwebengine-bin/lib/qt-5.14.2/plugins CONFIG+=release -- -system-ffmpeg -webengine-webrtc-pipewire -proprietary-codecs Info: creating stash file /build/qtwebengine-everywhere-src-5.14.2/.qmake.stash Info: creating cache file /build/qtwebengine-everywhere-src-5.14.2/.qmake.cache ERROR: Unknown command line option '-webengine-webrtc-pipewire'. builder for '/nix/store/g6dvr7789sswmahlxc6zs5pr8k2g5pgy-qtwebengine.drv' failed with exit code 3 ``` Also, only bring in pipewire_0_2 if we enable pipewire support. (cherry picked from commit 4cbb20402a88abee9a68b53a8786df5af87b4101) --- pkgs/development/libraries/qt-5/modules/qtwebengine.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix index 0229d92d9a2..13ab7e35c5a 100644 --- a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix +++ b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix @@ -134,7 +134,7 @@ qtModule { ''; qmakeFlags = [ "--" "-system-ffmpeg" ] - ++ optional stdenv.isLinux "-webengine-webrtc-pipewire" + ++ optional (stdenv.isLinux && (lib.versionAtLeast qtCompatVersion "5.15")) "-webengine-webrtc-pipewire" ++ optional enableProprietaryCodecs "-proprietary-codecs"; propagatedBuildInputs = [ @@ -168,6 +168,7 @@ qtModule { xorg.xrandr libXScrnSaver libXcursor libXrandr xorg.libpciaccess libXtst xorg.libXcomposite xorg.libXdamage libdrm + ] ++ optionals (stdenv.isLinux && (lib.versionAtLeast qtCompatVersion "5.15")) [ # Pipewire pipewire_0_2 ] From b39ac7cf2ba28adf742c427bf93043f3e772213a Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 23 May 2021 00:10:02 +0200 Subject: [PATCH 03/17] php74.extensions.iconv: fix error signalling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The configure script checks whether iconv supports errno. Unfortunately, on PHP < 8, the test program includes $PHP_ICONV_H_PATH, which defaults to FHS path so it fails to build: conftest.c:13:10: fatal error: /usr/include/iconv.h: No such file or directory 13 | #include | ^~~~~~~~~~~~~~~~~~~~~~ That causes the feature check to report a false negative, leading PHP to use a degraded code that returns PHP_ICONV_ERR_UNKNOWN when error occurs, breaking granular error handling in applications. To prevent this, let’s just include . PHP 8 just uses include path so the detection works there: https://github.com/php/php-src/commit/7bd1d703411e1e4b1f663f0cb06af619eea04b42 (cherry picked from commit 024243bac4612c62ef5be676818ed2465edae27f) --- pkgs/top-level/php-packages.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pkgs/top-level/php-packages.nix b/pkgs/top-level/php-packages.nix index 6aa23a22713..af47529f364 100644 --- a/pkgs/top-level/php-packages.nix +++ b/pkgs/top-level/php-packages.nix @@ -322,10 +322,16 @@ lib.makeScope pkgs.newScope (self: with self; { configureFlags = [ "--with-gmp=${gmp.dev}" ]; } { name = "hash"; enable = lib.versionOlder php.version "7.4"; } { name = "iconv"; - configureFlags = if stdenv.isDarwin then - [ "--with-iconv=${libiconv}" ] - else - [ "--with-iconv" ]; + configureFlags = [ + "--with-iconv${lib.optionalString stdenv.isDarwin "=${libiconv}"}" + ]; + patches = lib.optionals (lib.versionOlder php.version "8.0") [ + # Header path defaults to FHS location, preventing the configure script from detecting errno support. + (fetchpatch { + url = "https://github.com/fossar/nix-phps/raw/263861a8c9bdafd7abe44db6db4ef0179643680c/pkgs/iconv-header-path.patch"; + sha256 = "7GHnEUu+hcsQ4h3itDwk6p46ZKfib9JZ2XpWlXrdn6E="; + }) + ]; doCheck = false; } { name = "imap"; buildInputs = [ uwimap openssl pam pcre' ]; From 6514fc8f6b61bffba68c9e41b7bde3f9dc1eff0e Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sat, 22 May 2021 19:03:56 +0100 Subject: [PATCH 04/17] arpack: fix libblas.dylib's path on darwin (cherry picked from commit 1241d9fae3451b824506277174b6053a379f4db7) --- pkgs/development/libraries/science/math/arpack/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/libraries/science/math/arpack/default.nix b/pkgs/development/libraries/science/math/arpack/default.nix index 23e44bf28b0..a26a3bb6d8d 100644 --- a/pkgs/development/libraries/science/math/arpack/default.nix +++ b/pkgs/development/libraries/science/math/arpack/default.nix @@ -46,6 +46,10 @@ stdenv.mkDerivation rec { export OMP_NUM_THREADS=2 ''; + postFixup = lib.optionalString stdenv.isDarwin '' + install_name_tool -change libblas.dylib ${blas}/lib/libblas.dylib $out/lib/libarpack.dylib + ''; + meta = { homepage = "https://github.com/opencollab/arpack-ng"; description = '' From b7e6b86c7492c7f265197f48f8bf4f7a3cafa5a4 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sat, 22 May 2021 19:05:14 +0100 Subject: [PATCH 05/17] igraph: fix libblas.dylib's path on darwin (cherry picked from commit 73df171f26f426d1e2201e04ad0a7fa556eca17b) --- pkgs/development/libraries/igraph/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/libraries/igraph/default.nix b/pkgs/development/libraries/igraph/default.nix index 29e12cc8541..0c668525e92 100644 --- a/pkgs/development/libraries/igraph/default.nix +++ b/pkgs/development/libraries/igraph/default.nix @@ -96,6 +96,10 @@ stdenv.mkDerivation rec { cp -r doc "$out/share" ''; + postFixup = lib.optionalString stdenv.isDarwin '' + install_name_tool -change libblas.dylib ${blas}/lib/libblas.dylib $out/lib/libigraph.dylib + ''; + meta = with lib; { description = "The network analysis package"; homepage = "https://igraph.org/"; From 7375cb1c0edfdbfb9ea76f02136f24001527fdfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6gler?= Date: Sun, 23 May 2021 13:33:41 +0200 Subject: [PATCH 06/17] neovide: Fix build caused by llvm multi output --- pkgs/applications/editors/neovim/neovide/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/editors/neovim/neovide/default.nix b/pkgs/applications/editors/neovim/neovide/default.nix index b4c12304a9d..c0a54487329 100644 --- a/pkgs/applications/editors/neovim/neovide/default.nix +++ b/pkgs/applications/editors/neovim/neovide/default.nix @@ -66,7 +66,7 @@ rustPlatform.buildRustPackage rec { SKIA_OFFLINE_NINJA_COMMAND = "${ninja}/bin/ninja"; SKIA_OFFLINE_GN_COMMAND = "${gn}/bin/gn"; - LIBCLANG_PATH = "${llvmPackages.libclang}/lib"; + LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib"; # test needs a valid fontconfig file FONTCONFIG_FILE = makeFontsConf { fontDirectories = [ ]; }; From 1c1e5094d95f3525cb1ffffd38ab44b363757e8f Mon Sep 17 00:00:00 2001 From: Guillaume Girol Date: Sun, 23 May 2021 12:18:14 +0000 Subject: [PATCH 07/17] Merge pull request #123902 from hyperfekt/mount-pstore-quiet nixos/filesystems: condition mount-pstore.service on unmounted /sys/fs/pstore (cherry picked from commit d7555732bc8bb8a2acb50fd4ecba96c825b4f21e) Reason: activation throws an error from failing to start the unit --- nixos/modules/tasks/filesystems.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/tasks/filesystems.nix b/nixos/modules/tasks/filesystems.nix index 24f71d29427..065d6cc95d1 100644 --- a/nixos/modules/tasks/filesystems.nix +++ b/nixos/modules/tasks/filesystems.nix @@ -321,6 +321,7 @@ in RemainAfterExit = true; }; unitConfig = { + ConditionPathIsMountPoint = "!/sys/fs/pstore"; ConditionVirtualization = "!container"; DefaultDependencies = false; # needed to prevent a cycle }; From 35f631618fb6c0f82016e201ee9de4a4915a2cc3 Mon Sep 17 00:00:00 2001 From: Thomas Gerbet Date: Sun, 23 May 2021 12:00:44 +0200 Subject: [PATCH 08/17] redis: 6.2.1 -> 6.2.3 Fixes CVE-2021-29477 and CVE-2021-29478. https://github.com/redis/redis/blob/6.2.3/00-RELEASENOTES (cherry picked from commit 0d1b14161acc0c79b0712ea4f4c476684bfa41a3) --- pkgs/servers/nosql/redis/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/nosql/redis/default.nix b/pkgs/servers/nosql/redis/default.nix index 48dcbb8f813..5856d0d17b5 100644 --- a/pkgs/servers/nosql/redis/default.nix +++ b/pkgs/servers/nosql/redis/default.nix @@ -5,20 +5,22 @@ stdenv.mkDerivation rec { pname = "redis"; - version = "6.2.1"; + version = "6.2.3"; src = fetchurl { url = "https://download.redis.io/releases/${pname}-${version}.tar.gz"; - sha256 = "sha256-zSIlBQEsziCyVoL8qTHsk70hrpLLSr/nQs97dqqQdSA="; + sha256 = "sha256-mO19UytelnH13wglu3Hw83SDoWVGNkBJOExj24dkUSs="; }; # Cross-compiling fixes configurePhase = '' + runHook preConfigure ${lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' # This fixes hiredis, which has the AR awkwardly coded. # Probably a good candidate for a patch upstream. makeFlagsArray+=('STLIB_MAKE_CMD=${stdenv.cc.targetPrefix}ar rcs $(STLIBNAME)') ''} + runHook postConfigure ''; nativeBuildInputs = [ pkg-config ]; From 40b3403d595be6487c96e8b6ddb38fdd951aab08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 11 May 2021 16:02:37 +0200 Subject: [PATCH 09/17] dpdk: 20.05 -> 21.02 (cherry picked from commit a443ea7d0142ac3f8c27a40a3dcc5723cb49d62e) --- pkgs/os-specific/linux/dpdk/default.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pkgs/os-specific/linux/dpdk/default.nix b/pkgs/os-specific/linux/dpdk/default.nix index 38dac78b3fe..acb3da11fd1 100644 --- a/pkgs/os-specific/linux/dpdk/default.nix +++ b/pkgs/os-specific/linux/dpdk/default.nix @@ -8,14 +8,14 @@ let mod = kernel != null; - + dpdkVersion = "21.02"; in stdenv.mkDerivation rec { - name = "dpdk-${version}" + lib.optionalString mod "-${kernel.version}"; - version = "20.05"; + pname = "dpdk"; + version = "${dpdkVersion}" + lib.optionalString mod "-${kernel.version}"; src = fetchurl { - url = "https://fast.dpdk.org/rel/dpdk-${version}.tar.xz"; - sha256 = "0h0xv2zwb91b9n29afg5ihn06a8q28in64hag2f112kc19f79jj8"; + url = "https://fast.dpdk.org/rel/dpdk-${dpdkVersion}.tar.xz"; + sha256 = "sha256-CZJKKoJVGqKZeKNoYYT4oQX1L1ZAsb4of1QLLJHpSJs=="; }; nativeBuildInputs = [ @@ -25,6 +25,7 @@ in stdenv.mkDerivation rec { pkg-config python3 python3.pkgs.sphinx + python3.pkgs.pyelftools ]; buildInputs = [ jansson @@ -42,9 +43,12 @@ in stdenv.mkDerivation rec { ''; mesonFlags = [ + "-Dtests=false" "-Denable_docs=true" "-Denable_kmods=${lib.boolToString mod}" ] + # kni kernel driver is currently not compatble with 5.11 + ++ lib.optional (mod && kernel.kernelOlder "5.11") "-Ddisable_drivers=kni" ++ lib.optional (!shared) "-Ddefault_library=static" ++ lib.optional stdenv.isx86_64 "-Dmachine=nehalem" ++ lib.optional mod "-Dkernel_dir=${placeholder "kmod"}/lib/modules/${kernel.modDirVersion}"; From ee76949241d97236cd096ffc360757258909a5b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 24 May 2021 08:22:01 +0200 Subject: [PATCH 10/17] spdk: 20.04.1 -> 21.04 (cherry picked from commit 00a7a0f609352bd077b6c4d5dab88bddb70458fc) --- pkgs/development/libraries/spdk/default.nix | 23 +++++---------------- 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/pkgs/development/libraries/spdk/default.nix b/pkgs/development/libraries/spdk/default.nix index 755c65d2fa4..eec08f3cc2d 100644 --- a/pkgs/development/libraries/spdk/default.nix +++ b/pkgs/development/libraries/spdk/default.nix @@ -13,31 +13,17 @@ , openssl }: -let - dpdk-compat-patch = fetchurl { - url = "https://review.spdk.io/gerrit/plugins/gitiles/spdk/spdk/+/6acb9a58755856fb9316baf9dbbb7239dc6b9446%5E%21/?format=TEXT"; - sha256 = "18q0956fkjw19r29hp16x4pygkfv01alj9cld2wlqqyfgp41nhn0"; - }; -in stdenv.mkDerivation rec { +stdenv.mkDerivation rec { pname = "spdk"; - version = "20.04.1"; + version = "21.04"; src = fetchFromGitHub { owner = "spdk"; repo = "spdk"; rev = "v${version}"; - sha256 = "ApMyGamPrMalzZLbVkJlcwatiB8dOJmoxesdjkWZElk="; + sha256 = "sha256-Xmmgojgtt1HwTqG/1ZOJVo1BcdAH0sheu40d73OJ68w="; }; - patches = [ - ./spdk-dpdk-meson.patch - # https://review.spdk.io/gerrit/c/spdk/spdk/+/3134 - (fetchpatch { - url = "https://github.com/spdk/spdk/commit/c954b5b722c5c163774d3598458ff726c48852ab.patch"; - sha256 = "1n149hva5qxmpr0nmav10nya7zklafxi136f809clv8pag84g698"; - }) - ]; - nativeBuildInputs = [ python3 ]; @@ -48,12 +34,13 @@ in stdenv.mkDerivation rec { postPatch = '' patchShebangs . - base64 -d ${dpdk-compat-patch} | patch -p1 ''; configureFlags = [ "--with-dpdk=${dpdk}" ]; NIX_CFLAGS_COMPILE = "-mssse3"; # Necessary to compile. + # otherwise does not find strncpy when compiling + NIX_LDFLAGS = "-lbsd"; meta = with lib; { description = "Set of libraries for fast user-mode storage"; From c443ac73f23b412be4e976bf4b29a055d9953962 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 24 May 2021 08:40:49 +0200 Subject: [PATCH 11/17] pktgen: 19.12.0 -> 21.05.0 (cherry picked from commit 9d002b110e74cb73b0e08029088d1f034c23f80a) --- pkgs/os-specific/linux/pktgen/configure.patch | 17 ------------- pkgs/os-specific/linux/pktgen/default.nix | 24 +++++++++++-------- 2 files changed, 14 insertions(+), 27 deletions(-) delete mode 100644 pkgs/os-specific/linux/pktgen/configure.patch diff --git a/pkgs/os-specific/linux/pktgen/configure.patch b/pkgs/os-specific/linux/pktgen/configure.patch deleted file mode 100644 index b4933313a51..00000000000 --- a/pkgs/os-specific/linux/pktgen/configure.patch +++ /dev/null @@ -1,17 +0,0 @@ -1. librte_process_info does not exist. -2. lua5.3 library is liblua. -3. app/meson.build uses undeclared drivers_install_subdir. ---- a/lib/common/meson.build -+++ b/lib/common/meson.build -@@ -34,1 +34,1 @@ --libs = ['eal', 'kvargs', 'cmdline', 'process_info'] -+libs = ['eal', 'kvargs', 'cmdline'] ---- a/lib/lua/meson.build -+++ b/lib/lua/meson.build -@@ -31 +31 @@ endforeach --ext_deps += cc.find_library('lua5.3', required: true) -+ext_deps += cc.find_library('lua', required: true) ---- a/meson_options.txt -+++ b/meson_options.txt -@@ -0,0 +1,1 @@ -+option('drivers_install_subdir', type: 'string', value: '') diff --git a/pkgs/os-specific/linux/pktgen/default.nix b/pkgs/os-specific/linux/pktgen/default.nix index 47ca709c44b..5a1a56ab691 100644 --- a/pkgs/os-specific/linux/pktgen/default.nix +++ b/pkgs/os-specific/linux/pktgen/default.nix @@ -1,29 +1,33 @@ -{ stdenv, lib, fetchurl, meson, ninja, pkg-config +{ stdenv, lib, fetchFromGitHub, meson, ninja, pkg-config , dpdk, libbsd, libpcap, lua5_3, numactl, util-linux , gtk2, which, withGtk ? false }: stdenv.mkDerivation rec { pname = "pktgen"; - version = "19.12.0"; + version = "21.05.0"; - src = fetchurl { - url = "http://dpdk.org/browse/apps/pktgen-dpdk/snapshot/${pname}-${version}.tar.xz"; - sha256 = "1clfviz1qa4hysslcg6i29vsxwl9f6j1y7zf9wwx9br3yq08x956"; + src = fetchFromGitHub { + owner = "pktgen"; + repo = "Pktgen-DPDK"; + rev = "pktgen-${version}"; + sha256 = "sha256-7lLDtbd14olEHO+1BuI6KTEUNRM/zAyRXau/OZbYbGA="; }; nativeBuildInputs = [ meson ninja pkg-config ]; - buildInputs = - [ dpdk libbsd libpcap lua5_3 numactl which ] - ++ lib.optionals withGtk [gtk2]; + buildInputs = [ + dpdk libbsd libpcap lua5_3 numactl which + ] ++ lib.optionals withGtk [ + gtk2 + ]; RTE_SDK = dpdk; GUI = lib.optionalString withGtk "true"; NIX_CFLAGS_COMPILE = "-msse3"; - - patches = [ ./configure.patch ]; + # requires symbols from this file + NIX_LDFLAGS = "-lrte_net_bond"; postPatch = '' substituteInPlace lib/common/lscpu.h --replace /usr/bin/lscpu ${util-linux}/bin/lscpu From 0c67f4a204d18c6320277213f138fb189094acae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 24 May 2021 08:52:11 +0200 Subject: [PATCH 12/17] odp-dpdk: 1.22.0.0_DPDK_18.11 -> 1.27.0.0_DPDK_19.11 (cherry picked from commit b50d58d9884bcd9216376e0f2c8f8f096572e7bf) --- pkgs/os-specific/linux/odp-dpdk/default.nix | 26 +++++++-------------- 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/pkgs/os-specific/linux/odp-dpdk/default.nix b/pkgs/os-specific/linux/odp-dpdk/default.nix index b5610d35dde..5e2284b489c 100644 --- a/pkgs/os-specific/linux/odp-dpdk/default.nix +++ b/pkgs/os-specific/linux/odp-dpdk/default.nix @@ -1,21 +1,21 @@ { lib, stdenv, fetchurl, autoreconfHook, pkg-config -, dpdk, libconfig, libpcap, numactl, openssl, zlib, libbsd, libelf, jansson +, dpdk, libbpf, libconfig, libpcap, numactl, openssl, zlib, libbsd, libelf, jansson }: let - dpdk_18_11 = dpdk.overrideAttrs (old: rec { - version = "18.11.5"; + dpdk_19_11 = dpdk.overrideAttrs (old: rec { + version = "19.11"; src = fetchurl { url = "https://fast.dpdk.org/rel/dpdk-${version}.tar.xz"; - sha256 = "1n6nfaj7703l19jcw540lm8avni48hj9q1rq4mfp8b8gd4zjprj0"; + sha256 = "sha256-RnEzlohDZ3uxwna7dKNFiqfAAswh4pXFHjvWVJexEqs="; }; }); in stdenv.mkDerivation rec { pname = "odp-dpdk"; - version = "1.22.0.0_DPDK_18.11"; + version = "1.27.0.0_DPDK_19.11"; src = fetchurl { url = "https://git.linaro.org/lng/odp-dpdk.git/snapshot/${pname}-${version}.tar.gz"; - sha256 = "1m8xhmfjqlj2gkkigq5ka3yh0xgzrcpfpaxp1pnh8d1g99094vbx"; + sha256 = "sha256-/4m2NqnEXyenNUrCq3c2ozJzPWFFs/Qp7MAVm9B2biA="; }; nativeBuildInputs = [ @@ -23,7 +23,7 @@ in stdenv.mkDerivation rec { pkg-config ]; buildInputs = [ - dpdk_18_11 + dpdk_19_11 libconfig libpcap numactl @@ -32,19 +32,9 @@ in stdenv.mkDerivation rec { libbsd libelf jansson + libbpf ]; - NIX_CFLAGS_COMPILE = [ "-Wno-error=address-of-packed-member" ]; - - # for some reason, /build/odp-dpdk-1.22.0.0_DPDK_18.11/lib/.libs ends up in all binaries, - # while it should be $out/lib instead. - # prepend rpath with the proper location, the /build will get removed during rpath shrinking - preFixup = '' - for prog in $out/bin/*; do - patchelf --set-rpath $out/lib:`patchelf --print-rpath $prog` $prog - done - ''; - # binaries will segfault otherwise dontStrip = true; From 2bffd5fef9dde067696c0c1768ab10684ba89fde Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sun, 23 May 2021 20:59:33 +0200 Subject: [PATCH 13/17] phpExtensions.dom: fix build ZHF #122042 (cherry picked from commit 53951c0c1444e500585205e8b2510270b2ad188f) --- pkgs/top-level/php-packages.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/php-packages.nix b/pkgs/top-level/php-packages.nix index af47529f364..0f61402bb05 100644 --- a/pkgs/top-level/php-packages.nix +++ b/pkgs/top-level/php-packages.nix @@ -235,7 +235,7 @@ lib.makeScope pkgs.newScope (self: with self; { (dep: "mkdir -p ext; ln -s ${dep.dev}/include ext/${dep.extensionName}") internalDeps} ''; - checkPhase = "echo n | make test"; + checkPhase = "runHook preCheck; echo n | make test; runHook postCheck"; outputs = [ "out" "dev" ]; installPhase = '' mkdir -p $out/lib/php/extensions @@ -270,6 +270,20 @@ lib.makeScope pkgs.newScope (self: with self; { { name = "dba"; } { name = "dom"; buildInputs = [ libxml2 ]; + patches = [ + # https://github.com/php/php-src/pull/7030 + (fetchpatch { + url = "https://github.com/php/php-src/commit/4cc261aa6afca2190b1b74de39c3caa462ec6f0b.patch"; + sha256 = "11qsdiwj1zmpfc2pgh6nr0sn7qa1nyjg4jwf69cgwnd57qfjcy4k"; + excludes = [ "ext/dom/tests/bug43364.phpt" "ext/dom/tests/bug80268.phpt" ]; + }) + ]; + # For some reason `patch` fails to remove these files correctly. + # Since `postPatch` is already used in `mkExtension`, we have to make it here. + preCheck = '' + rm tests/bug43364.phpt + rm tests/bug80268.phpt + ''; configureFlags = [ "--enable-dom" ] # Required to build on darwin. ++ lib.optionals (lib.versionOlder php.version "7.4") [ "--with-libxml-dir=${libxml2.dev}" ]; } From 0cebbdf687b05f3e686b7e1f17a58aefed1f3483 Mon Sep 17 00:00:00 2001 From: regnat Date: Mon, 24 May 2021 10:51:02 +0200 Subject: [PATCH 14/17] Revert "nixos/nix-daemon: fix sandbox-paths option" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit aeeee447bcc181d57a19d348f857326f4e1959fe. (cherry picked from commit 113823669b9b71fff84bc592d1fd6022635c28eb) Signed-off-by: Domen Kožar --- nixos/modules/services/misc/nix-daemon.nix | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix index df745fa7168..133e96da0ec 100644 --- a/nixos/modules/services/misc/nix-daemon.nix +++ b/nixos/modules/services/misc/nix-daemon.nix @@ -12,8 +12,6 @@ let isNix23 = versionAtLeast nixVersion "2.3pre"; - isNix24 = versionAtLeast nixVersion "2.4pre"; - makeNixBuildUser = nr: { name = "nixbld${toString nr}"; value = { @@ -43,11 +41,7 @@ let max-jobs = ${toString (cfg.maxJobs)} cores = ${toString (cfg.buildCores)} sandbox = ${if (builtins.isBool cfg.useSandbox) then boolToString cfg.useSandbox else cfg.useSandbox} - ${if isNix24 then '' - sandbox-paths = ${toString cfg.sandboxPaths} - '' else '' - extra-sandbox-paths = ${toString cfg.sandboxPaths} - ''} + extra-sandbox-paths = ${toString cfg.sandboxPaths} substituters = ${toString cfg.binaryCaches} trusted-substituters = ${toString cfg.trustedBinaryCaches} trusted-public-keys = ${toString cfg.binaryCachePublicKeys} From baedf2c7854a488753f762add54efa36da1ceff3 Mon Sep 17 00:00:00 2001 From: Gabriel Ebner Date: Mon, 24 May 2021 12:39:15 +0200 Subject: [PATCH 15/17] ccls: fix libc++ header path (cherry picked from commit eef236e8efdf99e4e4d61815aa9889e5b64e6bc3) --- pkgs/development/tools/misc/ccls/default.nix | 12 +++--------- pkgs/development/tools/misc/ccls/wrapper | 13 +++++-------- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/pkgs/development/tools/misc/ccls/default.nix b/pkgs/development/tools/misc/ccls/default.nix index 986363b83ef..bd753016fc8 100644 --- a/pkgs/development/tools/misc/ccls/default.nix +++ b/pkgs/development/tools/misc/ccls/default.nix @@ -21,17 +21,11 @@ stdenv.mkDerivation rec { cmakeFlagsArray+=(-DCMAKE_CXX_FLAGS="-fvisibility=hidden -fno-rtti") ''; + clang = llvmPackages.clang; shell = runtimeShell; + postFixup = '' - # We need to tell ccls where to find the standard library headers. - - standard_library_includes="\\\"-isystem\\\", \\\"${lib.getDev stdenv.cc.libc}/include\\\"" - standard_library_includes+=", \\\"-isystem\\\", \\\"${llvmPackages.libcxx}/include/c++/v1\\\"" - export standard_library_includes - - wrapped=".ccls-wrapped" - export wrapped - + export wrapped=".ccls-wrapped" mv $out/bin/ccls $out/bin/$wrapped substituteAll ${./wrapper} $out/bin/ccls chmod --reference=$out/bin/$wrapped $out/bin/ccls diff --git a/pkgs/development/tools/misc/ccls/wrapper b/pkgs/development/tools/misc/ccls/wrapper index 155e6d4f647..c92bc6b40d1 100644 --- a/pkgs/development/tools/misc/ccls/wrapper +++ b/pkgs/development/tools/misc/ccls/wrapper @@ -1,12 +1,9 @@ #! @shell@ -e -initString="--init={\"clang\":{\"extraArgs\": [@standard_library_includes@" - -if [ "${NIX_CFLAGS_COMPILE}" != "" ]; then - read -a cflags_array <<< ${NIX_CFLAGS_COMPILE} - initString+=$(printf ', \"%s\"' "${cflags_array[@]}") -fi - -initString+="]}}" +printf -v extraArgs ',\"%s\"' \ + $(cat @clang@/nix-support/libc-cflags \ + @clang@/nix-support/libcxx-cxxflags) \ + ${NIX_CFLAGS_COMPILE} +initString="--init={\"clang\":{\"extraArgs\":[${extraArgs:1}]}}" exec -a "$0" "@out@/bin/@wrapped@" "${initString}" "$@" From b3a9a3e19f1deb1e5a295af49e7f4423a956c50c Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Mon, 24 May 2021 19:43:18 -0400 Subject: [PATCH 16/17] terraform-providers.hydra: 0.1.0 -> 0.1.1 (cherry picked from commit 0e91b031f6558a7e8623ccacedfedfa458531ed6) --- .../networking/cluster/terraform-providers/providers.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/cluster/terraform-providers/providers.json b/pkgs/applications/networking/cluster/terraform-providers/providers.json index 2ff13a9a593..994b212d9df 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/providers.json +++ b/pkgs/applications/networking/cluster/terraform-providers/providers.json @@ -440,10 +440,10 @@ "owner": "DeterminateSystems", "provider-source-address": "registry.terraform.io/DeterminateSystems/hydra", "repo": "terraform-provider-hydra", - "rev": "v0.1.0", - "sha256": "18c9j54fy1f2sfz317rlv8z7fb18bpc1a0baw1bgl72x5sgil5kv", + "rev": "v0.1.1", + "sha256": "093al7crxgjimy4nnxvb1xy9p7yc0c7gf2rgvql7y3y3n8bz5q1b", "vendorSha256": null, - "version": "0.1.0" + "version": "0.1.1" }, "ibm": { "owner": "IBM-Cloud", From befda3568c5dacfce5e347c862086a60ea22f765 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Mon, 24 May 2021 12:04:06 -0700 Subject: [PATCH 17/17] exempi: disable tests for i686 Unable to find boost unittest framework. Tests are still ran on the x86_64 platform (cherry picked from commit 266f6ee63a562016b28d9a155fc4d84006d746d0) --- pkgs/development/libraries/exempi/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/exempi/default.nix b/pkgs/development/libraries/exempi/default.nix index 356959b429f..332de1595a0 100644 --- a/pkgs/development/libraries/exempi/default.nix +++ b/pkgs/development/libraries/exempi/default.nix @@ -11,12 +11,14 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-boost=${boost.dev}" + ] ++ lib.optionals (!doCheck) [ + "--enable-unittest=no" ]; buildInputs = [ expat zlib boost ] ++ lib.optionals stdenv.isDarwin [ libiconv darwin.apple_sdk.frameworks.CoreServices ]; - doCheck = stdenv.isLinux; + doCheck = stdenv.isLinux && stdenv.is64bit; meta = with lib; { description = "An implementation of XMP (Adobe's Extensible Metadata Platform)";