From 3f11d845d0ec8b76aea2ae245b989e42de3b5681 Mon Sep 17 00:00:00 2001 From: natsukium Date: Tue, 4 Jun 2024 01:12:36 +0900 Subject: [PATCH 01/25] python311Packages.opentelemetry: fix version These packages are in the same repository as `opentelemetry-api`, but their versions are synchronized with `opentelemetry-instrumentation` in another repository. (cherry picked from commit d349f8dac2dee452398a582c2924aa573f92a6c9) --- .../opentelemetry-exporter-prometheus/default.nix | 5 ++++- .../opentelemetry-semantic-conventions/default.nix | 5 ++++- .../python-modules/opentelemetry-test-utils/default.nix | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/opentelemetry-exporter-prometheus/default.nix b/pkgs/development/python-modules/opentelemetry-exporter-prometheus/default.nix index 933006554d86..ef0d80d4b65c 100644 --- a/pkgs/development/python-modules/opentelemetry-exporter-prometheus/default.nix +++ b/pkgs/development/python-modules/opentelemetry-exporter-prometheus/default.nix @@ -4,6 +4,7 @@ pythonOlder, hatchling, opentelemetry-api, + opentelemetry-instrumentation, opentelemetry-sdk, opentelemetry-test-utils, prometheus-client, @@ -13,7 +14,9 @@ buildPythonPackage { inherit (opentelemetry-api) src; pname = "opentelemetry-exporter-prometheus"; - version = "0.44b0"; + # This package is in the same repository as `opentelemetry-api`, + # but its version is synchronized with `opentelemetry-instrumentation` in another repository. + version = opentelemetry-instrumentation.version; pyproject = true; disabled = pythonOlder "3.8"; diff --git a/pkgs/development/python-modules/opentelemetry-semantic-conventions/default.nix b/pkgs/development/python-modules/opentelemetry-semantic-conventions/default.nix index cadd60634ab2..f4001c4f13b6 100644 --- a/pkgs/development/python-modules/opentelemetry-semantic-conventions/default.nix +++ b/pkgs/development/python-modules/opentelemetry-semantic-conventions/default.nix @@ -4,13 +4,16 @@ pythonOlder, hatchling, opentelemetry-api, + opentelemetry-instrumentation, pytestCheckHook, }: buildPythonPackage { inherit (opentelemetry-api) src; pname = "opentelemetry-semantic-conventions"; - version = "0.44b0"; + # This package is in the same repository as `opentelemetry-api`, + # but its version is synchronized with `opentelemetry-instrumentation` in another repository. + version = opentelemetry-instrumentation.version; pyproject = true; disabled = pythonOlder "3.8"; diff --git a/pkgs/development/python-modules/opentelemetry-test-utils/default.nix b/pkgs/development/python-modules/opentelemetry-test-utils/default.nix index 64cca503a407..b6af8dea4f4f 100644 --- a/pkgs/development/python-modules/opentelemetry-test-utils/default.nix +++ b/pkgs/development/python-modules/opentelemetry-test-utils/default.nix @@ -5,13 +5,16 @@ asgiref, hatchling, opentelemetry-api, + opentelemetry-instrumentation, opentelemetry-sdk, }: buildPythonPackage { inherit (opentelemetry-api) src; pname = "opentelemetry-test-utils"; - version = "0.44b0"; + # This package is in the same repository as `opentelemetry-api`, + # but its version is synchronized with `opentelemetry-instrumentation` in another repository. + version = opentelemetry-instrumentation.version; pyproject = true; disabled = pythonOlder "3.8"; From 5c4c81839f64c02480cad32b455f865026c1b08a Mon Sep 17 00:00:00 2001 From: DontEatOreo <57304299+DontEatOreo@users.noreply.github.com> Date: Thu, 30 May 2024 20:45:51 +0300 Subject: [PATCH 02/25] rewind-ai: init at 1.5284-15284.1-dcd0176-20240504 (cherry picked from commit 8d6ab1262d2a139eabeb9cbab730c8aee2fb1f58) --- pkgs/by-name/re/rewind-ai/package.nix | 82 +++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 pkgs/by-name/re/rewind-ai/package.nix diff --git a/pkgs/by-name/re/rewind-ai/package.nix b/pkgs/by-name/re/rewind-ai/package.nix new file mode 100644 index 000000000000..cfd1db484671 --- /dev/null +++ b/pkgs/by-name/re/rewind-ai/package.nix @@ -0,0 +1,82 @@ +{ + lib, + stdenvNoCC, + fetchzip, + writeShellApplication, + curl, + gawk, + xmlstarlet, + common-updater-scripts, +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "rewind-ai"; + # Example version with explanation + # 1.5284 (Base version) + # 15284.1 (build number) + # dcd0176 (commit hash) + # 20240504 (pub date) + version = "1.5284-15284.1-dcd0176-20240504"; + + src = fetchzip { + url = + let + buildNumber = lib.elemAt (lib.splitString "-" finalAttrs.version) 1; + commitHash = lib.elemAt (lib.splitString "-" finalAttrs.version) 2; + in + "https://updates.rewind.ai/builds/main/b${buildNumber}-main-${commitHash}.zip"; + hash = "sha256-Y7iAYHH/msZoXFzAZHJb6YoDz5fwMPHJx1kg7TqP5Gw="; + }; + + installPhase = '' + runHook preInstall + + mkdir -p "$out/Applications/Rewind.app" + cp -R . "$out/Applications/Rewind.app" + + runHook postInstall + ''; + + # Example response to use when modifing the script: https://pastebin.com/raw/90qU3n6H + # There is a real harsh limit on update checks, so DO NOT send any unnecessary update checks + # Wait at least 3 days since the last pub_date (you will find the date at the end of the version number) + # Example: 20240504 would be 2024/05/04, and that would mean that we want to check no earlier than on 2024/05/07 for any updates + passthru.updateScript = lib.getExe (writeShellApplication { + name = "${finalAttrs.pname}-update-script"; + runtimeInputs = [ + curl + gawk + xmlstarlet + common-updater-scripts + ]; + text = '' + xml_get () { + echo "$update_xml" | xmlstarlet sel -t -v "$1" + } + + update_url="https://updates.rewind.ai/appcasts/main.xml" + + update_xml=$(curl -s "$update_url") + + version_base=$(xml_get "/rss/channel/item/sparkle:shortVersionString") + url=$(xml_get "/rss/channel/item/enclosure/@url") + pub_date=$(xml_get "/rss/channel/item/pubDate") + commit_id=$(echo "$url" | awk -F '-|\\.' '{ print $(NF - 1) }') + build_number=$(xml_get "/rss/channel/item/sparkle:version") + formatted_pub_date=$(date -d "$pub_date" +"%Y%m%d") + + full_version="''${version_base}-''${build_number}-''${commit_id}-''${formatted_pub_date}" + update-source-version "rewind-ai" "$full_version" --version-key=version --file=./pkgs/by-name/re/rewind-ai/package.nix --print-changes + ''; + }); + + meta = { + changelog = "https://www.rewind.ai/changelog"; + description = "Rewind is a personalized AI powered by everything you've seen, said, or heard"; + homepage = "https://www.rewind.ai/"; + license = lib.licenses.unfree; + maintainers = with lib.maintainers; [ donteatoreo ]; + platforms = [ "aarch64-darwin" ]; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + }; +}) From d105e0e5fede500d6655f25210e68bffe8baa893 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20=C5=BDlender?= Date: Thu, 9 May 2024 19:11:20 +0200 Subject: [PATCH 03/25] deterministic-uname: Overridable platform Some packages rely on `uname` to configure the host target which breaks cross-compilation. We can have more control over the evaluation of `uname` by placing `deterministic-uname` into the package's `nativeBuildInputs`. However the current `deterministic-uname` is hardcoded to `buildPlatform`. This PR introduces a build argument `forPlatform` to `deterministic-uname` which allows you to override the platform it reports. Example: ```nix deterministic-uname.override { forPlatform = stdenv.hostPlatform; } ``` (cherry picked from commit 2ed51a3ff0a69a6d2e6359a2bcf5da70f7313789) --- .../deterministic-uname/default.nix | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/pkgs/build-support/deterministic-uname/default.nix b/pkgs/build-support/deterministic-uname/default.nix index 6d150557aa9d..9d07a4b6c4e2 100644 --- a/pkgs/build-support/deterministic-uname/default.nix +++ b/pkgs/build-support/deterministic-uname/default.nix @@ -5,6 +5,7 @@ , coreutils , getopt , modDirVersion ? "" +, forPlatform ? stdenv.buildPlatform }: substituteAll { @@ -17,8 +18,8 @@ substituteAll { inherit coreutils getopt; - uSystem = if stdenv.buildPlatform.uname.system != null then stdenv.buildPlatform.uname.system else "unknown"; - inherit (stdenv.buildPlatform.uname) processor; + uSystem = if forPlatform.uname.system != null then forPlatform.uname.system else "unknown"; + inherit (forPlatform.uname) processor; # uname -o # maybe add to lib/systems/default.nix uname attrset @@ -26,9 +27,9 @@ substituteAll { # https://stackoverflow.com/questions/61711186/where-does-host-operating-system-in-uname-c-comes-from # https://github.com/coreutils/gnulib/blob/master/m4/host-os.m4 operatingSystem = - if stdenv.buildPlatform.isLinux + if forPlatform.isLinux then "GNU/Linux" - else if stdenv.buildPlatform.isDarwin + else if forPlatform.isDarwin then "Darwin" # darwin isn't in host-os.m4 so where does this come from? else "unknown"; @@ -42,11 +43,12 @@ substituteAll { mainProgram = "uname"; longDescription = '' This package provides a replacement for `uname` whose output depends only - on `stdenv.buildPlatform`. It is meant to be used from within derivations. - Many packages' build processes run `uname` at compile time and embed its - output into the result of the build. Since `uname` calls into the kernel, - and the Nix sandbox currently does not intercept these calls, builds made - on different kernels will produce different results. + on `stdenv.buildPlatform`, or a configurable `forPlatform`. It is meant + to be used from within derivations. Many packages' build processes run + `uname` at compile time and embed its output into the result of the build. + Since `uname` calls into the kernel, and the Nix sandbox currently does + not intercept these calls, builds made on different kernels will produce + different results. ''; license = [ licenses.mit ]; maintainers = with maintainers; [ artturin ]; From f7675025cb85cf3c4ae55f7feb1285631905a11a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20=C5=BDlender?= Date: Sun, 26 May 2024 10:11:39 +0200 Subject: [PATCH 04/25] deterministic-host-uname: init (cherry picked from commit b0e8337c3aed748de1383aba68df971ed3ff0962) --- pkgs/top-level/all-packages.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a94a887b1c96..6dc8d84a87dc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3656,6 +3656,8 @@ with pkgs; deterministic-uname = callPackage ../build-support/deterministic-uname { }; + deterministic-host-uname = deterministic-uname.override { forPlatform = stdenv.hostPlatform; }; + dfmt = callPackage ../tools/text/dfmt { }; diopser = callPackage ../applications/audio/diopser { }; From 25175b401d9c47094c943a1425361247e312c045 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo?= Date: Thu, 6 Jun 2024 10:11:27 -0300 Subject: [PATCH 05/25] lxqt.qtermwidget: add prior version 1.4.0 for compatibility with qt5 (cherry picked from commit d735378802a3e3929dbd18a170ea7847176cee87) --- pkgs/desktops/lxqt/default.nix | 5 +++++ pkgs/desktops/lxqt/qtermwidget/default.nix | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/pkgs/desktops/lxqt/default.nix b/pkgs/desktops/lxqt/default.nix index 8418652dbc38..3efd526cb6bd 100644 --- a/pkgs/desktops/lxqt/default.nix +++ b/pkgs/desktops/lxqt/default.nix @@ -75,6 +75,11 @@ let libfm-qt = libfm-qt_1_4; inherit (pkgs.libsForQt5) qtbase qtsvg qttools libdbusmenu; }; + qtermwidget_1_4 = callPackage ./qtermwidget { + version = "1.4.0"; + lxqt-build-tools = lxqt-build-tools_0_13; + inherit (pkgs.libsForQt5) qtbase qttools; + }; preRequisitePackages = [ kdePackages.kwindowsystem # provides some QT plugins needed by lxqt-panel diff --git a/pkgs/desktops/lxqt/qtermwidget/default.nix b/pkgs/desktops/lxqt/qtermwidget/default.nix index 35c5b2c3f641..fb0c63460df1 100644 --- a/pkgs/desktops/lxqt/qtermwidget/default.nix +++ b/pkgs/desktops/lxqt/qtermwidget/default.nix @@ -7,17 +7,21 @@ , lxqt-build-tools , wrapQtAppsHook , gitUpdater +, version ? "2.0.0" }: stdenv.mkDerivation rec { pname = "qtermwidget"; - version = "2.0.0"; + inherit version; src = fetchFromGitHub { owner = "lxqt"; repo = pname; rev = version; - hash = "sha256-kZS6D/wSJFRt/+Afq0zCCmNnJPpFT+1hd4zVPc+rJsE="; + hash = { + "1.4.0" = "sha256-wYUOqAiBjnupX1ITbFMw7sAk42V37yDz9SrjVhE4FgU="; + "2.0.0" = "sha256-kZS6D/wSJFRt/+Afq0zCCmNnJPpFT+1hd4zVPc+rJsE="; + }."${version}"; }; nativeBuildInputs = [ From e1605087aa2d1efa014bf087dce422bfacdcab84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo?= Date: Thu, 6 Jun 2024 09:36:37 -0300 Subject: [PATCH 06/25] virt-manager-qt: 0.72.97 -> 0.72.99 Diff: https://github.com/F1ash/qt-virt-manager/compare/0.72.97...0.72.99 (cherry picked from commit 4d3ee6f521217301bbf60868d263fb3244cb9380) --- .../virtualization/virt-manager/qt.nix | 14 +++----------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/pkgs/applications/virtualization/virt-manager/qt.nix b/pkgs/applications/virtualization/virt-manager/qt.nix index 840ada805d75..103d0a3f4fbb 100644 --- a/pkgs/applications/virtualization/virt-manager/qt.nix +++ b/pkgs/applications/virtualization/virt-manager/qt.nix @@ -1,4 +1,4 @@ -{ mkDerivation, lib, fetchFromGitHub, fetchpatch, cmake, pkg-config +{ mkDerivation, lib, fetchFromGitHub, cmake, pkg-config , qtbase, qtmultimedia, qtsvg, qttools, krdc , libvncserver, libvirt, pcre, pixman, qtermwidget, spice-gtk, spice-protocol , libselinux, libsepol, util-linux @@ -6,13 +6,13 @@ mkDerivation rec { pname = "virt-manager-qt"; - version = "0.72.97"; + version = "0.72.99"; src = fetchFromGitHub { owner = "F1ash"; repo = "qt-virt-manager"; rev = version; - sha256 = "0b2bx7ah35glcsiv186sc9cqdrkhg1vs9jz036k9byk61np0cb1i"; + hash = "sha256-1aXlGlK+YPOe2X51xycWvSu8YC9uCywyL6ItiScFA04="; }; cmakeFlags = [ @@ -20,14 +20,6 @@ mkDerivation rec { "-DQTERMWIDGET_INCLUDE_DIRS=${qtermwidget}/include/qtermwidget5" ]; - patches = [ - (fetchpatch { - # drop with next update - url = "https://github.com/F1ash/qt-virt-manager/commit/0d338b037ef58c376d468c1cd4521a34ea181edd.patch"; - sha256 = "1wjqyc5wsnxfwwjzgqjr9hcqhd867amwhjd712qyvpvz8x7p2s24"; - }) - ]; - buildInputs = [ qtbase qtmultimedia qtsvg krdc libvirt libvncserver pcre pixman qtermwidget spice-gtk spice-protocol diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a94a887b1c96..e3fb482952d5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -35209,7 +35209,7 @@ with pkgs; }; virt-manager-qt = libsForQt5.callPackage ../applications/virtualization/virt-manager/qt.nix { - qtermwidget = lxqt.qtermwidget; + qtermwidget = lxqt.qtermwidget_1_4; }; virtscreen = callPackage ../tools/admin/virtscreen { }; From e409023534b666bb17931e8e38fff133be88e0d3 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 24 May 2024 09:32:53 +0200 Subject: [PATCH 07/25] python312Packages.libtmux: 0.36.0 -> 0.37.0 Diff: https://github.com/tmux-python/libtmux/compare/refs/tags/v0.37.0...v0.37.0 Changelog: https://github.com/tmux-python/libtmux/raw/v0.37.0/CHANGES Signed-off-by: Otavio Salvador (cherry picked from commit 83c47d19ff752fc868a18e6878d74e3981710868) --- .../python-modules/libtmux/default.nix | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/libtmux/default.nix b/pkgs/development/python-modules/libtmux/default.nix index abd82ba2f25e..0bb5cb5cda28 100644 --- a/pkgs/development/python-modules/libtmux/default.nix +++ b/pkgs/development/python-modules/libtmux/default.nix @@ -1,33 +1,34 @@ { lib, stdenv, - fetchFromGitHub, buildPythonPackage, + fetchFromGitHub, + ncurses, poetry-core, + procps, pytest-rerunfailures, pytestCheckHook, - procps, tmux, - ncurses, }: buildPythonPackage rec { pname = "libtmux"; - version = "0.36.0"; + version = "0.37.0"; pyproject = true; src = fetchFromGitHub { owner = "tmux-python"; - repo = pname; + repo = "libtmux"; rev = "refs/tags/v${version}"; - hash = "sha256-oJ2IGaPFMKA/amUEPZi1UO9vZtjPNQg3SIFjQWzUeSE="; + hash = "sha256-I0E6zkfQ6mx2svCaXEgKPhrrog3iLgXZ4E3CMMxPkIA="; }; postPatch = '' - sed -i '/addopts/d' pyproject.toml + substituteInPlace pyproject.toml \ + --replace-fail '"--doctest-docutils-modules",' "" ''; - nativeBuildInputs = [ poetry-core ]; + build-system = [ poetry-core ]; nativeCheckInputs = [ procps @@ -53,7 +54,6 @@ buildPythonPackage rec { disabledTestPaths = lib.optionals stdenv.isDarwin [ "tests/test_test.py" - "tests/legacy_api/test_test.py" ]; pythonImportsCheck = [ "libtmux" ]; From 6235a4bf223a014fc6092fc1abb0483922813631 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Mon, 3 Jun 2024 13:30:30 +0000 Subject: [PATCH 08/25] tmuxp: 1.46.0 -> 1.47.0 (cherry picked from commit 655f0bf07ba2f9fb374f4ceee651569147e62c50) --- pkgs/tools/misc/tmuxp/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/tmuxp/default.nix b/pkgs/tools/misc/tmuxp/default.nix index f0352cdda360..6964cb5ace4e 100644 --- a/pkgs/tools/misc/tmuxp/default.nix +++ b/pkgs/tools/misc/tmuxp/default.nix @@ -2,8 +2,8 @@ let pname = "tmuxp"; - version = "1.46.0"; - hash = "sha256-+aXpsB4mjw9sZLalv3knW8okP+mh2P/nbZCiCwa3UBU="; + version = "1.47.0"; + hash = "sha256-HYY6CEUPpZVvVK9kV4Ehw4wGk5YfIVSkZ0+qqf6Nz4c="; in python3Packages.buildPythonApplication { inherit pname version; From 038dd25af13bbf6e335eb5ccdc4f08b2e4a6b430 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Pitucha?= Date: Thu, 6 Jun 2024 21:34:26 +1000 Subject: [PATCH 09/25] libxmi: fix darwin build Library requires C std 89 to compile. Clang defaults to newer these days. (cherry picked from commit 42ccbf2dea5a261ad4a5a5347199e7a6d4e88446) --- pkgs/development/libraries/libxmi/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/libxmi/default.nix b/pkgs/development/libraries/libxmi/default.nix index 2d2a0089c443..2446df52a2bc 100644 --- a/pkgs/development/libraries/libxmi/default.nix +++ b/pkgs/development/libraries/libxmi/default.nix @@ -9,6 +9,8 @@ stdenv.mkDerivation rec { sha256 = "03d4ikh29l38rl1wavb0icw7m5pp7yilnv7bb2k8qij1dinsymlx"; }; + CFLAGS = "-std=gnu89"; + # For the x86_64 GNU/Linux arch to be recognized by 'configure' preConfigure = "cp ${libtool}/share/libtool/build-aux/config.sub ."; From 628548bd756a573db2582b828952bb787a6771e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Pitucha?= Date: Thu, 6 Jun 2024 22:38:19 +1000 Subject: [PATCH 10/25] python311Packages.rtslib: set platform to Linux This library is linux specific. (cherry picked from commit de8e7e2f8f5ca035defd263fd2541daf79bc15c6) --- pkgs/development/python-modules/rtslib/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/python-modules/rtslib/default.nix b/pkgs/development/python-modules/rtslib/default.nix index 23ec07248994..5be26edebbfa 100644 --- a/pkgs/development/python-modules/rtslib/default.nix +++ b/pkgs/development/python-modules/rtslib/default.nix @@ -30,5 +30,6 @@ buildPythonPackage rec { mainProgram = "targetctl"; homepage = "https://github.com/open-iscsi/rtslib-fb"; license = licenses.asl20; + platforms = platforms.linux; }; } From 7abe305ff9694e4c633d98a14a7b75ccc6e831bd Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Thu, 6 Jun 2024 22:58:58 +0200 Subject: [PATCH 11/25] php81: 8.1.28 -> 8.1.29 diff: https://github.com/php/php-src/compare/php-8.1.28..php-8.1.29 changelog: https://github.com/php/php-src/blob/PHP-8.1.29/NEWS Fix: CVE-2024-4577, CVE-2024-5458, CVE-2024-2408, CVE-2024-5585 (cherry picked from commit f7dea8a84a7188e5e5d4f7c8e6fa440480e5ead0) --- pkgs/development/interpreters/php/8.1.nix | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/pkgs/development/interpreters/php/8.1.nix b/pkgs/development/interpreters/php/8.1.nix index b31d08fbda3a..a6eed4d4772b 100644 --- a/pkgs/development/interpreters/php/8.1.nix +++ b/pkgs/development/interpreters/php/8.1.nix @@ -1,17 +1,9 @@ -{ callPackage, fetchpatch, ... }@_args: +{ callPackage, ... }@_args: let - base = callPackage ./generic.nix ((removeAttrs _args [ "fetchpatch" ]) // { - version = "8.1.28"; - hash = "sha256-i+RQCW4BU8R9dThOfdWVzIl/HVPOAGBwjOlYm8wxQe4="; - extraPatches = [ - # Fix build with libxml 2.12+. - # Patch from https://github.com/php/php-src/commit/0a39890c967aa57225bb6bdf4821aff7a3a3c082 - (fetchpatch { - url = "https://github.com/php/php-src/commit/0a39890c967aa57225bb6bdf4821aff7a3a3c082.patch"; - hash = "sha256-HvpTL7aXO9gr4glFdhqUWQPrG8TYTlvbNINq33M3zS0="; - }) - ]; + base = callPackage ./generic.nix (_args // { + version = "8.1.29"; + hash = "sha256-h6YDEyY/L1M/GA5xknLKXkfNmITU7DyTcgGY6v+uCCc="; }); in base.withExtensions ({ all, ... }: with all; ([ From 497f9dafc3969acdf76bcc737951ff968a71bd35 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Thu, 6 Jun 2024 23:00:00 +0200 Subject: [PATCH 12/25] php82: 8.2.19 -> 8.2.20 diff: https://github.com/php/php-src/compare/php-8.2.19..php-8.2.20 changelog: https://github.com/php/php-src/blob/PHP-8.2.20/NEWS Fix: CVE-2024-4577, CVE-2024-5458, CVE-2024-2408, CVE-2024-5585 (cherry picked from commit 68b4e2b8112c8d1dc3b7a0ed5942dead05a4b157) --- pkgs/development/interpreters/php/8.2.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/php/8.2.nix b/pkgs/development/interpreters/php/8.2.nix index a63f1391616d..e50bdfd13741 100644 --- a/pkgs/development/interpreters/php/8.2.nix +++ b/pkgs/development/interpreters/php/8.2.nix @@ -2,8 +2,8 @@ let base = callPackage ./generic.nix (_args // { - version = "8.2.19"; - hash = "sha256-PBj3zlG3x7JreX4flwedOGswNH6wToF/XmyOmydeKmo="; + version = "8.2.20"; + hash = "sha256-Xexvphx7nEeqHXZma+ZR8mQu0rz2zYY4xX41cc4qrGE="; }); in base.withExtensions ({ all, ... }: with all; ([ From 3a2960050885debbd29671696829ff974212e2cc Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Thu, 6 Jun 2024 23:02:02 +0200 Subject: [PATCH 13/25] php83: 8.3.7 -> 8.3.8 diff: https://github.com/php/php-src/compare/php-8.3.7..php-8.3.8 changelog: https://github.com/php/php-src/blob/PHP-8.3.8/NEWS Fix: CVE-2024-4577, CVE-2024-5458, CVE-2024-2408, CVE-2024-5585 (cherry picked from commit 3b58ac5892203e264d7d66bbf866615b90762cf2) --- pkgs/development/interpreters/php/8.3.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/php/8.3.nix b/pkgs/development/interpreters/php/8.3.nix index 1da9841f7894..ae4ad6e949b1 100644 --- a/pkgs/development/interpreters/php/8.3.nix +++ b/pkgs/development/interpreters/php/8.3.nix @@ -2,8 +2,8 @@ let base = callPackage ./generic.nix (_args // { - version = "8.3.7"; - hash = "sha256-AcIM3hxaVpZlGHXtIvUHhJZ5+6dA+MQhYWt9Q9f3l9o="; + version = "8.3.8"; + hash = "sha256-9KbLAFrhF6uobCBEkyz1Y4maLpd6wJeBqnSyFh3cVjs="; }); in base.withExtensions ({ all, ... }: with all; ([ From 27aa34dce3095d5c6200d932ea73c3c9ee387910 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Pitucha?= Date: Thu, 6 Jun 2024 21:25:25 +1000 Subject: [PATCH 14/25] cpcfs: fix darwin build This code is written in gnu89. (cherry picked from commit d04c804ad999f38ab21508b4f84f5272eaaf7654) --- pkgs/tools/filesystems/cpcfs/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/tools/filesystems/cpcfs/default.nix b/pkgs/tools/filesystems/cpcfs/default.nix index 3b1d54ba427c..654a88961440 100644 --- a/pkgs/tools/filesystems/cpcfs/default.nix +++ b/pkgs/tools/filesystems/cpcfs/default.nix @@ -16,6 +16,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper ncurses readline ronn ]; + env.NIX_CFLAGS_COMPILE = "-std=gnu89"; + postPatch = '' substituteInPlace Makefile \ --replace '-ltermcap' '-lncurses' \ From 9fb1639dbe37c8bd779731c87edbeacc63db2523 Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Wed, 5 Jun 2024 12:05:46 +1000 Subject: [PATCH 15/25] go_1_21: 1.21.10 -> 1.21.11 Changelog: https://go.dev/doc/devel/release#go1.21 (cherry picked from commit c06c5c6f919b02f176e91574a5bc41c504911037) --- pkgs/development/compilers/go/1.21.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/go/1.21.nix b/pkgs/development/compilers/go/1.21.nix index 4d9982f2b265..335161623300 100644 --- a/pkgs/development/compilers/go/1.21.nix +++ b/pkgs/development/compilers/go/1.21.nix @@ -47,11 +47,11 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "go"; - version = "1.21.10"; + version = "1.21.11"; src = fetchurl { url = "https://go.dev/dl/go${finalAttrs.version}.src.tar.gz"; - hash = "sha256-kA4K/okAwe5lqKjE8MWjygLc+FwdHLE6ZSviLCE5k5Q="; + hash = "sha256-Qq7pvytpVsdaetaqPwpRtYIf/qxX9aLnM6LW6uHm2dI="; }; strictDeps = true; From a3e71b2a9d67478dd05b2e10a8d3799a90be0e5f Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Fri, 7 Jun 2024 11:36:52 +0200 Subject: [PATCH 16/25] lomiri.lomiri-filemanager-app: init at 1.0.4 (cherry picked from commit 7f084b0fe1ec8daef5c77fe76d1407b57e4389bb) --- .../lomiri-filemanager-app/default.nix | 140 ++++++++++++++++++ pkgs/desktops/lomiri/default.nix | 1 + 2 files changed, 141 insertions(+) create mode 100644 pkgs/desktops/lomiri/applications/lomiri-filemanager-app/default.nix diff --git a/pkgs/desktops/lomiri/applications/lomiri-filemanager-app/default.nix b/pkgs/desktops/lomiri/applications/lomiri-filemanager-app/default.nix new file mode 100644 index 000000000000..dddbbc5a6fb3 --- /dev/null +++ b/pkgs/desktops/lomiri/applications/lomiri-filemanager-app/default.nix @@ -0,0 +1,140 @@ +{ + stdenv, + lib, + fetchFromGitLab, + fetchpatch, + gitUpdater, + biometryd, + cmake, + content-hub, + gettext, + lomiri-thumbnailer, + lomiri-ui-extras, + lomiri-ui-toolkit, + pkg-config, + python3, + qtbase, + qtdeclarative, + samba, + wrapQtAppsHook, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "lomiri-filemanager-app"; + version = "1.0.4"; + + src = fetchFromGitLab { + owner = "ubports"; + repo = "development/apps/lomiri-filemanager-app"; + rev = "v${finalAttrs.version}"; + hash = "sha256-vjGCTfXoqul1S7KUJXG6JwgZOc2etXWsdKbyQ/V3abA="; + }; + + patches = [ + # This sets the *wrong* domain, but at least it sets *some* domain. + # Remove when version > 1.0.4 + (fetchpatch { + name = "0001-lomiri-filemanager-app-Set-a-gettext-domain.patch"; + url = "https://gitlab.com/ubports/development/apps/lomiri-filemanager-app/-/commit/b310434d2c25a3b446d3d975f3755eb473a833e8.patch"; + hash = "sha256-gzFFzZCIxedMGW4fp6sonnHj/HmwqdqU5fvGhXUsSOI="; + }) + + # Set the *correct* domain. + # Remove when version > 1.0.4 + (fetchpatch { + name = "0002-lomiri-filemanager-app-Fix-gettext-domain.patch"; + url = "https://gitlab.com/ubports/development/apps/lomiri-filemanager-app/-/commit/2bb19aeef2baba8d12df1e4976becc08d7cf341d.patch"; + hash = "sha256-wreOMMvBjf316N/XJv3VfI5f5N/VFiEraeadtgRStjA="; + }) + + # Bind domain to locale dir + # Remove when https://gitlab.com/ubports/development/apps/lomiri-filemanager-app/-/merge_requests/112 merged & in release + (fetchpatch { + name = "0003-lomiri-filemanager-app-Call-i18n.bindtextdomain.patch"; + url = "https://gitlab.com/ubports/development/apps/lomiri-filemanager-app/-/commit/ac0ab681c52c691d464cf94707b013b39675ad2d.patch"; + hash = "sha256-mwpcHwMT2FcNC6KIZNuSWU/bA8XP8rEQKHn7t5m6npM="; + }) + + # Stop using deprecated qt5_use_modules + # Remove when https://gitlab.com/ubports/development/apps/lomiri-filemanager-app/-/merge_requests/113 merged & in release + (fetchpatch { + name = "0004-lomiri-filemanager-app-Stop-using-qt5_use_modules.patch"; + url = "https://gitlab.com/ubports/development/apps/lomiri-filemanager-app/-/commit/c2bfe927b16e660bf4730371b1e61e442e034780.patch"; + hash = "sha256-wPOZP2FOaacEGj4SMS5Q/TO+/L11Qz7NTux4kA86Bcs="; + }) + + # Use pkg-config for smbclient flags + # Remove when https://gitlab.com/ubports/development/apps/lomiri-filemanager-app/-/merge_requests/115 merged & in release + (fetchpatch { + name = "0005-lomiri-filemanager-app-Get-smbclient-flags-via-pkg-config.patch"; + url = "https://gitlab.com/ubports/development/apps/lomiri-filemanager-app/-/commit/aa791da5999719724e0b0592765e8fa2962305c6.patch"; + hash = "sha256-fFAYKBR28ym/n7fhP9O6VE2owarLxK8cN9QeExHFbtU="; + }) + ]; + + postPatch = '' + # Use correct QML install path, don't pull in autopilot test code (we can't run that system) + # Remove absolute paths from desktop file, https://github.com/NixOS/nixpkgs/issues/308324 + substituteInPlace CMakeLists.txt \ + --replace-fail 'qmake -query QT_INSTALL_QML' 'echo ${placeholder "out"}/${qtbase.qtQmlPrefix}' \ + --replace-fail 'add_subdirectory(tests)' '#add_subdirectory(tests)' \ + --replace-fail 'ICON ''${CMAKE_INSTALL_PREFIX}/''${DATA_DIR}/''${ICON_FILE}' 'ICON lomiri-filemanager-app' \ + --replace-fail 'SPLASH ''${CMAKE_INSTALL_PREFIX}/''${DATA_DIR}/''${SPLASH_FILE}' 'SPLASH lomiri-app-launch/splash/lomiri-filemanager-app.svg' + + # In case this ever gets run, at least point it to a correct-ish path + substituteInPlace tests/autopilot/CMakeLists.txt \ + --replace-fail 'python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"' 'echo "${placeholder "out"}/${python3.sitePackages}/lomiri_filemanager_app"' + ''; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + gettext + pkg-config + wrapQtAppsHook + ]; + + buildInputs = [ + qtbase + qtdeclarative + samba + + # QML + biometryd + content-hub + lomiri-thumbnailer + lomiri-ui-extras + lomiri-ui-toolkit + ]; + + cmakeFlags = [ + (lib.cmakeBool "INSTALL_TESTS" false) + (lib.cmakeBool "CLICK_MODE" false) + ]; + + # No tests we can actually run (just autopilot) + doCheck = false; + + postInstall = '' + # Some misc files don't get installed to the correct paths for us + mkdir -p $out/share/{content-hub/peers,icons/hicolor/scalable/apps,lomiri-app-launch/splash} + ln -s $out/share/lomiri-filemanager-app/content-hub.json $out/share/content-hub/peers/lomiri-filemanager-app + ln -s $out/share/lomiri-filemanager-app/filemanager.svg $out/share/icons/hicolor/scalable/apps/lomiri-filemanager-app.svg + ln -s $out/share/lomiri-filemanager-app/splash.svg $out/share/lomiri-app-launch/splash/lomiri-filemanager-app.svg + ''; + + passthru = { + updateScript = gitUpdater { rev-prefix = "v"; }; + }; + + meta = { + description = "File Manager application for Ubuntu Touch devices"; + homepage = "https://gitlab.com/ubports/development/apps/lomiri-filemanager-app"; + changelog = "https://gitlab.com/ubports/development/apps/lomiri-filemanager-app/-/blob/v${finalAttrs.version}/ChangeLog"; + license = lib.licenses.gpl3Only; + mainProgram = "lomiri-filemanager-app"; + maintainers = lib.teams.lomiri.members; + platforms = lib.platforms.linux; + }; +}) diff --git a/pkgs/desktops/lomiri/default.nix b/pkgs/desktops/lomiri/default.nix index 76e0351e5a07..03d8e9451bbb 100644 --- a/pkgs/desktops/lomiri/default.nix +++ b/pkgs/desktops/lomiri/default.nix @@ -9,6 +9,7 @@ let in { #### Core Apps lomiri = callPackage ./applications/lomiri { }; + lomiri-filemanager-app = callPackage ./applications/lomiri-filemanager-app { }; lomiri-system-settings-unwrapped = callPackage ./applications/lomiri-system-settings { }; lomiri-system-settings-security-privacy = callPackage ./applications/lomiri-system-settings/plugins/lomiri-system-settings-security-privacy.nix { }; lomiri-system-settings = callPackage ./applications/lomiri-system-settings/wrapper.nix { }; From e0fc7d81b4472497cf70e92a0811d8303e530dc2 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Fri, 7 Jun 2024 11:37:49 +0200 Subject: [PATCH 17/25] tests/lomiri-filemanager-app: init (cherry picked from commit 4a495ec755c826f6b23147a6a77dd2148c934f18) --- nixos/tests/all-tests.nix | 1 + nixos/tests/lomiri-filemanager-app.nix | 48 +++++++++++++++++++ .../lomiri-filemanager-app/default.nix | 2 + 3 files changed, 51 insertions(+) create mode 100644 nixos/tests/lomiri-filemanager-app.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 8146a9b86026..5b965bc5d25d 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -516,6 +516,7 @@ in { lxd-image-server = handleTest ./lxd-image-server.nix {}; #logstash = handleTest ./logstash.nix {}; lomiri = handleTest ./lomiri.nix {}; + lomiri-filemanager-app = runTest ./lomiri-filemanager-app.nix; lomiri-system-settings = handleTest ./lomiri-system-settings.nix {}; lorri = handleTest ./lorri/default.nix {}; maddy = discoverTests (import ./maddy { inherit handleTest; }); diff --git a/nixos/tests/lomiri-filemanager-app.nix b/nixos/tests/lomiri-filemanager-app.nix new file mode 100644 index 000000000000..de42c9d15089 --- /dev/null +++ b/nixos/tests/lomiri-filemanager-app.nix @@ -0,0 +1,48 @@ +{ pkgs, lib, ... }: +{ + name = "lomiri-filemanager-app-standalone"; + meta.maintainers = lib.teams.lomiri.members; + + nodes.machine = + { config, pkgs, ... }: + { + imports = [ ./common/x11.nix ]; + + services.xserver.enable = true; + + environment = { + systemPackages = with pkgs.lomiri; [ + suru-icon-theme + lomiri-filemanager-app + ]; + variables = { + UITK_ICON_THEME = "suru"; + }; + }; + + i18n.supportedLocales = [ "all" ]; + + fonts.packages = with pkgs; [ + # Intended font & helps with OCR + ubuntu_font_family + ]; + }; + + enableOCR = true; + + testScript = '' + machine.wait_for_x() + + with subtest("lomiri filemanager launches"): + machine.execute("lomiri-filemanager-app >&2 &") + machine.wait_for_text(r"(filemanager.ubports|alice|items|directories|files|folder)") + machine.screenshot("lomiri-filemanager_open") + + machine.succeed("pkill -f lomiri-filemanager-app") + + with subtest("lomiri filemanager localisation works"): + machine.execute("env LANG=de_DE.UTF-8 lomiri-filemanager-app >&2 &") + machine.wait_for_text(r"(Elemente|Verzeichnisse|Dateien|Ordner)") + machine.screenshot("lomiri-filemanager_localised") + ''; +} diff --git a/pkgs/desktops/lomiri/applications/lomiri-filemanager-app/default.nix b/pkgs/desktops/lomiri/applications/lomiri-filemanager-app/default.nix index dddbbc5a6fb3..fa91e1531bf2 100644 --- a/pkgs/desktops/lomiri/applications/lomiri-filemanager-app/default.nix +++ b/pkgs/desktops/lomiri/applications/lomiri-filemanager-app/default.nix @@ -4,6 +4,7 @@ fetchFromGitLab, fetchpatch, gitUpdater, + nixosTests, biometryd, cmake, content-hub, @@ -125,6 +126,7 @@ stdenv.mkDerivation (finalAttrs: { ''; passthru = { + tests.vm = nixosTests.lomiri-filemanager-app; updateScript = gitUpdater { rev-prefix = "v"; }; }; From 225cdd883af1628592dfdee1568eaf763221eeaf Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Sat, 1 Jun 2024 21:04:30 +0200 Subject: [PATCH 18/25] nixos/lomiri: Add file manager (cherry picked from commit 6477cb49a5fd4e6bd2e15bad2f7e19f953f5d4f9) --- nixos/modules/services/desktop-managers/lomiri.nix | 1 + nixos/tests/lomiri.nix | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/desktop-managers/lomiri.nix b/nixos/modules/services/desktop-managers/lomiri.nix index 214ec17e0dc4..c9444c946653 100644 --- a/nixos/modules/services/desktop-managers/lomiri.nix +++ b/nixos/modules/services/desktop-managers/lomiri.nix @@ -22,6 +22,7 @@ in { libusermetrics lomiri lomiri-download-manager + lomiri-filemanager-app lomiri-schemas # exposes some required dbus interfaces lomiri-session # wrappers to properly launch the session lomiri-sounds diff --git a/nixos/tests/lomiri.nix b/nixos/tests/lomiri.nix index 99f04a303be3..e9134a202cd1 100644 --- a/nixos/tests/lomiri.nix +++ b/nixos/tests/lomiri.nix @@ -268,7 +268,7 @@ in { machine.screenshot("settings_content-hub_peers") # Select Morph as content source - mouse_click(300, 100) + mouse_click(370, 100) # Expect Morph to be brought into the foreground, with its Downloads page open machine.wait_for_text("No downloads") From e64e41dc29628ae34df7d63c7542130e00147a67 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Fri, 31 May 2024 22:11:59 +0200 Subject: [PATCH 19/25] lomiri.lomiri-app-launch: Inject /run/current-system/sw/bin into PATH LAL manages desktop file parsing for various parts of the Lomiri environment. It also handles turning them into SystemD services tracked in the background. And due to how things work one, it's code is also SystemD-launched by itself. When we package applications with desktop files, we don't want the Exec values to be absolute, so we patch out absolute paths. Without absolute paths, PATH is expected to have the path to the executables. But our PATHs don't always contain i.e. /run/current-system/sw/bin. Services launched by SystemD are one such instance. If LAL code is run under SystemD's restricted reduced PATH, then it fails to find the requested executables. This is what happens to content-hub, and it causes all transfer requests to be met with an immediate "could not launch peer"-like error, and a transfer being stuck halfway. To work around this (I wouldn't call this a real solution?), patch LAL code to: - also propagate whatever PATH it currently *does* have to its launched applications - postfix the PATH it has with /run/current-system/sw/bin, to give it a decent fallback These changes allow for lomiri-filemanager-app to be launched via a content-hub request from lomiri-system-settings (i.e. the background selection). (cherry picked from commit af1d2bd13a27e39eb306fe206ce0389c06c0e9b9) --- .../2001-Inject-current-system-PATH.patch | 59 +++++++++++++++++++ .../development/lomiri-app-launch/default.nix | 3 + 2 files changed, 62 insertions(+) create mode 100644 pkgs/desktops/lomiri/development/lomiri-app-launch/2001-Inject-current-system-PATH.patch diff --git a/pkgs/desktops/lomiri/development/lomiri-app-launch/2001-Inject-current-system-PATH.patch b/pkgs/desktops/lomiri/development/lomiri-app-launch/2001-Inject-current-system-PATH.patch new file mode 100644 index 000000000000..86bf90085d7a --- /dev/null +++ b/pkgs/desktops/lomiri/development/lomiri-app-launch/2001-Inject-current-system-PATH.patch @@ -0,0 +1,59 @@ +From e4fe87427f24aa9b506c15c0f73f298e8909aabe Mon Sep 17 00:00:00 2001 +From: OPNA2608 +Date: Fri, 31 May 2024 21:31:46 +0200 +Subject: [PATCH] Inject current-system PATH + +--- + liblomiri-app-launch/jobs-systemd.cpp | 16 ++++++++++++++++ + liblomiri-app-launch/jobs-systemd.h | 1 + + 2 files changed, 17 insertions(+) + +diff --git a/liblomiri-app-launch/jobs-systemd.cpp b/liblomiri-app-launch/jobs-systemd.cpp +index e9be801..246bea8 100644 +--- a/liblomiri-app-launch/jobs-systemd.cpp ++++ b/liblomiri-app-launch/jobs-systemd.cpp +@@ -574,6 +574,20 @@ void SystemD::copyEnvByPrefix(const std::string& prefix, std::list>& env) ++{ ++ std::string newPath { "/run/current-system/sw/bin" }; ++ char* oldPath = getenv("PATH"); ++ if (oldPath != NULL && oldPath[0] != '\0') ++ { ++ newPath.insert(0, 1, ':'); ++ newPath.insert(0, oldPath); ++ } ++ setenv("PATH", newPath.c_str(), true); ++ copyEnv("PATH", env); ++} ++ + std::shared_ptr SystemD::launch( + const AppID& appId, + const std::string& job, +@@ -625,6 +639,8 @@ std::shared_ptr SystemD::launch( + + copyEnv("DISPLAY", env); + ++ setupNixosPath(env); ++ + for (const auto& prefix : {"DBUS_", "MIR_", "LOMIRI_APP_LAUNCH_"}) + { + copyEnvByPrefix(prefix, env); +diff --git a/liblomiri-app-launch/jobs-systemd.h b/liblomiri-app-launch/jobs-systemd.h +index fe35932..19bf44e 100644 +--- a/liblomiri-app-launch/jobs-systemd.h ++++ b/liblomiri-app-launch/jobs-systemd.h +@@ -136,6 +136,7 @@ private: + static void copyEnv(const std::string& envname, std::list>& env); + static void copyEnvByPrefix(const std::string& prefix, std::list>& env); + static int envSize(std::list>& env); ++ static void setupNixosPath(std::list>& env); + + static std::vector parseExec(std::list>& env); + static void application_start_cb(GObject* obj, GAsyncResult* res, gpointer user_data); +-- +2.42.0 + diff --git a/pkgs/desktops/lomiri/development/lomiri-app-launch/default.nix b/pkgs/desktops/lomiri/development/lomiri-app-launch/default.nix index 381a89fe10ff..f248ae9ca0d0 100644 --- a/pkgs/desktops/lomiri/development/lomiri-app-launch/default.nix +++ b/pkgs/desktops/lomiri/development/lomiri-app-launch/default.nix @@ -54,6 +54,9 @@ stdenv.mkDerivation (finalAttrs: { url = "https://gitlab.com/ubports/development/core/lomiri-app-launch/-/commit/0419b2592284f43ee5e76060948ea3d5f1c991fd.patch"; hash = "sha256-11pEhFi39Cvqb9Hg47kT8+5hq+bz6WmySqaIdwt1MVk="; }) + + # Use /run/current-system/sw/bin fallback for desktop file Exec= lookups, propagate to launched applications + ./2001-Inject-current-system-PATH.patch ]; postPatch = '' From cdb316993015495831d8dfe0697552181efe29fe Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Fri, 31 May 2024 22:19:25 +0200 Subject: [PATCH 20/25] lomiri.lomiri-app-launch: Modernise abit - Patch has been merged, fetch merged one & update comment (hash is unchanged, checked) - We now have a CMake modern enough for pkg_get_variable DEFINE_VARIABLES, use it - substituteInPlace --replace is deprecated - with lib; in meta is frowned-upon (cherry picked from commit 20c9038e157ddb5152a0693f75d46f158c805c05) --- .../development/lomiri-app-launch/default.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/desktops/lomiri/development/lomiri-app-launch/default.nix b/pkgs/desktops/lomiri/development/lomiri-app-launch/default.nix index f248ae9ca0d0..ea44e6babb64 100644 --- a/pkgs/desktops/lomiri/development/lomiri-app-launch/default.nix +++ b/pkgs/desktops/lomiri/development/lomiri-app-launch/default.nix @@ -48,10 +48,10 @@ stdenv.mkDerivation (finalAttrs: { }; patches = [ - # Remove when https://gitlab.com/ubports/development/core/lomiri-app-launch/-/merge_requests/57 merged & in release + # Remove when version > 0.1.9 (fetchpatch { name = "0001-lomiri-app-launch-Fix-typelib-gir-dependency.patch"; - url = "https://gitlab.com/ubports/development/core/lomiri-app-launch/-/commit/0419b2592284f43ee5e76060948ea3d5f1c991fd.patch"; + url = "https://gitlab.com/ubports/development/core/lomiri-app-launch/-/commit/8466e77914e73801499df224fcd4a53c4a0eab25.patch"; hash = "sha256-11pEhFi39Cvqb9Hg47kT8+5hq+bz6WmySqaIdwt1MVk="; }) @@ -64,10 +64,10 @@ stdenv.mkDerivation (finalAttrs: { # used pkg_get_variable, cannot replace prefix substituteInPlace data/CMakeLists.txt \ - --replace 'pkg_get_variable(SYSTEMD_USER_UNIT_DIR systemd systemduserunitdir)' 'set(SYSTEMD_USER_UNIT_DIR "''${CMAKE_INSTALL_PREFIX}/lib/systemd/user")' + --replace-fail 'pkg_get_variable(SYSTEMD_USER_UNIT_DIR systemd systemduserunitdir)' 'pkg_get_variable(SYSTEMD_USER_UNIT_DIR systemd systemduserunitdir DEFINE_VARIABLES prefix=''${CMAKE_INSTALL_PREFIX})' substituteInPlace tests/jobs-systemd.cpp \ - --replace '^(/usr)?' '^(/nix/store/\\w+-bash-.+)?' + --replace-fail '^(/usr)?' '^(/nix/store/\\w+-bash-.+)?' ''; strictDeps = true; @@ -139,13 +139,13 @@ stdenv.mkDerivation (finalAttrs: { updateScript = gitUpdater { }; }; - meta = with lib; { + meta = { description = "System and associated utilities to launch applications in a standard and confined way"; homepage = "https://gitlab.com/ubports/development/core/lomiri-app-launch"; changelog = "https://gitlab.com/ubports/development/core/lomiri-app-launch/-/blob/${finalAttrs.version}/ChangeLog"; - license = licenses.gpl3Only; - maintainers = teams.lomiri.members; - platforms = platforms.linux; + license = lib.licenses.gpl3Only; + maintainers = lib.teams.lomiri.members; + platforms = lib.platforms.linux; pkgConfigModules = [ "lomiri-app-launch-0" ]; From 2c7cdaf292601491cb4b17d18ac6e3d1cc73f850 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Fri, 31 May 2024 22:25:39 +0200 Subject: [PATCH 21/25] lomiri.content-hub: Fetch patch to fix data transfer We don't have a functional content-hub transfer test, so this slipped through the cracks during testing. (The background setting in LSS would be an easy one, but that calls an AccountsSetting function that doesn't exist outside of Ubuntu, so it wouldn't work anyway.) (cherry picked from commit 0ddd3a49e916136451ccab8689d2dc9f718e35f5) --- pkgs/desktops/lomiri/services/content-hub/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/desktops/lomiri/services/content-hub/default.nix b/pkgs/desktops/lomiri/services/content-hub/default.nix index 3df927d3ed2d..c57874d3ee77 100644 --- a/pkgs/desktops/lomiri/services/content-hub/default.nix +++ b/pkgs/desktops/lomiri/services/content-hub/default.nix @@ -80,6 +80,13 @@ stdenv.mkDerivation (finalAttrs: { url = "https://gitlab.com/ubports/development/core/content-hub/-/commit/6e30f4f10ef90e817ca01d32959b6c782de48955.patch"; hash = "sha256-TAbYn265RpHpulaRVaHy9XqNF+qoDE7YQIfFMPfqEhw="; }) + + # Remove when https://gitlab.com/ubports/development/core/lomiri-content-hub/-/merge_requests/40 merged & in release + (fetchpatch { + name = "0006-content-hub-Fix-AppArmor-less-transfer.patch"; + url = "https://gitlab.com/ubports/development/core/content-hub/-/commit/b58e5c8babf00ad7c402555c96254ce0165adb9e.patch"; + hash = "sha256-a7x/0NiUBmmFlq96jkHyLCL0f5NIFh5JR/H+FQ/2GqI="; + }) ]; postPatch = '' From 47174d2d67136eacc23abd6e87a67af6a988091e Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Fri, 31 May 2024 22:33:49 +0200 Subject: [PATCH 22/25] lomiri.content-hub: Modernise abit - Some patches have been merged, fetch merged ones if possible & update comments - with lib; in meta is frowned-upon (cherry picked from commit 120fda2ef344872c39b57f703a033548806687f8) --- .../lomiri/services/content-hub/default.nix | 29 ++++++++----------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/pkgs/desktops/lomiri/services/content-hub/default.nix b/pkgs/desktops/lomiri/services/content-hub/default.nix index c57874d3ee77..a1fd99757844 100644 --- a/pkgs/desktops/lomiri/services/content-hub/default.nix +++ b/pkgs/desktops/lomiri/services/content-hub/default.nix @@ -47,11 +47,11 @@ stdenv.mkDerivation (finalAttrs: { ]; patches = [ - # Remove when https://gitlab.com/ubports/development/core/content-hub/-/merge_requests/33 merged & in release + # Remove when version > 1.1.1 (fetchpatch { name = "0001-content-hub-Migrate-to-GetConnectionCredentials.patch"; - url = "https://gitlab.com/ubports/development/core/content-hub/-/commit/9c0eae42d856b4b6e24fa609ade0e674c7a84cfe.patch"; - hash = "sha256-IWoCQKSCCk26n7133oG0Ht+iEjavn/IiOVUM+tCLX2U="; + url = "https://gitlab.com/ubports/development/core/content-hub/-/commit/9ec9df32f77383eec7994d8e3e6961531bc8464d.patch"; + hash = "sha256-14dZosMTMa1FDGEMuil0r1Hz6vn+L9XC83NMAqC7Ol8="; }) # Remove when https://gitlab.com/ubports/development/core/content-hub/-/merge_requests/34 merged & in release @@ -61,7 +61,7 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-T+6T9lXne6AhDFv9d7L8JNwdl8f0wjDmvSoNVPkHza4="; }) - # Remove when https://gitlab.com/ubports/development/core/content-hub/-/merge_requests/35 merged & in release + # Remove when version > 1.1.1 # fetchpatch2 due to renames, https://github.com/NixOS/nixpkgs/issues/32084 (fetchpatch2 { name = "0003-content-hub-Add-more-better-GNUInstallDirs-variables-usage.patch"; @@ -69,16 +69,11 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-kYN0eLwMyM/9yK+zboyEsoPKZMZ4SCXodVYsvkQr2F8="; }) - # Remove when https://gitlab.com/ubports/development/core/content-hub/-/merge_requests/37 merged & in release + # Remove when version > 1.1.1 (fetchpatch { - name = "0004-content-hub-Fix-generation-of-transfer_files.patch"; - url = "https://gitlab.com/ubports/development/core/content-hub/-/commit/7ab3a4421356f83515f0deffb5f97a5b38601c13.patch"; - hash = "sha256-MJZm3ny5t0/GX0bd5hGQbPM2k7M4KUvKqce/0cYYgvM="; - }) - (fetchpatch { - name = "0005-content-hub-Fix-generation-of-moc_test_harness.patch"; - url = "https://gitlab.com/ubports/development/core/content-hub/-/commit/6e30f4f10ef90e817ca01d32959b6c782de48955.patch"; - hash = "sha256-TAbYn265RpHpulaRVaHy9XqNF+qoDE7YQIfFMPfqEhw="; + name = "0004-content-hub-Fix-generation-of-transfer_files-and-moc_test_harness.patch"; + url = "https://gitlab.com/ubports/development/core/content-hub/-/commit/68899c75e77e1f34176b8a550d52794413e5070f.patch"; + hash = "sha256-HAxePnzY/cL2c+o+Aw2N1pdr8rsbHGmRsH2EQkrBcHg="; }) # Remove when https://gitlab.com/ubports/development/core/lomiri-content-hub/-/merge_requests/40 merged & in release @@ -182,7 +177,7 @@ stdenv.mkDerivation (finalAttrs: { updateScript = gitUpdater { }; }; - meta = with lib; { + meta = { description = "Content sharing/picking service"; longDescription = '' content-hub is a mediation service to let applications share content between them, @@ -190,10 +185,10 @@ stdenv.mkDerivation (finalAttrs: { ''; homepage = "https://gitlab.com/ubports/development/core/content-hub"; changelog = "https://gitlab.com/ubports/development/core/content-hub/-/blob/${finalAttrs.version}/ChangeLog"; - license = with licenses; [ gpl3Only lgpl3Only ]; + license = with lib.licenses; [ gpl3Only lgpl3Only ]; mainProgram = "content-hub-service"; - maintainers = teams.lomiri.members; - platforms = platforms.linux; + maintainers = lib.teams.lomiri.members; + platforms = lib.platforms.linux; pkgConfigModules = [ "libcontent-hub" "libcontent-hub-glib" From 968425a09287a776ae70d7e7886505e88a26048b Mon Sep 17 00:00:00 2001 From: Keith Pine Date: Mon, 3 Jun 2024 07:49:36 -0700 Subject: [PATCH 23/25] nixos/inadyn: fix cache directory path The CacheDirectory subdirectory is already part of $CACHE_DIRECTORY. (cherry picked from commit 5776f733cdc6858053c8b8341e1a411903f9b78e) --- nixos/modules/services/networking/inadyn.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/inadyn.nix b/nixos/modules/services/networking/inadyn.nix index baa4302096c2..7022673538c8 100644 --- a/nixos/modules/services/networking/inadyn.nix +++ b/nixos/modules/services/networking/inadyn.nix @@ -202,7 +202,7 @@ in startAt = cfg.interval; serviceConfig = { Type = "oneshot"; - ExecStart = ''${lib.getExe pkgs.inadyn} -f ${configFile} --cache-dir ''${CACHE_DIRECTORY}/inadyn -1 --foreground -l ${cfg.logLevel}''; + ExecStart = ''${lib.getExe pkgs.inadyn} -f ${configFile} --cache-dir ''${CACHE_DIRECTORY} -1 --foreground -l ${cfg.logLevel}''; LoadCredential = "config:${configFile}"; CacheDirectory = "inadyn"; From 34b6455ddba0888e64166bfebf91e3654516d5c8 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Sat, 1 Jun 2024 00:26:25 +0200 Subject: [PATCH 24/25] lomiri.lomiri: Try to consider services.xserver.xkb.layout Propagate the configuration setting through an envvar, check the envvar in the compositor. Needed because querying AccountsSettings for this information fails, due to Ubuntu-only "InputSources" interface. So you're stuck on US layout without this hack. (cherry picked from commit 2735184f6d8fdb7f32265fd4a3a92bce29ee52a7) --- .../services/desktop-managers/lomiri.nix | 4 +++ .../9902-lomiri-Check-NIXOS_XKB_LAYOUTS.patch | 29 +++++++++++++++++++ .../lomiri/applications/lomiri/default.nix | 1 + 3 files changed, 34 insertions(+) create mode 100644 pkgs/desktops/lomiri/applications/lomiri/9902-lomiri-Check-NIXOS_XKB_LAYOUTS.patch diff --git a/nixos/modules/services/desktop-managers/lomiri.nix b/nixos/modules/services/desktop-managers/lomiri.nix index c9444c946653..eec33597dc71 100644 --- a/nixos/modules/services/desktop-managers/lomiri.nix +++ b/nixos/modules/services/desktop-managers/lomiri.nix @@ -37,6 +37,10 @@ in { suru-icon-theme # telephony-service # currently broken: https://github.com/NixOS/nixpkgs/pull/314043 ]); + variables = { + # To override the keyboard layouts in Lomiri + NIXOS_XKB_LAYOUTS = config.services.xserver.xkb.layout; + }; }; hardware.pulseaudio.enable = lib.mkDefault true; diff --git a/pkgs/desktops/lomiri/applications/lomiri/9902-lomiri-Check-NIXOS_XKB_LAYOUTS.patch b/pkgs/desktops/lomiri/applications/lomiri/9902-lomiri-Check-NIXOS_XKB_LAYOUTS.patch new file mode 100644 index 000000000000..0563aab5dda8 --- /dev/null +++ b/pkgs/desktops/lomiri/applications/lomiri/9902-lomiri-Check-NIXOS_XKB_LAYOUTS.patch @@ -0,0 +1,29 @@ +From 640cab41986fac83742af39dd19877041a2ab8dc Mon Sep 17 00:00:00 2001 +From: OPNA2608 +Date: Sat, 1 Jun 2024 00:22:27 +0200 +Subject: [PATCH] Check NIXOS_XKB_LAYOUTS for layouts before falling back to + "us" + +--- + plugins/AccountsService/AccountsService.cpp | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/plugins/AccountsService/AccountsService.cpp b/plugins/AccountsService/AccountsService.cpp +index bcf18246c..f4a7dfaa1 100644 +--- a/plugins/AccountsService/AccountsService.cpp ++++ b/plugins/AccountsService/AccountsService.cpp +@@ -295,6 +295,11 @@ QStringList AccountsService::keymaps() const + return simplifiedMaps; + } + ++ char* fallbackNixosLayouts = getenv("NIXOS_XKB_LAYOUTS"); ++ if (fallbackNixosLayouts != NULL && fallbackNixosLayouts[0] != '\0') { ++ return QString(fallbackNixosLayouts).split(QLatin1Char(','), Qt::SkipEmptyParts); ++ } ++ + return {QStringLiteral("us")}; + } + +-- +2.42.0 + diff --git a/pkgs/desktops/lomiri/applications/lomiri/default.nix b/pkgs/desktops/lomiri/applications/lomiri/default.nix index 35fdd1e46617..ca46560e702a 100644 --- a/pkgs/desktops/lomiri/applications/lomiri/default.nix +++ b/pkgs/desktops/lomiri/applications/lomiri/default.nix @@ -117,6 +117,7 @@ stdenv.mkDerivation (finalAttrs: { }) ./9901-lomiri-Disable-Wizard.patch + ./9902-lomiri-Check-NIXOS_XKB_LAYOUTS.patch ]; postPatch = '' From 7408825124b6d847e84addaa2e55eb9c7f601eff Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 7 Jun 2024 11:05:25 +0000 Subject: [PATCH 25/25] telegram-desktop: 5.1.2 -> 5.1.5 (cherry picked from commit bebf27e522546756fce284903f8038c6ac5f0f23) --- .../instant-messengers/telegram/telegram-desktop/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/default.nix b/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/default.nix index cf1f41d563bb..5da59f94e567 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/default.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/default.nix @@ -63,14 +63,14 @@ let in stdenv.mkDerivation rec { pname = "telegram-desktop"; - version = "5.1.2"; + version = "5.1.5"; src = fetchFromGitHub { owner = "telegramdesktop"; repo = "tdesktop"; rev = "v${version}"; fetchSubmodules = true; - hash = "sha256-KTgID7pd0QSFi5t9cdIVEi4/oQirDgsf7tTcEEtRdY0="; + hash = "sha256-dlPt87SKP17v9QFiRZSSUtSLVGTGbeo05G/p05l2zVc="; }; patches = [