From 7732e956a82f0ab9211d317f23e80aa044d5a420 Mon Sep 17 00:00:00 2001 From: mksafavi Date: Mon, 26 Aug 2024 09:12:59 +0330 Subject: [PATCH 01/62] libphidget22: init at 0-unstable-2024-04-11 --- pkgs/by-name/li/libphidget22/package.nix | 31 ++++++++++++++++ pkgs/by-name/li/libphidget22extra/package.nix | 35 +++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 pkgs/by-name/li/libphidget22/package.nix create mode 100644 pkgs/by-name/li/libphidget22extra/package.nix diff --git a/pkgs/by-name/li/libphidget22/package.nix b/pkgs/by-name/li/libphidget22/package.nix new file mode 100644 index 000000000000..8dd3d5e2f475 --- /dev/null +++ b/pkgs/by-name/li/libphidget22/package.nix @@ -0,0 +1,31 @@ +{ + lib, + stdenv, + fetchurl, + automake, + libusb1, +}: + +stdenv.mkDerivation { + pname = "libphidget22"; + version = "0-unstable-2024-04-11"; + + src = fetchurl { + url = "https://cdn.phidgets.com/downloads/phidget22/libraries/linux/libphidget22.tar.gz"; + hash = "sha256-mDoYVs0LhBb3+vzKjzYr9EmcrztmA4cy9xh5ONxHaxI="; + }; + + nativeBuildInputs = [ automake ]; + + buildInputs = [ libusb1 ]; + + strictDeps = true; + + meta = { + description = "Phidget Inc sensor boards and electronics Library"; + homepage = "https://www.phidgets.com/docs/OS_-_Linux"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ mksafavi ]; + platforms = lib.platforms.linux; + }; +} diff --git a/pkgs/by-name/li/libphidget22extra/package.nix b/pkgs/by-name/li/libphidget22extra/package.nix new file mode 100644 index 000000000000..b67d2026b655 --- /dev/null +++ b/pkgs/by-name/li/libphidget22extra/package.nix @@ -0,0 +1,35 @@ +{ + lib, + stdenv, + fetchurl, + automake, + libusb1, + libphidget22, +}: + +stdenv.mkDerivation { + pname = "libphidget22extra"; + version = "0-unstable-2024-04-11"; + + src = fetchurl { + url = "https://cdn.phidgets.com/downloads/phidget22/libraries/linux/libphidget22extra.tar.gz"; + hash = "sha256-UD6Crr1dl7c3NOAVNi3xrXJI3OYPLZBJX1MXVvbyEUE="; + }; + + nativeBuildInputs = [ automake ]; + + buildInputs = [ + libphidget22 + libusb1 + ]; + + strictDeps = true; + + meta = { + description = "Phidget Inc sensor boards and electronics extras library"; + homepage = "https://www.phidgets.com/docs/OS_-_Linux"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ mksafavi ]; + platforms = lib.platforms.linux; + }; +} From 956b32d77485a368fe820af8adfa64aa328bf4a6 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 3 Oct 2024 13:07:14 +0000 Subject: [PATCH 02/62] boxbuddy: 2.2.12 -> 2.2.13 --- pkgs/by-name/bo/boxbuddy/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/bo/boxbuddy/package.nix b/pkgs/by-name/bo/boxbuddy/package.nix index db8e357899f6..34c3cd1911ac 100644 --- a/pkgs/by-name/bo/boxbuddy/package.nix +++ b/pkgs/by-name/bo/boxbuddy/package.nix @@ -9,16 +9,16 @@ rustPlatform.buildRustPackage rec { pname = "boxbuddy"; - version = "2.2.12"; + version = "2.2.13"; src = fetchFromGitHub { owner = "Dvlv"; repo = "BoxBuddyRS"; rev = version; - hash = "sha256-PoPIIwe2SlK/iQTyqIhMG0dRobU98L5hnOciMmi9coo="; + hash = "sha256-47LOwBm7ql3Nvx6PZ2+x5aR9LSpzc8xuixdvKGdNS94="; }; - cargoHash = "sha256-En5TVCW/URJEry4sTd+vdi8K1YO2L0X5pYu/TGsrx6U="; + cargoHash = "sha256-W4W2tnnNgBcGD0/t5pobj4ca/YrRkHE1l5dIVe21KPU="; # The software assumes it is installed either in flatpak or in the home directory # so the xdg data path needs to be patched here From 19b9676383c4e473b16bafa5e3a704a01639420f Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sat, 5 Oct 2024 13:31:09 +0200 Subject: [PATCH 03/62] linux: mark <6.12 with Rust as broken, assert on <6.7 with Rust Linux 6.7 is the oldest kernel with Rust support, so the config part should fail hard if 6.6 or older requests the Rust feature. Until now this was silently ignored[1]. It turned out that Rust for Linux 6.11 or older fails for unknown reasons[2]. We decided to not bother since it's not a longterm kernel and 6.12 seems fine again. As a result, marking this as broken. [1] https://github.com/NixOS/nixpkgs/pull/345534#discussion_r1781392312 [2] https://github.com/NixOS/nixpkgs/pull/345534#issuecomment-2391238381 --- pkgs/os-specific/linux/kernel/common-config.nix | 6 +++++- pkgs/os-specific/linux/kernel/manual-config.nix | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index ee3862052135..8051876960b8 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -34,7 +34,11 @@ let # Currently not enabling Rust by default, as upstream requires rustc 1.81 defaultRust = false; - withRust = (forceRust || defaultRust) && kernelSupportsRust; + withRust = + assert lib.assertMsg (!(forceRust && !kernelSupportsRust)) '' + Kernels below 6.7 (the kernel being built is ${version}) don't support Rust. + ''; + (forceRust || defaultRust) && kernelSupportsRust; options = { diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix index 5544409a74d6..f69de86fd1a6 100644 --- a/pkgs/os-specific/linux/kernel/manual-config.nix +++ b/pkgs/os-specific/linux/kernel/manual-config.nix @@ -396,6 +396,9 @@ let requiredSystemFeatures = [ "big-parallel" ]; meta = { + # https://github.com/NixOS/nixpkgs/pull/345534#issuecomment-2391238381 + broken = withRust && lib.versionOlder version "6.12"; + description = "The Linux kernel" + (if kernelPatches == [] then "" else From 3920b9d8191e7766a536fb5205ff36049d7a39d6 Mon Sep 17 00:00:00 2001 From: Jared Baur Date: Mon, 7 Oct 2024 16:47:09 -0700 Subject: [PATCH 04/62] uboot: 2024.07 -> 2024.10 --- pkgs/misc/uboot/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/misc/uboot/default.nix b/pkgs/misc/uboot/default.nix index 351c5788584a..61f4a283206b 100644 --- a/pkgs/misc/uboot/default.nix +++ b/pkgs/misc/uboot/default.nix @@ -28,10 +28,10 @@ }: let - defaultVersion = "2024.07"; + defaultVersion = "2024.10"; defaultSrc = fetchurl { url = "https://ftp.denx.de/pub/u-boot/u-boot-${defaultVersion}.tar.bz2"; - hash = "sha256-9ZHamrkO89az0XN2bQ3f+QxO1zMGgIl0hhF985DYPI8="; + hash = "sha256-so2vSsF+QxVjYweL9RApdYQTf231D87ZsS3zT2GpL7A="; }; # Dependencies for the tools need to be included as either native or cross, From ec537c2c0306edd5e59d8ddd1910a51aff0f33f2 Mon Sep 17 00:00:00 2001 From: Aaron Jheng Date: Fri, 20 Sep 2024 05:01:15 +0000 Subject: [PATCH 05/62] harbor-cli: init at 0.0.1 --- pkgs/by-name/ha/harbor-cli/package.nix | 52 ++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 pkgs/by-name/ha/harbor-cli/package.nix diff --git a/pkgs/by-name/ha/harbor-cli/package.nix b/pkgs/by-name/ha/harbor-cli/package.nix new file mode 100644 index 000000000000..c47f50ecc2aa --- /dev/null +++ b/pkgs/by-name/ha/harbor-cli/package.nix @@ -0,0 +1,52 @@ +{ + lib, + stdenv, + buildGoModule, + fetchFromGitHub, + testers, + harbor-cli, + installShellFiles, +}: + +buildGoModule rec { + pname = "harbor-cli"; + version = "0.0.1"; + + src = fetchFromGitHub { + owner = "goharbor"; + repo = "harbor-cli"; + rev = "v${version}"; + hash = "sha256-WSADuhr6p8N0Oh1xIG7yItM6t0EWUiAkzNbdKsSc4WA="; + }; + + vendorHash = "sha256-UUD9/5+McR1t5oO4/6TSScT7hhSKM0OpBf94LVQG1Pw="; + + nativeBuildInputs = [ installShellFiles ]; + + ldflags = [ + "-s" + "-w" + "-X github.com/goharbor/harbor-cli/cmd/harbor/internal/version.Version=${version}" + ]; + + postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + installShellCompletion --cmd harbor \ + --bash <($out/bin/harbor completion bash) \ + --fish <($out/bin/harbor completion fish) \ + --zsh <($out/bin/harbor completion zsh) + ''; + + passthru.tests.version = testers.testVersion { + package = harbor-cli; + command = "harbor version"; + }; + + meta = { + homepage = "https://github.com/goharbor/harbor-cli"; + description = "Command-line tool facilitates seamless interaction with the Harbor container registry"; + changelog = "https://github.com/goharbor/harbor-cli/releases/tag/v${version}"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ aaronjheng ]; + mainProgram = "harbor"; + }; +} From a155c718d3a2175bfc3cdfacf49e1e73cf89e3f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 8 Oct 2024 13:36:13 +0200 Subject: [PATCH 06/62] nixos/nginx: expand proxyResolveWhileRunning's description --- nixos/modules/services/web-servers/nginx/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/web-servers/nginx/default.nix b/nixos/modules/services/web-servers/nginx/default.nix index d49ee0eba115..1a58662adafa 100644 --- a/nixos/modules/services/web-servers/nginx/default.nix +++ b/nixos/modules/services/web-servers/nginx/default.nix @@ -853,9 +853,12 @@ in type = types.bool; default = false; description = '' - Resolves domains of proxyPass targets at runtime - and not only at start, you have to set - services.nginx.resolver, too. + Resolves domains of proxyPass targets at runtime and not only at startup. + This can be used as a workaround if nginx fails to start because of not-yet-working DNS. + + :::{.warn} + `services.nginx.resolver` must be set for this option to work. + ::: ''; }; From ce8336e70989364521ab397f8257b87ab8a887cb Mon Sep 17 00:00:00 2001 From: K900 Date: Tue, 8 Oct 2024 16:10:24 +0300 Subject: [PATCH 07/62] ubootOrangePi3B: init at 2024.10 --- pkgs/misc/uboot/default.nix | 8 ++++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 9 insertions(+) diff --git a/pkgs/misc/uboot/default.nix b/pkgs/misc/uboot/default.nix index 61f4a283206b..6d5f6ae9bf6f 100644 --- a/pkgs/misc/uboot/default.nix +++ b/pkgs/misc/uboot/default.nix @@ -442,6 +442,14 @@ in { filesToInstall = ["u-boot-sunxi-with-spl.bin"]; }; + ubootOrangePi3B = buildUBoot { + defconfig = "orangepi-3b-rk3566_defconfig"; + extraMeta.platforms = ["aarch64-linux"]; + ROCKCHIP_TPL = rkbin.TPL_RK3568; + BL31 = rkbin.BL31_RK3568; + filesToInstall = [ "u-boot.itb" "idbloader.img" "u-boot-rockchip.bin" "u-boot-rockchip-spi.bin" ]; + }; + ubootPcduino3Nano = buildUBoot { defconfig = "Linksprite_pcDuino3_Nano_defconfig"; extraMeta.platforms = ["armv7l-linux"]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2edc4e6ec756..d182c591cf06 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26627,6 +26627,7 @@ with pkgs; ubootOlimexA64Olinuxino ubootOlimexA64Teres1 ubootOrangePi3 + ubootOrangePi3B ubootOrangePi5 ubootOrangePi5Plus ubootOrangePiPc From 19bda3deeea0c87a0443299e342917b85c66f165 Mon Sep 17 00:00:00 2001 From: K900 Date: Tue, 8 Oct 2024 16:10:16 +0300 Subject: [PATCH 08/62] ubootCM3588NAS: init at 2024.10 --- pkgs/misc/uboot/default.nix | 8 ++++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 9 insertions(+) diff --git a/pkgs/misc/uboot/default.nix b/pkgs/misc/uboot/default.nix index 6d5f6ae9bf6f..037b4ca8d008 100644 --- a/pkgs/misc/uboot/default.nix +++ b/pkgs/misc/uboot/default.nix @@ -212,6 +212,14 @@ in { filesToInstall = ["u-boot-with-spl.kwb"]; }; + ubootCM3588NAS = buildUBoot { + defconfig = "cm3588-nas-rk3588_defconfig"; + extraMeta.platforms = [ "aarch64-linux" ]; + BL31 = "${armTrustedFirmwareRK3588}/bl31.elf"; + ROCKCHIP_TPL = rkbin.TPL_RK3588; + filesToInstall = [ "u-boot.itb" "idbloader.img" "u-boot-rockchip.bin" "u-boot-rockchip-spi.bin" ]; + }; + ubootCubieboard2 = buildUBoot { defconfig = "Cubieboard2_defconfig"; extraMeta.platforms = ["armv7l-linux"]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d182c591cf06..aceacc1ce5a2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26615,6 +26615,7 @@ with pkgs; ubootBananaPim64 ubootAmx335xEVM ubootClearfog + ubootCM3588NAS ubootCubieboard2 ubootGuruplug ubootJetsonTK1 From b8d9a0eaa691eb611de21d3cb8891333cc29f062 Mon Sep 17 00:00:00 2001 From: Jared Baur Date: Tue, 8 Oct 2024 08:46:45 -0700 Subject: [PATCH 09/62] ubootCM3588NAS: don't install non-existent image for SPI flash The defconfig for ubootCM3588NAS does not specify building an image for SPI flash, so remove the attempt to install the non-existent file. --- pkgs/misc/uboot/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/misc/uboot/default.nix b/pkgs/misc/uboot/default.nix index 037b4ca8d008..1983157df1f6 100644 --- a/pkgs/misc/uboot/default.nix +++ b/pkgs/misc/uboot/default.nix @@ -217,7 +217,7 @@ in { extraMeta.platforms = [ "aarch64-linux" ]; BL31 = "${armTrustedFirmwareRK3588}/bl31.elf"; ROCKCHIP_TPL = rkbin.TPL_RK3588; - filesToInstall = [ "u-boot.itb" "idbloader.img" "u-boot-rockchip.bin" "u-boot-rockchip-spi.bin" ]; + filesToInstall = [ "u-boot.itb" "idbloader.img" "u-boot-rockchip.bin" ]; }; ubootCubieboard2 = buildUBoot { From 8b2b7db6d420ac52ea9e3b2fc39411c687816d1f Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 10 Oct 2024 04:18:41 +0000 Subject: [PATCH 10/62] python312Packages.pylint-django: 2.5.4 -> 2.6.0 --- pkgs/development/python-modules/pylint-django/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pylint-django/default.nix b/pkgs/development/python-modules/pylint-django/default.nix index 5cf7838dea18..0bac1f4037ce 100644 --- a/pkgs/development/python-modules/pylint-django/default.nix +++ b/pkgs/development/python-modules/pylint-django/default.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { pname = "pylint-django"; - version = "2.5.4"; + version = "2.6.0"; pyproject = true; disabled = pythonOlder "3.7"; @@ -23,7 +23,7 @@ buildPythonPackage rec { owner = "PyCQA"; repo = "pylint-django"; rev = "refs/tags/v${version}"; - hash = "sha256-MNgu3LvFoohXA+JzUiHIaYFw0ssEe+H5T8Ea56LcGuI="; + hash = "sha256-Rnty8ryKd5PxFFVYcvB8p9VS3qlHCprxR8+/ySY5qC8="; }; nativeBuildInputs = [ poetry-core ]; From 1b0fea21dfea57382f75cbec79787e91a8b0738f Mon Sep 17 00:00:00 2001 From: Adam Stephens Date: Thu, 10 Oct 2024 13:33:06 +0000 Subject: [PATCH 11/62] audiobookshelf: 2.13.4 -> 2.14.0 --- pkgs/by-name/au/audiobookshelf/source.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/au/audiobookshelf/source.json b/pkgs/by-name/au/audiobookshelf/source.json index 350ca60dfd95..87811d028730 100644 --- a/pkgs/by-name/au/audiobookshelf/source.json +++ b/pkgs/by-name/au/audiobookshelf/source.json @@ -1,9 +1,9 @@ { "owner": "advplyr", "repo": "audiobookshelf", - "rev": "ce213c3d89458baeb77324ce59a5f2137740564e", - "hash": "sha256-7vPhvsjGJQvus5Mmx8543OuBeuPWC/4cLfHHYmN2lnk=", - "version": "2.13.4", - "depsHash": "sha256-1CmtuzE8R6zkb0DT7gt9MrxErAw0mqY2AkJZh3PjuBQ=", - "clientDepsHash": "sha256-BfrVN70i1e4JWELxLS0jliHLfG4/kN8tj8aQOjsnZ/M=" + "rev": "cf5598aeb9b086a28e853d6a89b82a7467fd6969", + "hash": "sha256-tObC7QbdwpAlt97eXB9QzZEaQcquuST+8nC6lYEXTUM=", + "version": "2.14.0", + "depsHash": "sha256-nVsmV3Vms2S9oM7duFfgt+go1+wM2JniI8B3UFmv/TE=", + "clientDepsHash": "sha256-oaoGxcMs8XQVaRx8UO9NSThqbHuZsA4fm8OGlSiaKO0=" } From 36a83a3bf1d5ff8df5dd3a001b58a2a6ed74349c Mon Sep 17 00:00:00 2001 From: Izorkin Date: Mon, 26 Aug 2024 23:05:56 +0300 Subject: [PATCH 12/62] mastodon: 4.2.13 -> 4.3.0 Changelog: https://github.com/mastodon/mastodon/releases/tag/v4.3.0 --- nixos/modules/services/web-apps/mastodon.nix | 97 +- pkgs/servers/mastodon/default.nix | 53 +- pkgs/servers/mastodon/gemset.nix | 1489 +++++++++++------- pkgs/servers/mastodon/source.nix | 6 +- pkgs/servers/mastodon/update.sh | 6 +- pkgs/servers/mastodon/yarn.nix | 34 + pkgs/top-level/all-packages.nix | 6 +- 7 files changed, 1062 insertions(+), 629 deletions(-) create mode 100644 pkgs/servers/mastodon/yarn.nix diff --git a/nixos/modules/services/web-apps/mastodon.nix b/nixos/modules/services/web-apps/mastodon.nix index 5c383e9f16ab..a3a2bbd1eca6 100644 --- a/nixos/modules/services/web-apps/mastodon.nix +++ b/nixos/modules/services/web-apps/mastodon.nix @@ -12,9 +12,12 @@ let RAILS_ENV = "production"; NODE_ENV = "production"; + BOOTSNAP_CACHE_DIR="/var/cache/mastodon/precompile"; LD_PRELOAD = "${pkgs.jemalloc}/lib/libjemalloc.so"; - # mastodon-web concurrency. + MASTODON_USE_LIBVIPS = "true"; + + # Concurrency mastodon-web WEB_CONCURRENCY = toString cfg.webProcesses; MAX_THREADS = toString cfg.webThreads; @@ -24,7 +27,7 @@ let DB_NAME = cfg.database.name; LOCAL_DOMAIN = cfg.localDomain; SMTP_SERVER = cfg.smtp.host; - SMTP_PORT = toString(cfg.smtp.port); + SMTP_PORT = toString cfg.smtp.port; SMTP_FROM_ADDRESS = cfg.smtp.fromAddress; PAPERCLIP_ROOT_PATH = "/var/lib/mastodon/public-system"; PAPERCLIP_ROOT_URL = "/system"; @@ -33,12 +36,12 @@ let TRUSTED_PROXY_IP = cfg.trustedProxy; } // lib.optionalAttrs (cfg.redis.host != null) { REDIS_HOST = cfg.redis.host; } - // lib.optionalAttrs (cfg.redis.port != null) { REDIS_PORT = toString(cfg.redis.port); } + // lib.optionalAttrs (cfg.redis.port != null) { REDIS_PORT = toString cfg.redis.port; } // lib.optionalAttrs (cfg.redis.createLocally && cfg.redis.enableUnixSocket) { REDIS_URL = "unix://${config.services.redis.servers.mastodon.unixSocket}"; } // lib.optionalAttrs (cfg.database.host != "/run/postgresql" && cfg.database.port != null) { DB_PORT = toString cfg.database.port; } // lib.optionalAttrs cfg.smtp.authenticate { SMTP_LOGIN = cfg.smtp.user; } // lib.optionalAttrs (cfg.elasticsearch.host != null) { ES_HOST = cfg.elasticsearch.host; } - // lib.optionalAttrs (cfg.elasticsearch.host != null) { ES_PORT = toString(cfg.elasticsearch.port); } + // lib.optionalAttrs (cfg.elasticsearch.host != null) { ES_PORT = toString cfg.elasticsearch.port; } // lib.optionalAttrs (cfg.elasticsearch.host != null) { ES_PRESET = cfg.elasticsearch.preset; } // lib.optionalAttrs (cfg.elasticsearch.user != null) { ES_USER = cfg.elasticsearch.user; } // cfg.extraConfig; @@ -51,6 +54,9 @@ let Group = cfg.group; # Working directory WorkingDirectory = cfg.package; + # Cache directory and mode + CacheDirectory = "mastodon"; + CacheDirectoryMode = "0750"; # State directory and mode StateDirectory = "mastodon"; StateDirectoryMode = "0750"; @@ -127,7 +133,7 @@ let description = "Mastodon sidekiq${jobClassLabel}"; wantedBy = [ "mastodon.target" ]; environment = env // { - PORT = toString(cfg.sidekiqPort); + PORT = toString cfg.sidekiqPort; DB_POOL = threads; }; serviceConfig = { @@ -309,7 +315,7 @@ in { Voluntary Application Server Identification. A new keypair can be generated by running: - `nix build -f '' mastodon; cd result; bin/rake webpush:generate_keys` + `nix build -f '' mastodon; cd result; RAILS_ENV=production bin/rake webpush:generate_keys` If {option}`mastodon.vapidPrivateKeyFile`does not exist, it and this file will be created with a new keypair. @@ -324,12 +330,57 @@ in { type = lib.types.str; }; + activeRecordEncryptionDeterministicKeyFile = lib.mkOption { + description = '' + This key must be set to enable the Active Record Encryption feature within + Rails that Mastodon uses to encrypt and decrypt some database attributes. + A new Active Record keys can be generated by running: + + `nix build -f '' mastodon; cd result; RAILS_ENV=production ./bin/rails db:encryption:init` + + If this file does not exist, it will be created with a new Active Record + keys. + ''; + default = "/var/lib/mastodon/secrets/active-record-encryption-deterministic-key"; + type = lib.types.str; + }; + + activeRecordEncryptionKeyDerivationSaltFile = lib.mkOption { + description = '' + This key must be set to enable the Active Record Encryption feature within + Rails that Mastodon uses to encrypt and decrypt some database attributes. + A new Active Record keys can be generated by running: + + `nix build -f '' mastodon; cd result; RAILS_ENV=production ./bin/rails db:encryption:init` + + If this file does not exist, it will be created with a new Active Record + keys. + ''; + default = "/var/lib/mastodon/secrets/active-record-encryption-key-derivation-salt"; + type = lib.types.str; + }; + + activeRecordEncryptionPrimaryKeyFile = lib.mkOption { + description = '' + This key must be set to enable the Active Record Encryption feature within + Rails that Mastodon uses to encrypt and decrypt some database attributes. + A new Active Record keys can be generated by running: + + `nix build -f '' mastodon; cd result; RAILS_ENV=production ./bin/rails db:encryption:init` + + If this file does not exist, it will be created with a new Active Record + keys. + ''; + default = "/var/lib/mastodon/secrets/active-record-encryption-primary-key"; + type = lib.types.str; + }; + secretKeyBaseFile = lib.mkOption { description = '' Path to file containing the secret key base. A new secret key base can be generated by running: - `nix build -f '' mastodon; cd result; bin/rake secret` + `nix build -f '' mastodon; cd result; bin/bundle exec rails secret` If this file does not exist, it will be created with a new secret key base. ''; @@ -342,7 +393,7 @@ in { Path to file containing the OTP secret. A new OTP secret can be generated by running: - `nix build -f '' mastodon; cd result; bin/rake secret` + `nix build -f '' mastodon; cd result; bin/bundle exec rails secret` If this file does not exist, it will be created with a new OTP secret. ''; @@ -708,13 +759,28 @@ in { script = '' umask 077 + if ! test -d /var/cache/mastodon/precompile; then + ${cfg.package}/bin/bundle exec bootsnap precompile --gemfile ${cfg.package}/app ${cfg.package}/lib + fi + if ! test -f ${cfg.activeRecordEncryptionDeterministicKeyFile}; then + mkdir -p $(dirname ${cfg.activeRecordEncryptionDeterministicKeyFile}) + bin/rails db:encryption:init | grep --only-matching "ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY=[^ ]\+" | sed 's/^ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY=//' > ${cfg.activeRecordEncryptionDeterministicKeyFile} + fi + if ! test -f ${cfg.activeRecordEncryptionKeyDerivationSaltFile}; then + mkdir -p $(dirname ${cfg.activeRecordEncryptionKeyDerivationSaltFile}) + bin/rails db:encryption:init | grep --only-matching "ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT=[^ ]\+" | sed 's/^ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT=//' > ${cfg.activeRecordEncryptionKeyDerivationSaltFile} + fi + if ! test -f ${cfg.activeRecordEncryptionPrimaryKeyFile}; then + mkdir -p $(dirname ${cfg.activeRecordEncryptionPrimaryKeyFile}) + bin/rails db:encryption:init | grep --only-matching "ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY=[^ ]\+" | sed 's/^ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY=//' > ${cfg.activeRecordEncryptionPrimaryKeyFile} + fi if ! test -f ${cfg.secretKeyBaseFile}; then mkdir -p $(dirname ${cfg.secretKeyBaseFile}) - bin/rake secret > ${cfg.secretKeyBaseFile} + bin/bundle exec rails secret > ${cfg.secretKeyBaseFile} fi if ! test -f ${cfg.otpSecretFile}; then mkdir -p $(dirname ${cfg.otpSecretFile}) - bin/rake secret > ${cfg.otpSecretFile} + bin/bundle exec rails secret > ${cfg.otpSecretFile} fi if ! test -f ${cfg.vapidPrivateKeyFile}; then mkdir -p $(dirname ${cfg.vapidPrivateKeyFile}) $(dirname ${cfg.vapidPublicKeyFile}) @@ -724,6 +790,9 @@ in { fi cat > /var/lib/mastodon/.secrets_env <> gemset.nix # Create trailing newline to please EditorConfig checks -echo "Creating yarn-hash.nix" -YARN_HASH="$(prefetch-yarn-deps "$SOURCE_DIR/yarn.lock")" -YARN_HASH="$(nix hash to-sri --type sha256 "$YARN_HASH")" -sed -i "s/sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=/$YARN_HASH/g" source.nix +echo "Required manual update of yarn-hash" +exit 1 diff --git a/pkgs/servers/mastodon/yarn.nix b/pkgs/servers/mastodon/yarn.nix new file mode 100644 index 000000000000..3fb4018906d2 --- /dev/null +++ b/pkgs/servers/mastodon/yarn.nix @@ -0,0 +1,34 @@ +{ + stdenvNoCC, + yarn-berry, + cacert, + version, + src, + hash, +}: +stdenvNoCC.mkDerivation { + pname = "yarn-deps"; + inherit version src; + + nativeBuildInputs = [ + yarn-berry + ]; + + dontInstall = true; + + NODE_EXTRA_CA_CERTS = "${cacert}/etc/ssl/certs/ca-bundle.crt"; + + buildPhase = '' + export HOME=$(mktemp -d) + export YARN_ENABLE_TELEMETRY=0 + + cache="$(yarn config get cacheFolder)" + yarn install --immutable --mode skip-build + + mkdir -p $out + cp -r $cache/* $out/ + ''; + + outputHash = hash; + outputHashMode = "recursive"; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4c58aaa8b0f2..e22700fb2d07 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24522,8 +24522,10 @@ with pkgs; maker-panel = callPackage ../tools/misc/maker-panel { }; mastodon = callPackage ../servers/mastodon { - nodejs-slim = nodejs-slim_20; - ruby = ruby_3_2; + nodejs-slim = nodejs-slim_22; + python3 = python311; + ruby = ruby_3_3; + yarn-berry = yarn-berry.override { nodejs = nodejs-slim_22; }; }; gotosocial = callPackage ../servers/gotosocial { }; From f9b28d5678b351f06365ed683c6a948669fe23fd Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Thu, 10 Oct 2024 21:17:53 +0200 Subject: [PATCH 13/62] workflows/codeowners: Cache codeowner validator build The codeowner-validator build declared in ci/codeowners-validator was not cached before and needed to be built for every PR, which is slow and wasteful: https://github.com/NixOS/nixpkgs/actions/runs/11280533037/job/31373720922 --- .github/workflows/codeowners.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/codeowners.yml b/.github/workflows/codeowners.yml index 164b5a1136f2..56588d45c9cd 100644 --- a/.github/workflows/codeowners.yml +++ b/.github/workflows/codeowners.yml @@ -25,6 +25,13 @@ jobs: steps: - uses: cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # v30 + - uses: cachix/cachix-action@ad2ddac53f961de1989924296a1f236fcfbaa4fc # v15 + if: github.repository_owner == 'NixOS' + with: + # This cache is for the nixpkgs repo checks and should not be trusted or used elsewhere. + name: nixpkgs-ci + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + # Important: Because we use pull_request_target, this checks out the base branch of the PR, not the PR itself. # We later build and run code from the base branch with access to secrets, # so it's important this is not the PRs code. From ed897d230af4802bb7f19b7548639941166ed755 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Wed, 11 Sep 2024 17:03:31 +0200 Subject: [PATCH 14/62] lomiri.u1db-qt: 0.1.7 -> 0.1.8 --- .../lomiri/development/u1db-qt/default.nix | 56 ++++++++----------- 1 file changed, 24 insertions(+), 32 deletions(-) diff --git a/pkgs/desktops/lomiri/development/u1db-qt/default.nix b/pkgs/desktops/lomiri/development/u1db-qt/default.nix index 8eeffa84ce35..9bba0d914c7a 100644 --- a/pkgs/desktops/lomiri/development/u1db-qt/default.nix +++ b/pkgs/desktops/lomiri/development/u1db-qt/default.nix @@ -1,25 +1,26 @@ -{ stdenv -, lib -, fetchFromGitLab -, fetchpatch -, gitUpdater -, testers -, cmake -, dbus-test-runner -, pkg-config -, qtbase -, qtdeclarative +{ + stdenv, + lib, + fetchFromGitLab, + fetchpatch, + gitUpdater, + testers, + cmake, + dbus-test-runner, + pkg-config, + qtbase, + qtdeclarative, }: stdenv.mkDerivation (finalAttrs: { pname = "u1db-qt"; - version = "0.1.7"; + version = "0.1.8"; src = fetchFromGitLab { owner = "ubports"; repo = "development/core/u1db-qt"; rev = finalAttrs.version; - hash = "sha256-qlWkxpiVEUbpsKhzR0s7SKaEFCLM2RH+v9XmJ3qLoGY="; + hash = "sha256-KmAEgnWHY0cDKJqRhZpY0fzVjNlEU67e559XEbAPpJI="; }; outputs = [ @@ -29,12 +30,11 @@ stdenv.mkDerivation (finalAttrs: { ]; patches = [ - # Fixes some issues with the pkg-config file - # Remove when https://gitlab.com/ubports/development/core/u1db-qt/-/merge_requests/7 merged & in release + # Remove when https://gitlab.com/ubports/development/core/u1db-qt/-/merge_requests/8 merged & in release (fetchpatch { - name = "0001-u1db-qt-Fix-pkg-config-files-includedir-variable.patch"; - url = "https://gitlab.com/ubports/development/core/u1db-qt/-/commit/ddafbfadfad6dfc508a866835354a4701dda1fe1.patch"; - hash = "sha256-entwjU9TiHuSuht7Cdl0k1v0cP7350a04/FXgTVhGmk="; + name = "0001-u1db-qt-Use-BUILD_TESTING.patch"; + url = "https://gitlab.com/ubports/development/core/u1db-qt/-/commit/df5d526df26c056d54bfa532a3a3fa025d655690.patch"; + hash = "sha256-CILMcvqXrTbEL/N2Tic4IsKLnTtmFJ2QbV3r4PsQ5t0="; }) ]; @@ -48,10 +48,6 @@ stdenv.mkDerivation (finalAttrs: { # For our automatic pkg-config output patcher to work, prefix must be used here substituteInPlace libu1db-qt.pc.in \ --replace-fail 'libdir=''${exec_prefix}/lib' 'libdir=''${prefix}/lib' - '' + lib.optionalString (!finalAttrs.finalPackage.doCheck) '' - # Other locations add dependencies to custom check target from tests - substituteInPlace CMakeLists.txt \ - --replace-fail 'add_subdirectory(tests)' 'add_custom_target(check COMMAND "echo check dummy")' ''; strictDeps = true; @@ -67,9 +63,7 @@ stdenv.mkDerivation (finalAttrs: { qtdeclarative ]; - nativeCheckInputs = [ - dbus-test-runner - ]; + nativeCheckInputs = [ dbus-test-runner ]; cmakeFlags = [ # Needs qdoc, see https://github.com/NixOS/nixpkgs/pull/245379 @@ -104,14 +98,12 @@ stdenv.mkDerivation (finalAttrs: { updateScript = gitUpdater { }; }; - meta = with lib; { + meta = { description = "Qt5 binding and QtQuick2 plugin for U1DB"; homepage = "https://gitlab.com/ubports/development/core/u1db-qt"; - license = licenses.lgpl3Only; - maintainers = teams.lomiri.members; - platforms = platforms.linux; - pkgConfigModules = [ - "libu1db-qt5" - ]; + license = lib.licenses.lgpl3Only; + maintainers = lib.teams.lomiri.members; + platforms = lib.platforms.linux; + pkgConfigModules = [ "libu1db-qt5" ]; }; }) From 6037708c33bc2014125e27721cd4e61121c8c03c Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Mon, 16 Sep 2024 13:04:27 +0200 Subject: [PATCH 15/62] lomiri.lomiri-content-hub: Rename from lomiri.content-hub, 1.1.1 -> 2.0.0 --- .../services/desktop-managers/lomiri.nix | 8 +-- nixos/tests/lomiri.nix | 22 +++---- .../lomiri-camera-app/default.nix | 8 +-- .../applications/lomiri-clock-app/default.nix | 6 +- .../lomiri-docviewer-app/default.nix | 10 +-- .../lomiri-filemanager-app/default.nix | 8 +-- .../lomiri-gallery-app/default.nix | 19 ++++-- .../lomiri-system-settings/default.nix | 4 +- .../applications/morph-browser/default.nix | 11 +++- .../lomiri/applications/teleports/default.nix | 8 +-- pkgs/desktops/lomiri/default.nix | 3 +- .../default.nix | 64 ++++--------------- 12 files changed, 72 insertions(+), 99 deletions(-) rename pkgs/desktops/lomiri/services/{content-hub => lomiri-content-hub}/default.nix (56%) diff --git a/nixos/modules/services/desktop-managers/lomiri.nix b/nixos/modules/services/desktop-managers/lomiri.nix index 310657179fea..75834eab0cd8 100644 --- a/nixos/modules/services/desktop-managers/lomiri.nix +++ b/nixos/modules/services/desktop-managers/lomiri.nix @@ -16,7 +16,6 @@ in { libayatana-common ubports-click ]) ++ (with pkgs.lomiri; [ - content-hub hfd-service history-service libusermetrics @@ -24,6 +23,7 @@ in { lomiri-calculator-app lomiri-camera-app lomiri-clock-app + lomiri-content-hub lomiri-docviewer-app lomiri-download-manager lomiri-filemanager-app @@ -129,7 +129,7 @@ in { environment.pathsToLink = [ # Configs for inter-app data exchange system - "/share/content-hub/peers" + "/share/lomiri-content-hub/peers" # Configs for inter-app URL requests "/share/lomiri-url-dispatcher/urls" # Splash screens & other images for desktop apps launched via lomiri-app-launch @@ -194,10 +194,6 @@ in { }; users.groups.usermetrics = { }; - - # TODO content-hub cannot pass files between applications without asking AA for permissions. And alot of the Lomiri stack is designed with AA availability in mind. This might be a requirement to be closer to upstream? - # But content-hub currently fails to pass files between applications even with AA enabled, and we can get away without AA in many places. Let's see how this develops before requiring this for good. - # security.apparmor.enable = true; }; meta.maintainers = lib.teams.lomiri.members; diff --git a/nixos/tests/lomiri.nix b/nixos/tests/lomiri.nix index 95a3cd0dd90e..66f921610460 100644 --- a/nixos/tests/lomiri.nix +++ b/nixos/tests/lomiri.nix @@ -360,13 +360,13 @@ in }; variables = { - # So we can test what content-hub is working behind the scenes - CONTENT_HUB_LOGGING_LEVEL = "2"; + # So we can test what lomiri-content-hub is working behind the scenes + LOMIRI_CONTENT_HUB_LOGGING_LEVEL = "2"; }; systemPackages = with pkgs; [ - # For a convenient way of kicking off content-hub peer collection - lomiri.content-hub.examples + # For a convenient way of kicking off lomiri-content-hub peer collection + lomiri.lomiri-content-hub.examples ]; }; @@ -484,9 +484,9 @@ in # lomiri-terminal-app has a separate VM test to test its basic functionality - # for the LSS content-hub test to work reliably, we need to kick off peer collecting - machine.send_chars("content-hub-test-importer\n") - wait_for_text(r"(/build/source|hub.cpp|handler.cpp|void|virtual|const)") # awaiting log messages from content-hub + # for the LSS lomiri-content-hub test to work reliably, we need to kick off peer collecting + machine.send_chars("lomiri-content-hub-test-importer\n") + wait_for_text(r"(/build/source|hub.cpp|handler.cpp|void|virtual|const)") # awaiting log messages from lomiri-content-hub machine.send_key("ctrl-c") # Doing this here, since we need an in-session shell & separately starting a terminal again wastes time @@ -510,7 +510,7 @@ in wait_for_text("Rotation Lock") machine.screenshot("settings_open") - # lomiri-system-settings has a separate VM test, only test Lomiri-specific content-hub functionalities here + # lomiri-system-settings has a separate VM test, only test Lomiri-specific lomiri-content-hub functionalities here # Make fullscreen, can't navigate to Background plugin via keyboard unless window has non-phone-like aspect ratio toggle_maximise() @@ -536,7 +536,7 @@ in # Peers should be loaded wait_for_text("Morph") # or Gallery, but Morph is already packaged - machine.screenshot("settings_content-hub_peers") + machine.screenshot("settings_lomiri-content-hub_peers") # Select Morph as content source mouse_click(370, 100) @@ -544,11 +544,11 @@ in # Expect Morph to be brought into the foreground, with its Downloads page open wait_for_text("No downloads") - # If content-hub encounters a problem, it may have crashed the original application issuing the request. + # If lomiri-content-hub encounters a problem, it may have crashed the original application issuing the request. # Check that it's still alive machine.succeed("pgrep -u ${user} -f lomiri-system-settings") - machine.screenshot("content-hub_exchange") + machine.screenshot("lomiri-content-hub_exchange") # Testing any more would require more applications & setup, the fact that it's already being attempted is a good sign machine.send_key("esc") diff --git a/pkgs/desktops/lomiri/applications/lomiri-camera-app/default.nix b/pkgs/desktops/lomiri/applications/lomiri-camera-app/default.nix index 34abc5d808ee..88770eeaf9b4 100644 --- a/pkgs/desktops/lomiri/applications/lomiri-camera-app/default.nix +++ b/pkgs/desktops/lomiri/applications/lomiri-camera-app/default.nix @@ -6,12 +6,12 @@ gitUpdater, nixosTests, cmake, - content-hub, exiv2, gettext, gst_all_1, libusermetrics, lomiri-action-api, + lomiri-content-hub, lomiri-ui-toolkit, lomiri-thumbnailer, pkg-config, @@ -145,9 +145,9 @@ stdenv.mkDerivation (finalAttrs: { qzxing # QML - content-hub libusermetrics lomiri-action-api + lomiri-content-hub lomiri-ui-toolkit lomiri-thumbnailer qtpositioning @@ -192,7 +192,7 @@ stdenv.mkDerivation (finalAttrs: { export QML2_IMPORT_PATH=${ listToQtVar qtbase.qtQmlPrefix [ lomiri-ui-toolkit - content-hub + lomiri-content-hub lomiri-thumbnailer ] } @@ -203,7 +203,7 @@ stdenv.mkDerivation (finalAttrs: { ln -s $out/share/lomiri-camera-app/assets/lomiri-camera-app-splash.svg $out/share/lomiri-app-launch/splash/lomiri-camera-app.svg ln -s $out/share/lomiri-camera-app/assets/lomiri-barcode-reader-app-splash.svg $out/share/lomiri-app-launch/splash/lomiri-barcode-reader-app.svg - install -Dm644 ../camera-contenthub.json $out/share/content-hub/peers/lomiri-camera-app + install -Dm644 ../camera-contenthub.json $out/share/lomiri-content-hub/peers/lomiri-camera-app ''; dontWrapGApps = true; diff --git a/pkgs/desktops/lomiri/applications/lomiri-clock-app/default.nix b/pkgs/desktops/lomiri/applications/lomiri-clock-app/default.nix index 6403ed165c29..b750184e7300 100644 --- a/pkgs/desktops/lomiri/applications/lomiri-clock-app/default.nix +++ b/pkgs/desktops/lomiri/applications/lomiri-clock-app/default.nix @@ -6,10 +6,10 @@ gitUpdater, nixosTests, cmake, - content-hub, geonames, gettext, libusermetrics, + lomiri-content-hub, lomiri-sounds, lomiri-ui-toolkit, makeWrapper, @@ -124,8 +124,8 @@ stdenv.mkDerivation (finalAttrs: { qtbase # QML - content-hub libusermetrics + lomiri-content-hub lomiri-ui-toolkit qtdeclarative qtmultimedia @@ -172,7 +172,7 @@ stdenv.mkDerivation (finalAttrs: { export QML2_IMPORT_PATH=${ listToQtVar qtbase.qtQmlPrefix ( [ - content-hub + lomiri-content-hub lomiri-ui-toolkit qtmultimedia u1db-qt diff --git a/pkgs/desktops/lomiri/applications/lomiri-docviewer-app/default.nix b/pkgs/desktops/lomiri/applications/lomiri-docviewer-app/default.nix index 165987ef18c9..58168edbc594 100644 --- a/pkgs/desktops/lomiri/applications/lomiri-docviewer-app/default.nix +++ b/pkgs/desktops/lomiri/applications/lomiri-docviewer-app/default.nix @@ -7,9 +7,9 @@ gitUpdater, nixosTests, cmake, - content-hub, gettext, libreoffice-unwrapped, + lomiri-content-hub, lomiri-ui-toolkit, pkg-config, poppler, @@ -84,11 +84,11 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-KdHyKXM0hMMIFkuDn5JZJOEuitWAXT2QQOuR+1AolP0="; }) - # Remove when https://gitlab.com/ubports/development/apps/lomiri-docviewer-app/-/merge_requests/77 merged & in release + # Remove when version > 3.0.4 (fetchpatch { name = "1051-lomiri-docviewer-app-Install-content-hub-lomiri-url-dispatcher-files.patch"; - url = "https://gitlab.com/ubports/development/apps/lomiri-docviewer-app/-/commit/98f5ab9d51ba05e8c3ed1991c0b67d3922b5ba90.patch"; - hash = "sha256-JA26ga1CNOdbis87lSzqbUbs94Oc1vlxraXZxx3dsu8="; + url = "https://gitlab.com/ubports/development/apps/lomiri-docviewer-app/-/commit/d6731f6d00050b42d561d63ae91751761f7fd278.patch"; + hash = "sha256-EFuQ+pMI8fwYM0lgapi/XeAagFbXUzLWzAx0bPkEdzA="; }) ]; @@ -118,7 +118,7 @@ stdenv.mkDerivation (finalAttrs: { qtdeclarative # QML - content-hub + lomiri-content-hub lomiri-ui-toolkit qtsystems ]; diff --git a/pkgs/desktops/lomiri/applications/lomiri-filemanager-app/default.nix b/pkgs/desktops/lomiri/applications/lomiri-filemanager-app/default.nix index fa91e1531bf2..c27f10b91860 100644 --- a/pkgs/desktops/lomiri/applications/lomiri-filemanager-app/default.nix +++ b/pkgs/desktops/lomiri/applications/lomiri-filemanager-app/default.nix @@ -7,8 +7,8 @@ nixosTests, biometryd, cmake, - content-hub, gettext, + lomiri-content-hub, lomiri-thumbnailer, lomiri-ui-extras, lomiri-ui-toolkit, @@ -103,7 +103,7 @@ stdenv.mkDerivation (finalAttrs: { # QML biometryd - content-hub + lomiri-content-hub lomiri-thumbnailer lomiri-ui-extras lomiri-ui-toolkit @@ -119,8 +119,8 @@ stdenv.mkDerivation (finalAttrs: { 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 + mkdir -p $out/share/{lomiri-content-hub/peers,icons/hicolor/scalable/apps,lomiri-app-launch/splash} + ln -s $out/share/lomiri-filemanager-app/content-hub.json $out/share/lomiri-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 ''; diff --git a/pkgs/desktops/lomiri/applications/lomiri-gallery-app/default.nix b/pkgs/desktops/lomiri/applications/lomiri-gallery-app/default.nix index deed853358b4..eedf4c6a7ac3 100644 --- a/pkgs/desktops/lomiri/applications/lomiri-gallery-app/default.nix +++ b/pkgs/desktops/lomiri/applications/lomiri-gallery-app/default.nix @@ -6,11 +6,11 @@ gitUpdater, nixosTests, cmake, - content-hub, exiv2, imagemagick, libglvnd, libmediainfo, + lomiri-content-hub, lomiri-thumbnailer, lomiri-ui-extras, lomiri-ui-toolkit, @@ -88,6 +88,18 @@ stdenv.mkDerivation (finalAttrs: { url = "https://gitlab.com/ubports/development/apps/lomiri-gallery-app/-/commit/90a79972741ee0c5dc734dba6c42afeb3ee6a699.patch"; hash = "sha256-YAmH0he5/rZYKWFyPzUFAKJuHhUTxB3q8zbLL7Spz/c="; }) + + # Remove when version >= 3.1.0 + (fetchpatch { + name = "0101-lomiri-gallery-app-Updated-content-hub-peer-name.patch"; + url = "https://gitlab.com/ubports/development/apps/lomiri-gallery-app/-/commit/9a3376760ea6825d9915262264f98d7faf94bf81.patch"; + hash = "sha256-aKRtKUNDhQNJPW5MkohXw1lTnKvZwz4LnRMqp2pKMpU="; + }) + (fetchpatch { + name = "0102-lomiri-gallery-app-lomiri-content-hub-rename.patch"; + url = "https://gitlab.com/ubports/development/apps/lomiri-gallery-app/-/commit/cb6eb0ffdf8d67de97572450447df277ce56a226.patch"; + hash = "sha256-32QNWmZU1DmXeGkwYUH4g4nPMkYId9k6IdOKm+KfSuE="; + }) ]; postPatch = '' @@ -130,7 +142,7 @@ stdenv.mkDerivation (finalAttrs: { qtsvg # QML - content-hub + lomiri-content-hub lomiri-thumbnailer lomiri-ui-extras lomiri-ui-toolkit @@ -164,9 +176,6 @@ stdenv.mkDerivation (finalAttrs: { # Link splash to splash dir mkdir -p $out/share/lomiri-app-launch/splash ln -s $out/share/{lomiri-gallery-app/lomiri-gallery-app-splash.svg,lomiri-app-launch/splash/lomiri-gallery-app.svg} - - # Old name - mv $out/share/content-hub/peers/{,lomiri-}gallery-app ''; passthru = { diff --git a/pkgs/desktops/lomiri/applications/lomiri-system-settings/default.nix b/pkgs/desktops/lomiri/applications/lomiri-system-settings/default.nix index 115d1d01abfc..6085f4d1b5fb 100644 --- a/pkgs/desktops/lomiri/applications/lomiri-system-settings/default.nix +++ b/pkgs/desktops/lomiri/applications/lomiri-system-settings/default.nix @@ -9,7 +9,6 @@ biometryd, cmake, cmake-extras, - content-hub, dbus, deviceinfo, geonames, @@ -24,6 +23,7 @@ libqofono, libqtdbustest, libqtdbusmock, + lomiri-content-hub, lomiri-indicator-network, lomiri-schemas, lomiri-settings-components, @@ -122,8 +122,8 @@ stdenv.mkDerivation (finalAttrs: { propagatedBuildInputs = [ ayatana-indicator-datetime biometryd - content-hub libqofono + lomiri-content-hub lomiri-indicator-network lomiri-schemas lomiri-settings-components diff --git a/pkgs/desktops/lomiri/applications/morph-browser/default.nix b/pkgs/desktops/lomiri/applications/morph-browser/default.nix index 12c71a4f90b8..6733f6b0d878 100644 --- a/pkgs/desktops/lomiri/applications/morph-browser/default.nix +++ b/pkgs/desktops/lomiri/applications/morph-browser/default.nix @@ -5,10 +5,10 @@ , gitUpdater , nixosTests , cmake -, content-hub , gettext , libapparmor , lomiri-action-api +, lomiri-content-hub , lomiri-ui-extras , lomiri-ui-toolkit , pkg-config @@ -50,6 +50,13 @@ stdenv.mkDerivation (finalAttrs: { url = "https://gitlab.com/ubports/development/core/morph-browser/-/commit/0527a1e01fb27c62f5e0011274f73bad400e9691.patch"; hash = "sha256-zx/pP72uNqAi8TZR4bKeONuqcJyK/vGtPglTA+5R5no="; }) + + # Remove when https://gitlab.com/ubports/development/core/morph-browser/-/merge_requests/580 merged & in release + (fetchpatch { + name = "0003-morph-browser-lomiri-content-hub-rename.patch"; + url = "https://gitlab.com/ubports/development/core/morph-browser/-/commit/29e5031a1fd0aa69587724b25772ae78d6d2bd7d.patch"; + hash = "sha256-nxOaiRSKi+Nb0JLopi0UNvpnctjkPkjhaHLAWPHRfQA="; + }) ]; postPatch = '' @@ -84,8 +91,8 @@ stdenv.mkDerivation (finalAttrs: { qtwebengine # QML - content-hub lomiri-action-api + lomiri-content-hub lomiri-ui-extras lomiri-ui-toolkit qqc2-suru-style diff --git a/pkgs/desktops/lomiri/applications/teleports/default.nix b/pkgs/desktops/lomiri/applications/teleports/default.nix index f5fceb5bd40a..8a9d318f4b2c 100644 --- a/pkgs/desktops/lomiri/applications/teleports/default.nix +++ b/pkgs/desktops/lomiri/applications/teleports/default.nix @@ -7,8 +7,8 @@ gitUpdater, nixosTests, cmake, - content-hub, intltool, + lomiri-content-hub, lomiri-indicator-network, lomiri-push-qml, lomiri-thumbnailer, @@ -84,7 +84,7 @@ stdenv.mkDerivation (finalAttrs: { ]; buildInputs = [ - content-hub + lomiri-content-hub lomiri-indicator-network lomiri-push-qml lomiri-thumbnailer @@ -102,10 +102,10 @@ stdenv.mkDerivation (finalAttrs: { ]; postInstall = '' - mkdir -p $out/share/{applications,content-hub/peers,icons/hicolor/scalable/apps,lomiri-app-launch/splash,lomiri-url-dispatcher/urls} + mkdir -p $out/share/{applications,lomiri-content-hub/peers,icons/hicolor/scalable/apps,lomiri-app-launch/splash,lomiri-url-dispatcher/urls} ln -s $out/share/teleports/teleports.desktop $out/share/applications/teleports.desktop - ln -s $out/share/teleports/teleports.content-hub $out/share/content-hub/peers/teleports + ln -s $out/share/teleports/teleports.content-hub $out/share/lomiri-content-hub/peers/teleports ln -s $out/share/teleports/assets/icon.svg $out/share/icons/hicolor/scalable/apps/teleports.svg ln -s $out/share/teleports/assets/splash.svg $out/share/lomiri-app-launch/splash/teleports.svg ln -s $out/share/teleports/teleports.url-dispatcher $out/share/lomiri-url-dispatcher/urls/teleports.url-dispatcher diff --git a/pkgs/desktops/lomiri/default.nix b/pkgs/desktops/lomiri/default.nix index 8e5dbd2ff9ef..c4794109b862 100644 --- a/pkgs/desktops/lomiri/default.nix +++ b/pkgs/desktops/lomiri/default.nix @@ -56,7 +56,7 @@ let #### Services biometryd = callPackage ./services/biometryd { }; - content-hub = callPackage ./services/content-hub { }; + lomiri-content-hub = callPackage ./services/lomiri-content-hub { }; hfd-service = callPackage ./services/hfd-service { }; history-service = callPackage ./services/history-service { }; lomiri-download-manager = callPackage ./services/lomiri-download-manager { }; @@ -70,5 +70,6 @@ let in lib.makeScope libsForQt5.newScope packages // lib.optionalAttrs config.allowAliases { + content-hub = lib.warn "`content-hub` was renamed to `lomiri-content-hub`." pkgs.lomiri.lomiri-content-hub; # Added on 2024-09-11 lomiri-system-settings-security-privacy = lib.warn "`lomiri-system-settings-security-privacy` upstream was merged into `lomiri-system-settings`. Please use `pkgs.lomiri.lomiri-system-settings-unwrapped` if you need to directly access the plugins that belonged to this project." pkgs.lomiri.lomiri-system-settings-unwrapped; # Added on 2024-08-08 } diff --git a/pkgs/desktops/lomiri/services/content-hub/default.nix b/pkgs/desktops/lomiri/services/lomiri-content-hub/default.nix similarity index 56% rename from pkgs/desktops/lomiri/services/content-hub/default.nix rename to pkgs/desktops/lomiri/services/lomiri-content-hub/default.nix index a1fd99757844..dd2f6d3ab23e 100644 --- a/pkgs/desktops/lomiri/services/content-hub/default.nix +++ b/pkgs/desktops/lomiri/services/lomiri-content-hub/default.nix @@ -1,8 +1,6 @@ { stdenv , lib , fetchFromGitLab -, fetchpatch -, fetchpatch2 , gitUpdater , testers , cmake @@ -30,14 +28,14 @@ }: stdenv.mkDerivation (finalAttrs: { - pname = "content-hub"; - version = "1.1.1"; + pname = "lomiri-content-hub"; + version = "2.0.0"; src = fetchFromGitLab { owner = "ubports"; - repo = "development/core/content-hub"; + repo = "development/core/lomiri-content-hub"; rev = finalAttrs.version; - hash = "sha256-sQeyJV+Wc6PHKGIefl/dfU06XqTdICsn+Xamjx3puiI="; + hash = "sha256-eA5oCoAZB7fWyWm0Sy6wXh0EW+h76bdfJ2dotr7gUC0="; }; outputs = [ @@ -46,44 +44,6 @@ stdenv.mkDerivation (finalAttrs: { "examples" ]; - patches = [ - # 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/9ec9df32f77383eec7994d8e3e6961531bc8464d.patch"; - hash = "sha256-14dZosMTMa1FDGEMuil0r1Hz6vn+L9XC83NMAqC7Ol8="; - }) - - # Remove when https://gitlab.com/ubports/development/core/content-hub/-/merge_requests/34 merged & in release - (fetchpatch { - name = "0002-content-hub-import-Lomiri-Content-CMakeLists-Drop-qt-argument-to-qmlplugindump.patch"; - url = "https://gitlab.com/ubports/development/core/content-hub/-/commit/63a4baf1469de31c4fd50c69ed85d061f5e8e80a.patch"; - hash = "sha256-T+6T9lXne6AhDFv9d7L8JNwdl8f0wjDmvSoNVPkHza4="; - }) - - # 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"; - url = "https://gitlab.com/ubports/development/core/content-hub/-/commit/3c5ca4a8ec125e003aca78c14521b70140856c25.patch"; - hash = "sha256-kYN0eLwMyM/9yK+zboyEsoPKZMZ4SCXodVYsvkQr2F8="; - }) - - # Remove when version > 1.1.1 - (fetchpatch { - 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 - (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 = '' substituteInPlace import/*/Content/CMakeLists.txt \ --replace-fail "\''${CMAKE_INSTALL_LIBDIR}/qt5/qml" "\''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}" @@ -163,7 +123,7 @@ stdenv.mkDerivation (finalAttrs: { moveToOutput share/applications/$exampleExe.desktop $examples done moveToOutput share/icons $examples - moveToOutput share/content-hub/peers $examples + moveToOutput share/lomiri-content-hub/peers $examples ''; postFixup = '' @@ -178,20 +138,20 @@ stdenv.mkDerivation (finalAttrs: { }; meta = { - description = "Content sharing/picking service"; + description = "Content sharing/picking service for the Lomiri desktop"; longDescription = '' - content-hub is a mediation service to let applications share content between them, + lomiri-content-hub is a mediation service to let applications share content between them, even if they are not running at the same time. ''; - homepage = "https://gitlab.com/ubports/development/core/content-hub"; - changelog = "https://gitlab.com/ubports/development/core/content-hub/-/blob/${finalAttrs.version}/ChangeLog"; + homepage = "https://gitlab.com/ubports/development/core/lomiri-content-hub"; + changelog = "https://gitlab.com/ubports/development/core/lomiri-content-hub/-/blob/${finalAttrs.version}/ChangeLog"; license = with lib.licenses; [ gpl3Only lgpl3Only ]; - mainProgram = "content-hub-service"; + mainProgram = "lomiri-content-hub-service"; maintainers = lib.teams.lomiri.members; platforms = lib.platforms.linux; pkgConfigModules = [ - "libcontent-hub" - "libcontent-hub-glib" + "liblomiri-content-hub" + "liblomiri-content-hub-glib" ]; }; }) From 44e237cb65a6ff10c2d4a22f99cde58e7a8bc275 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Thu, 12 Sep 2024 13:41:32 +0200 Subject: [PATCH 16/62] lomiri.lomiri-filemanager-app: 1.0.4 -> 1.1.1 --- .../lomiri-filemanager-app/default.nix | 57 ++++--------------- 1 file changed, 10 insertions(+), 47 deletions(-) diff --git a/pkgs/desktops/lomiri/applications/lomiri-filemanager-app/default.nix b/pkgs/desktops/lomiri/applications/lomiri-filemanager-app/default.nix index c27f10b91860..28d3c23f6ee9 100644 --- a/pkgs/desktops/lomiri/applications/lomiri-filemanager-app/default.nix +++ b/pkgs/desktops/lomiri/applications/lomiri-filemanager-app/default.nix @@ -22,54 +22,26 @@ stdenv.mkDerivation (finalAttrs: { pname = "lomiri-filemanager-app"; - version = "1.0.4"; + version = "1.1.1"; src = fetchFromGitLab { owner = "ubports"; repo = "development/apps/lomiri-filemanager-app"; rev = "v${finalAttrs.version}"; - hash = "sha256-vjGCTfXoqul1S7KUJXG6JwgZOc2etXWsdKbyQ/V3abA="; + hash = "sha256-KZzkD+h2yUeBvNFn9xLLtc4Iukk6maimFjIdpGCWLOE="; }; patches = [ - # This sets the *wrong* domain, but at least it sets *some* domain. - # Remove when version > 1.0.4 + # Remove when https://gitlab.com/ubports/development/apps/lomiri-filemanager-app/-/merge_requests/117 merged & in release (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="; + name = "0001-lomiri-filemanager-app-Install-content-hub-and-url-dispatcher-files.patch"; + url = "https://gitlab.com/ubports/development/apps/lomiri-filemanager-app/-/commit/e15dc7c5b4dd0b9e5df3e4e99da8f28bd760e093.patch"; + hash = "sha256-MXuQXpZcf5fJP4aenl5KDOtdaDFTTnkzIfem9BpE5ig="; }) - - # 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="; + name = "0002-lomiri-filemanager-app-Let-desktop-icon-be-found-via-lookup.patch"; + url = "https://gitlab.com/ubports/development/apps/lomiri-filemanager-app/-/commit/8c38f30ac099609379b95079fac771a61d73e7d6.patch"; + hash = "sha256-I3hB+W/5JW08HcLiNrSpZ7rTeQyKNoMNINVrFbF/Uiw="; }) ]; @@ -79,8 +51,7 @@ stdenv.mkDerivation (finalAttrs: { 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' + --replace-fail 'SPLASH ''${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 \ @@ -117,14 +88,6 @@ stdenv.mkDerivation (finalAttrs: { # 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/{lomiri-content-hub/peers,icons/hicolor/scalable/apps,lomiri-app-launch/splash} - ln -s $out/share/lomiri-filemanager-app/content-hub.json $out/share/lomiri-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 = { tests.vm = nixosTests.lomiri-filemanager-app; updateScript = gitUpdater { rev-prefix = "v"; }; From 7f4d08fb7eb726e68b41dd3d156ae88181e40099 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Thu, 12 Sep 2024 14:08:07 +0200 Subject: [PATCH 17/62] lomiri.lomiri-gallery-app: 3.0.2 -> 3.1.0 --- .../lomiri-gallery-app/default.nix | 77 ++----------------- 1 file changed, 8 insertions(+), 69 deletions(-) diff --git a/pkgs/desktops/lomiri/applications/lomiri-gallery-app/default.nix b/pkgs/desktops/lomiri/applications/lomiri-gallery-app/default.nix index eedf4c6a7ac3..817ce9b69bfc 100644 --- a/pkgs/desktops/lomiri/applications/lomiri-gallery-app/default.nix +++ b/pkgs/desktops/lomiri/applications/lomiri-gallery-app/default.nix @@ -25,91 +25,30 @@ stdenv.mkDerivation (finalAttrs: { pname = "lomiri-gallery-app"; - version = "3.0.2"; + version = "3.1.0"; src = fetchFromGitLab { owner = "ubports"; repo = "development/apps/lomiri-gallery-app"; rev = "v${finalAttrs.version}"; - hash = "sha256-nX9dTL4W0WxrwvszGd4AUIx4yUrghMM7ZMtGZLhZE/8="; + hash = "sha256-uKGPic9XYUj0rLA05i6GjLM+n17MYgiFJMWnLXHKmIU="; }; patches = [ - # Remove when version > 3.0.2 - (fetchpatch { - name = "0001-lomiri-gallery-app-Newer-Evix2-compat.patch"; - url = "https://gitlab.com/ubports/development/apps/lomiri-gallery-app/-/commit/afa019b5e9071fbafaa9afb3b4effdae6e0774c5.patch"; - hash = "sha256-gBc++6EQ7t3VcBZTknkIpC0bJ/P15oI+G0YoQWtjnSY="; - }) - - # Remove when https://gitlab.com/ubports/development/apps/lomiri-gallery-app/-/merge_requests/147 merged & in release - (fetchpatch { - name = "0002-lomiri-gallery-app-Stop-using-qt5_use_modules.patch"; - url = "https://gitlab.com/ubports/development/apps/lomiri-gallery-app/-/commit/0149c8d422c3e0889d7d523789dc65776a52c4f9.patch"; - hash = "sha256-jS81F7KNbAn5J8sDDXzhXARNYAu6dEKcbNHpHp/3MaI="; - }) - - # Remove when https://gitlab.com/ubports/development/apps/lomiri-gallery-app/-/merge_requests/148 merged & in release - (fetchpatch { - name = "0003-lomiri-gallery-app-Fix-GNUInstallDirs.patch"; - url = "https://gitlab.com/ubports/development/apps/lomiri-gallery-app/-/commit/805121b362a9b486094e570053884b9ffa92b152.patch"; - hash = "sha256-fyAqKjZ0g7Sw7fWP1IW4SpZ+g0xi/pH6RJie1K3doP0="; - }) - - # Remove when https://gitlab.com/ubports/development/apps/lomiri-gallery-app/-/merge_requests/149 merged & in release - (fetchpatch { - name = "0004-lomiri-gallery-app-Fix-icons.patch"; - url = "https://gitlab.com/ubports/development/apps/lomiri-gallery-app/-/commit/906966536363e80fe9906dee935d991955e8f842.patch"; - hash = "sha256-LJ+ILhokceXFUvP/G1BEBE/J1/XUAmNBxu551x0Q6nk="; - }) - - # Remove when https://gitlab.com/ubports/development/apps/lomiri-gallery-app/-/merge_requests/150 merged & in release - (fetchpatch { - name = "0005-lomiri-gallery-app-Add-ENABLE_WERROR.patch"; - url = "https://gitlab.com/ubports/development/apps/lomiri-gallery-app/-/commit/fe32a3453b88cc3563e53ab124f669ce307e9688.patch"; - hash = "sha256-nFCtY3857D5e66rIME+lj6x4exEfx9D2XGEgyWhemgI="; - }) - - # Remove when https://gitlab.com/ubports/development/apps/lomiri-gallery-app/-/merge_requests/151 merged & in release - (fetchpatch { - name = "0006-lomiri-gallery-app-BUILD_TESTING.patch"; - url = "https://gitlab.com/ubports/development/apps/lomiri-gallery-app/-/commit/51f3d5e643db5576b051da63c58ba3492c851e44.patch"; - hash = "sha256-5aGx2xfCDgq/khgkzGsvUOmTIYALjyfn6W7IR5dldr8="; - }) - (fetchpatch { - name = "0007-lomiri-gallery-app-Top-level-Qt5Test.patch"; - url = "https://gitlab.com/ubports/development/apps/lomiri-gallery-app/-/commit/c308c689c2841d71554ff6397a110d1a12016b70.patch"; - hash = "sha256-fXVOKjnj4EPeby9iEp3mZRqx9MLqdF8SUVEouCkyDRc="; - }) - # Remove when https://gitlab.com/ubports/development/apps/lomiri-gallery-app/-/merge_requests/152 merged & in release (fetchpatch { - name = "0008-lomiri-gallery-app-bindtextdomain.patch"; - url = "https://gitlab.com/ubports/development/apps/lomiri-gallery-app/-/commit/90a79972741ee0c5dc734dba6c42afeb3ee6a699.patch"; - hash = "sha256-YAmH0he5/rZYKWFyPzUFAKJuHhUTxB3q8zbLL7Spz/c="; - }) - - # Remove when version >= 3.1.0 - (fetchpatch { - name = "0101-lomiri-gallery-app-Updated-content-hub-peer-name.patch"; - url = "https://gitlab.com/ubports/development/apps/lomiri-gallery-app/-/commit/9a3376760ea6825d9915262264f98d7faf94bf81.patch"; - hash = "sha256-aKRtKUNDhQNJPW5MkohXw1lTnKvZwz4LnRMqp2pKMpU="; + name = "0001-lomiri-gallery-app-bindtextdomain.patch"; + url = "https://gitlab.com/ubports/development/apps/lomiri-gallery-app/-/commit/592eff118cb5056886b73e6698f8941c7a16f2e0.patch"; + hash = "sha256-aR/Lnzvq4RuRLI75mMd4xTGMAcijm1adSAGVFZZ++No="; }) (fetchpatch { - name = "0102-lomiri-gallery-app-lomiri-content-hub-rename.patch"; - url = "https://gitlab.com/ubports/development/apps/lomiri-gallery-app/-/commit/cb6eb0ffdf8d67de97572450447df277ce56a226.patch"; - hash = "sha256-32QNWmZU1DmXeGkwYUH4g4nPMkYId9k6IdOKm+KfSuE="; + name = "0002-lomiri-gallery-app-C++ify-i18n.patch"; + url = "https://gitlab.com/ubports/development/apps/lomiri-gallery-app/-/commit/a7582abbe0acef4d49c77a4395bc22dbd1707ef3.patch"; + hash = "sha256-qzqTXqIYX+enoOwwV9d9fxe7tVYLuh1WkL8Ij/Qx0H0="; }) ]; postPatch = '' - # 0003-lomiri-gallery-app-Fix-icons.patch cannot be fully applied via patches due to binary diffs - # Remove when https://gitlab.com/ubports/development/apps/lomiri-gallery-app/-/merge_requests/149 merged & in release - for size in 64x64 128x128 256x256; do - rm desktop/icons/hicolor/"$size"/apps/gallery-app.png - magick desktop/lomiri-gallery-app.svg -resize "$size" desktop/icons/hicolor/"$size"/apps/lomiri-gallery-app.png - done - # Make splash path in desktop file relative substituteInPlace desktop/lomiri-gallery-app.desktop.in.in \ --replace-fail 'X-Lomiri-Splash-Image=@SPLASH@' 'X-Lomiri-Splash-Image=lomiri-app-launch/splash/lomiri-gallery-app.svg' From d0c3c4dfd8f16fb0615da592dedc2e86d52ee02d Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Thu, 12 Sep 2024 15:10:12 +0200 Subject: [PATCH 18/62] lomiri.lomiri-docviewer-app: 3.0.4 -> 3.1.0 --- .../lomiri-docviewer-app/default.nix | 61 +++---------------- 1 file changed, 7 insertions(+), 54 deletions(-) diff --git a/pkgs/desktops/lomiri/applications/lomiri-docviewer-app/default.nix b/pkgs/desktops/lomiri/applications/lomiri-docviewer-app/default.nix index 58168edbc594..6c5ce2a57cf8 100644 --- a/pkgs/desktops/lomiri/applications/lomiri-docviewer-app/default.nix +++ b/pkgs/desktops/lomiri/applications/lomiri-docviewer-app/default.nix @@ -21,61 +21,16 @@ stdenv.mkDerivation (finalAttrs: { pname = "lomiri-docviewer-app"; - version = "3.0.4"; + version = "3.1.0"; src = fetchFromGitLab { owner = "ubports"; repo = "development/apps/lomiri-docviewer-app"; rev = "v${finalAttrs.version}"; - hash = "sha256-xUBE+eSAfG2yMlE/DI+6JHQx+3HiNwtSTv/P4YOAE7Y="; + hash = "sha256-zesBZmaMiMJwHtj3SoaNeHPiM9VNGEa4nTIiG8nskqI="; }; patches = [ - # Remove when version > 3.0.4 - (fetchpatch { - name = "0001-lomiri-docviewer-app-Set-gettext-domain.patch"; - url = "https://gitlab.com/ubports/development/apps/lomiri-docviewer-app/-/commit/8dc2c911817c45451ff341e4ae4b841bcc134945.patch"; - hash = "sha256-vP6MYl7qhJzkgtnVelMMIbc0ZkHxC1s3abUXJ2zVi4w="; - }) - (fetchpatch { - name = "0002-lomiri-docviewer-app-Install-splash-file.patch"; - url = "https://gitlab.com/ubports/development/apps/lomiri-docviewer-app/-/commit/ef20bbdd5e80040bf11273a5fc2964400086fdc9.patch"; - hash = "sha256-ylPFn53PJRyyzhN1SxtmNFMFeDsV9UxyQhAqULA5PJM="; - }) - - # Remove when https://gitlab.com/ubports/development/apps/lomiri-docviewer-app/-/merge_requests/72 merged & in release - (fetchpatch { - name = "1001-lomiri-docviewer-app-Stop-using-qt5_use_modules.patch"; - url = "https://gitlab.com/ubports/development/apps/lomiri-docviewer-app/-/commit/120c81dd71356f2e06ef5c44d114b665236a7382.patch"; - hash = "sha256-4VCw90qYnQ/o67ndp9o8h+wUl2IUpmVGb9xyY55AMIQ="; - }) - (fetchpatch { - name = "1002-lomiri-docviewer-app-Move-Qt-find_package-to-top-level.patch"; - url = "https://gitlab.com/ubports/development/apps/lomiri-docviewer-app/-/commit/43ee96a3a33b7a8f04e95f434982bcc60ba4b257.patch"; - hash = "sha256-3LggdNo4Yak4SVAD/4/mMCl8PjZy1dIx9i5hKHM5fJU="; - }) - - # Remove when https://gitlab.com/ubports/development/apps/lomiri-docviewer-app/-/merge_requests/73 merged & in release - (fetchpatch { - name = "1011-lomiri-docviewer-app-Call-i18n-bindtextdomain.patch"; - url = "https://gitlab.com/ubports/development/apps/lomiri-docviewer-app/-/commit/67599a841917304f76ffa1167a217718542a8b46.patch"; - hash = "sha256-nbi3qX14kWtFcXrxAD41IeybDIRTNfUdRgSP1vDI/Hs="; - }) - - # Remove when https://gitlab.com/ubports/development/apps/lomiri-docviewer-app/-/merge_requests/74 merged & in release - (fetchpatch { - name = "1021-lomiri-docviewer-app-Use-GNUInstallDirs-more-better.patch"; - url = "https://gitlab.com/ubports/development/apps/lomiri-docviewer-app/-/commit/40a860a118077c05692002db694be77ea62dc5b3.patch"; - hash = "sha256-/zhpIdqZ7WsU4tx4/AZs5w8kEopjH2boiHdHaJk5RXk="; - }) - - # Remove when https://gitlab.com/ubports/development/apps/lomiri-docviewer-app/-/merge_requests/75 merged & in release - (fetchpatch { - name = "1031-lomiri-docviewer-app-Use-BUILD_TESTING.patch"; - url = "https://gitlab.com/ubports/development/apps/lomiri-docviewer-app/-/commit/6f1eb739a3e0bf0ba847f94f8ea8411e0a385c2d.patch"; - hash = "sha256-yVuYG+1JGo/I4TVRZ3UQeO/TJ8GiFO5BJ9Bs7glK7hg="; - }) - # Remove when https://gitlab.com/ubports/development/apps/lomiri-docviewer-app/-/merge_requests/76 merged & in release # fetchpatch2 because there's a file rename (fetchpatch2 { @@ -84,11 +39,11 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-KdHyKXM0hMMIFkuDn5JZJOEuitWAXT2QQOuR+1AolP0="; }) - # Remove when version > 3.0.4 + # Remove when https://gitlab.com/ubports/development/apps/lomiri-docviewer-app/-/merge_requests/81 merged & in release (fetchpatch { - name = "1051-lomiri-docviewer-app-Install-content-hub-lomiri-url-dispatcher-files.patch"; - url = "https://gitlab.com/ubports/development/apps/lomiri-docviewer-app/-/commit/d6731f6d00050b42d561d63ae91751761f7fd278.patch"; - hash = "sha256-EFuQ+pMI8fwYM0lgapi/XeAagFbXUzLWzAx0bPkEdzA="; + name = "1051-lomiri-docviewer-app-XDGify-icon.patch"; + url = "https://gitlab.com/ubports/development/apps/lomiri-docviewer-app/-/commit/a319e648ba15a7868d9ceb3a77ea15ad196e515b.patch"; + hash = "sha256-JMSnN8EyWPHhqHzaJxy3JIhNaOvPLYkVDnNCrPGbO4E="; }) ]; @@ -98,7 +53,6 @@ stdenv.mkDerivation (finalAttrs: { # We don't want absolute paths in desktop files substituteInPlace data/CMakeLists.txt \ - --replace-fail 'ICON "''${DATA_DIR}/''${ICON_FILE}"' 'ICON lomiri-docviewer-app' \ --replace-fail 'SPLASH "''${DATA_DIR}/''${SPLASH_FILE}"' 'SPLASH "lomiri-app-launch/splash/lomiri-docviewer-app.svg"' ''; @@ -133,9 +87,8 @@ stdenv.mkDerivation (finalAttrs: { doCheck = false; postInstall = '' - mkdir -p $out/share/{icons/hicolor/scalable/apps,lomiri-app-launch/splash} + mkdir -p $out/share/lomiri-app-launch/splash - ln -s $out/share/{lomiri-docviewer-app/docviewer-app.svg,icons/hicolor/scalable/apps/lomiri-docviewer-app.svg} ln -s $out/share/{lomiri-docviewer-app/docviewer-app-splash.svg,lomiri-app-launch/splash/lomiri-docviewer-app.svg} ''; From e67242b04c5e746c83437f9ea089b59b80573152 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Fri, 27 Sep 2024 22:32:03 +0200 Subject: [PATCH 19/62] lomiri.lomiri-filemanager-app: 1.1.1 -> 1.1.2 --- .../lomiri-filemanager-app/default.nix | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/pkgs/desktops/lomiri/applications/lomiri-filemanager-app/default.nix b/pkgs/desktops/lomiri/applications/lomiri-filemanager-app/default.nix index 28d3c23f6ee9..9ad6cee361f9 100644 --- a/pkgs/desktops/lomiri/applications/lomiri-filemanager-app/default.nix +++ b/pkgs/desktops/lomiri/applications/lomiri-filemanager-app/default.nix @@ -2,7 +2,6 @@ stdenv, lib, fetchFromGitLab, - fetchpatch, gitUpdater, nixosTests, biometryd, @@ -22,29 +21,15 @@ stdenv.mkDerivation (finalAttrs: { pname = "lomiri-filemanager-app"; - version = "1.1.1"; + version = "1.1.2"; src = fetchFromGitLab { owner = "ubports"; repo = "development/apps/lomiri-filemanager-app"; rev = "v${finalAttrs.version}"; - hash = "sha256-KZzkD+h2yUeBvNFn9xLLtc4Iukk6maimFjIdpGCWLOE="; + hash = "sha256-XA1Gdb0Kpc3BEifmgHhQ38moKkCkYbhpr8wptnddZlk="; }; - patches = [ - # Remove when https://gitlab.com/ubports/development/apps/lomiri-filemanager-app/-/merge_requests/117 merged & in release - (fetchpatch { - name = "0001-lomiri-filemanager-app-Install-content-hub-and-url-dispatcher-files.patch"; - url = "https://gitlab.com/ubports/development/apps/lomiri-filemanager-app/-/commit/e15dc7c5b4dd0b9e5df3e4e99da8f28bd760e093.patch"; - hash = "sha256-MXuQXpZcf5fJP4aenl5KDOtdaDFTTnkzIfem9BpE5ig="; - }) - (fetchpatch { - name = "0002-lomiri-filemanager-app-Let-desktop-icon-be-found-via-lookup.patch"; - url = "https://gitlab.com/ubports/development/apps/lomiri-filemanager-app/-/commit/8c38f30ac099609379b95079fac771a61d73e7d6.patch"; - hash = "sha256-I3hB+W/5JW08HcLiNrSpZ7rTeQyKNoMNINVrFbF/Uiw="; - }) - ]; - 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 From aca2f57b15d0b057dc4e163270d938475c515f9e Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Fri, 27 Sep 2024 22:39:18 +0200 Subject: [PATCH 20/62] lomiri.morph-browser: 1.1.0 -> 1.1.1 --- .../applications/morph-browser/default.nix | 21 ++++--------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/pkgs/desktops/lomiri/applications/morph-browser/default.nix b/pkgs/desktops/lomiri/applications/morph-browser/default.nix index 6733f6b0d878..ff636197d738 100644 --- a/pkgs/desktops/lomiri/applications/morph-browser/default.nix +++ b/pkgs/desktops/lomiri/applications/morph-browser/default.nix @@ -27,36 +27,22 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "morph-browser"; - version = "1.1.0"; + version = "1.1.1"; src = fetchFromGitLab { owner = "ubports"; repo = "development/core/morph-browser"; rev = finalAttrs.version; - hash = "sha256-C5iXv8VS8Mm1ryxK7Vi5tVmiM01OSIFiTyH0vP9B/xA="; + hash = "sha256-VxSADFTlaxQUDc81TzGkx54mjAUgY2L+suQC9zYGKo0="; }; patches = [ - # Remove when https://gitlab.com/ubports/development/core/morph-browser/-/merge_requests/575 merged & in release - (fetchpatch { - name = "0001-morph-browser-tst_SessionUtilsTests-Set-permissions-on-temporary-xdg-runtime-directory.patch"; - url = "https://gitlab.com/ubports/development/core/morph-browser/-/commit/e90206105b8b287fbd6e45ac37ca1cd259981928.patch"; - hash = "sha256-5htFn+OGVVBn3mJQaZcF5yt0mT+2QRlKyKFesEhklfA="; - }) - # Remove when https://gitlab.com/ubports/development/core/morph-browser/-/merge_requests/576 merged & in release (fetchpatch { name = "0002-morph-browser-Call-i18n-bindtextdomain-with-buildtime-determined-locale-path.patch"; url = "https://gitlab.com/ubports/development/core/morph-browser/-/commit/0527a1e01fb27c62f5e0011274f73bad400e9691.patch"; hash = "sha256-zx/pP72uNqAi8TZR4bKeONuqcJyK/vGtPglTA+5R5no="; }) - - # Remove when https://gitlab.com/ubports/development/core/morph-browser/-/merge_requests/580 merged & in release - (fetchpatch { - name = "0003-morph-browser-lomiri-content-hub-rename.patch"; - url = "https://gitlab.com/ubports/development/core/morph-browser/-/commit/29e5031a1fd0aa69587724b25772ae78d6d2bd7d.patch"; - hash = "sha256-nxOaiRSKi+Nb0JLopi0UNvpnctjkPkjhaHLAWPHRfQA="; - }) ]; postPatch = '' @@ -139,7 +125,8 @@ stdenv.mkDerivation (finalAttrs: { standalone = nixosTests.morph-browser; # Lomiri-specific issues with the desktop file may break the entire session, make sure it still works - lomiri = nixosTests.lomiri; + lomiri-basics = nixosTests.lomiri.desktop-basics; + lomiri-appinteractions = nixosTests.lomiri.desktop-appinteractions; }; }; From c10108bfbd860d040ed438b3d6ca814f6cd935bc Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Sat, 28 Sep 2024 14:54:58 +0200 Subject: [PATCH 21/62] lomiri.lomiri-terminal-app: 2.0.2 -> 2.0.3 --- .../lomiri-terminal-app/default.nix | 31 ++----------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/pkgs/desktops/lomiri/applications/lomiri-terminal-app/default.nix b/pkgs/desktops/lomiri/applications/lomiri-terminal-app/default.nix index 0b2b6f6e5798..a6bf2877ef58 100644 --- a/pkgs/desktops/lomiri/applications/lomiri-terminal-app/default.nix +++ b/pkgs/desktops/lomiri/applications/lomiri-terminal-app/default.nix @@ -1,7 +1,6 @@ { stdenv , lib , fetchFromGitLab -, fetchpatch , gitUpdater , nixosTests , cmake @@ -18,41 +17,15 @@ stdenv.mkDerivation (finalAttrs: { pname = "lomiri-terminal-app"; - version = "2.0.2"; + version = "2.0.3"; src = fetchFromGitLab { owner = "ubports"; repo = "development/apps/lomiri-terminal-app"; rev = "v${finalAttrs.version}"; - hash = "sha256-mXbPmVcl5dL78QUp+w3o4im5ohUQCPTKWLSVqlNO0yo="; + hash = "sha256-374ATxF+XhoALzYv6DEyj6IYgb82Ch4zcmqK0RXmlzI="; }; - patches = [ - # Stop usage of private qt5_use_modules function, seemingly unavailable in this package - # Remove when https://gitlab.com/ubports/development/apps/lomiri-terminal-app/-/merge_requests/103 merged & in release - (fetchpatch { - name = "0001-lomiri-terminal-app-Stop-using-qt5_use_modules.patch"; - url = "https://gitlab.com/ubports/development/apps/lomiri-terminal-app/-/commit/db210c74e771a427066aebdc3a99cab6e782d326.patch"; - hash = "sha256-op4+/eo8rBRMcW6MZ0rOEFReM7JBCck1B+AsgAPyqAI="; - }) - - # Explicitly bind textdomain, don't rely on hacky workaround in LUITK - # Remove when https://gitlab.com/ubports/development/apps/lomiri-terminal-app/-/merge_requests/104 merged & in release - (fetchpatch { - name = "0002-lomiri-terminal-app-Call-i18n.bindtextdomain.patch"; - url = "https://gitlab.com/ubports/development/apps/lomiri-terminal-app/-/commit/7f9d419e29043f0d0922d2ac1dce5673e2723a01.patch"; - hash = "sha256-HfIvGVbIdTasoHAfHysnzFLufQQ4lskym5HTekH+mjk="; - }) - - # Add more & correct existing usage of GNUInstallDirs variables - # Remove when https://gitlab.com/ubports/development/apps/lomiri-terminal-app/-/merge_requests/105 merged & in release - (fetchpatch { - name = "0003-lomiri-terminal-app-GNUInstallDirs-usage.patch"; - url = "https://gitlab.com/ubports/development/apps/lomiri-terminal-app/-/commit/fcde1f05bb442c74b1dff95917fd7594f26e97a7.patch"; - hash = "sha256-umxCMGNjyz0TVmwH0Gl0MpgjLQtkW9cHkUfpNJcoasE="; - }) - ]; - postPatch = '' substituteInPlace CMakeLists.txt \ --replace "\''${CMAKE_INSTALL_LIBDIR}/qt5/qml" "\''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}" From c707f731bf51bbd6f36073d5092d0f74758d82fe Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Wed, 9 Oct 2024 21:29:12 +0200 Subject: [PATCH 22/62] lomiri.mediascanner2: Cleanup after bump This was implemented upstream, no need to patch it anymore. --- pkgs/desktops/lomiri/services/mediascanner2/default.nix | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pkgs/desktops/lomiri/services/mediascanner2/default.nix b/pkgs/desktops/lomiri/services/mediascanner2/default.nix index 28dc57c3d31b..eac245737012 100644 --- a/pkgs/desktops/lomiri/services/mediascanner2/default.nix +++ b/pkgs/desktops/lomiri/services/mediascanner2/default.nix @@ -43,11 +43,7 @@ stdenv.mkDerivation (finalAttrs: { postPatch = '' substituteInPlace src/qml/MediaScanner.*/CMakeLists.txt \ - --replace "\''${CMAKE_INSTALL_LIBDIR}/qt5/qml" "\''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}" - - # Lomiri desktop doesn't identify itself under Canonical's name anymore - substituteInPlace src/daemon/scannerdaemon.cc \ - --replace 'Unity8' 'Lomiri' + --replace-fail "\''${CMAKE_INSTALL_LIBDIR}/qt5/qml" "\''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}" ''; strictDeps = true; From de16f5ecfda238f3742552c94371f8dfa6da995a Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Wed, 9 Oct 2024 21:37:37 +0200 Subject: [PATCH 23/62] lomiri.mediascanner2: nixfmt, modernise abit --- .../lomiri/services/mediascanner2/default.nix | 115 +++++++++--------- 1 file changed, 56 insertions(+), 59 deletions(-) diff --git a/pkgs/desktops/lomiri/services/mediascanner2/default.nix b/pkgs/desktops/lomiri/services/mediascanner2/default.nix index eac245737012..79670a8eb499 100644 --- a/pkgs/desktops/lomiri/services/mediascanner2/default.nix +++ b/pkgs/desktops/lomiri/services/mediascanner2/default.nix @@ -1,28 +1,29 @@ -{ stdenv -, lib -, fetchFromGitLab -, gitUpdater -, testers -, boost -, cmake -, cmake-extras -, dbus -, dbus-cpp -, gdk-pixbuf -, glib -, gst_all_1 -, gtest -, libapparmor -, libexif -, pkg-config -, properties-cpp -, qtbase -, qtdeclarative -, shared-mime-info -, sqlite -, taglib -, udisks -, wrapQtAppsHook +{ + stdenv, + lib, + fetchFromGitLab, + gitUpdater, + testers, + boost, + cmake, + cmake-extras, + dbus, + dbus-cpp, + gdk-pixbuf, + glib, + gst_all_1, + gtest, + libapparmor, + libexif, + pkg-config, + properties-cpp, + qtbase, + qtdeclarative, + shared-mime-info, + sqlite, + taglib, + udisks, + wrapQtAppsHook, }: stdenv.mkDerivation (finalAttrs: { @@ -55,35 +56,33 @@ stdenv.mkDerivation (finalAttrs: { wrapQtAppsHook ]; - buildInputs = [ - boost - cmake-extras - dbus - dbus-cpp - gdk-pixbuf - glib - libapparmor - libexif - properties-cpp - qtbase - qtdeclarative - shared-mime-info - sqlite - taglib - udisks - ] ++ (with gst_all_1; [ - gstreamer - gst-plugins-base - gst-plugins-good - ]); + buildInputs = + [ + boost + cmake-extras + dbus + dbus-cpp + gdk-pixbuf + glib + libapparmor + libexif + properties-cpp + qtbase + qtdeclarative + shared-mime-info + sqlite + taglib + udisks + ] + ++ (with gst_all_1; [ + gstreamer + gst-plugins-base + gst-plugins-good + ]); - checkInputs = [ - gtest - ]; + checkInputs = [ gtest ]; - cmakeFlags = [ - "-DENABLE_TESTS=${lib.boolToString finalAttrs.finalPackage.doCheck}" - ]; + cmakeFlags = [ (lib.cmakeBool "ENABLE_TESTS" finalAttrs.finalPackage.doCheck) ]; doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; @@ -104,15 +103,13 @@ stdenv.mkDerivation (finalAttrs: { updateScript = gitUpdater { }; }; - meta = with lib; { + meta = { description = "Media scanner service & access library"; homepage = "https://gitlab.com/ubports/development/core/mediascanner2"; - license = licenses.gpl3Only; - maintainers = teams.lomiri.members; + license = lib.licenses.gpl3Only; + maintainers = lib.teams.lomiri.members; mainProgram = "mediascanner-service-2.0"; - platforms = platforms.linux; - pkgConfigModules = [ - "mediascanner-2.0" - ]; + platforms = lib.platforms.linux; + pkgConfigModules = [ "mediascanner-2.0" ]; }; }) From 1b660ba22a6f7504cece4dfac487af79296c4c1c Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Thu, 10 Oct 2024 16:38:13 +0200 Subject: [PATCH 24/62] tests/lomiri: Test keymap switch, make keymap OCR more consistent --- nixos/tests/lomiri.nix | 171 +++++++++++++++++++++-------------------- 1 file changed, 87 insertions(+), 84 deletions(-) diff --git a/nixos/tests/lomiri.nix b/nixos/tests/lomiri.nix index 66f921610460..1ff68e85b94d 100644 --- a/nixos/tests/lomiri.nix +++ b/nixos/tests/lomiri.nix @@ -4,6 +4,52 @@ let user = "alice"; description = "Alice Foobar"; password = "foobar"; + + # tmpfiles setup to make OCRing on terminal output more reliable + terminalOcrTmpfilesSetup = + { + pkgs, + lib, + config, + }: + let + white = "255, 255, 255"; + black = "0, 0, 0"; + colorSection = color: { + Color = color; + Bold = true; + Transparency = false; + }; + terminalColors = pkgs.writeText "customized.colorscheme" ( + lib.generators.toINI { } { + Background = colorSection white; + Foreground = colorSection black; + Color2 = colorSection black; + Color2Intense = colorSection black; + } + ); + terminalConfig = pkgs.writeText "terminal.ubports.conf" ( + lib.generators.toINI { } { + General = { + colorScheme = "customized"; + fontSize = "16"; + fontStyle = "Inconsolata"; + }; + } + ); + confBase = "${config.users.users.${user}.home}/.config"; + userDirArgs = { + mode = "0700"; + user = user; + group = "users"; + }; + in + { + "${confBase}".d = userDirArgs; + "${confBase}/terminal.ubports".d = userDirArgs; + "${confBase}/terminal.ubports/customized.colorscheme".L.argument = "${terminalColors}"; + "${confBase}/terminal.ubports/terminal.ubports.conf".L.argument = "${terminalConfig}"; + }; in { greeter = makeTest ( @@ -154,47 +200,9 @@ in }; # Help with OCR - systemd.tmpfiles.settings = - let - white = "255, 255, 255"; - black = "0, 0, 0"; - colorSection = color: { - Color = color; - Bold = true; - Transparency = false; - }; - terminalColors = pkgs.writeText "customized.colorscheme" ( - lib.generators.toINI { } { - Background = colorSection white; - Foreground = colorSection black; - Color2 = colorSection black; - Color2Intense = colorSection black; - } - ); - terminalConfig = pkgs.writeText "terminal.ubports.conf" ( - lib.generators.toINI { } { - General = { - colorScheme = "customized"; - fontSize = "16"; - fontStyle = "Inconsolata"; - }; - } - ); - confBase = "${config.users.users.${user}.home}/.config"; - userDirArgs = { - mode = "0700"; - user = user; - group = "users"; - }; - in - { - "10-lomiri-test-setup" = { - "${confBase}".d = userDirArgs; - "${confBase}/terminal.ubports".d = userDirArgs; - "${confBase}/terminal.ubports/customized.colorscheme".L.argument = "${terminalColors}"; - "${confBase}/terminal.ubports/terminal.ubports.conf".L.argument = "${terminalConfig}"; - }; - }; + systemd.tmpfiles.settings = { + "10-lomiri-test-setup" = terminalOcrTmpfilesSetup { inherit pkgs lib config; }; + }; }; enableOCR = true; @@ -371,47 +379,9 @@ in }; # Help with OCR - systemd.tmpfiles.settings = - let - white = "255, 255, 255"; - black = "0, 0, 0"; - colorSection = color: { - Color = color; - Bold = true; - Transparency = false; - }; - terminalColors = pkgs.writeText "customized.colorscheme" ( - lib.generators.toINI { } { - Background = colorSection white; - Foreground = colorSection black; - Color2 = colorSection black; - Color2Intense = colorSection black; - } - ); - terminalConfig = pkgs.writeText "terminal.ubports.conf" ( - lib.generators.toINI { } { - General = { - colorScheme = "customized"; - fontSize = "16"; - fontStyle = "Inconsolata"; - }; - } - ); - confBase = "${config.users.users.${user}.home}/.config"; - userDirArgs = { - mode = "0700"; - user = user; - group = "users"; - }; - in - { - "10-lomiri-test-setup" = { - "${confBase}".d = userDirArgs; - "${confBase}/terminal.ubports".d = userDirArgs; - "${confBase}/terminal.ubports/customized.colorscheme".L.argument = "${terminalColors}"; - "${confBase}/terminal.ubports/terminal.ubports.conf".L.argument = "${terminalConfig}"; - }; - }; + systemd.tmpfiles.settings = { + "10-lomiri-test-setup" = terminalOcrTmpfilesSetup { inherit pkgs lib config; }; + }; }; enableOCR = true; @@ -732,8 +702,17 @@ in # Help with OCR fonts.packages = [ pkgs.inconsolata ]; - # Non-QWERTY keymap to test keymap patch - services.xserver.xkb.layout = "de"; + services.xserver.xkb.layout = lib.strings.concatStringsSep "," [ + # Start with a non-QWERTY keymap to test keymap patch + "de" + # Then a QWERTY one to test switching + "us" + ]; + + # Help with OCR + systemd.tmpfiles.settings = { + "10-lomiri-test-setup" = terminalOcrTmpfilesSetup { inherit pkgs lib config; }; + }; }; enableOCR = true; @@ -784,6 +763,30 @@ in machine.send_chars("touch ${pwInput}\n") machine.wait_for_file("/home/alice/${pwOutput}", 10) + # Issues with this keybind: input leaks to focused surface, may open launcher + # Don't have the keyboard indicator to handle this better + machine.send_key("meta_l-spc") + machine.wait_for_console_text('SET KEYMAP "us"') + + # Handle keybind fallout + machine.sleep(10) # wait for everything to settle + machine.send_key("esc") # close launcher in case it was opened + machine.sleep(2) # wait for animation to finish + # Make sure input leaks are gone + machine.send_key("backspace") + machine.send_key("backspace") + machine.send_key("backspace") + machine.send_key("backspace") + machine.send_key("backspace") + machine.send_key("backspace") + machine.send_key("backspace") + machine.send_key("backspace") + machine.send_key("backspace") + machine.send_key("backspace") + + machine.send_chars("touch ${pwInput}\n") + machine.wait_for_file("/home/alice/${pwInput}", 10) + machine.send_key("alt-f4") ''; } From 19afd5603290706849c18ba5ad06684466c45ac9 Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Fri, 11 Oct 2024 11:34:20 +0200 Subject: [PATCH 25/62] discord: fix parsing versions in updateScripts Discord changed their download URLs and the new code is now more lenient regarding the actual download URL, as all we care about is the version in the URL path. Example: https://ptb.dl2.discordapp.net/apps/linux/0.0.110/discord-ptb-0.0.110.tar.gz ^-----^ This is what we need Signed-off-by: Sefa Eyeoglu --- .../networking/instant-messengers/discord/darwin.nix | 7 ++----- .../networking/instant-messengers/discord/linux.nix | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/discord/darwin.nix b/pkgs/applications/networking/instant-messengers/discord/darwin.nix index aff995a1cee4..06957341a3bb 100644 --- a/pkgs/applications/networking/instant-messengers/discord/darwin.nix +++ b/pkgs/applications/networking/instant-messengers/discord/darwin.nix @@ -54,11 +54,8 @@ stdenv.mkDerivation { #!nix-shell -i bash -p curl gnugrep common-updater-scripts set -x set -eou pipefail; - url=$(curl -sI "https://discordapp.com/api/download/${ - builtins.replaceStrings [ "discord-" "discord" ] [ "" "stable" ] pname - }?platform=osx&format=dmg" | grep -oP 'location: \K\S+') - version=''${url##https://dl*.discordapp.net/apps/osx/} - version=''${version%%/*.dmg} + url=$(curl -sI -o /dev/null -w '%header{location}' "https://discord.com/api/download/${branch}?platform=osx&format=dmg") + version=$(echo $url | grep -oP '/\K(\d+\.){2}\d+') update-source-version ${lib.optionalString (!stdenv.buildPlatform.isDarwin) "pkgsCross.aarch64-darwin."}${pname} "$version" --file=./pkgs/applications/networking/instant-messengers/discord/default.nix --version-key=${branch} ''; }; diff --git a/pkgs/applications/networking/instant-messengers/discord/linux.nix b/pkgs/applications/networking/instant-messengers/discord/linux.nix index e0375ecf7b89..3c67d578013b 100644 --- a/pkgs/applications/networking/instant-messengers/discord/linux.nix +++ b/pkgs/applications/networking/instant-messengers/discord/linux.nix @@ -151,11 +151,8 @@ stdenv.mkDerivation rec { #!/usr/bin/env nix-shell #!nix-shell -i bash -p curl gnugrep common-updater-scripts set -eou pipefail; - url=$(curl -sI "https://discordapp.com/api/download/${ - builtins.replaceStrings [ "discord-" "discord" ] [ "" "stable" ] pname - }?platform=linux&format=tar.gz" | grep -oP 'location: \K\S+') - version=''${url##https://dl*.discordapp.net/apps/linux/} - version=''${version%%/*.tar.gz} + url=$(curl -sI -o /dev/null -w '%header{location}' "https://discord.com/api/download/${branch}?platform=linux&format=tar.gz") + version=$(echo $url | grep -oP '/\K(\d+\.){2}\d+') update-source-version ${pname} "$version" --file=./pkgs/applications/networking/instant-messengers/discord/default.nix --version-key=${branch} ''; }; From a765e430e92e5d596ea561e807f8ebc256d8073f Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Fri, 11 Oct 2024 11:50:22 +0200 Subject: [PATCH 26/62] discord: update all discord packages Signed-off-by: Sefa Eyeoglu --- .../instant-messengers/discord/default.nix | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/discord/default.nix b/pkgs/applications/networking/instant-messengers/discord/default.nix index 500b0a28f18e..8c5410ce8328 100644 --- a/pkgs/applications/networking/instant-messengers/discord/default.nix +++ b/pkgs/applications/networking/instant-messengers/discord/default.nix @@ -2,52 +2,52 @@ let versions = if stdenv.hostPlatform.isLinux then { - stable = "0.0.70"; - ptb = "0.0.105"; - canary = "0.0.492"; - development = "0.0.28"; + stable = "0.0.71"; + ptb = "0.0.110"; + canary = "0.0.502"; + development = "0.0.30"; } else { - stable = "0.0.318"; - ptb = "0.0.133"; - canary = "0.0.591"; - development = "0.0.49"; + stable = "0.0.322"; + ptb = "0.0.140"; + canary = "0.0.611"; + development = "0.0.53"; }; version = versions.${branch}; srcs = rec { x86_64-linux = { stable = fetchurl { - url = "https://dl.discordapp.net/apps/linux/${version}/discord-${version}.tar.gz"; - hash = "sha256-Ujlewrhbqal97hCG6+Iu+OqntWZJ/oY6ZHeL+HmoU38="; + url = "https://stable.dl2.discordapp.net/apps/linux/${version}/discord-${version}.tar.gz"; + hash = "sha256-PMcavgUhL8c1YFaWsooZObDa7APMqCD1IaysED5fWac="; }; ptb = fetchurl { - url = "https://dl-ptb.discordapp.net/apps/linux/${version}/discord-ptb-${version}.tar.gz"; - hash = "sha256-u/4wWssZxKlHrRW/Vd9pqUfqN2VQGYv1SDktpRsOayM="; + url = "https://ptb.dl2.discordapp.net/apps/linux/${version}/discord-ptb-${version}.tar.gz"; + hash = "sha256-NV/0YKn1rG54Zkc9qAmpeb+4YbKjxhjTCdPOd84Lcc8="; }; canary = fetchurl { - url = "https://dl-canary.discordapp.net/apps/linux/${version}/discord-canary-${version}.tar.gz"; - hash = "sha256-NjcNgKYm1Twm8nN3sFlZCG/3x5fcSmX7X2On7CeZm0M="; + url = "https://canary.dl2.discordapp.net/apps/linux/${version}/discord-canary-${version}.tar.gz"; + hash = "sha256-2DE7p3eT/mVGC+ejnTcTEhF7sEWyhfUfzj0gYTh+6Dw="; }; development = fetchurl { - url = "https://dl-development.discordapp.net/apps/linux/${version}/discord-development-${version}.tar.gz"; - hash = "sha256-326KAuqt3VQSgyJAdsdc7YgrdF3vCVoJoKUCVC2UdaU="; + url = "https://development.dl2.discordapp.net/apps/linux/${version}/discord-development-${version}.tar.gz"; + hash = "sha256-HxMJQd5fM1VNfrBey4SbnnBkFQYZgbxg4YTy6FIC9Ps="; }; }; x86_64-darwin = { stable = fetchurl { - url = "https://dl.discordapp.net/apps/osx/${version}/Discord.dmg"; - hash = "sha256-Ot6IM6EAg4MQPp0JqvUOZNAor6Nr6luc6pGY+722GMo="; + url = "https://stable.dl2.discordapp.net/apps/osx/${version}/Discord.dmg"; + hash = "sha256-RLAdcCcRrUtDSdaj/RdVLJGvufpIjZoMAKxp0Jyu17A="; }; ptb = fetchurl { - url = "https://dl-ptb.discordapp.net/apps/osx/${version}/DiscordPTB.dmg"; - hash = "sha256-FFp6CRgD/kpCVxJ4+es0DaOGaW5v2Aa+lzJdG2Zu8eY="; + url = "https://ptb.dl2.discordapp.net/apps/osx/${version}/DiscordPTB.dmg"; + hash = "sha256-VGhvykujfzI7jwXE+lHTzqT0t08GaON6gCuf13po7wY="; }; canary = fetchurl { - url = "https://dl-canary.discordapp.net/apps/osx/${version}/DiscordCanary.dmg"; - hash = "sha256-TIXe8cy6feME0900R5aWyItZfUrUA8zXo0pqwQ79yAM="; + url = "https://canary.dl2.discordapp.net/apps/osx/${version}/DiscordCanary.dmg"; + hash = "sha256-QC8RANqoyMAGKjTF0NNhz7wMt65D5LI1xYtd++dHXC4="; }; development = fetchurl { - url = "https://dl-development.discordapp.net/apps/osx/${version}/DiscordDevelopment.dmg"; - hash = "sha256-kfHnS1NHuPD7UR7XvMdtY2LPsDRJVQHk7/Nm+cR/KGc="; + url = "https://development.dl2.discordapp.net/apps/osx/${version}/DiscordDevelopment.dmg"; + hash = "sha256-DhY8s7Mhzos0ygB/WuoE07WK6hoIh/FcETeIsffw+e0="; }; }; aarch64-darwin = x86_64-darwin; @@ -78,7 +78,7 @@ let meta = meta // { mainProgram = value.binaryName; }; })) { - stable = rec { + stable = { pname = "discord"; binaryName = "Discord"; desktopName = "Discord"; From ffbde0e2077042cc4347ad7ce1d5ff133d3414e9 Mon Sep 17 00:00:00 2001 From: jsz4n Date: Fri, 11 Oct 2024 11:59:13 +0200 Subject: [PATCH 27/62] vlang: 0.4.4 -> 0.4.8 --- pkgs/development/compilers/vlang/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/compilers/vlang/default.nix b/pkgs/development/compilers/vlang/default.nix index 267f473274a5..62077a7e4f85 100644 --- a/pkgs/development/compilers/vlang/default.nix +++ b/pkgs/development/compilers/vlang/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchFromGitHub, glfw, freetype, openssl, makeWrapper, upx, boehmgc, xorg, binaryen, darwin }: let - version = "0.4.4"; + version = "0.4.8"; ptraceSubstitution = '' #include #include @@ -10,12 +10,12 @@ let # So we fix its rev to correspond to the V version. vc = stdenv.mkDerivation { pname = "v.c"; - version = "0.4.4"; + version = "0.4.8"; src = fetchFromGitHub { owner = "vlang"; repo = "vc"; - rev = "66eb8eae253d31fa5622e35a69580d9ad8efcccb"; - hash = "sha256-YGlzr0Qq7+NtrnbaFPBuclzjOZBOnTe3BOhsuwdsQ5c="; + rev = "54beb1f416b404a06b894e6883a0e2368d80bc3e"; + hash = "sha256-hofganRnWPRCjjsItwF2BKam4dCqzMCrjgWSjZLSrlo="; }; # patch the ptrace reference for darwin @@ -46,7 +46,7 @@ stdenv.mkDerivation { owner = "vlang"; repo = "v"; rev = version; - hash = "sha256-Aqecw8K+igHx5R34lQiWtdNfeGn+umcjcS4w0vXgpLM="; + hash = "sha256-V4f14TcuKW8unzlo6i/tE6MzSb3HAll478OU2LxiTPQ="; }; propagatedBuildInputs = [ glfw freetype openssl ] From e3d0f0e1210211285522ef6eca272b75e704843d Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Fri, 11 Oct 2024 17:32:28 +0200 Subject: [PATCH 28/62] lomiri.mediascanner2: 0.116 -> 0.117 --- pkgs/desktops/lomiri/services/mediascanner2/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/desktops/lomiri/services/mediascanner2/default.nix b/pkgs/desktops/lomiri/services/mediascanner2/default.nix index 79670a8eb499..3a1fbe01221a 100644 --- a/pkgs/desktops/lomiri/services/mediascanner2/default.nix +++ b/pkgs/desktops/lomiri/services/mediascanner2/default.nix @@ -28,13 +28,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "mediascanner2"; - version = "0.116"; + version = "0.117"; src = fetchFromGitLab { owner = "ubports"; repo = "development/core/mediascanner2"; rev = finalAttrs.version; - hash = "sha256-aRNT3DSPxz/vf6gqipf5Qc5zyDGFMHWONevAslwOrCY="; + hash = "sha256-e1vDPnIIfevXj9ODEEKJ2y4TiU0H+08aTf2vU+emdQk="; }; outputs = [ From 7fa83260059aa9010559263619f3b895848a431d Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Fri, 11 Oct 2024 19:15:02 +0200 Subject: [PATCH 29/62] lomiri.qqc2-suru-style: 0.20230206 -> 0.20230630 --- pkgs/desktops/lomiri/qml/qqc2-suru-style/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/desktops/lomiri/qml/qqc2-suru-style/default.nix b/pkgs/desktops/lomiri/qml/qqc2-suru-style/default.nix index 5717ae35f113..a46199d57072 100644 --- a/pkgs/desktops/lomiri/qml/qqc2-suru-style/default.nix +++ b/pkgs/desktops/lomiri/qml/qqc2-suru-style/default.nix @@ -9,13 +9,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "qqc2-suru-style"; - version = "0.20230206"; + version = "0.20230630"; src = fetchFromGitLab { owner = "ubports"; repo = "development/core/qqc2-suru-style"; rev = finalAttrs.version; - hash = "sha256-ZLPuXnhlR1IDhGnprcdWHLnOeS6ZzVkFhQML0iKMjO8="; + hash = "sha256-kAgHsNWwUWxHg26bTMmlq8m9DR4+ob4pl/oUX7516hM="; }; # QMake can't find Qt modules from buildInputs From 127dfa6fd3e931a64d8775724d0ed3b18928a41e Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Fri, 11 Oct 2024 19:18:30 +0200 Subject: [PATCH 30/62] lomiri.qqc2-suru-style: nixfmt, modernise abit --- .../lomiri/qml/qqc2-suru-style/default.nix | 33 ++++++++++--------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/pkgs/desktops/lomiri/qml/qqc2-suru-style/default.nix b/pkgs/desktops/lomiri/qml/qqc2-suru-style/default.nix index a46199d57072..967485fcf403 100644 --- a/pkgs/desktops/lomiri/qml/qqc2-suru-style/default.nix +++ b/pkgs/desktops/lomiri/qml/qqc2-suru-style/default.nix @@ -1,10 +1,11 @@ -{ stdenv -, lib -, fetchFromGitLab -, gitUpdater -, qmake -, qtdeclarative -, qtquickcontrols2 +{ + stdenv, + lib, + fetchFromGitLab, + gitUpdater, + qmake, + qtdeclarative, + qtquickcontrols2, }: stdenv.mkDerivation (finalAttrs: { @@ -14,16 +15,14 @@ stdenv.mkDerivation (finalAttrs: { src = fetchFromGitLab { owner = "ubports"; repo = "development/core/qqc2-suru-style"; - rev = finalAttrs.version; + rev = "refs/tags/${finalAttrs.version}"; hash = "sha256-kAgHsNWwUWxHg26bTMmlq8m9DR4+ob4pl/oUX7516hM="; }; # QMake can't find Qt modules from buildInputs strictDeps = false; - nativeBuildInputs = [ - qmake - ]; + nativeBuildInputs = [ qmake ]; buildInputs = [ qtdeclarative @@ -34,12 +33,16 @@ stdenv.mkDerivation (finalAttrs: { passthru.updateScript = gitUpdater { }; - meta = with lib; { + meta = { description = "Suru Style for QtQuick Controls 2"; homepage = "https://gitlab.com/ubports/development/core/qqc2-suru-style"; changelog = "https://gitlab.com/ubports/development/core/qqc2-suru-style/-/blob/${finalAttrs.version}/ChangeLog"; - license = with licenses; [ gpl2Plus lgpl3Only cc-by-sa-30 ]; - maintainers = teams.lomiri.members; - platforms = platforms.unix; + license = with lib.licenses; [ + gpl2Plus + lgpl3Only + cc-by-sa-30 + ]; + maintainers = lib.teams.lomiri.members; + platforms = lib.platforms.unix; }; }) From e19a5660de5c581dc5b8610bbaadd7667fcf3e63 Mon Sep 17 00:00:00 2001 From: Kira Bruneau Date: Fri, 11 Oct 2024 17:06:41 -0400 Subject: [PATCH 31/62] python312Packages.debugpy: 1.8.6 -> 1.8.7 Update to latest version: https://github.com/microsoft/debugpy/releases/tag/v1.8.7 --- pkgs/development/python-modules/debugpy/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/debugpy/default.nix b/pkgs/development/python-modules/debugpy/default.nix index 4bf451d834be..cce50d3b7e51 100644 --- a/pkgs/development/python-modules/debugpy/default.nix +++ b/pkgs/development/python-modules/debugpy/default.nix @@ -22,7 +22,7 @@ buildPythonPackage rec { pname = "debugpy"; - version = "1.8.6"; + version = "1.8.7"; format = "setuptools"; disabled = pythonOlder "3.8"; @@ -31,7 +31,7 @@ buildPythonPackage rec { owner = "microsoft"; repo = "debugpy"; rev = "refs/tags/v${version}"; - hash = "sha256-kkFNIJ3QwojwgiRAOmBiWIg5desxOKTmo9YH1Qup6fI="; + hash = "sha256-JFVhEAfdSfl2ACfXLMdoO/1otdif9bHialdQXucTM5A="; }; patches = From f53387e15a15891957971706df1d70321533a79b Mon Sep 17 00:00:00 2001 From: Matej Cotman Date: Tue, 8 Oct 2024 13:04:07 +0300 Subject: [PATCH 32/62] ipu6: update packages This updates the ipu6 driver and firmware to a more recent version, which seems to at least work in Chrom{e,ium}. ipu6-drivers now relies on the in-kernel ipu6 kernel driver, so we update our logic and metadata for it. --- nixos/modules/hardware/video/webcam/ipu6.nix | 6 ++--- .../gstreamer/icamerasrc/default.nix | 11 +++++--- .../libraries/ipu6-camera-hal/default.nix | 26 ++++++++++++++----- .../firmware/ipu6-camera-bins/default.nix | 15 ++++++----- .../linux/firmware/ivsc-firmware/default.nix | 6 ++--- .../linux/ipu6-drivers/default.nix | 14 +++++----- .../os-specific/linux/ivsc-driver/default.nix | 6 ++--- pkgs/top-level/linux-kernels.nix | 5 +--- 8 files changed, 52 insertions(+), 37 deletions(-) diff --git a/nixos/modules/hardware/video/webcam/ipu6.nix b/nixos/modules/hardware/video/webcam/ipu6.nix index ae54e24ee2da..803902530dd9 100644 --- a/nixos/modules/hardware/video/webcam/ipu6.nix +++ b/nixos/modules/hardware/video/webcam/ipu6.nix @@ -26,9 +26,9 @@ in config = mkIf cfg.enable { - # Module is upstream as of 6.10 - boot.extraModulePackages = with config.boot.kernelPackages; - optional (kernelOlder "6.10") ipu6-drivers; + # Module is upstream as of 6.10, + # but still needs various out-of-tree i2c and the `intel-ipu6-psys` kernel driver + boot.extraModulePackages = with config.boot.kernelPackages; [ ipu6-drivers ]; hardware.firmware = with pkgs; [ ipu6-camera-bins diff --git a/pkgs/development/libraries/gstreamer/icamerasrc/default.nix b/pkgs/development/libraries/gstreamer/icamerasrc/default.nix index 68485f7e7454..4bbb20c6e41a 100644 --- a/pkgs/development/libraries/gstreamer/icamerasrc/default.nix +++ b/pkgs/development/libraries/gstreamer/icamerasrc/default.nix @@ -6,17 +6,18 @@ , gst_all_1 , ipu6-camera-hal , libdrm +, libva }: -stdenv.mkDerivation { +stdenv.mkDerivation rec { pname = "icamerasrc-${ipu6-camera-hal.ipuVersion}"; - version = "unstable-2023-10-23"; + version = "unstable-2024-09-29"; src = fetchFromGitHub { owner = "intel"; repo = "icamerasrc"; - rev = "528a6f177732def4d5ebc17927220d8823bc8fdc"; - hash = "sha256-Ezcm5OpF/NKvJf5sFeJyvNc2Uq0166GukC9MuNUV2Fs="; + rev = "refs/tags/20240926_1446"; + hash = "sha256-BpIZxkPmSVKqPntwBJjGmCaMSYFCEZHJa4soaMAJRWE="; }; nativeBuildInputs = [ @@ -34,8 +35,10 @@ stdenv.mkDerivation { buildInputs = [ gst_all_1.gstreamer gst_all_1.gst-plugins-base + gst_all_1.gst-plugins-bad ipu6-camera-hal libdrm + libva ]; NIX_CFLAGS_COMPILE = [ diff --git a/pkgs/development/libraries/ipu6-camera-hal/default.nix b/pkgs/development/libraries/ipu6-camera-hal/default.nix index 9c6cc585f9b3..0bbed96ca3af 100644 --- a/pkgs/development/libraries/ipu6-camera-hal/default.nix +++ b/pkgs/development/libraries/ipu6-camera-hal/default.nix @@ -11,6 +11,7 @@ , ipu6-camera-bins , libtool , gst_all_1 +, libdrm # Pick one of # - ipu6 (Tiger Lake) @@ -27,13 +28,13 @@ let in stdenv.mkDerivation { pname = "${ipuVersion}-camera-hal"; - version = "unstable-2023-09-25"; + version = "unstable-2024-09-29"; src = fetchFromGitHub { owner = "intel"; repo = "ipu6-camera-hal"; - rev = "9fa05a90886d399ad3dda4c2ddc990642b3d20c9"; - hash = "sha256-yS1D7o6dsQ4FQkjfwcisOxcP7Majb+4uQ/iW5anMb5c="; + rev = "f98f72b156563fe8373e4f8d017a9f609676bb33"; + hash = "sha256-zVcgKW7/GHYd1oMvsaI77cPyj3G68dL+OXBJDz5+Td4="; }; nativeBuildInputs = [ @@ -41,12 +42,16 @@ stdenv.mkDerivation { pkg-config ]; - PKG_CONFIG_PATH = "${lib.makeLibraryPath [ ipu6-camera-bins ]}/${ipuTarget}/pkgconfig"; cmakeFlags = [ "-DIPU_VER=${ipuVersion}" + "-DTARGET_SUFFIX=-${ipuVersion}" # missing libiacss "-DUSE_PG_LITE_PIPE=ON" + "-DCMAKE_BUILD_TYPE=Release" + "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}" + "-DCMAKE_INSTALL_SUB_PATH=${ipuTarget}" + "-DCMAKE_INSTALL_LIBDIR=lib" ]; NIX_CFLAGS_COMPILE = [ @@ -61,21 +66,28 @@ stdenv.mkDerivation { libtool gst_all_1.gstreamer gst_all_1.gst-plugins-base + libdrm ]; postPatch = '' substituteInPlace src/platformdata/PlatformData.h \ - --replace '/usr/share/' "${placeholder "out"}/share/" + --replace '/usr/share/' "${placeholder "out"}/share/" \ + --replace '#define CAMERA_DEFAULT_CFG_PATH "/etc/camera/"' '#define CAMERA_DEFAULT_CFG_PATH "${placeholder "out"}/etc/camera/"' + ''; + + postInstall = '' + mkdir -p $out/include/${ipuTarget}/ + cp -r $src/include $out/include/${ipuTarget}/libcamhal ''; postFixup = '' for lib in $out/lib/*.so; do - patchelf --add-rpath "${lib.makeLibraryPath [ ipu6-camera-bins ]}/${ipuTarget}" $lib + patchelf --add-rpath "${ipu6-camera-bins}/lib" $lib done ''; passthru = { - inherit ipuVersion; + inherit ipuVersion ipuTarget; }; meta = with lib; { diff --git a/pkgs/os-specific/linux/firmware/ipu6-camera-bins/default.nix b/pkgs/os-specific/linux/firmware/ipu6-camera-bins/default.nix index 4c3bede4fba2..873e0c971d67 100644 --- a/pkgs/os-specific/linux/firmware/ipu6-camera-bins/default.nix +++ b/pkgs/os-specific/linux/firmware/ipu6-camera-bins/default.nix @@ -6,15 +6,15 @@ , zlib }: -stdenv.mkDerivation (finalAttrs: { +stdenv.mkDerivation (finalAttrs: rec { pname = "ipu6-camera-bins"; - version = "unstable-2023-10-26"; + version = "unstable-2024-09-27"; src = fetchFromGitHub { - owner = "intel"; repo = "ipu6-camera-bins"; - rev = "af5ba0cb4a763569ac7514635013e9d870040bcf"; - hash = "sha256-y0pT5M7AKACbquQWLZPYpTPXRC5hipLNL61nhs+cst4="; + owner = "intel"; + rev = "98ca6f2a54d20f171628055938619972514f7a07"; + hash = "sha256-DAjAzHMqX41mrfQVpDUJLw4Zjb9pz6Uy3TJjTGIkd6o="; }; nativeBuildInputs = [ @@ -33,13 +33,14 @@ stdenv.mkDerivation (finalAttrs: { include \ $out/ - install -m 0644 -D LICENSE $out/share/doc/LICENSE + # There is no LICENSE file in the src + # install -m 0644 -D LICENSE $out/share/doc/LICENSE runHook postInstall ''; postFixup = '' - for pcfile in $out/lib/*/pkgconfig/*.pc; do + for pcfile in $out/lib/pkgconfig/*.pc; do substituteInPlace $pcfile \ --replace 'prefix=/usr' "prefix=$out" done diff --git a/pkgs/os-specific/linux/firmware/ivsc-firmware/default.nix b/pkgs/os-specific/linux/firmware/ivsc-firmware/default.nix index 9674cea2226f..931c85470821 100644 --- a/pkgs/os-specific/linux/firmware/ivsc-firmware/default.nix +++ b/pkgs/os-specific/linux/firmware/ivsc-firmware/default.nix @@ -5,13 +5,13 @@ stdenv.mkDerivation { pname = "ivsc-firmware"; - version = "unstable-2023-08-11"; + version = "unstable-2024-06-14"; src = fetchFromGitHub { owner = "intel"; repo = "ivsc-firmware"; - rev = "10c214fea5560060d387fbd2fb8a1af329cb6232"; - hash = "sha256-kEoA0yeGXuuB+jlMIhNm+SBljH+Ru7zt3PzGb+EPBPw="; + rev = "74a01d1208a352ed85d76f959c68200af4ead918"; + hash = "sha256-kHYfeftMtoOsOtVN6+XoDMDHP7uTEztbvjQLpCnKCh0="; }; dontBuild = true; diff --git a/pkgs/os-specific/linux/ipu6-drivers/default.nix b/pkgs/os-specific/linux/ipu6-drivers/default.nix index 304f27dfb43c..d6aafa53a52f 100644 --- a/pkgs/os-specific/linux/ipu6-drivers/default.nix +++ b/pkgs/os-specific/linux/ipu6-drivers/default.nix @@ -5,17 +5,19 @@ , kernel }: -stdenv.mkDerivation { +stdenv.mkDerivation rec { pname = "ipu6-drivers"; - version = "unstable-2023-11-24"; + version = "unstable-2024-10-10"; src = fetchFromGitHub { owner = "intel"; repo = "ipu6-drivers"; - rev = "07f0612eabfdc31df36f5e316a9eae115807804f"; - hash = "sha256-8JRZG6IKJT0qtoqJHm8641kSQMLc4Z+DRzK6FpL9Euk="; + rev = "118952d49ec598f56add50d93fa7bc3ac4a05643"; + hash = "sha256-xdMwINoKrdRHCPMpdZQn86ATi1dAXncMU39LLXS16mc="; }; + patches = [ "${src}/patches/0001-v6.10-IPU6-headers-used-by-PSYS.patch" ]; + postPatch = '' cp --no-preserve=mode --recursive --verbose \ ${ivsc-driver.src}/backport-include \ @@ -47,7 +49,7 @@ stdenv.mkDerivation { license = lib.licenses.gpl2Only; maintainers = [ ]; platforms = [ "x86_64-linux" ]; - # requires 6.1.7 https://github.com/intel/ipu6-drivers/pull/84 - broken = kernel.kernelOlder "6.1.7"; + # requires 6.10 + broken = kernel.kernelOlder "6.10"; }; } diff --git a/pkgs/os-specific/linux/ivsc-driver/default.nix b/pkgs/os-specific/linux/ivsc-driver/default.nix index 74ad354a984f..d9fa513ede87 100644 --- a/pkgs/os-specific/linux/ivsc-driver/default.nix +++ b/pkgs/os-specific/linux/ivsc-driver/default.nix @@ -6,13 +6,13 @@ stdenv.mkDerivation { pname = "ivsc-driver"; - version = "unstable-2023-11-09"; + version = "unstable-2024-09-18"; src = fetchFromGitHub { owner = "intel"; repo = "ivsc-driver"; - rev = "73a044d9633212fac54ea96cdd882ff5ab40573e"; - hash = "sha256-vE5pOtVqjiWovlUMSEoBKTk/qvs8K8T5oY2r7njh0wQ="; + rev = "10f440febe87419d5c82d8fe48580319ea135b54"; + hash = "sha256-jc+8geVquRtaZeIOtadCjY9F162Rb05ptE7dk8kuof0="; }; nativeBuildInputs = kernel.moduleBuildDependencies; diff --git a/pkgs/top-level/linux-kernels.nix b/pkgs/top-level/linux-kernels.nix index 4255d0c036e8..b1e4cbd2d53f 100644 --- a/pkgs/top-level/linux-kernels.nix +++ b/pkgs/top-level/linux-kernels.nix @@ -367,10 +367,7 @@ in { intel-speed-select = if lib.versionAtLeast kernel.version "5.3" then callPackage ../os-specific/linux/intel-speed-select { } else null; - ipu6-drivers = - if kernelOlder "6.10" - then callPackage ../os-specific/linux/ipu6-drivers {} - else null; + ipu6-drivers = callPackage ../os-specific/linux/ipu6-drivers {}; ivsc-driver = callPackage ../os-specific/linux/ivsc-driver {}; From 75e144253792ace493b218c9be7585fdb70fc43b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20=C5=BDlender?= Date: Sat, 12 Oct 2024 00:28:50 +0200 Subject: [PATCH 33/62] redocly: 1.18.1 -> 1.25.5 --- pkgs/by-name/re/redocly/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/re/redocly/package.nix b/pkgs/by-name/re/redocly/package.nix index 198d50270259..fe53529c18b9 100644 --- a/pkgs/by-name/re/redocly/package.nix +++ b/pkgs/by-name/re/redocly/package.nix @@ -8,16 +8,16 @@ buildNpmPackage rec { pname = "redocly"; - version = "1.18.1"; + version = "1.25.5"; src = fetchFromGitHub { owner = "Redocly"; repo = "redocly-cli"; rev = "@redocly/cli@${version}"; - hash = "sha256-Y09tGm3Sje8gd+6tUyBTCt7HjL2CQ/vo/ExLDnywvcQ="; + hash = "sha256-pVSmrORa6KcAwllYepwra8QpnlfFoB9+noevLSmoWzY="; }; - npmDepsHash = "sha256-WzMFKMW/YyAH3ZoOeIcXIum15cJmPGp96xSYb9QCaWI="; + npmDepsHash = "sha256-nFRKC3xM+vq9SDeIelUqE/ZSSCSke0G0Qm629/s6WO8="; npmBuildScript = "prepare"; From 32a4de4339d263c013e2584ed5798fdda1122745 Mon Sep 17 00:00:00 2001 From: lordkekz Date: Fri, 11 Oct 2024 23:46:04 +0200 Subject: [PATCH 34/62] zenmonitor: inherit meta.homepage from new src --- pkgs/os-specific/linux/zenmonitor/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/zenmonitor/default.nix b/pkgs/os-specific/linux/zenmonitor/default.nix index bf9ddbc5fec5..837785c4d5a2 100644 --- a/pkgs/os-specific/linux/zenmonitor/default.nix +++ b/pkgs/os-specific/linux/zenmonitor/default.nix @@ -18,9 +18,9 @@ stdenv.mkDerivation rec { makeFlags = [ "PREFIX=${placeholder "out"}" ]; meta = with lib; { + inherit (src.meta) homepage; description = "Monitoring software for AMD Zen-based CPUs"; mainProgram = "zenmonitor"; - homepage = "https://github.com/Ta180m/zenmonitor3"; license = licenses.mit; platforms = [ "i686-linux" "x86_64-linux" ]; maintainers = with maintainers; [ alexbakker artturin ]; From 7f9d2978386dab504c7129359c9c0aa34b44eb6c Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Thu, 10 Oct 2024 20:01:46 +0200 Subject: [PATCH 35/62] workflows/nixpkgs-vet: Make merge check script reusable This is useful for other workflows as well. Originally I thought it couldn't be put in the repo, but it can (just needs another checkout) --- .github/workflows/nixpkgs-vet.yml | 48 +++++---------------------- ci/get-merge-commit.sh | 55 +++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 39 deletions(-) create mode 100755 ci/get-merge-commit.sh diff --git a/.github/workflows/nixpkgs-vet.yml b/.github/workflows/nixpkgs-vet.yml index 7bfe973a8c36..f08af86822ca 100644 --- a/.github/workflows/nixpkgs-vet.yml +++ b/.github/workflows/nixpkgs-vet.yml @@ -26,52 +26,22 @@ jobs: # This should take 1 minute at most, but let's be generous. The default of 6 hours is definitely too long. timeout-minutes: 10 steps: - # This step has to be in this file, because it's needed to determine which revision of the repository to fetch, and we can only use other files from the repository once it's fetched. + # This checks out the base branch because of pull_request_target + - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 + with: + path: base + sparse-checkout: ci - name: Resolving the merge commit env: GH_TOKEN: ${{ github.token }} run: | - # This checks for mergeability of a pull request as recommended in - # https://docs.github.com/en/rest/guides/using-the-rest-api-to-interact-with-your-git-database?apiVersion=2022-11-28#checking-mergeability-of-pull-requests - - # Retry the API query this many times - retryCount=5 - # Start with 5 seconds, but double every retry - retryInterval=5 - while true; do - echo "Checking whether the pull request can be merged" - prInfo=$(gh api \ - -H "Accept: application/vnd.github+json" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - /repos/"$GITHUB_REPOSITORY"/pulls/${{ github.event.pull_request.number }}) - mergeable=$(jq -r .mergeable <<< "$prInfo") - mergedSha=$(jq -r .merge_commit_sha <<< "$prInfo") - - if [[ "$mergeable" == "null" ]]; then - if (( retryCount == 0 )); then - echo "Not retrying anymore. It's likely that GitHub is having internal issues: check https://www.githubstatus.com/" - exit 1 - else - (( retryCount -= 1 )) || true - - # null indicates that GitHub is still computing whether it's mergeable - # Wait a couple seconds before trying again - echo "GitHub is still computing whether this PR can be merged, waiting $retryInterval seconds before trying again ($retryCount retries left)" - sleep "$retryInterval" - - (( retryInterval *= 2 )) || true - fi - else - break - fi - done - - if [[ "$mergeable" == "true" ]]; then - echo "The PR can be merged, checking the merge commit $mergedSha" + if mergedSha=$(base/ci/get-merge-commit.sh ${{ github.repository }} ${{ github.event.number }}); then + echo "Checking the merge commit $mergedSha" echo "mergedSha=$mergedSha" >> "$GITHUB_ENV" else - echo "The PR cannot be merged, it has a merge conflict, skipping the rest.." + echo "Skipping the rest..." fi + rm -rf base - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 if: env.mergedSha with: diff --git a/ci/get-merge-commit.sh b/ci/get-merge-commit.sh new file mode 100755 index 000000000000..8d4877ecc4c3 --- /dev/null +++ b/ci/get-merge-commit.sh @@ -0,0 +1,55 @@ +#!/usr/bin/env bash +# This checks for mergeability of a pull request as recommended in +# https://docs.github.com/en/rest/guides/using-the-rest-api-to-interact-with-your-git-database?apiVersion=2022-11-28#checking-mergeability-of-pull-requests + +set -euo pipefail + +log() { + echo "$@" >&2 +} + +if (( $# < 2 )); then + log "Usage: $0 GITHUB_REPO PR_NUMBER" + exit 99 +fi +repo=$1 +prNumber=$2 + +# Retry the API query this many times +retryCount=5 +# Start with 5 seconds, but double every retry +retryInterval=5 + +while true; do + log "Checking whether the pull request can be merged" + prInfo=$(gh api \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "/repos/$repo/pulls/$prNumber") + mergeable=$(jq -r .mergeable <<< "$prInfo") + if [[ "$mergeable" == "null" ]]; then + if (( retryCount == 0 )); then + log "Not retrying anymore. It's likely that GitHub is having internal issues: check https://www.githubstatus.com/" + exit 1 + else + (( retryCount -= 1 )) || true + + # null indicates that GitHub is still computing whether it's mergeable + # Wait a couple seconds before trying again + log "GitHub is still computing whether this PR can be merged, waiting $retryInterval seconds before trying again ($retryCount retries left)" + sleep "$retryInterval" + + (( retryInterval *= 2 )) || true + fi + else + break + fi +done + +if [[ "$mergeable" == "true" ]]; then + log "The PR can be merged" + jq -r .merge_commit_sha <<< "$prInfo" +else + log "The PR has a merge conflict" + exit 1 +fi From 048f4aa537ec81b23454d61f559e31477e4f7af2 Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Thu, 10 Oct 2024 20:11:56 +0200 Subject: [PATCH 36/62] ci/get-merge-commit.sh: Exit for non-open PRs If PRs aren't open (either merged or closed), GitHub never computes whether the PR is mergeable, so we'd wait forever, which has been happening: https://github.com/NixOS/nixpkgs/actions/runs/11279197077/job/31369348101#step:2:59 --- ci/get-merge-commit.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ci/get-merge-commit.sh b/ci/get-merge-commit.sh index 8d4877ecc4c3..75fc7fcbe60f 100755 --- a/ci/get-merge-commit.sh +++ b/ci/get-merge-commit.sh @@ -26,6 +26,14 @@ while true; do -H "Accept: application/vnd.github+json" \ -H "X-GitHub-Api-Version: 2022-11-28" \ "/repos/$repo/pulls/$prNumber") + + # Non-open PRs won't have their mergeability computed no matter what + state=$(jq -r .state <<< "$prInfo") + if [[ "$state" != open ]]; then + log "PR is not open anymore" + exit 2 + fi + mergeable=$(jq -r .mergeable <<< "$prInfo") if [[ "$mergeable" == "null" ]]; then if (( retryCount == 0 )); then From e6a8855a14cb86c461df1c1f8585a19c71ac90c1 Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Thu, 10 Oct 2024 20:40:46 +0200 Subject: [PATCH 37/62] ci/get-merge-commit.sh: Add documentation And distinguish exit codes --- ci/README.md | 55 ++++++++++++++++++++++++++++++++++++++++++ ci/get-merge-commit.sh | 9 +++---- 2 files changed, 59 insertions(+), 5 deletions(-) diff --git a/ci/README.md b/ci/README.md index 40c3d0ed344b..11b53c6095e6 100644 --- a/ci/README.md +++ b/ci/README.md @@ -41,3 +41,58 @@ Why not just build the tooling right from the PRs Nixpkgs version? - Because it improves security, since we don't have to build potentially untrusted code from PRs. The tool only needs a very minimal Nix evaluation at runtime, which can work with [readonly-mode](https://nixos.org/manual/nix/stable/command-ref/opt-common.html#opt-readonly-mode) and [restrict-eval](https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-restrict-eval). +## `get-merge-commit.sh GITHUB_REPO PR_NUMBER` + +Check whether a PR is mergeable and return the test merge commit as +[computed by GitHub](https://docs.github.com/en/rest/guides/using-the-rest-api-to-interact-with-your-git-database?apiVersion=2022-11-28#checking-mergeability-of-pull-requests). + +Arguments: +- `GITHUB_REPO`: The repository of the PR, e.g. `NixOS/nixpkgs` +- `PR_NUMBER`: The PR number, e.g. `1234` + +Exit codes: +- 0: The PR can be merged, the test merge commit hash is returned on stdout +- 1: The PR cannot be merged because it's not open anymore +- 2: The PR cannot be merged because it has a merge conflict +- 3: The merge commit isn't being computed, GitHub is likely having internal issues, unknown if the PR is mergeable + +### Usage + +This script can be used in GitHub Actions workflows as follows: + +```yaml +on: pull_request_target + +# We need a token to query the API, but it doesn't need any special permissions +permissions: {} + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + # Important: Because of `pull_request_target`, this doesn't check out the PR, + # but rather the base branch of the PR, which is needed so we don't run untrusted code + - uses: actions/checkout@ + with: + path: base + sparse-checkout: ci + - name: Resolving the merge commit + env: + GH_TOKEN: ${{ github.token }} + run: | + if mergedSha=$(base/ci/get-merge-commit.sh ${{ github.repository }} ${{ github.event.number }}); then + echo "Checking the merge commit $mergedSha" + echo "mergedSha=$mergedSha" >> "$GITHUB_ENV" + else + # Skipping so that no notifications are sent + echo "Skipping the rest..." + fi + rm -rf base + - uses: actions/checkout@ + # Add this to _all_ subsequent steps to skip them + if: env.mergedSha + with: + ref: ${{ env.mergedSha }} + - ... +``` diff --git a/ci/get-merge-commit.sh b/ci/get-merge-commit.sh index 75fc7fcbe60f..c62bb56dd993 100755 --- a/ci/get-merge-commit.sh +++ b/ci/get-merge-commit.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -# This checks for mergeability of a pull request as recommended in -# https://docs.github.com/en/rest/guides/using-the-rest-api-to-interact-with-your-git-database?apiVersion=2022-11-28#checking-mergeability-of-pull-requests +# See ./README.md for docs set -euo pipefail @@ -31,14 +30,14 @@ while true; do state=$(jq -r .state <<< "$prInfo") if [[ "$state" != open ]]; then log "PR is not open anymore" - exit 2 + exit 1 fi mergeable=$(jq -r .mergeable <<< "$prInfo") if [[ "$mergeable" == "null" ]]; then if (( retryCount == 0 )); then log "Not retrying anymore. It's likely that GitHub is having internal issues: check https://www.githubstatus.com/" - exit 1 + exit 3 else (( retryCount -= 1 )) || true @@ -59,5 +58,5 @@ if [[ "$mergeable" == "true" ]]; then jq -r .merge_commit_sha <<< "$prInfo" else log "The PR has a merge conflict" - exit 1 + exit 2 fi From 83ee7ea281ff2a6c5f927fe74dd430b6ee2e71f0 Mon Sep 17 00:00:00 2001 From: Tomo Date: Sat, 12 Oct 2024 04:19:14 +0000 Subject: [PATCH 38/62] hop-cli: move throw to top-level/aliases.nix Also fixed the spacing in the comment for consistency. --- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 448909ee840f..05ef395227b3 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -712,6 +712,7 @@ mapAliases { hip-common = throw "'hip-common' has been replaced with 'rocmPackages.hip-common'"; # Added 2023-10-08 hip-nvidia = throw "'hip-nvidia' has been removed in favor of 'rocmPackages.clr'"; # Added 2023-10-08 hll2390dw-cups = throw "The hll2390dw-cups package was dropped since it was unmaintained."; # Added 2024-06-21 + hop-cli = throw "hop-cli has been removed as the service has been shut-down"; # Added 2024-08-13 ht-rust = xh; # Added 2021-02-13 hydra_unstable = hydra; # Added 2024-08-22 hydron = throw "hydron has been removed as the project has been archived upstream since 2022 and is affected by a severe remote code execution vulnerability"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d9430e2154f9..5bbbe0efb96e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15000,8 +15000,6 @@ with pkgs; hop = callPackage ../development/compilers/hop { }; - hop-cli = throw "hop-cli has been removed as the service has been shut-down"; #Added 2024-08-13 - falcon = callPackage ../development/interpreters/falcon { stdenv = gcc10Stdenv; }; From ac8067158bf8163169b60877ab3fd049b1f0f9d5 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 12 Sep 2024 10:42:48 +0200 Subject: [PATCH 39/62] python312Packages.azure-mgmt-billing: 6.0.0 -> 7.0.0 Changelog: https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-billing_7.0.0/sdk/billing/azure-mgmt-billing/CHANGELOG.md --- .../azure-mgmt-billing/default.nix | 41 ++++++++++--------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/pkgs/development/python-modules/azure-mgmt-billing/default.nix b/pkgs/development/python-modules/azure-mgmt-billing/default.nix index db243f585759..dfef1554ecc4 100644 --- a/pkgs/development/python-modules/azure-mgmt-billing/default.nix +++ b/pkgs/development/python-modules/azure-mgmt-billing/default.nix @@ -1,45 +1,46 @@ { lib, - buildPythonPackage, - fetchPypi, - msrestazure, azure-common, azure-mgmt-core, - azure-mgmt-nspkg, + buildPythonPackage, + fetchPypi, + isodate, + pythonOlder, + setuptools, + typing-extensions, }: buildPythonPackage rec { pname = "azure-mgmt-billing"; - version = "6.0.0"; # pypi's 0.2.0 doesn't build ootb - format = "setuptools"; + version = "7.0.0"; + pyproject = true; + + disabled = pythonOlder "3.8"; src = fetchPypi { - inherit pname version; - sha256 = "d4f5c5a4188a456fe1eb32b6c45f55ca2069c74be41eb76921840b39f2f5c07f"; - extension = "zip"; + pname = "azure_mgmt_billing"; + inherit version; + hash = "sha256-jgplxlEQtTpCk35b7WrgDvydYgaXLZa/1KdOgMhcLXs="; }; - propagatedBuildInputs = [ - msrestazure + build-system = [ setuptools ]; + + dependencies = [ azure-common azure-mgmt-core - azure-mgmt-nspkg + isodate + typing-extensions ]; - preBuild = '' - rm -rf azure_bdist_wheel.py - substituteInPlace setup.cfg \ - --replace "azure-namespace-package = azure-mgmt-nspkg" "" - ''; - pythonNamespaces = [ "azure.mgmt" ]; - # has no tests + # Module has no tests doCheck = false; meta = with lib; { description = "This is the Microsoft Azure Billing Client Library"; - homepage = "https://github.com/Azure/azure-sdk-for-python"; + homepage = "https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/billing/azure-mgmt-billing"; + changelog = "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-billing_${version}/sdk/billing/azure-mgmt-billing/CHANGELOG.md"; license = licenses.mit; maintainers = with maintainers; [ maxwilson ]; }; From b364b9fdcf37df5fc1d351f261fa62b9b6756f7c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 12 Oct 2024 08:47:45 +0200 Subject: [PATCH 40/62] azure-cli: override azure-mgmt-billing --- pkgs/by-name/az/azure-cli/python-packages.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/by-name/az/azure-cli/python-packages.nix b/pkgs/by-name/az/azure-cli/python-packages.nix index 5bde74450419..0b09811647bc 100644 --- a/pkgs/by-name/az/azure-cli/python-packages.nix +++ b/pkgs/by-name/az/azure-cli/python-packages.nix @@ -119,6 +119,17 @@ let overrideAzureMgmtPackage super.azure-mgmt-batchai "7.0.0b1" "zip" "sha256-mT6vvjWbq0RWQidugR229E8JeVEiobPD3XA/nDM3I6Y="; + azure-mgmt-billing = + (overrideAzureMgmtPackage super.azure-mgmt-billing "6.0.0" "zip" + "sha256-1PXFpBiKRW/h6zK2xF9VyiBpx0vkHrdpIYQLOfL1wH8=" + ).overridePythonAttrs + (attrs: { + propagatedBuildInputs = attrs.propagatedBuildInputs or [ ] ++ [ + self.msrest + self.msrestazure + ]; + }); + # AttributeError: type object 'CustomDomainsOperations' has no attribute 'disable_custom_https' azure-mgmt-cdn = overrideAzureMgmtPackage super.azure-mgmt-cdn "12.0.0" "zip" From 92ed25c8c1fa216f39f80d56a9a5a8119dae990b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 12 Oct 2024 09:01:13 +0200 Subject: [PATCH 41/62] python312Packages.aiortm: 0.9.11 -> 0.9.12 Diff: https://github.com/MartinHjelmare/aiortm/compare/refs/tags/v0.9.11...v0.9.12 Changelog: https://github.com/MartinHjelmare/aiortm/blob/v0.9.12/CHANGELOG.md --- pkgs/development/python-modules/aiortm/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/aiortm/default.nix b/pkgs/development/python-modules/aiortm/default.nix index 1760e816fc05..b02e418a1ddb 100644 --- a/pkgs/development/python-modules/aiortm/default.nix +++ b/pkgs/development/python-modules/aiortm/default.nix @@ -19,7 +19,7 @@ buildPythonPackage rec { pname = "aiortm"; - version = "0.9.11"; + version = "0.9.12"; pyproject = true; disabled = pythonOlder "3.12"; @@ -28,7 +28,7 @@ buildPythonPackage rec { owner = "MartinHjelmare"; repo = "aiortm"; rev = "refs/tags/v${version}"; - hash = "sha256-uP+nQZA6ZdCAy3E4a1jcm+3X1Fe6n+7v/6unX423jfw="; + hash = "sha256-PTg+/Iqjj5V5XJNDAJva/BvaOl6qyjeqrjxy0RLAvEc="; }; pythonRelaxDeps = [ "typer" ]; From 08248ac3bfff189f6a525533471e51c500ce9459 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 12 Oct 2024 09:16:04 +0200 Subject: [PATCH 42/62] python312Packages.pylint-django: refactor --- pkgs/development/python-modules/pylint-django/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/pylint-django/default.nix b/pkgs/development/python-modules/pylint-django/default.nix index 0bac1f4037ce..170fb0af1d60 100644 --- a/pkgs/development/python-modules/pylint-django/default.nix +++ b/pkgs/development/python-modules/pylint-django/default.nix @@ -17,7 +17,7 @@ buildPythonPackage rec { version = "2.6.0"; pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "PyCQA"; @@ -26,9 +26,9 @@ buildPythonPackage rec { hash = "sha256-Rnty8ryKd5PxFFVYcvB8p9VS3qlHCprxR8+/ySY5qC8="; }; - nativeBuildInputs = [ poetry-core ]; + build-system = [ poetry-core ]; - propagatedBuildInputs = [ pylint-plugin-utils ]; + dependencies = [ pylint-plugin-utils ]; optional-dependencies = { with_django = [ django ]; From ca82458e77271dd01ed2f01c96fd5b2be0164457 Mon Sep 17 00:00:00 2001 From: K900 Date: Sat, 12 Oct 2024 10:32:59 +0300 Subject: [PATCH 43/62] nixos/tests/nixos-rebuild-target-host: fix test Fixes #348043 --- nixos/tests/nixos-rebuild-target-host.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/tests/nixos-rebuild-target-host.nix b/nixos/tests/nixos-rebuild-target-host.nix index bf80b2fa6606..4a210f94fd22 100644 --- a/nixos/tests/nixos-rebuild-target-host.nix +++ b/nixos/tests/nixos-rebuild-target-host.nix @@ -24,6 +24,8 @@ import ./make-test-python.nix ({ pkgs, ... }: { system.build.privateKey = snakeOilPrivateKey; system.build.publicKey = snakeOilPublicKey; + # needed to provide STC implementation for target + system.switch.enable = true; }; target = { nodes, lib, ... }: let From fba9ad044b021b287d09db7cc163570563eedb31 Mon Sep 17 00:00:00 2001 From: Gliczy <129636582+Gliczy@users.noreply.github.com> Date: Thu, 10 Oct 2024 07:53:08 +0200 Subject: [PATCH 44/62] alpaca: 2.0.6 -> 2.6.0 --- pkgs/by-name/al/alpaca/package.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/al/alpaca/package.nix b/pkgs/by-name/al/alpaca/package.nix index ab0bb3a83331..88a3dc8fc502 100644 --- a/pkgs/by-name/al/alpaca/package.nix +++ b/pkgs/by-name/al/alpaca/package.nix @@ -13,18 +13,19 @@ gtksourceview5, xdg-utils, ollama, + vte-gtk4, }: python3Packages.buildPythonApplication rec { pname = "alpaca"; - version = "2.0.6"; + version = "2.6.0"; pyproject = false; # Built with meson src = fetchFromGitHub { owner = "Jeffser"; repo = "Alpaca"; rev = "refs/tags/${version}"; - hash = "sha256-4c6pisd3o7mycivHd1QZ2N7s8pYzrQXiZMbVvl5ciPA="; + hash = "sha256-XXxfbchQ1l6L8KflqjlGIiyRbG/dI5ok0ExlROavXYg="; }; nativeBuildInputs = [ @@ -40,6 +41,7 @@ python3Packages.buildPythonApplication rec { buildInputs = [ libadwaita gtksourceview5 + vte-gtk4 ]; dependencies = with python3Packages; [ From 587e18003e646528b10798e851d21b3e1ed57754 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 12 Oct 2024 10:05:21 +0200 Subject: [PATCH 45/62] python312Packages.flow-record: 3.15 -> 3.17 Changelog: https://github.com/fox-it/flow.record/releases/tag/3.17 --- .../python-modules/flow-record/default.nix | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/flow-record/default.nix b/pkgs/development/python-modules/flow-record/default.nix index b92660587549..268c7387502b 100644 --- a/pkgs/development/python-modules/flow-record/default.nix +++ b/pkgs/development/python-modules/flow-record/default.nix @@ -1,30 +1,35 @@ { lib, buildPythonPackage, + duckdb, + elastic-transport, elasticsearch, fastavro, fetchFromGitHub, + httpx, lz4, + maxminddb, msgpack, pytest7CheckHook, pythonOlder, - setuptools, + pytz, setuptools-scm, + setuptools, zstandard, }: buildPythonPackage rec { pname = "flow-record"; - version = "3.15"; + version = "3.17"; pyproject = true; - disabled = pythonOlder "3.8"; + disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "fox-it"; repo = "flow.record"; rev = "refs/tags/${version}"; - hash = "sha256-j5N66p7feB9Ae+Fu5RhVzh8XCHiq55jJMg0Fe+C6Jvg="; + hash = "sha256-fFP2bdO4wTR9Y+9no3FabtVmLicTD76Jw5aWDMPOB0w="; }; build-system = [ @@ -39,11 +44,18 @@ buildPythonPackage rec { lz4 zstandard ]; + duckdb = [ + duckdb + pytz + ]; elastic = [ elasticsearch ]; + geoip = [ maxminddb ]; avro = [ fastavro ] ++ fastavro.optional-dependencies.snappy; + splunk = [ httpx ]; }; nativeCheckInputs = [ + elastic-transport pytest7CheckHook ] ++ lib.flatten (builtins.attrValues optional-dependencies); From 257c05192f13b804a365f79bc31349d031ebdaea Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 12 Oct 2024 10:06:58 +0200 Subject: [PATCH 46/62] python312Packages.dissect-volume: 3.11 -> 3.12 Changelog: https://github.com/fox-it/dissect.volume/releases/tag/3.12 --- .../python-modules/dissect-volume/default.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/dissect-volume/default.nix b/pkgs/development/python-modules/dissect-volume/default.nix index 3a094cbd7880..0fb8e92a7cfe 100644 --- a/pkgs/development/python-modules/dissect-volume/default.nix +++ b/pkgs/development/python-modules/dissect-volume/default.nix @@ -12,24 +12,24 @@ buildPythonPackage rec { pname = "dissect-volume"; - version = "3.11"; + version = "3.12"; pyproject = true; - disabled = pythonOlder "3.11"; + disabled = pythonOlder "3.12"; src = fetchFromGitHub { owner = "fox-it"; repo = "dissect.volume"; rev = "refs/tags/${version}"; - hash = "sha256-eHIInoquuyukKuPVvVB6qtovx1NloHHVGKfFBHxVd+o="; + hash = "sha256-IhG2FZdCmYrGxHc2i+ERhphxP/uGgOY67epHEWnQXb0="; }; - nativeBuildInputs = [ + build-system = [ setuptools setuptools-scm ]; - propagatedBuildInputs = [ + dependencies = [ dissect-cstruct dissect-util ]; @@ -44,6 +44,7 @@ buildPythonPackage rec { "test_dm_thin" "test_lvm_mirro" "test_lvm_thin" + "test_lvm" "test_md_raid0_zones" "test_md_read" ]; From 31248ef3bd8f0639b3bf832b667c034a5700d98f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 12 Oct 2024 10:08:52 +0200 Subject: [PATCH 47/62] python312Packages.dissect-target: 3.18 -> 3.19 Changelog: https://github.com/fox-it/dissect.target/releases/tag/3.19 --- pkgs/development/python-modules/dissect-target/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/dissect-target/default.nix b/pkgs/development/python-modules/dissect-target/default.nix index 409f8444c33d..259d2e7d077d 100644 --- a/pkgs/development/python-modules/dissect-target/default.nix +++ b/pkgs/development/python-modules/dissect-target/default.nix @@ -44,7 +44,7 @@ buildPythonPackage rec { pname = "dissect-target"; - version = "3.18"; + version = "3.19"; pyproject = true; disabled = pythonOlder "3.9"; @@ -53,7 +53,7 @@ buildPythonPackage rec { owner = "fox-it"; repo = "dissect.target"; rev = "refs/tags/${version}"; - hash = "sha256-jR+f4t0QXmm007lrGdMyF9vFa3NW35gZxs7pe9sdjfg="; + hash = "sha256-D5YgCAKcnPyBrZTpcSuvKfWfIIcCxKGxn+mj8Jqzmws="; }; postPatch = '' @@ -138,6 +138,8 @@ buildPythonPackage rec { "test_systemd_basic_syntax" "test_target_cli_unicode_argparse" "test_target_query" + "test_target_info" + "test_yara" ] ++ # test is broken on Darwin From 9e5b1494060bd31fd3caff7642abee19abe9a31a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 12 Oct 2024 10:22:16 +0200 Subject: [PATCH 48/62] python312Packages.jalali-core: init at 1.0.0 Module to convert Gregorian to Jalali and inverse dates https://pypi.org/project/jalali-core/ --- .../python-modules/jalali-core/default.nix | 35 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/development/python-modules/jalali-core/default.nix diff --git a/pkgs/development/python-modules/jalali-core/default.nix b/pkgs/development/python-modules/jalali-core/default.nix new file mode 100644 index 000000000000..69c613d0417c --- /dev/null +++ b/pkgs/development/python-modules/jalali-core/default.nix @@ -0,0 +1,35 @@ +{ + lib, + buildPythonPackage, + fetchPypi, + pythonOlder, + setuptools, +}: + +buildPythonPackage rec { + pname = "jalali-core"; + version = "1.0.0"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchPypi { + pname = "jalali_core"; + inherit version; + hash = "sha256-9Ch8cMYwMj3PCjqybfkFuk1FHiMKwfZbO7L3d5eJSis="; + }; + + build-system = [ setuptools ]; + + # Module has no tests + doCheck = false; + + pythonImportsCheck = [ "jalali_core" ]; + + meta = { + description = "Module to convert Gregorian to Jalali and inverse dates"; + homepage = "https://pypi.org/project/jalali-core/"; + license = lib.licenses.lgpl2Only; + maintainers = with lib.maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9993849c1234..a7b7b2892cd2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6333,6 +6333,8 @@ self: super: with self; { jaeger-client = callPackage ../development/python-modules/jaeger-client { }; + jalali-core = callPackage ../development/python-modules/jalali-core { }; + jamo = callPackage ../development/python-modules/jamo { }; janus = callPackage ../development/python-modules/janus { }; From 28c0dcd4469c2376390b9fd8fbf5a80570e6c90f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 12 Oct 2024 10:23:02 +0200 Subject: [PATCH 49/62] python312Packages.jdatetime: refactor --- .../development/python-modules/jdatetime/default.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/jdatetime/default.nix b/pkgs/development/python-modules/jdatetime/default.nix index 553500c47be6..acc5dca6a825 100644 --- a/pkgs/development/python-modules/jdatetime/default.nix +++ b/pkgs/development/python-modules/jdatetime/default.nix @@ -2,29 +2,33 @@ lib, buildPythonPackage, fetchPypi, - six, + jalali-core, pythonOlder, + setuptools, }: buildPythonPackage rec { pname = "jdatetime"; version = "5.0.0"; - format = "setuptools"; + pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; hash = "sha256-LMYD2RPA2OMokoRU09KVJhywN+mVAif2fJYpq0cQ/fk="; }; - propagatedBuildInputs = [ six ]; + build-system = [ setuptools ]; + + dependencies = [ jalali-core ]; pythonImportsCheck = [ "jdatetime" ]; meta = with lib; { description = "Jalali datetime binding"; homepage = "https://github.com/slashmili/python-jalali"; + changelog = "https://github.com/slashmili/python-jalali/blob/v${version}/CHANGELOG.md"; license = licenses.psfl; maintainers = [ ]; }; From 1ea0000c9613186f692c235b6fb3e5606333af43 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 12 Oct 2024 10:28:24 +0200 Subject: [PATCH 50/62] mitmproxy2swagger: refactor --- .../security/mitmproxy2swagger/default.nix | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/pkgs/tools/security/mitmproxy2swagger/default.nix b/pkgs/tools/security/mitmproxy2swagger/default.nix index 6731d7c21c53..baf318573ee7 100644 --- a/pkgs/tools/security/mitmproxy2swagger/default.nix +++ b/pkgs/tools/security/mitmproxy2swagger/default.nix @@ -1,29 +1,29 @@ -{ lib -, fetchFromGitHub -, python3 +{ + lib, + fetchFromGitHub, + python3, }: python3.pkgs.buildPythonApplication rec { pname = "mitmproxy2swagger"; version = "0.13.0"; - format = "pyproject"; + pyproject = true; src = fetchFromGitHub { owner = "alufers"; - repo = pname; + repo = "mitmproxy2swagger"; rev = "refs/tags/${version}"; hash = "sha256-VHxqxee5sQWRS13V4SfY4LWaN0oxxWsNVDOEqUyKHfg="; }; - nativeBuildInputs = with python3.pkgs; [ - poetry-core - ]; - pythonRelaxDeps = [ + "mitmproxy" "ruamel.yaml" ]; - propagatedBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ poetry-core ]; + + dependencies = with python3.pkgs; [ json-stream mitmproxy ruamel-yaml @@ -32,16 +32,14 @@ python3.pkgs.buildPythonApplication rec { # No tests available doCheck = false; - pythonImportsCheck = [ - "mitmproxy2swagger" - ]; + pythonImportsCheck = [ "mitmproxy2swagger" ]; meta = with lib; { description = "Tool to automagically reverse-engineer REST APIs"; - mainProgram = "mitmproxy2swagger"; homepage = "https://github.com/alufers/mitmproxy2swagger"; changelog = "https://github.com/alufers/mitmproxy2swagger/releases/tag/${version}"; license = licenses.mit; maintainers = with maintainers; [ fab ]; + mainProgram = "mitmproxy2swagger"; }; } From 1becabfc8fc0815d3596db1bbaace8849fee9770 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 12 Oct 2024 10:31:36 +0200 Subject: [PATCH 51/62] python312Packages.azure-storage-file-share: 12.18.0 -> 12.19.0 Changelog: https://github.com/Azure/azure-sdk-for-python/blob/azure-storage-file-share_12.19.0/sdk/storage/azure-storage-file-share/CHANGELOG.md --- .../python-modules/azure-storage-file-share/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/azure-storage-file-share/default.nix b/pkgs/development/python-modules/azure-storage-file-share/default.nix index 5169b9a73366..04e4ee8bf5a8 100644 --- a/pkgs/development/python-modules/azure-storage-file-share/default.nix +++ b/pkgs/development/python-modules/azure-storage-file-share/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "azure-storage-file-share"; - version = "12.18.0"; + version = "12.19.0"; pyproject = true; disabled = pythonOlder "3.8"; @@ -20,7 +20,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "azure_storage_file_share"; inherit version; - hash = "sha256-CoHa7l4TWYrM3jxzsa7Mxu39zsXpV79AFQwGIvuV3HY="; + hash = "sha256-6npBdNxsUvUKyMMPIoFZ/MNnXR+Lp3G40O/LwxB0Ang="; }; build-system = [ setuptools ]; From 0c0658507b5af653fe7485451eb21d5e5cf8fcbf Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 12 Oct 2024 11:25:14 +0200 Subject: [PATCH 52/62] python312Packages.tableauserverclient: 0.31 -> 0.33 Changelog: https://github.com/tableau/server-client-python/releases/tag/v0.33 --- .../python-modules/tableauserverclient/default.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/tableauserverclient/default.nix b/pkgs/development/python-modules/tableauserverclient/default.nix index 032b4e189b70..910fd59d0683 100644 --- a/pkgs/development/python-modules/tableauserverclient/default.nix +++ b/pkgs/development/python-modules/tableauserverclient/default.nix @@ -9,19 +9,20 @@ requests, requests-mock, setuptools, + typing-extensions, versioneer, }: buildPythonPackage rec { pname = "tableauserverclient"; - version = "0.31"; + version = "0.33"; pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-e00/+yVKg7dGGq3Os+oWu/F93j5e9dnwWZxKwm+soqM="; + hash = "sha256-7yj/Ey3mIR2GZ0gtNkrrtoKEmuA5LihZlM9qPhbROQw="; }; postPatch = '' @@ -29,7 +30,10 @@ buildPythonPackage rec { rm versioneer.py ''; - pythonRelaxDeps = [ "urllib3" ]; + pythonRelaxDeps = [ + "defusedxml" + "urllib3" + ]; nativeBuildInputs = [ setuptools @@ -40,6 +44,7 @@ buildPythonPackage rec { defusedxml requests packaging + typing-extensions ]; nativeCheckInputs = [ From 9c3eafa2d44d7d33c43c3b848d333b9ff57ac451 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 12 Oct 2024 11:30:53 +0200 Subject: [PATCH 53/62] python312Packages.connexion: disable failing tests --- .../python-modules/connexion/default.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/connexion/default.nix b/pkgs/development/python-modules/connexion/default.nix index a43fccb0170e..bd19ae31caa2 100644 --- a/pkgs/development/python-modules/connexion/default.nix +++ b/pkgs/development/python-modules/connexion/default.nix @@ -37,18 +37,18 @@ buildPythonPackage rec { version = "3.1.0"; pyproject = true; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "spec-first"; - repo = pname; + repo = "connexion"; rev = "refs/tags/${version}"; hash = "sha256-rngQDU9kXw/Z+Al0SCVnWN8xnphueTtZ0+xPBR5MbEM="; }; - nativeBuildInputs = [ poetry-core ]; + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + dependencies = [ asgiref httpx inflection @@ -80,6 +80,10 @@ buildPythonPackage rec { pythonImportsCheck = [ "connexion" ]; disabledTests = [ + "test_build_example" + "test_mock_resolver_no_example" + # Tests require network access + "test_remote_api" # AssertionError "test_headers" # waiter.acquire() deadlock @@ -91,9 +95,10 @@ buildPythonPackage rec { meta = with lib; { description = "Swagger/OpenAPI First framework on top of Flask"; - mainProgram = "connexion"; homepage = "https://github.com/spec-first/connexion"; changelog = "https://github.com/spec-first/connexion/releases/tag/${version}"; license = licenses.asl20; + maintainers = [ ]; + mainProgram = "connexion"; }; } From d9984214d81e7b535f2240147d1f41404c2b5c75 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 12 Oct 2024 11:37:02 +0200 Subject: [PATCH 54/62] python312Packages.hypothesis-auto: relax dependencies --- .../python-modules/hypothesis-auto/default.nix | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/hypothesis-auto/default.nix b/pkgs/development/python-modules/hypothesis-auto/default.nix index eca2ca101457..7dcaf5cd0578 100644 --- a/pkgs/development/python-modules/hypothesis-auto/default.nix +++ b/pkgs/development/python-modules/hypothesis-auto/default.nix @@ -5,7 +5,6 @@ hypothesis, poetry-core, pydantic, - pytest, pytestCheckHook, pythonOlder, }: @@ -13,7 +12,7 @@ buildPythonPackage rec { pname = "hypothesis-auto"; version = "1.1.5"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.6"; @@ -23,12 +22,16 @@ buildPythonPackage rec { hash = "sha256-U0vcOB9jXmUV5v2IwybVu2arY1FpPnKkP7m2kbD1kRw="; }; - nativeBuildInputs = [ poetry-core ]; + pythonRelaxDeps = [ + "hypothesis" + "pydantic" + ]; - propagatedBuildInputs = [ - pydantic + build-system = [ poetry-core ]; + + dependencies = [ hypothesis - pytest + pydantic ]; pythonImportsCheck = [ "hypothesis_auto" ]; @@ -38,6 +41,7 @@ buildPythonPackage rec { meta = with lib; { description = "Enables fully automatic tests for type annotated functions"; homepage = "https://github.com/timothycrosley/hypothesis-auto/"; + changelog = "https://github.com/timothycrosley/hypothesis-auto/blob/master/CHANGELOG.md"; license = licenses.mit; maintainers = [ ]; }; From 76e8a95910cfecfe4409125cb99485c787540eeb Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 12 Oct 2024 11:39:50 +0200 Subject: [PATCH 55/62] python312Packages.hypothesis-auto: add optional-dependencies --- pkgs/development/python-modules/hypothesis-auto/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/python-modules/hypothesis-auto/default.nix b/pkgs/development/python-modules/hypothesis-auto/default.nix index 7dcaf5cd0578..13457576cdb4 100644 --- a/pkgs/development/python-modules/hypothesis-auto/default.nix +++ b/pkgs/development/python-modules/hypothesis-auto/default.nix @@ -5,6 +5,7 @@ hypothesis, poetry-core, pydantic, + pytest, pytestCheckHook, pythonOlder, }: @@ -34,6 +35,10 @@ buildPythonPackage rec { pydantic ]; + optional-dependencies = { + pytest = [ pytest ]; + }; + pythonImportsCheck = [ "hypothesis_auto" ]; nativeCheckInputs = [ pytestCheckHook ]; From 7005cf7193feee43b9b0e1d2237e66e05ee870ce Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 12 Oct 2024 11:49:16 +0200 Subject: [PATCH 56/62] python312Packages.import-expression: refactor --- .../import-expression/default.nix | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/import-expression/default.nix b/pkgs/development/python-modules/import-expression/default.nix index 369495b96e29..6be9824a37a1 100644 --- a/pkgs/development/python-modules/import-expression/default.nix +++ b/pkgs/development/python-modules/import-expression/default.nix @@ -3,38 +3,43 @@ buildPythonPackage, fetchPypi, pytestCheckHook, - astunparse, + pythonOlder, setuptools, + typing-extensions, }: + buildPythonPackage rec { pname = "import-expression"; version = "2.0.0"; pyproject = true; + disabled = pythonOlder "3.9"; + src = fetchPypi { - inherit version; pname = "import_expression"; + inherit version; hash = "sha256-Biw7dIOPKbDcqYJSCyeqC/seREcVihSZuaKNFfgjTew="; }; build-system = [ setuptools ]; - dependencies = [ astunparse ]; + + dependencies = [ typing-extensions ]; + nativeCheckInputs = [ pytestCheckHook ]; + pytestFlagsArray = [ "tests.py" ]; - pythonImportsCheck = [ - "import_expression" - "import_expression._codec" - ]; + pythonImportsCheck = [ "import_expression" ]; meta = { description = "Transpiles a superset of python to allow easy inline imports"; homepage = "https://github.com/ioistired/import-expression-parser"; + changelog = "https://github.com/ioistired/import-expression/releases/tag/v${version}"; license = with lib.licenses; [ mit psfl ]; - mainProgram = "import-expression"; maintainers = with lib.maintainers; [ ]; + mainProgram = "import-expression"; }; } From 12b1a23c6e40105796d2713f7ccb42441ef7e464 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Sat, 14 Sep 2024 21:13:06 +0200 Subject: [PATCH 57/62] release-lib: add exception to build olm on hydra Olm was marked as vulnerable in e4767b47. The issue, however, is controversial and the practical ability to exploit its vulnerabilities has not been demostrated: ultimately the users are invited to decide for themselves. Given that, hydra should still build and distribute the packages depending on olm to avoid expensive builds in the event the users decide it's acceptable to continue using these packages. --- pkgs/top-level/release.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix index 0f5974d83cb8..bf69d13c98f1 100644 --- a/pkgs/top-level/release.nix +++ b/pkgs/top-level/release.nix @@ -31,6 +31,11 @@ , nixpkgsArgs ? { config = { allowUnfree = false; inHydra = true; + # Exceptional unsafe packages that we still build and distribute, + # so users choosing to allow don't have to rebuild them every time. + permittedInsecurePackages = [ + "olm-3.2.16" # see PR #347899 + ]; }; } # This flag, if set to true, will inhibit the use of `mapTestOn` From 58cd045b17f588c0897f44201e1168845668ae1e Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Fri, 11 Oct 2024 11:21:58 +0200 Subject: [PATCH 58/62] catboost: move to by-name --- .../catboost/default.nix => by-name/ca/catboost/package.nix} | 0 .../libraries => by-name/ca}/catboost/remove-conan.patch | 0 pkgs/top-level/all-packages.nix | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) rename pkgs/{development/libraries/catboost/default.nix => by-name/ca/catboost/package.nix} (100%) rename pkgs/{development/libraries => by-name/ca}/catboost/remove-conan.patch (100%) diff --git a/pkgs/development/libraries/catboost/default.nix b/pkgs/by-name/ca/catboost/package.nix similarity index 100% rename from pkgs/development/libraries/catboost/default.nix rename to pkgs/by-name/ca/catboost/package.nix diff --git a/pkgs/development/libraries/catboost/remove-conan.patch b/pkgs/by-name/ca/catboost/remove-conan.patch similarity index 100% rename from pkgs/development/libraries/catboost/remove-conan.patch rename to pkgs/by-name/ca/catboost/remove-conan.patch diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index dca6653f586c..2f572ac6db3b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19071,7 +19071,7 @@ with pkgs; captive-browser = callPackage ../applications/networking/browsers/captive-browser { }; - catboost = callPackage ../development/libraries/catboost { + catboost = callPackage ../by-name/ca/catboost/package.nix { # https://github.com/catboost/catboost/issues/2540 cudaPackages = cudaPackages_11; }; From 5d2c1a9655ab765314e35a05d423cbac49743b9e Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Fri, 11 Oct 2024 11:23:26 +0200 Subject: [PATCH 59/62] catboost: format --- pkgs/by-name/ca/catboost/package.nix | 101 ++++++++++++++++----------- 1 file changed, 60 insertions(+), 41 deletions(-) diff --git a/pkgs/by-name/ca/catboost/package.nix b/pkgs/by-name/ca/catboost/package.nix index ca0d22ff002c..1c36c6de4a83 100644 --- a/pkgs/by-name/ca/catboost/package.nix +++ b/pkgs/by-name/ca/catboost/package.nix @@ -1,20 +1,21 @@ -{ lib -, config -, fetchFromGitHub -, cmake -, cctools -, libiconv -, llvmPackages -, ninja -, openssl -, python3Packages -, ragel -, yasm -, zlib -, cudaSupport ? config.cudaSupport -, cudaPackages ? {} -, llvmPackages_12 -, pythonSupport ? false +{ + lib, + config, + fetchFromGitHub, + cmake, + cctools, + libiconv, + llvmPackages, + ninja, + openssl, + python3Packages, + ragel, + yasm, + zlib, + cudaSupport ? config.cudaSupport, + cudaPackages ? { }, + llvmPackages_12, + pythonSupport ? false, }: let inherit (llvmPackages) stdenv; @@ -50,31 +51,46 @@ stdenv.mkDerivation (finalAttrs: { done ''; - outputs = [ "out" "dev" ]; + outputs = [ + "out" + "dev" + ]; - nativeBuildInputs = [ - cmake - llvmPackages.bintools - ninja - (python3Packages.python.withPackages (ps: with ps; [ six ])) - ragel - yasm - ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ - cctools - ] ++ lib.optionals cudaSupport (with cudaPackages; [ - cuda_nvcc - ]); + nativeBuildInputs = + [ + cmake + llvmPackages.bintools + ninja + (python3Packages.python.withPackages (ps: with ps; [ six ])) + ragel + yasm + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + cctools + ] + ++ lib.optionals cudaSupport ( + with cudaPackages; + [ + cuda_nvcc + ] + ); - buildInputs = [ - openssl - zlib - ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ - libiconv - ] ++ lib.optionals cudaSupport (with cudaPackages; [ - cuda_cudart - cuda_cccl - libcublas - ]); + buildInputs = + [ + openssl + zlib + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + libiconv + ] + ++ lib.optionals cudaSupport ( + with cudaPackages; + [ + cuda_cudart + cuda_cccl + libcublas + ] + ); env = { # catboost requires clang 14+ for build, but does clang 12 for cuda build. @@ -115,7 +131,10 @@ stdenv.mkDerivation (finalAttrs: { license = licenses.asl20; platforms = platforms.unix; homepage = "https://catboost.ai"; - maintainers = with maintainers; [ PlushBeaver natsukium ]; + maintainers = with maintainers; [ + PlushBeaver + natsukium + ]; mainProgram = "catboost"; }; }) From 8ff97cbeb128f796ae6de76bc5e44470161ca111 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Fri, 11 Oct 2024 11:28:26 +0200 Subject: [PATCH 60/62] catboost: 1.2.5 -> 1.2.7 Diff: https://github.com/catboost/catboost/compare/v1.2.5...v1.2.7 Changelog: https://github.com/catboost/catboost/releases/tag/v1.2.7 --- pkgs/by-name/ca/catboost/package.nix | 7 +++++-- pkgs/by-name/ca/catboost/remove-conan.patch | 19 ++++++++++++------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/ca/catboost/package.nix b/pkgs/by-name/ca/catboost/package.nix index 1c36c6de4a83..0bbfe4671d3a 100644 --- a/pkgs/by-name/ca/catboost/package.nix +++ b/pkgs/by-name/ca/catboost/package.nix @@ -23,13 +23,13 @@ in stdenv.mkDerivation (finalAttrs: { pname = "catboost"; - version = "1.2.5"; + version = "1.2.7"; src = fetchFromGitHub { owner = "catboost"; repo = "catboost"; rev = "refs/tags/v${finalAttrs.version}"; - hash = "sha256-2dfCCCa0LheytkLRbYuBd25M320f1kbhBWKIVjslor0="; + hash = "sha256-I3geFdVQ1Pm61eRXi+ueaxel3QRb8EJV9f4zV2Q7kk4="; }; patches = [ @@ -93,6 +93,8 @@ stdenv.mkDerivation (finalAttrs: { ); env = { + PROGRAM_VERSION = finalAttrs.version; + # catboost requires clang 14+ for build, but does clang 12 for cuda build. # after bumping the default version of llvm, check for compatibility with the cuda backend and pin it. # see https://catboost.ai/en/docs/installation/build-environment-setup-for-cmake#compilers,-linkers-and-related-tools @@ -128,6 +130,7 @@ stdenv.mkDerivation (finalAttrs: { library, used for ranking, classification, regression and other machine learning tasks for Python, R, Java, C++. Supports computation on CPU and GPU. ''; + changelog = "https://github.com/catboost/catboost/releases/tag/v${finalAttrs.version}"; license = licenses.asl20; platforms = platforms.unix; homepage = "https://catboost.ai"; diff --git a/pkgs/by-name/ca/catboost/remove-conan.patch b/pkgs/by-name/ca/catboost/remove-conan.patch index 44411ad4160b..4e3ab6f436f9 100644 --- a/pkgs/by-name/ca/catboost/remove-conan.patch +++ b/pkgs/by-name/ca/catboost/remove-conan.patch @@ -1,16 +1,16 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index ed6c53b220..5c6fb8f157 100644 +index 24ffd1225a..700adcc246 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -29,7 +29,6 @@ include(cmake/global_flags.cmake) +@@ -39,7 +39,6 @@ include(cmake/global_flags.cmake) include(cmake/global_vars.cmake) include(cmake/archive.cmake) include(cmake/common.cmake) --include(cmake/conan.cmake) +-include(cmake/conan1_deprecated.cmake) include(cmake/cuda.cmake) include(cmake/cython.cmake) include(cmake/fbs.cmake) -@@ -38,21 +37,6 @@ include(cmake/recursive_library.cmake) +@@ -48,21 +47,6 @@ include(cmake/recursive_library.cmake) include(cmake/shared_libs.cmake) include(cmake/swig.cmake) @@ -24,11 +24,16 @@ index ed6c53b220..5c6fb8f157 100644 - BUILD missing - REMOTE conancenter - SETTINGS ${settings} -- ENV "CONAN_CMAKE_GENERATOR=${CMAKE_GENERATOR}" -- CONF "tools.cmake.cmaketoolchain:generator=${CMAKE_GENERATOR}" +- ENV "CONAN_CMAKE_GENERATOR=${CMAKE_GENERATOR}" +- CONF "tools.cmake.cmaketoolchain:generator=${CMAKE_GENERATOR}" - ) -endif() - + if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND NOT HAVE_CUDA) include(CMakeLists.linux-x86_64.txt) - elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND HAVE_CUDA) +@@ -93,4 +77,3 @@ elseif (ANDROID AND CMAKE_ANDROID_ARCH STREQUAL "x86") + elseif (ANDROID AND CMAKE_ANDROID_ARCH STREQUAL "x86_64") + include(CMakeLists.android-x86_64.txt) + endif() +- From dbd3d28e558bda0430e9ae97a9ef73af727b2014 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Fri, 11 Oct 2024 17:17:38 +0200 Subject: [PATCH 61/62] catboost: mark as broken on x86_64-darwin --- pkgs/by-name/ca/catboost/package.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/by-name/ca/catboost/package.nix b/pkgs/by-name/ca/catboost/package.nix index 0bbfe4671d3a..1d0ef404a667 100644 --- a/pkgs/by-name/ca/catboost/package.nix +++ b/pkgs/by-name/ca/catboost/package.nix @@ -139,5 +139,7 @@ stdenv.mkDerivation (finalAttrs: { natsukium ]; mainProgram = "catboost"; + # /nix/store/hzxiynjmmj35fpy3jla7vcqwmzj9i449-Libsystem-1238.60.2/include/sys/_types/_mbstate_t.h:31:9: error: unknown type name '__darwin_mbstate_t' + broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64; }; }) From bf171746655a97d46cc7a1037749d9e2f15e5889 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Fri, 11 Oct 2024 17:25:19 +0200 Subject: [PATCH 62/62] python312Packages.catboost: clean derivation --- .../python-modules/catboost/default.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/catboost/default.nix b/pkgs/development/python-modules/catboost/default.nix index 98e4f0869ccb..d0fc77b70038 100644 --- a/pkgs/development/python-modules/catboost/default.nix +++ b/pkgs/development/python-modules/catboost/default.nix @@ -3,15 +3,18 @@ buildPythonPackage, catboost, python, + + # build-system + setuptools, + + # dependencies graphviz, matplotlib, numpy, pandas, plotly, scipy, - setuptools, six, - wheel, }: buildPythonPackage rec { @@ -21,16 +24,15 @@ buildPythonPackage rec { src meta ; - format = "pyproject"; + pyproject = true; sourceRoot = "${src.name}/catboost/python-package"; - nativeBuildInputs = [ + build-system = [ setuptools - wheel ]; - propagatedBuildInputs = [ + dependencies = [ graphviz matplotlib numpy