From 8a6a09f620087fb3db9f4a8cd2de7de45de1c8f4 Mon Sep 17 00:00:00 2001 From: SharzyL Date: Sun, 2 Jul 2023 20:51:36 +0800 Subject: [PATCH 01/28] jextract: init at unstable-2023-04-14 --- .../tools/java/jextract/default.nix | 99 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 101 insertions(+) create mode 100644 pkgs/development/tools/java/jextract/default.nix diff --git a/pkgs/development/tools/java/jextract/default.nix b/pkgs/development/tools/java/jextract/default.nix new file mode 100644 index 000000000000..8302e02726e8 --- /dev/null +++ b/pkgs/development/tools/java/jextract/default.nix @@ -0,0 +1,99 @@ +{ lib +, stdenv +, fetchFromGitHub +, emptyDirectory +, writeText +, makeWrapper +, gradle +, jdk20 +, llvmPackages +}: + +let + gradleInit = writeText "init.gradle" '' + logger.lifecycle 'Replacing Maven repositories with empty directory...' + gradle.projectsLoaded { + rootProject.allprojects { + buildscript { + repositories { + clear() + maven { url '${emptyDirectory}' } + } + } + repositories { + clear() + maven { url '${emptyDirectory}' } + } + } + } + settingsEvaluated { settings -> + settings.pluginManagement { + repositories { + maven { url '${emptyDirectory}' } + } + } + } + ''; +in + +stdenv.mkDerivation { + pname = "jextract"; + version = "unstable-2023-04-14"; + + src = fetchFromGitHub { + owner = "openjdk"; + repo = "jextract"; + rev = "cf3afe9ca71592c8ebb32f219707285dd1d5b28a"; + hash = "sha256-8qRD1Xg39vxtFAdguD8XvkQ8u7YzFU55MhyyJozVffo="; + }; + + nativeBuildInputs = [ + gradle + makeWrapper + ]; + + env = { + ORG_GRADLE_PROJECT_llvm_home = llvmPackages.libclang.lib; + ORG_GRADLE_PROJECT_jdk20_home = jdk20; + }; + + buildPhase = '' + runHook preBuild + + export GRADLE_USER_HOME=$(mktemp -d) + gradle --console plain --init-script "${gradleInit}" assemble + + runHook postBuild + ''; + + doCheck = true; + + checkPhase = '' + runHook preCheck + gradle --console plain --init-script "${gradleInit}" verify + runHook postCheck + ''; + + installPhase = '' + runHook preInstall + + install -D --mode=0444 --target-directory="$out/share/java" \ + ./build/libs/org.openjdk.jextract-unspecified.jar + + runHook postInstall + ''; + + postFixup = '' + makeWrapper "${jdk20}/bin/java" "$out/bin/jextract" \ + --add-flags "--enable-preview" \ + --add-flags "--class-path $out/share/java/org.openjdk.jextract-unspecified.jar" \ + --add-flags "org.openjdk.jextract.JextractTool" + ''; + + meta = with lib; { + description = "A tool which mechanically generates Java bindings from a native library headers"; + homepage = "https://github.com/openjdk/jextract"; + license = licenses.gpl2Only; + maintainers = with maintainers; [ sharzy ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4cac45c1deba..b867106b9103 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -25215,6 +25215,8 @@ with pkgs; fastjar = callPackage ../development/tools/java/fastjar { }; + jextract = callPackage ../development/tools/java/jextract { }; + httpunit = callPackage ../development/libraries/java/httpunit { }; javaCup = callPackage ../development/libraries/java/cup { From 641d717acedd9a468c762b77fa15b5d8a3728600 Mon Sep 17 00:00:00 2001 From: Victor SENE Date: Sat, 15 Jul 2023 14:36:53 +0200 Subject: [PATCH 02/28] nixos/mautrix-whatsapp: init module Import from PR https://github.com/NixOS/nixpkgs/pull/176025 Co-authored-by: Luflosi --- nixos/modules/module-list.nix | 3 +- .../services/matrix/mautrix-whatsapp.nix | 148 ++++++++++++++++++ 2 files changed, 150 insertions(+), 1 deletion(-) create mode 100644 nixos/modules/services/matrix/mautrix-whatsapp.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 0d4369cc3f15..342354b51638 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -600,6 +600,7 @@ ./services/matrix/dendrite.nix ./services/matrix/mautrix-facebook.nix ./services/matrix/mautrix-telegram.nix + ./services/matrix/mautrix-whatsapp.nix ./services/matrix/mjolnir.nix ./services/matrix/mx-puppet-discord.nix ./services/matrix/pantalaimon.nix @@ -1479,5 +1480,5 @@ ./virtualisation/waydroid.nix ./virtualisation/xe-guest-utilities.nix ./virtualisation/xen-dom0.nix - { documentation.nixos.extraModules = [ ./virtualisation/qemu-vm.nix ]; } + {documentation.nixos.extraModules = [./virtualisation/qemu-vm.nix];} ] diff --git a/nixos/modules/services/matrix/mautrix-whatsapp.nix b/nixos/modules/services/matrix/mautrix-whatsapp.nix new file mode 100644 index 000000000000..8ba7fe752ca0 --- /dev/null +++ b/nixos/modules/services/matrix/mautrix-whatsapp.nix @@ -0,0 +1,148 @@ +{ + lib, + config, + pkgs, + ... +}: +with lib; let + cfg = config.services.mautrix-whatsapp; + dataDir = "/var/lib/mautrix-whatsapp"; + settingsFormat = pkgs.formats.json {}; + + registrationFile = "${dataDir}/whatsapp-registration.yaml"; + settingsFile = settingsFormat.generate "config.json" cfg.settings; + + startupScript = '' + ${pkgs.yq}/bin/yq -s '.[0].appservice.as_token = .[1].as_token + | .[0].appservice.hs_token = .[1].hs_token + | .[0]' ${settingsFile} ${registrationFile} \ + > ${dataDir}/config.yml + + ${pkgs.mautrix-whatsapp}/bin/mautrix-whatsapp \ + --config='${dataDir}/config.yml' \ + --registration='${registrationFile}' + ''; +in { + options.services.mautrix-whatsapp = { + enable = mkEnableOption "Mautrix-whatsapp, a puppeting bridge between Matrix and WhatsApp."; + + settings = mkOption rec { + apply = recursiveUpdate default; + inherit (settingsFormat) type; + + description = lib.mdDoc '' + {file}`config.yaml` configuration as a Nix attribute set. + Configuration options should match those described in + [example-config.yaml](https://github.com/mautrix/whatsapp/blob/master/example-config.yaml). + ''; + default = { + homeserver = { + domain = config.services.matrix-synapse.settings.server_name; + }; + appservice = rec { + address = "http://localhost:29318"; + hostname = "0.0.0.0"; + port = 29318; + database = { + type = "sqlite3"; + uri = "${dataDir}/mautrix-whatsapp.db"; + }; + id = "whatsapp"; + bot = { + username = "whatsappbot"; + displayname = "WhatsApp Bot"; + }; + as_token = ""; + hs_token = ""; + }; + bridge = { + username_template = "whatsapp_{{.}}"; + displayname_template = "{{if .Notify}}{{.Notify}}{{else}}{{.Jid}}{{end}}"; + command_prefix = "!wa"; + permissions."*" = "relay"; + }; + relay = { + enabled = true; + management = "!whatsappbot:${toString (config.services.matrix-synapse.settings.server_name)}"; + }; + logging = { + directory = "${dataDir}/logs"; + file_name_format = "{{.Date}}-{{.Index}}.log"; + file_date_format = "2006-01-02"; + file_mode = 0384; + timestamp_format = "Jan _2, 2006 15:04:05"; + print_level = "info"; + }; + }; + example = { + settings = { + homeserver.address = https://matrix.myhomeserver.org; + bridge.permissions = { + "@admin:myhomeserver.org" = "admin"; + }; + }; + }; + }; + + serviceDependencies = mkOption { + type = with types; listOf str; + default = optional config.services.matrix-synapse.enable "matrix-synapse.service"; + defaultText = literalExpression '' + optional config.services.matrix-synapse.enable "matrix-synapse.service" + ''; + description = lib.mdDoc '' + List of Systemd services to require and wait for when starting the application service. + ''; + }; + }; + + config = mkIf cfg.enable { + systemd.services.mautrix-whatsapp = { + description = "Mautrix-WhatsApp Service - A WhatsApp bridge for Matrix"; + + wantedBy = ["multi-user.target"]; + wants = ["network-online.target"] ++ cfg.serviceDependencies; + after = ["network-online.target"] ++ cfg.serviceDependencies; + + preStart = '' + # generate the appservice's registration file if absent + if [ ! -f '${registrationFile}' ]; then + ${pkgs.mautrix-whatsapp}/bin/mautrix-whatsapp \ + --generate-registration \ + --config='${settingsFile}' \ + --registration='${registrationFile}' + fi + chmod 640 ${registrationFile} + ''; + + script = startupScript; + + serviceConfig = { + Type = "simple"; + #DynamicUser = true; + PrivateTmp = true; + StateDirectory = baseNameOf dataDir; + WorkingDirectory = "${dataDir}"; + + ProtectSystem = "strict"; + ProtectHome = true; + ProtectKernelTunables = true; + ProtectKernelModules = true; + ProtectControlGroups = true; + User = "mautrix-whatsapp"; + Group = "matrix-synapse"; + SupplementaryGroups = "matrix-synapse"; + UMask = 0027; + Restart = "always"; + }; + }; + + users.groups.mautrix-whatsapp = {}; + users.users.mautrix-whatsapp = { + isSystemUser = true; + group = "mautrix-whatsapp"; + home = dataDir; + }; + services.matrix-synapse.settings.app_service_config_files = ["${registrationFile}"]; + }; +} From b443a4d9406b83ea7819e9ea4d9dedb8a17821c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Christ?= Date: Sat, 15 Jul 2023 21:20:55 +0200 Subject: [PATCH 03/28] mautrix-whatsapp: Apply suggestions This contribution applies suggestions made by Luflosi in https://github.com/NixOS/nixpkgs/pull/176025#issuecomment-1237338551 as well as some general refactoring. Co-authored-by: Luflosi --- .../services/matrix/mautrix-whatsapp.nix | 147 +++++++++++------- 1 file changed, 90 insertions(+), 57 deletions(-) diff --git a/nixos/modules/services/matrix/mautrix-whatsapp.nix b/nixos/modules/services/matrix/mautrix-whatsapp.nix index 8ba7fe752ca0..1a959bc96e9d 100644 --- a/nixos/modules/services/matrix/mautrix-whatsapp.nix +++ b/nixos/modules/services/matrix/mautrix-whatsapp.nix @@ -7,41 +7,25 @@ with lib; let cfg = config.services.mautrix-whatsapp; dataDir = "/var/lib/mautrix-whatsapp"; - settingsFormat = pkgs.formats.json {}; - registrationFile = "${dataDir}/whatsapp-registration.yaml"; - settingsFile = settingsFormat.generate "config.json" cfg.settings; - - startupScript = '' - ${pkgs.yq}/bin/yq -s '.[0].appservice.as_token = .[1].as_token - | .[0].appservice.hs_token = .[1].hs_token - | .[0]' ${settingsFile} ${registrationFile} \ - > ${dataDir}/config.yml - - ${pkgs.mautrix-whatsapp}/bin/mautrix-whatsapp \ - --config='${dataDir}/config.yml' \ - --registration='${registrationFile}' - ''; + settingsFile = "${dataDir}/config.json"; + settingsFileUnsubstituted = settingsFormat.generate "mautrix-whatsapp-config-unsubstituted.json" cfg.settings; + settingsFormat = pkgs.formats.json {}; in { options.services.mautrix-whatsapp = { - enable = mkEnableOption "Mautrix-whatsapp, a puppeting bridge between Matrix and WhatsApp."; + enable = mkEnableOption "mautrix-whatsapp, a puppeting/relaybot bridge between Matrix and WhatsApp."; settings = mkOption rec { apply = recursiveUpdate default; inherit (settingsFormat) type; - description = lib.mdDoc '' - {file}`config.yaml` configuration as a Nix attribute set. - Configuration options should match those described in - [example-config.yaml](https://github.com/mautrix/whatsapp/blob/master/example-config.yaml). - ''; default = { homeserver = { domain = config.services.matrix-synapse.settings.server_name; }; appservice = rec { - address = "http://localhost:29318"; - hostname = "0.0.0.0"; + address = "http://localhost:${toString port}"; + hostname = "[::]"; port = 29318; database = { type = "sqlite3"; @@ -50,38 +34,62 @@ in { id = "whatsapp"; bot = { username = "whatsappbot"; - displayname = "WhatsApp Bot"; + displayname = "WhatsApp Bridge Bot"; }; as_token = ""; hs_token = ""; }; bridge = { username_template = "whatsapp_{{.}}"; - displayname_template = "{{if .Notify}}{{.Notify}}{{else}}{{.Jid}}{{end}}"; + displayname_template = "{{if .BusinessName}}{{.BusinessName}}{{else if .PushName}}{{.PushName}}{{else}}{{.JID}}{{end}} (WA)"; + double_puppet_server_map = {}; + login_shared_secret_map = {}; command_prefix = "!wa"; permissions."*" = "relay"; - }; - relay = { - enabled = true; - management = "!whatsappbot:${toString (config.services.matrix-synapse.settings.server_name)}"; + relay = { + enabled = true; + }; }; logging = { - directory = "${dataDir}/logs"; - file_name_format = "{{.Date}}-{{.Index}}.log"; - file_date_format = "2006-01-02"; - file_mode = 0384; - timestamp_format = "Jan _2, 2006 15:04:05"; - print_level = "info"; + min_level = "info"; + writers = [ + { + type = "stdout"; + format = "pretty-colored"; + } + { + type = "file"; + format = "json"; + } + ]; }; }; example = { settings = { - homeserver.address = https://matrix.myhomeserver.org; + homeserver.address = "https://matrix.myhomeserver.org"; bridge.permissions = { "@admin:myhomeserver.org" = "admin"; }; }; }; + description = lib.mdDoc '' + {file}`config.yaml` configuration as a Nix attribute set. + Configuration options should match those described in + [example-config.yaml](https://github.com/mautrix/whatsapp/blob/master/example-config.yaml). + + Secret tokens should be specified using {option}`environmentFile` + instead of this world-readable attribute set. + ''; + }; + + environmentFile = mkOption { + type = types.nullOr types.path; + default = null; + description = lib.mdDoc '' + File containing environment variables to be passed to the mautrix-whatsapp service, + in which secret tokens can be specified securely by optionally defining a value for + `MAUTRIX_WHATSAPP_BRIDGE_LOGIN_SHARED_SECRET`. + ''; }; serviceDependencies = mkOption { @@ -105,6 +113,16 @@ in { after = ["network-online.target"] ++ cfg.serviceDependencies; preStart = '' + # substitute the settings file by environment variables + # in this case read from EnvironmentFile + test -f '${settingsFile}' && rm -f '${settingsFile}' + old_umask=$(umask) + umask 0177 + ${pkgs.envsubst}/bin/envsubst \ + -o '${settingsFile}' \ + -i '${settingsFileUnsubstituted}' + umask $old_umask + # generate the appservice's registration file if absent if [ ! -f '${registrationFile}' ]; then ${pkgs.mautrix-whatsapp}/bin/mautrix-whatsapp \ @@ -113,36 +131,51 @@ in { --registration='${registrationFile}' fi chmod 640 ${registrationFile} + + umask 0177 + ${pkgs.yq}/bin/yq -s '.[0].appservice.as_token = .[1].as_token + | .[0].appservice.hs_token = .[1].hs_token + | .[0]' '${settingsFile}' '${registrationFile}' \ + > '${settingsFile}.tmp' + mv '${settingsFile}.tmp' '${settingsFile}' + umask $old_umask ''; - script = startupScript; - serviceConfig = { - Type = "simple"; - #DynamicUser = true; - PrivateTmp = true; + DynamicUser = true; + EnvironmentFile = cfg.environmentFile; StateDirectory = baseNameOf dataDir; WorkingDirectory = "${dataDir}"; - - ProtectSystem = "strict"; - ProtectHome = true; - ProtectKernelTunables = true; - ProtectKernelModules = true; + ExecStart = '' + ${pkgs.mautrix-whatsapp}/bin/mautrix-whatsapp \ + --config='${settingsFile}' \ + --registration='${registrationFile}' + ''; + LockPersonality = true; + MemoryDenyWriteExecute = true; + NoNewPrivileges = true; + PrivateDevices = true; + PrivateTmp = true; + PrivateUsers = true; + ProtectClock = true; ProtectControlGroups = true; - User = "mautrix-whatsapp"; - Group = "matrix-synapse"; - SupplementaryGroups = "matrix-synapse"; + ProtectHome = true; + ProtectHostname = true; + ProtectKernelLogs = true; + ProtectKernelModules = true; + ProtectKernelTunables = true; + ProtectSystem = "strict"; + Restart = "on-failure"; + RestartSec = "30s"; + RestrictRealtime = true; + RestrictSUIDSGID = true; + SystemCallArchitectures = "native"; + SystemCallErrorNumber = "EPERM"; + SystemCallFilter = ["@system-service"]; + Type = "simple"; UMask = 0027; - Restart = "always"; }; + restartTriggers = [settingsFileUnsubstituted]; }; - - users.groups.mautrix-whatsapp = {}; - users.users.mautrix-whatsapp = { - isSystemUser = true; - group = "mautrix-whatsapp"; - home = dataDir; - }; - services.matrix-synapse.settings.app_service_config_files = ["${registrationFile}"]; }; } From 01733304267d0840bccf34bd5a6a39c16448b0ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Christ?= Date: Wed, 2 Aug 2023 21:24:29 +0200 Subject: [PATCH 04/28] mautrix-whatsapp: Add postgres options to example --- nixos/modules/services/matrix/mautrix-whatsapp.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nixos/modules/services/matrix/mautrix-whatsapp.nix b/nixos/modules/services/matrix/mautrix-whatsapp.nix index 1a959bc96e9d..366634d9fcc8 100644 --- a/nixos/modules/services/matrix/mautrix-whatsapp.nix +++ b/nixos/modules/services/matrix/mautrix-whatsapp.nix @@ -67,6 +67,10 @@ in { example = { settings = { homeserver.address = "https://matrix.myhomeserver.org"; + appservice.database = { + type = "postgres"; + uri = "postgresql:///mautrix_whatsapp?host=/run/postgresql"; + }; bridge.permissions = { "@admin:myhomeserver.org" = "admin"; }; From a71889c042b1e274671f5d84a19bf18e1516e816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Christ?= Date: Wed, 2 Aug 2023 21:37:30 +0200 Subject: [PATCH 05/28] mautrix-whatsapp: Add release notes --- nixos/doc/manual/release-notes/rl-2311.section.md | 2 ++ nixos/modules/module-list.nix | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/doc/manual/release-notes/rl-2311.section.md b/nixos/doc/manual/release-notes/rl-2311.section.md index 80b2066582a3..1ca8b2587038 100644 --- a/nixos/doc/manual/release-notes/rl-2311.section.md +++ b/nixos/doc/manual/release-notes/rl-2311.section.md @@ -18,6 +18,8 @@ - [wayfire](https://wayfire.org), A modular and extensible wayland compositor. Available as [programs.wayfire](#opt-programs.wayfire.enable). +- [mautrix-whatsapp](https://docs.mau.fi/bridges/go/whatsapp/index.html) A Matrix-WhatsApp puppeting bridge + - [GoToSocial](https://gotosocial.org/), an ActivityPub social network server, written in Golang. Available as [services.gotosocial](#opt-services.gotosocial.enable). - [Typesense](https://github.com/typesense/typesense), a fast, typo-tolerant search engine for building delightful search experiences. Available as [services.typesense](#opt-services.typesense.enable). diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 342354b51638..9720cf32e6c1 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -1480,5 +1480,5 @@ ./virtualisation/waydroid.nix ./virtualisation/xe-guest-utilities.nix ./virtualisation/xen-dom0.nix - {documentation.nixos.extraModules = [./virtualisation/qemu-vm.nix];} + { documentation.nixos.extraModules = [ ./virtualisation/qemu-vm.nix ]; } ] From 4627e977571633c27deff8a475aafc8baadcebac Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 5 Aug 2023 10:12:04 +0200 Subject: [PATCH 06/28] checkov: 2.3.318 -> 2.3.356 Diff: https://github.com/bridgecrewio/checkov/compare/refs/tags/2.3.318...2.3.356 Changelog: https://github.com/bridgecrewio/checkov/releases/tag/2.3.356 --- pkgs/development/tools/analysis/checkov/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/analysis/checkov/default.nix b/pkgs/development/tools/analysis/checkov/default.nix index 3535e4d5529a..a33c8a5cb2b5 100644 --- a/pkgs/development/tools/analysis/checkov/default.nix +++ b/pkgs/development/tools/analysis/checkov/default.nix @@ -22,14 +22,14 @@ with py.pkgs; buildPythonApplication rec { pname = "checkov"; - version = "2.3.318"; + version = "2.3.356"; format = "setuptools"; src = fetchFromGitHub { owner = "bridgecrewio"; repo = pname; rev = "refs/tags/${version}"; - hash = "sha256-E1PSwbEmTTHsYbRlLUJ2HLqiJJuQO/aN73xWHTaQdBY="; + hash = "sha256-Bz+A0QUUZ3Pvcw9XnRqm1fD/AjToJLSK+L/B81Kay20="; }; patches = [ From 288d2ee55d193c476bd62312f7ed5326835e442f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Christ?= Date: Sat, 5 Aug 2023 13:57:15 +0200 Subject: [PATCH 07/28] mautrix-whatsapp: Move defaults to config section This contribution applies Example 32 (conventional settings option) from [nixpkgs](https://nixos.org/manual/nixos/stable/#sec-settings-nix-representable). --- .../services/matrix/mautrix-whatsapp.nix | 160 ++++++++++-------- 1 file changed, 87 insertions(+), 73 deletions(-) diff --git a/nixos/modules/services/matrix/mautrix-whatsapp.nix b/nixos/modules/services/matrix/mautrix-whatsapp.nix index 366634d9fcc8..c047d6638854 100644 --- a/nixos/modules/services/matrix/mautrix-whatsapp.nix +++ b/nixos/modules/services/matrix/mautrix-whatsapp.nix @@ -3,91 +3,60 @@ config, pkgs, ... -}: -with lib; let +}: let cfg = config.services.mautrix-whatsapp; dataDir = "/var/lib/mautrix-whatsapp"; registrationFile = "${dataDir}/whatsapp-registration.yaml"; settingsFile = "${dataDir}/config.json"; settingsFileUnsubstituted = settingsFormat.generate "mautrix-whatsapp-config-unsubstituted.json" cfg.settings; settingsFormat = pkgs.formats.json {}; + appservicePort = 29318; in { + imports = []; options.services.mautrix-whatsapp = { - enable = mkEnableOption "mautrix-whatsapp, a puppeting/relaybot bridge between Matrix and WhatsApp."; + enable = lib.mkEnableOption "mautrix-whatsapp, a puppeting/relaybot bridge between Matrix and WhatsApp."; - settings = mkOption rec { - apply = recursiveUpdate default; - inherit (settingsFormat) type; - - default = { - homeserver = { - domain = config.services.matrix-synapse.settings.server_name; - }; - appservice = rec { - address = "http://localhost:${toString port}"; - hostname = "[::]"; - port = 29318; - database = { - type = "sqlite3"; - uri = "${dataDir}/mautrix-whatsapp.db"; - }; - id = "whatsapp"; - bot = { - username = "whatsappbot"; - displayname = "WhatsApp Bridge Bot"; - }; - as_token = ""; - hs_token = ""; - }; - bridge = { - username_template = "whatsapp_{{.}}"; - displayname_template = "{{if .BusinessName}}{{.BusinessName}}{{else if .PushName}}{{.PushName}}{{else}}{{.JID}}{{end}} (WA)"; - double_puppet_server_map = {}; - login_shared_secret_map = {}; - command_prefix = "!wa"; - permissions."*" = "relay"; - relay = { - enabled = true; - }; - }; - logging = { - min_level = "info"; - writers = [ - { - type = "stdout"; - format = "pretty-colored"; - } - { - type = "file"; - format = "json"; - } - ]; - }; - }; - example = { - settings = { - homeserver.address = "https://matrix.myhomeserver.org"; - appservice.database = { - type = "postgres"; - uri = "postgresql:///mautrix_whatsapp?host=/run/postgresql"; - }; - bridge.permissions = { - "@admin:myhomeserver.org" = "admin"; - }; - }; - }; + settings = lib.mkOption { + type = settingsFormat.type; + default = {}; description = lib.mdDoc '' {file}`config.yaml` configuration as a Nix attribute set. Configuration options should match those described in [example-config.yaml](https://github.com/mautrix/whatsapp/blob/master/example-config.yaml). - Secret tokens should be specified using {option}`environmentFile` instead of this world-readable attribute set. ''; + example = { + appservice = { + database = { + type = "postgres"; + uri = "postgresql:///mautrix_whatsapp?host=/run/postgresql"; + }; + id = "whatsapp"; + ephemeral_events = false; + }; + bridge = { + history_sync = { + request_full_sync = true; + }; + private_chat_portal_meta = true; + mute_bridging = true; + encryption = { + allow = true; + default = true; + require = true; + }; + provisioning = { + shared_secret = "disable"; + }; + permissions = { + "example.com" = "user"; + }; + }; + }; }; - - environmentFile = mkOption { - type = types.nullOr types.path; + environmentFile = lib.mkOption { + type = lib.types.nullOr lib.types.path; default = null; description = lib.mdDoc '' File containing environment variables to be passed to the mautrix-whatsapp service, @@ -96,10 +65,10 @@ in { ''; }; - serviceDependencies = mkOption { - type = with types; listOf str; - default = optional config.services.matrix-synapse.enable "matrix-synapse.service"; - defaultText = literalExpression '' + serviceDependencies = lib.mkOption { + type = with lib.types; listOf str; + default = lib.optional config.services.matrix-synapse.enable "matrix-synapse.service"; + defaultText = lib.literalExpression '' optional config.services.matrix-synapse.enable "matrix-synapse.service" ''; description = lib.mdDoc '' @@ -108,7 +77,51 @@ in { }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { + services.mautrix-whatsapp.settings = { + homeserver = { + domain = lib.mkDefault config.services.matrix-synapse.settings.server_name; + }; + appservice = { + address = lib.mkDefault "http://localhost:${toString appservicePort}"; + hostname = lib.mkDefault "[::]"; + port = lib.mkDefault appservicePort; + database = { + type = lib.mkDefault "sqlite3"; + uri = lib.mkDefault "${dataDir}/mautrix-whatsapp.db"; + }; + id = lib.mkDefault "whatsapp"; + bot = { + username = lib.mkDefault "whatsappbot"; + displayname = lib.mkDefault "WhatsApp Bridge Bot"; + }; + as_token = lib.mkDefault ""; + hs_token = lib.mkDefault ""; + }; + bridge = { + username_template = lib.mkDefault "whatsapp_{{.}}"; + displayname_template = lib.mkDefault "{{if .BusinessName}}{{.BusinessName}}{{else if .PushName}}{{.PushName}}{{else}}{{.JID}}{{end}} (WA)"; + double_puppet_server_map = lib.mkDefault {}; + login_shared_secret_map = lib.mkDefault {}; + command_prefix = lib.mkDefault "!wa"; + permissions."*" = lib.mkDefault "relay"; + relay.enabled = lib.mkDefault true; + }; + logging = { + min_level = lib.mkDefault "info"; + writers = [ + { + type = lib.mkDefault "stdout"; + format = lib.mkDefault "pretty-colored"; + } + { + type = lib.mkDefault "file"; + format = lib.mkDefault "json"; + } + ]; + }; + }; + systemd.services.mautrix-whatsapp = { description = "Mautrix-WhatsApp Service - A WhatsApp bridge for Matrix"; @@ -182,4 +195,5 @@ in { restartTriggers = [settingsFileUnsubstituted]; }; }; + meta.maintainers = with lib.maintainers; [frederictobiasc]; } From 2cceb70b13f898e09e95412e04e757a7b46cae80 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Sat, 5 Aug 2023 19:59:41 +0200 Subject: [PATCH 08/28] guile: add effectiveVersion and site{Ccache,}Dir --- pkgs/development/interpreters/guile/1.8.nix | 6 ++++++ pkgs/development/interpreters/guile/2.0.nix | 6 ++++++ pkgs/development/interpreters/guile/2.2.nix | 6 ++++++ pkgs/development/interpreters/guile/3.0.nix | 6 +++++- 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/guile/1.8.nix b/pkgs/development/interpreters/guile/1.8.nix index f30270fcc83f..51ac9ba3ed58 100644 --- a/pkgs/development/interpreters/guile/1.8.nix +++ b/pkgs/development/interpreters/guile/1.8.nix @@ -86,6 +86,12 @@ stdenv.mkDerivation rec { setupHook = ./setup-hook-1.8.sh; + passthru = { + effectiveVersion = lib.versions.majorMinor version; + siteCcacheDir = "lib/guile/site-ccache"; + siteDir = "share/guile/site"; + }; + meta = with lib; { homepage = "https://www.gnu.org/software/guile/"; description = "Embeddable Scheme implementation"; diff --git a/pkgs/development/interpreters/guile/2.0.nix b/pkgs/development/interpreters/guile/2.0.nix index 9e2953aa2f9e..18daad800568 100644 --- a/pkgs/development/interpreters/guile/2.0.nix +++ b/pkgs/development/interpreters/guile/2.0.nix @@ -133,6 +133,12 @@ builder rec { setupHook = ./setup-hook-2.0.sh; + passthru = rec { + effectiveVersion = lib.versions.majorMinor version; + siteCcacheDir = "lib/guile/${effectiveVersion}/site-ccache"; + siteDir = "share/guile/site/${effectiveVersion}"; + }; + meta = with lib; { homepage = "https://www.gnu.org/software/guile/"; description = "Embeddable Scheme implementation"; diff --git a/pkgs/development/interpreters/guile/2.2.nix b/pkgs/development/interpreters/guile/2.2.nix index 91cb993fae06..918735517ea3 100644 --- a/pkgs/development/interpreters/guile/2.2.nix +++ b/pkgs/development/interpreters/guile/2.2.nix @@ -124,6 +124,12 @@ builder rec { setupHook = ./setup-hook-2.2.sh; + passthru = rec { + effectiveVersion = lib.versions.majorMinor version; + siteCcacheDir = "lib/guile/${effectiveVersion}/site-ccache"; + siteDir = "share/guile/site/${effectiveVersion}"; + }; + meta = with lib; { homepage = "https://www.gnu.org/software/guile/"; description = "Embeddable Scheme implementation"; diff --git a/pkgs/development/interpreters/guile/3.0.nix b/pkgs/development/interpreters/guile/3.0.nix index de0b8479f1ca..0708fb3d2974 100644 --- a/pkgs/development/interpreters/guile/3.0.nix +++ b/pkgs/development/interpreters/guile/3.0.nix @@ -127,7 +127,11 @@ builder rec { setupHook = ./setup-hook-3.0.sh; - passthru = { + passthru = rec { + effectiveVersion = lib.versions.majorMinor version; + siteCcacheDir = "lib/guile/${effectiveVersion}/site-ccache"; + siteDir = "share/guile/site/${effectiveVersion}"; + updateScript = writeScript "update-guile-3" '' #!/usr/bin/env nix-shell #!nix-shell -i bash -p curl pcre common-updater-scripts From f48570f223115a68c6a1e0ad4c16082a5dc53e84 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Sat, 5 Aug 2023 22:08:23 +0200 Subject: [PATCH 09/28] treewide: fixup --- pkgs/applications/misc/haunt/default.nix | 14 +++++--------- .../guile-modules/guile-gnutls/default.nix | 6 +++--- .../guile-modules/guile-ncurses/default.nix | 16 ++++++---------- .../guile-modules/guile-reader/default.nix | 4 ++-- .../guile-modules/guile-ssh/default.nix | 4 ++-- .../guile-modules/guile-xcb/default.nix | 4 ++-- pkgs/development/libraries/libfive/default.nix | 8 ++++---- .../libraries/libmatheval/default.nix | 7 ++----- .../tools/guile/guile-hall/default.nix | 14 +++++--------- pkgs/tools/networking/junkie/default.nix | 4 ++-- pkgs/tools/typesetting/skribilo/default.nix | 14 +++++--------- 11 files changed, 38 insertions(+), 57 deletions(-) diff --git a/pkgs/applications/misc/haunt/default.nix b/pkgs/applications/misc/haunt/default.nix index 5d2156c91497..c5794591edf6 100644 --- a/pkgs/applications/misc/haunt/default.nix +++ b/pkgs/applications/misc/haunt/default.nix @@ -49,15 +49,11 @@ stdenv.mkDerivation rec { # Test suite is non-determinisitic in later versions doCheck = false; - postInstall = - let - guileVersion = lib.versions.majorMinor guile.version; - in - '' - wrapProgram $out/bin/haunt \ - --prefix GUILE_LOAD_PATH : "$out/share/guile/site/${guileVersion}:$GUILE_LOAD_PATH" \ - --prefix GUILE_LOAD_COMPILED_PATH : "$out/lib/guile/${guileVersion}/site-ccache:$GUILE_LOAD_COMPILED_PATH" - ''; + postInstall = '' + wrapProgram $out/bin/haunt \ + --prefix GUILE_LOAD_PATH : "$out/${guile.siteDir}:$GUILE_LOAD_PATH" \ + --prefix GUILE_LOAD_COMPILED_PATH : "$out/${guile.siteCcacheDir}:$GUILE_LOAD_COMPILED_PATH" + ''; doInstallCheck = true; installCheckPhase = '' diff --git a/pkgs/development/guile-modules/guile-gnutls/default.nix b/pkgs/development/guile-modules/guile-gnutls/default.nix index 91151e343722..8fe69b268408 100644 --- a/pkgs/development/guile-modules/guile-gnutls/default.nix +++ b/pkgs/development/guile-modules/guile-gnutls/default.nix @@ -27,9 +27,9 @@ stdenv.mkDerivation rec { ]; configureFlags = [ - "--with-guile-site-dir=${builtins.placeholder "out"}/share/guile/site" - "--with-guile-site-ccache-dir=${builtins.placeholder "out"}/share/guile/site" - "--with-guile-extension-dir=${builtins.placeholder "out"}/share/guile/extensions" + "--with-guile-site-dir=${builtins.placeholder "out"}/${guile.siteDir}" + "--with-guile-site-ccache-dir=${builtins.placeholder "out"}/${guile.siteCcacheDir}" + "--with-guile-extension-dir=${builtins.placeholder "out"}/lib/guile/${guile.effectiveVersion}/extensions" ]; meta = with lib; { diff --git a/pkgs/development/guile-modules/guile-ncurses/default.nix b/pkgs/development/guile-modules/guile-ncurses/default.nix index f982ff600b8b..7c092db5a7eb 100644 --- a/pkgs/development/guile-modules/guile-ncurses/default.nix +++ b/pkgs/development/guile-modules/guile-ncurses/default.nix @@ -29,16 +29,12 @@ stdenv.mkDerivation rec { "--with-gnu-filesystem-hierarchy" ]; - postFixup = - let - guileVersion = lib.versions.majorMinor guile.version; - in - '' - for f in $out/share/guile/site/ncurses/**.scm; do \ - substituteInPlace $f \ - --replace "libguile-ncurses" "$out/lib/guile/${guileVersion}/libguile-ncurses"; \ - done - ''; + postFixup = '' + for f in $out/${guile.siteDir}/ncurses/**.scm; do \ + substituteInPlace $f \ + --replace "libguile-ncurses" "$out/lib/guile/${guile.effectiveVersion}/libguile-ncurses"; \ + done + ''; # XXX: 1 of 65 tests failed. doCheck = false; diff --git a/pkgs/development/guile-modules/guile-reader/default.nix b/pkgs/development/guile-modules/guile-reader/default.nix index 7387dbc20876..edc6d73fffcc 100644 --- a/pkgs/development/guile-modules/guile-reader/default.nix +++ b/pkgs/development/guile-modules/guile-reader/default.nix @@ -27,9 +27,9 @@ stdenv.mkDerivation rec { libffi ]; - GUILE_SITE="${guile-lib}/share/guile/site"; + env.GUILE_SITE = "${guile-lib}/${guile.siteDir}"; - configureFlags = [ "--with-guilemoduledir=$(out)/share/guile/site" ]; + configureFlags = [ "--with-guilemoduledir=$(out)/${guile.siteDir}" ]; meta = with lib; { homepage = "https://www.nongnu.org/guile-reader/"; diff --git a/pkgs/development/guile-modules/guile-ssh/default.nix b/pkgs/development/guile-modules/guile-ssh/default.nix index 6cf9f5e4efac..e7654b747c3a 100644 --- a/pkgs/development/guile-modules/guile-ssh/default.nix +++ b/pkgs/development/guile-modules/guile-ssh/default.nix @@ -20,10 +20,10 @@ stdenv.mkDerivation rec { sha256 = "sha256-P29U88QrCjoyl/wdTPZbiMoykd/v6ul6CW/IJn9UAyw="; }; - configureFlags = [ "--with-guilesitedir=\${out}/share/guile/site" ]; + configureFlags = [ "--with-guilesitedir=\${out}/${guile.siteDir}" ]; postFixup = '' - for f in $out/share/guile/site/ssh/**.scm; do \ + for f in $out/${guile.siteDir}/ssh/**.scm; do \ substituteInPlace $f \ --replace "libguile-ssh" "$out/lib/libguile-ssh"; \ done diff --git a/pkgs/development/guile-modules/guile-xcb/default.nix b/pkgs/development/guile-modules/guile-xcb/default.nix index 19a790db77a4..2102e395d0b3 100644 --- a/pkgs/development/guile-modules/guile-xcb/default.nix +++ b/pkgs/development/guile-modules/guile-xcb/default.nix @@ -28,8 +28,8 @@ stdenv.mkDerivation rec { ]; configureFlags = [ - "--with-guile-site-dir=$out/share/guile/site" - "--with-guile-site-ccache-dir=$out/share/guile/site" + "--with-guile-site-dir=$(out)/${guile.siteDir}" + "--with-guile-site-ccache-dir=$(out)/${guile.siteCcacheDir}" ]; makeFlags = [ diff --git a/pkgs/development/libraries/libfive/default.nix b/pkgs/development/libraries/libfive/default.nix index 37eaed3ac650..2d7f05eada3c 100644 --- a/pkgs/development/libraries/libfive/default.nix +++ b/pkgs/development/libraries/libfive/default.nix @@ -9,7 +9,7 @@ , zlib , libpng , boost -, guile_3_0 +, guile , stdenv }: @@ -25,12 +25,12 @@ mkDerivation { }; nativeBuildInputs = [ wrapQtAppsHook cmake ninja pkg-config ]; - buildInputs = [ eigen zlib libpng boost guile_3_0 ]; + buildInputs = [ eigen zlib libpng boost guile ]; preConfigure = '' substituteInPlace studio/src/guile/interpreter.cpp \ --replace "qputenv(\"GUILE_LOAD_COMPILED_PATH\", \"libfive/bind/guile\");" \ - "qputenv(\"GUILE_LOAD_COMPILED_PATH\", \"libfive/bind/guile:$out/lib/guile/3.0/ccache\");" + "qputenv(\"GUILE_LOAD_COMPILED_PATH\", \"libfive/bind/guile:$out/${guile.siteCcacheDir}\");" substituteInPlace libfive/bind/guile/CMakeLists.txt \ --replace "LIBFIVE_FRAMEWORK_DIR=$" \ @@ -42,7 +42,7 @@ mkDerivation { ''; cmakeFlags = [ - "-DGUILE_CCACHE_DIR=${placeholder "out"}/lib/guile/3.0/ccache" + "-DGUILE_CCACHE_DIR=${placeholder "out"}/${guile.siteCcacheDir}" ]; postInstall = if stdenv.isDarwin then '' diff --git a/pkgs/development/libraries/libmatheval/default.nix b/pkgs/development/libraries/libmatheval/default.nix index fcf4167c1901..c2084b007a61 100644 --- a/pkgs/development/libraries/libmatheval/default.nix +++ b/pkgs/development/libraries/libmatheval/default.nix @@ -1,8 +1,5 @@ { lib, stdenv, fetchurl, pkg-config, guile, flex, fetchpatch }: -let - guileVersion = lib.versions.majorMinor guile.version; -in stdenv.mkDerivation rec { version = "1.1.11"; pname = "libmatheval"; @@ -32,8 +29,8 @@ stdenv.mkDerivation rec { }) ]; - env.NIX_CFLAGS_COMPILE = "-I${lib.getDev guile}/include/guile/${guileVersion}"; - env.NIX_LDFLAGS = "-L${guile}/lib -lguile-${guileVersion}"; + env.NIX_CFLAGS_COMPILE = "-I${lib.getDev guile}/include/guile/${guile.effectiveVersion}"; + env.NIX_LDFLAGS = "-L${guile}/lib -lguile-${guile.effectiveVersion}"; meta = { description = "A library to parse and evaluate symbolic expressions input as text"; diff --git a/pkgs/development/tools/guile/guile-hall/default.nix b/pkgs/development/tools/guile/guile-hall/default.nix index 440b94fab68e..b786a3427373 100644 --- a/pkgs/development/tools/guile/guile-hall/default.nix +++ b/pkgs/development/tools/guile/guile-hall/default.nix @@ -20,15 +20,11 @@ stdenv.mkDerivation rec { doCheck = true; - postInstall = - let - guileVersion = lib.versions.majorMinor guile.version; - in - '' - wrapProgram $out/bin/hall \ - --prefix GUILE_LOAD_PATH : "$out/share/guile/site/${guileVersion}:$GUILE_LOAD_PATH" \ - --prefix GUILE_LOAD_COMPILED_PATH : "$out/lib/guile/${guileVersion}/site-ccache:$GUILE_LOAD_COMPILED_PATH" - ''; + postInstall = '' + wrapProgram $out/bin/hall \ + --prefix GUILE_LOAD_PATH : "$out/${guile.siteDir}:$GUILE_LOAD_PATH" \ + --prefix GUILE_LOAD_COMPILED_PATH : "$out/${guile.siteCcacheDir}:$GUILE_LOAD_COMPILED_PATH" + ''; doInstallCheck = true; installCheckPhase = '' diff --git a/pkgs/tools/networking/junkie/default.nix b/pkgs/tools/networking/junkie/default.nix index 87c0fc6ae2a7..ac20577b5f35 100644 --- a/pkgs/tools/networking/junkie/default.nix +++ b/pkgs/tools/networking/junkie/default.nix @@ -28,8 +28,8 @@ stdenv.mkDerivation rec { buildInputs = [ libpcap guile_2_2 openssl ]; nativeBuildInputs = [ autoreconfHook pkg-config ]; configureFlags = [ - "GUILELIBDIR=\${out}/share/guile/site" - "GUILECACHEDIR=\${out}/lib/guile/ccache" + "GUILELIBDIR=\${out}/${guile_2_2.siteDir}" + "GUILECACHEDIR=\${out}/${guile_2_2.siteCcacheDir}" ]; meta = { diff --git a/pkgs/tools/typesetting/skribilo/default.nix b/pkgs/tools/typesetting/skribilo/default.nix index 264eeea52e38..a834ccdccbf5 100644 --- a/pkgs/tools/typesetting/skribilo/default.nix +++ b/pkgs/tools/typesetting/skribilo/default.nix @@ -46,15 +46,11 @@ in stdenv.mkDerivation (finalAttrs: { ++ optional enablePloticus ploticus ++ optional enableTex tex; - postInstall = - let - guileVersion = lib.versions.majorMinor guile.version; - in - '' - wrapProgram $out/bin/skribilo \ - --prefix GUILE_LOAD_PATH : "$out/share/guile/site/${guileVersion}:$GUILE_LOAD_PATH" \ - --prefix GUILE_LOAD_COMPILED_PATH : "$out/lib/guile/${guileVersion}/site-ccache:$GUILE_LOAD_COMPILED_PATH" - ''; + postInstall = '' + wrapProgram $out/bin/skribilo \ + --prefix GUILE_LOAD_PATH : "$out/${guile.siteDir}:$GUILE_LOAD_PATH" \ + --prefix GUILE_LOAD_COMPILED_PATH : "$out/${guile.siteCcacheDir}:$GUILE_LOAD_COMPILED_PATH" + ''; meta = { homepage = "https://www.nongnu.org/skribilo/"; From e2b0527318834b3798be16ec98c1024d21de45e1 Mon Sep 17 00:00:00 2001 From: Ilan Joselevich Date: Sun, 6 Aug 2023 00:10:44 +0300 Subject: [PATCH 10/28] gitea-actions-runner: 0.2.3 -> 0.2.5 Diff: https://gitea.com/gitea/act_runner/compare/v0.2.3...v0.2.5 Changelog: https://gitea.com/gitea/act_runner/releases/tag/v0.2.5 --- .../continuous-integration/gitea-actions-runner/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/continuous-integration/gitea-actions-runner/default.nix b/pkgs/development/tools/continuous-integration/gitea-actions-runner/default.nix index 69d23f7f33d3..cd2a9788f406 100644 --- a/pkgs/development/tools/continuous-integration/gitea-actions-runner/default.nix +++ b/pkgs/development/tools/continuous-integration/gitea-actions-runner/default.nix @@ -7,17 +7,17 @@ buildGoModule rec { pname = "gitea-actions-runner"; - version = "0.2.3"; + version = "0.2.5"; src = fetchFromGitea { domain = "gitea.com"; owner = "gitea"; repo = "act_runner"; rev = "v${version}"; - hash = "sha256-RNH/12XV07nWhGnmR4FKJSSK/KnLA76+pKFHTPG8AAk="; + hash = "sha256-HWJrgZJfI5fOeZvQkmpd6wciJWh1JOmZMlyGHSbgHpc="; }; - vendorHash = "sha256-VS1CIxV0e01h5L1UA4p8R1Z28yLOEZTMxS+gbEaJwKs="; + vendorHash = "sha256-Z61kTbKHSUpt2F6jVUUK4KwMJ0ILT1FI4/62AkNQuZI="; ldflags = [ "-s" From cb0526cfd0b42d4ee77a904236f656178eba8b97 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 5 Aug 2023 23:47:09 +0200 Subject: [PATCH 11/28] restish: 0.17.0 -> 0.18.0 Diff: https://github.com/danielgtaylor/restish/compare/refs/tags/v0.17.0...v0.18.0 Changelog: https://github.com/danielgtaylor/restish/releases/tag/v0.18.0 --- pkgs/tools/networking/restish/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/networking/restish/default.nix b/pkgs/tools/networking/restish/default.nix index 239d6f2b1f3e..c13c5708b52b 100644 --- a/pkgs/tools/networking/restish/default.nix +++ b/pkgs/tools/networking/restish/default.nix @@ -10,16 +10,16 @@ buildGoModule rec { pname = "restish"; - version = "0.17.0"; + version = "0.18.0"; src = fetchFromGitHub { owner = "danielgtaylor"; repo = "restish"; rev = "refs/tags/v${version}"; - hash = "sha256-sXktiYCymoqZgEWQJHYn9KAUxtZYNCSyDyPC8D/X+Mw="; + hash = "sha256-DvI1pe4ONuIhSecJOhv6GKRzOYHo+jePqT8oYVvcKnM="; }; - vendorHash = "sha256-quDHEoHVAEAnw+M0xiAd07s/EOhVUgH0T1z8TaBcbj0="; + vendorHash = "sha256-sUBqeLhpWUu1NfAmFQCKFHm8DQaB8LYRrFexvuF8vC8="; buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Cocoa From c7a9f7c13206594136a8bf3b9b8e44b189aab0fc Mon Sep 17 00:00:00 2001 From: Jeremy Date: Fri, 4 Aug 2023 15:51:12 +1200 Subject: [PATCH 12/28] nixos/nextcloud: improve documentation --- nixos/modules/services/web-apps/nextcloud.nix | 95 ++++++++++--------- 1 file changed, 52 insertions(+), 43 deletions(-) diff --git a/nixos/modules/services/web-apps/nextcloud.nix b/nixos/modules/services/web-apps/nextcloud.nix index 06af9d933e08..4498ab61cd36 100644 --- a/nixos/modules/services/web-apps/nextcloud.nix +++ b/nixos/modules/services/web-apps/nextcloud.nix @@ -136,8 +136,8 @@ in { default = config.services.nextcloud.home; defaultText = literalExpression "config.services.nextcloud.home"; description = lib.mdDoc '' - Data storage path of nextcloud. Will be [](#opt-services.nextcloud.home) by default. - This folder will be populated with a config.php and data folder which contains the state of the instance (excl the database)."; + Nextcloud's data storage path. Will be [](#opt-services.nextcloud.home) by default. + This folder will be populated with a config.php file and a data folder which contains the state of the instance (excluding the database)."; ''; example = "/mnt/nextcloud-file"; }; @@ -170,8 +170,8 @@ in { type = types.bool; default = true; description = lib.mdDoc '' - Automatically enable the apps in [](#opt-services.nextcloud.extraApps) every time nextcloud starts. - If set to false, apps need to be enabled in the Nextcloud user interface or with nextcloud-occ app:enable. + Automatically enable the apps in [](#opt-services.nextcloud.extraApps) every time Nextcloud starts. + If set to false, apps need to be enabled in the Nextcloud web user interface or with `nextcloud-occ app:enable`. ''; }; appstoreEnable = mkOption { @@ -179,16 +179,28 @@ in { default = null; example = true; description = lib.mdDoc '' - Allow the installation of apps and app updates from the store. + Allow the installation and updating of apps from the Nextcloud appstore. Enabled by default unless there are packages in [](#opt-services.nextcloud.extraApps). - Set to true to force enable the store even if [](#opt-services.nextcloud.extraApps) is used. - Set to false to disable the installation of apps from the global appstore. App management is always enabled regardless of this setting. + Set this to true to force enable the store even if [](#opt-services.nextcloud.extraApps) is used. + Set this to false to disable the installation of apps from the global appstore. App management is always enabled regardless of this setting. ''; }; logLevel = mkOption { type = types.ints.between 0 4; default = 2; - description = lib.mdDoc "Log level value between 0 (DEBUG) and 4 (FATAL)."; + description = lib.mdDoc '' + Log level value between 0 (DEBUG) and 4 (FATAL). + + - 0 (debug): Log all activity. + + - 1 (info): Log activity such as user logins and file activities, plus warnings, errors, and fatal errors. + + - 2 (warn): Log successful operations, as well as warnings of potential problems, errors and fatal errors. + + - 3 (error): Log failed operations and fatal errors. + + - 4 (fatal): Log only fatal errors that cause the server to stop. + ''; }; logType = mkOption { type = types.enum [ "errorlog" "file" "syslog" "systemd" ]; @@ -202,7 +214,7 @@ in { https = mkOption { type = types.bool; default = false; - description = lib.mdDoc "Use https for generated links."; + description = lib.mdDoc "Use HTTPS for generated links."; }; package = mkOption { type = types.package; @@ -222,7 +234,7 @@ in { default = "512M"; type = types.str; description = lib.mdDoc '' - Defines the upload limit for files. This changes the relevant options + The upload limit for files. This changes the relevant options in php.ini and nginx if enabled. ''; }; @@ -251,10 +263,10 @@ in { default = all: []; defaultText = literalExpression "all: []"; description = lib.mdDoc '' - Additional PHP extensions to use for nextcloud. - By default, only extensions necessary for a vanilla nextcloud installation are enabled, + Additional PHP extensions to use for Nextcloud. + By default, only extensions necessary for a vanilla Nextcloud installation are enabled, but you may choose from the list of available extensions and add further ones. - This is sometimes necessary to be able to install a certain nextcloud app that has additional requirements. + This is sometimes necessary to be able to install a certain Nextcloud app that has additional requirements. ''; example = literalExpression '' all: [ all.pdlib all.bz2 ] @@ -301,7 +313,7 @@ in { type = types.nullOr types.lines; default = null; description = lib.mdDoc '' - Options for nextcloud's PHP pool. See the documentation on `php-fpm.conf` for details on configuration directives. + Options for Nextcloud's PHP pool. See the documentation on `php-fpm.conf` for details on configuration directives. ''; }; @@ -319,7 +331,7 @@ in { type = types.bool; default = false; description = lib.mdDoc '' - Create the database and database user locally. + Whether to create the database and database user locally. ''; }; @@ -357,9 +369,10 @@ in { else "localhost"; defaultText = "localhost"; description = lib.mdDoc '' - Database host or socket path. Defaults to the correct unix socket - instead if `services.nextcloud.database.createLocally` is true and - `services.nextcloud.config.dbtype` is either `pgsql` or `mysql`. + Database host or socket path. + If [](#opt-services.nextcloud.database.createLocally) is true and + [](#opt-services.nextcloud.config.dbtype) is either `pgsql` or `mysql`, + defaults to the correct Unix socket instead. ''; }; dbport = mkOption { @@ -370,19 +383,19 @@ in { dbtableprefix = mkOption { type = types.nullOr types.str; default = null; - description = lib.mdDoc "Table prefix in Nextcloud database."; + description = lib.mdDoc "Table prefix in Nextcloud's database."; }; adminuser = mkOption { type = types.str; default = "root"; - description = lib.mdDoc "Admin username."; + description = lib.mdDoc "Username for the admin account."; }; adminpassFile = mkOption { type = types.str; description = lib.mdDoc '' The full path to a file that contains the admin's password. Must be readable by user `nextcloud`. The password is set only in the initial - setup of nextcloud by the systemd `nextcloud-setup.service`. + setup of Nextcloud by the systemd service `nextcloud-setup.service`. ''; }; @@ -390,7 +403,7 @@ in { type = types.listOf types.str; default = []; description = lib.mdDoc '' - Trusted domains, from which the nextcloud installation will be + Trusted domains from which the Nextcloud installation will be accessible. You don't need to add `services.nextcloud.hostname` here. ''; @@ -400,8 +413,8 @@ in { type = types.listOf types.str; default = []; description = lib.mdDoc '' - Trusted proxies, to provide if the nextcloud installation is being - proxied to secure against e.g. spoofing. + Trusted proxies to provide if the Nextcloud installation is being + proxied to secure against, e.g. spoofing. ''; }; @@ -411,10 +424,10 @@ in { example = "https"; description = lib.mdDoc '' - Force Nextcloud to always use HTTPS i.e. for link generation. Nextcloud - uses the currently used protocol by default, but when behind a reverse-proxy, - it may use `http` for everything although Nextcloud - may be served via HTTPS. + Force Nextcloud to always use HTTP or HTTPS i.e. for link generation. + Nextcloud uses the currently used protocol by default, but when + behind a reverse-proxy, it may use `http` for everything although + Nextcloud may be served via HTTPS. ''; }; @@ -423,16 +436,12 @@ in { type = types.nullOr types.str; example = "DE"; description = lib.mdDoc '' - ::: {.warning} - This option exists since Nextcloud 21! If older versions are used, - this will throw an eval-error! - ::: + An [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) + country code which replaces automatic phone-number detection + without a country code. - [ISO 3611-1](https://www.iso.org/iso-3166-country-codes.html) - country codes for automatic phone-number detection without a country code. - - With e.g. `DE` set, the `+49` can be omitted for - phone-numbers. + As an example, with `DE` set as the default phone region, + the `+49` prefix can be omitted for phone numbers. ''; }; @@ -557,10 +566,10 @@ in { default = config.services.nextcloud.notify_push.enable; defaultText = literalExpression "config.services.nextcloud.notify_push.enable"; description = lib.mdDoc '' - Whether to configure nextcloud to use the recommended redis settings for small instances. + Whether to configure Nextcloud to use the recommended Redis settings for small instances. ::: {.note} - The `notify_push` app requires redis to be configured. If this option is turned off, this must be configured manually. + The `notify_push` app requires Redis to be configured. If this option is turned off, this must be configured manually. ::: ''; }; @@ -597,7 +606,7 @@ in { type = types.bool; default = false; description = lib.mdDoc '' - Run regular auto update of all apps installed from the nextcloud app store. + Run a regular auto-update of all apps installed from the Nextcloud app store. ''; }; startAt = mkOption { @@ -644,7 +653,7 @@ in { type = jsonFormat.type; default = {}; description = lib.mdDoc '' - Extra options which should be appended to nextcloud's config.php file. + Extra options which should be appended to Nextcloud's config.php file. ''; example = literalExpression '' { redis = { @@ -661,7 +670,7 @@ in { type = types.nullOr types.str; default = null; description = lib.mdDoc '' - Secret options which will be appended to nextcloud's config.php file (written as JSON, in the same + Secret options which will be appended to Nextcloud's config.php file (written as JSON, in the same form as the [](#opt-services.nextcloud.extraOptions) option), for example `{"redis":{"password":"secret"}}`. ''; @@ -695,7 +704,7 @@ in { A legacy Nextcloud install (from before NixOS ${nixos}) may be installed. After nextcloud${toString major} is installed successfully, you can safely upgrade - to ${toString (major + 1)}. The latest version available is nextcloud${toString latest}. + to ${toString (major + 1)}. The latest version available is Nextcloud${toString latest}. Please note that Nextcloud doesn't support upgrades across multiple major versions (i.e. an upgrade from 16 is possible to 17, but not 16 to 18). From 251f7d47fd54313a03fbc4e2a59e90b715186d72 Mon Sep 17 00:00:00 2001 From: r-vdp Date: Sun, 6 Aug 2023 01:39:13 +0200 Subject: [PATCH 13/28] Treewide: add meta.mainProgram for bupstash, fd, autossh and ssh-to-age --- pkgs/tools/backup/bupstash/default.nix | 1 + pkgs/tools/misc/fd/default.nix | 1 + pkgs/tools/networking/autossh/default.nix | 17 +++++++++-------- pkgs/tools/security/ssh-to-age/default.nix | 1 + 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/pkgs/tools/backup/bupstash/default.nix b/pkgs/tools/backup/bupstash/default.nix index 6197bb9a2b72..d9b9bc8188b4 100644 --- a/pkgs/tools/backup/bupstash/default.nix +++ b/pkgs/tools/backup/bupstash/default.nix @@ -29,5 +29,6 @@ rustPlatform.buildRustPackage rec { license = licenses.mit; platforms = platforms.unix; maintainers = with maintainers; [ andrewchambers ]; + mainProgram = "bupstash"; }; } diff --git a/pkgs/tools/misc/fd/default.nix b/pkgs/tools/misc/fd/default.nix index b18454514914..0f78b752de00 100644 --- a/pkgs/tools/misc/fd/default.nix +++ b/pkgs/tools/misc/fd/default.nix @@ -45,5 +45,6 @@ rustPlatform.buildRustPackage rec { changelog = "https://github.com/sharkdp/fd/blob/v${version}/CHANGELOG.md"; license = with licenses; [ asl20 /* or */ mit ]; maintainers = with maintainers; [ dywedir figsoda globin ma27 zowoq ]; + mainProgram = "fd"; }; } diff --git a/pkgs/tools/networking/autossh/default.nix b/pkgs/tools/networking/autossh/default.nix index 9b8e7f712fd0..6d73715d832d 100644 --- a/pkgs/tools/networking/autossh/default.nix +++ b/pkgs/tools/networking/autossh/default.nix @@ -1,4 +1,4 @@ -{lib, stdenv, fetchurl, openssh}: +{ lib, stdenv, fetchurl, openssh }: stdenv.mkDerivation rec { pname = "autossh"; @@ -17,13 +17,13 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ openssh ]; installPhase = '' - install -D -m755 autossh $out/bin/autossh || return 1 - install -D -m644 CHANGES $out/share/doc/autossh/CHANGES || return 1 - install -D -m644 README $out/share/doc/autossh/README || return 1 - install -D -m644 autossh.host $out/share/autossh/examples/autossh.host || return 1 - install -D -m644 rscreen $out/share/autossh/examples/rscreen || return 1 - install -D -m644 autossh.1 $out/man/man1/autossh.1 || return 1 - ''; + install -D -m755 autossh $out/bin/autossh || return 1 + install -D -m644 CHANGES $out/share/doc/autossh/CHANGES || return 1 + install -D -m644 README $out/share/doc/autossh/README || return 1 + install -D -m644 autossh.host $out/share/autossh/examples/autossh.host || return 1 + install -D -m644 rscreen $out/share/autossh/examples/rscreen || return 1 + install -D -m644 autossh.1 $out/man/man1/autossh.1 || return 1 + ''; meta = with lib; { homepage = "https://www.harding.motd.ca/autossh/"; @@ -31,5 +31,6 @@ stdenv.mkDerivation rec { license = licenses.bsd1; platforms = platforms.unix; maintainers = with maintainers; [ pSub ]; + mainProgram = "autossh"; }; } diff --git a/pkgs/tools/security/ssh-to-age/default.nix b/pkgs/tools/security/ssh-to-age/default.nix index 93cbedf367f4..e348b081bd12 100644 --- a/pkgs/tools/security/ssh-to-age/default.nix +++ b/pkgs/tools/security/ssh-to-age/default.nix @@ -26,5 +26,6 @@ buildGoModule rec { homepage = "https://github.com/Mic92/ssh-to-age"; license = licenses.mit; maintainers = with maintainers; [ mic92 ]; + mainProgram = "ssh-to-age"; }; } From 14bb10f98fb98fd8973657e86f364c0648b0c80e Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 6 Aug 2023 03:53:58 +0000 Subject: [PATCH 14/28] python310Packages.hydra-check: 1.3.4 -> 1.3.5 --- pkgs/development/python-modules/hydra-check/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/hydra-check/default.nix b/pkgs/development/python-modules/hydra-check/default.nix index 8a6b7c8ac652..4da98f083c37 100644 --- a/pkgs/development/python-modules/hydra-check/default.nix +++ b/pkgs/development/python-modules/hydra-check/default.nix @@ -10,7 +10,7 @@ buildPythonPackage rec { pname = "hydra-check"; - version = "1.3.4"; + version = "1.3.5"; format = "pyproject"; disabled = pythonOlder "3.10"; @@ -18,8 +18,8 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "nix-community"; repo = pname; - rev = "v${version}"; - hash = "sha256-voSbpOPJUPjwzdMLVt2TC/FIi6LKk01PLd/GczOAUR8="; + rev = "refs/tags/v${version}"; + hash = "sha256-fRSC+dfZZSBBeN6YidXRKc1kPUbBKz5OiFSHGOSikgI="; }; nativeBuildInputs = [ poetry-core ]; From c7643019c4b6f1be1cfa51393443c9a73194bf09 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 6 Aug 2023 04:56:50 +0000 Subject: [PATCH 15/28] mdbook-katex: 0.5.5 -> 0.5.6 --- pkgs/tools/text/mdbook-katex/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/text/mdbook-katex/default.nix b/pkgs/tools/text/mdbook-katex/default.nix index 49edcf865903..be83e0f98468 100644 --- a/pkgs/tools/text/mdbook-katex/default.nix +++ b/pkgs/tools/text/mdbook-katex/default.nix @@ -2,14 +2,14 @@ rustPlatform.buildRustPackage rec { pname = "mdbook-katex"; - version = "0.5.5"; + version = "0.5.6"; src = fetchCrate { inherit pname version; - hash = "sha256-ZiMMO3v//re6rCwDojJqaXChKL4wTK1fKVdQ8plHv9Q="; + hash = "sha256-aG7mXMDogGfAHwz+itJthl7sJ4o+Oz5RnrTHNstrh28="; }; - cargoHash = "sha256-FEyUWR5WcKZsGTFAnvysYReH1wOrKYoKQ0wlrPaW4ok="; + cargoHash = "sha256-LE9NalzCTYvcj7WwQKVc7HkbyUj9zQIA2RfK8uxNfOk="; buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ]; From 5543a77d28f18b8b67466f54ec799cf9b8744438 Mon Sep 17 00:00:00 2001 From: kashw2 Date: Sun, 6 Aug 2023 15:17:20 +1000 Subject: [PATCH 16/28] pscale: 0.150.0 -> 0.151.0 --- pkgs/development/tools/pscale/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/pscale/default.nix b/pkgs/development/tools/pscale/default.nix index e5480cc77600..87c93e2de841 100644 --- a/pkgs/development/tools/pscale/default.nix +++ b/pkgs/development/tools/pscale/default.nix @@ -8,13 +8,13 @@ buildGoModule rec { pname = "pscale"; - version = "0.150.0"; + version = "0.151.0"; src = fetchFromGitHub { owner = "planetscale"; repo = "cli"; rev = "v${version}"; - sha256 = "sha256-tDpiInZab7RZ54Ho9uXnNEturINMhv0YqK5A9pmnEgs="; + sha256 = "sha256-w5FNZ7oFA+2weZtEsLX6eOwNyqVreDHg+2FApTsV5L0="; }; vendorHash = "sha256-I/cZa5IDmnYw/MU5h7jarYqbTY+5NrDDj5pz9WTcvGo="; From a7babc4a4adaf136e68e0ecb66a4a71bfc247b84 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 6 Aug 2023 05:20:16 +0000 Subject: [PATCH 17/28] pspg: 5.7.8 -> 5.8.0 --- pkgs/tools/misc/pspg/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/pspg/default.nix b/pkgs/tools/misc/pspg/default.nix index df852d63e246..f14339e007f5 100644 --- a/pkgs/tools/misc/pspg/default.nix +++ b/pkgs/tools/misc/pspg/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "pspg"; - version = "5.7.8"; + version = "5.8.0"; src = fetchFromGitHub { owner = "okbob"; repo = pname; rev = version; - sha256 = "sha256-gJsRVDKcLrXa20u2vrUaChTX2tj169x4SmJqa7dceu4="; + sha256 = "sha256-VkWGVKLN8arc6BOivmjSk8MtMbp2WYqZE9lM8oTQe+U="; }; nativeBuildInputs = [ pkg-config installShellFiles ]; From 44e748795c6445adfdd32b1af36a5267d5a9e74f Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 6 Aug 2023 05:40:07 +0000 Subject: [PATCH 18/28] lynis: 3.0.8 -> 3.0.9 --- pkgs/tools/security/lynis/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/security/lynis/default.nix b/pkgs/tools/security/lynis/default.nix index 17e70a3113c7..2a5030a954a6 100644 --- a/pkgs/tools/security/lynis/default.nix +++ b/pkgs/tools/security/lynis/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "lynis"; - version = "3.0.8"; + version = "3.0.9"; src = fetchFromGitHub { owner = "CISOfy"; repo = pname; rev = version; - sha256 = "sha256-fPQX/Iz+dc3nF3xMPt0bek4JC2XSHe4aC4O0tZwLf6Y="; + sha256 = "sha256-Qf5YVvsw4o2ZS3KjrHPJt8+iPr7G97egdDRN+peL8eU="; }; nativeBuildInputs = [ installShellFiles makeWrapper ]; From be98d462a1565460605c757aea82cc775bc1501f Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Sat, 5 Aug 2023 23:32:36 -0700 Subject: [PATCH 19/28] python3.pkgs.bitlist: audit and update dependencies --- .../python-modules/bitlist/default.nix | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/bitlist/default.nix b/pkgs/development/python-modules/bitlist/default.nix index 6571c93470c2..4c97f84cc7f3 100644 --- a/pkgs/development/python-modules/bitlist/default.nix +++ b/pkgs/development/python-modules/bitlist/default.nix @@ -1,8 +1,9 @@ { lib , buildPythonPackage , fetchPypi +, fetchpatch , setuptools -, nose +, wheel , parts , pytestCheckHook , pythonOlder @@ -20,8 +21,23 @@ buildPythonPackage rec { hash = "sha256-eViakuhgSe9E8ltxzeg8m6/ze7QQvoKBtYZoBZzHxlA="; }; + patches = [ + # https://github.com/lapets/bitlist/pull/1 + (fetchpatch { + name = "unpin-setuptools-dependency.patch"; + url = "https://github.com/lapets/bitlist/commit/d1f977a9e835852df358b2d93b642a6820619c10.patch"; + hash = "sha256-BBa6gdhuYsWahtp+Qdp/RigmVHK+uWyK46M1CdD8O2g="; + }) + ]; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace '--cov=bitlist --cov-report term-missing' "" + ''; + nativeBuildInputs = [ setuptools + wheel ]; propagatedBuildInputs = [ @@ -30,18 +46,12 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook - nose ]; pythonImportsCheck = [ "bitlist" ]; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace "--doctest-modules --ignore=docs --cov=bitlist --cov-report term-missing" "" - ''; - meta = with lib; { description = "Python library for working with little-endian list representation of bit strings"; homepage = "https://github.com/lapets/bitlist"; From d9b88ffcf124628116ef1b2c7a91ab161c64319c Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 6 Aug 2023 07:01:03 +0000 Subject: [PATCH 20/28] tile38: 1.31.0 -> 1.32.0 --- pkgs/servers/geospatial/tile38/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/geospatial/tile38/default.nix b/pkgs/servers/geospatial/tile38/default.nix index 1fcb5f81b98c..fd92065c35b0 100644 --- a/pkgs/servers/geospatial/tile38/default.nix +++ b/pkgs/servers/geospatial/tile38/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "tile38"; - version = "1.31.0"; + version = "1.32.0"; src = fetchFromGitHub { owner = "tidwall"; repo = pname; rev = version; - sha256 = "sha256-aGt5iBVT5MTbnuoZ4zd5r6sIwmNKPo1J7UjDAefKfPo="; + sha256 = "sha256-NSoi7CsxL+6DoKZZal+xhjlSz+9N9CFyzlMrTYHbiW8="; }; - vendorHash = "sha256-9KK1IRwERcJtVnK4y5l3Nr87I3hg7E8nJuJjRiCMCZk="; + vendorHash = "sha256-Vy5ct5JP2t3085TM4CCWVEAQR4mAqVbGM5JE2KctSlU="; subPackages = [ "cmd/tile38-cli" "cmd/tile38-server" ]; From caa6270dfbce858a7c83e2b71b7b37da88104477 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Mon, 31 Jul 2023 17:41:29 +0200 Subject: [PATCH 21/28] opensnitch-ui: 1.5.2 -> 1.6.1 --- pkgs/tools/networking/opensnitch/ui.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/networking/opensnitch/ui.nix b/pkgs/tools/networking/opensnitch/ui.nix index 3cac87bf55e9..e65451974a22 100644 --- a/pkgs/tools/networking/opensnitch/ui.nix +++ b/pkgs/tools/networking/opensnitch/ui.nix @@ -6,17 +6,17 @@ python3Packages.buildPythonApplication rec { pname = "opensnitch-ui"; - version = "1.5.2"; + version = "1.6.1"; src = fetchFromGitHub { owner = "evilsocket"; repo = "opensnitch"; rev = "refs/tags/v${version}"; - sha256 = "sha256-MF7K3WasG1xLdw1kWz6xVYrdfuZW5GUq6dlS0pPOkHI="; + sha256 = "sha256-yEo5nga0WTbgZm8W2qbJcTOO4cCzFWrjRmTBCFH7GLg="; }; postPatch = '' - substituteInPlace ui/opensnitch/utils.py \ + substituteInPlace ui/opensnitch/utils/__init__.py \ --replace /usr/lib/python3/dist-packages/data ${python3Packages.pyasn}/${python3Packages.python.sitePackages}/pyasn/data ''; From 1a18ac33409ac30b3bb02be827d5a755aa2d1652 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Mon, 31 Jul 2023 18:18:09 +0200 Subject: [PATCH 22/28] opensnitch: 1.5.2 -> 1.6.1 --- pkgs/tools/networking/opensnitch/daemon.nix | 29 ++-- pkgs/tools/networking/opensnitch/go.mod | 25 +++- pkgs/tools/networking/opensnitch/go.sum | 138 +++++++++++++++++--- 3 files changed, 157 insertions(+), 35 deletions(-) diff --git a/pkgs/tools/networking/opensnitch/daemon.nix b/pkgs/tools/networking/opensnitch/daemon.nix index 3390776a17ae..36c8739781df 100644 --- a/pkgs/tools/networking/opensnitch/daemon.nix +++ b/pkgs/tools/networking/opensnitch/daemon.nix @@ -17,32 +17,31 @@ buildGoModule rec { pname = "opensnitch"; - version = "1.5.2"; + version = "1.6.1"; src = fetchFromGitHub { owner = "evilsocket"; repo = "opensnitch"; rev = "v${version}"; - sha256 = "sha256-MF7K3WasG1xLdw1kWz6xVYrdfuZW5GUq6dlS0pPOkHI="; + sha256 = "sha256-yEo5nga0WTbgZm8W2qbJcTOO4cCzFWrjRmTBCFH7GLg="; }; - patches = [ - # https://github.com/evilsocket/opensnitch/pull/384 don't require - # a configuration file in /etc - (fetchpatch { - name = "dont-require-config-in-etc.patch"; - url = "https://github.com/evilsocket/opensnitch/commit/8a3f63f36aa92658217bbbf46d39e6d20b2c0791.patch"; - sha256 = "sha256-WkwjKTQZppR0nqvRO4xiQoKZ307NvuUwoRx+boIpuTg="; - }) - ]; - modRoot = "daemon"; - buildInputs = [ libnetfilter_queue libnfnetlink ]; + buildInputs = [ + libnetfilter_queue + libnfnetlink + ]; - nativeBuildInputs = [ pkg-config protobuf go-protobuf makeWrapper protoc-gen-go-grpc ]; + nativeBuildInputs = [ + pkg-config + protobuf + go-protobuf + makeWrapper + protoc-gen-go-grpc + ]; - vendorSha256 = "sha256-jWP0oF+jZRFMi5Y2y0SARMoP8wTKVZ8UWra9JNzdSOw="; + vendorSha256 = "sha256-bUzGWpQxeXzvkzQ7G53ljQJq6wwqiXqbi6bgeFlNvvM="; preBuild = '' # Fix inconsistent vendoring build error diff --git a/pkgs/tools/networking/opensnitch/go.mod b/pkgs/tools/networking/opensnitch/go.mod index f9eb29622741..f4a1c6c5fe9c 100644 --- a/pkgs/tools/networking/opensnitch/go.mod +++ b/pkgs/tools/networking/opensnitch/go.mod @@ -3,14 +3,31 @@ module github.com/evilsocket/opensnitch/daemon go 1.14 require ( - github.com/evilsocket/ftrace v1.2.0 github.com/fsnotify/fsnotify v1.4.7 + github.com/golang/protobuf v1.5.0 github.com/google/gopacket v1.1.14 - github.com/google/nftables v0.0.0-20210514154851-a285acebcad3 + github.com/google/nftables v0.1.0 + github.com/google/uuid v1.3.0 github.com/iovisor/gobpf v0.2.0 + github.com/varlink/go v0.4.0 github.com/vishvananda/netlink v0.0.0-20210811191823-e1a867c6b452 - golang.org/x/net v0.0.0-20191028085509-fe3aa8a45271 - golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1 + github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae + golang.org/x/net v0.0.0-20211209124913-491a49abca63 + golang.org/x/sys v0.0.0-20211205182925-97ca703d548d google.golang.org/grpc v1.32.0 google.golang.org/protobuf v1.26.0 ) + +require ( + github.com/BurntSushi/toml v0.4.1 // indirect + github.com/google/go-cmp v0.5.6 // indirect + github.com/josharian/native v0.0.0-20200817173448-b6b71def0850 // indirect + github.com/mdlayher/netlink v1.4.2 // indirect + github.com/mdlayher/socket v0.0.0-20211102153432-57e3fa563ecb // indirect + golang.org/x/mod v0.5.1 // indirect + golang.org/x/text v0.3.7 // indirect + golang.org/x/tools v0.1.8 // indirect + golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect + google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 // indirect + honnef.co/go/tools v0.2.2 // indirect +) diff --git a/pkgs/tools/networking/opensnitch/go.sum b/pkgs/tools/networking/opensnitch/go.sum index 0e931f93de6c..9b14c3bfb5b2 100644 --- a/pkgs/tools/networking/opensnitch/go.sum +++ b/pkgs/tools/networking/opensnitch/go.sum @@ -1,13 +1,17 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v0.4.1 h1:GaI7EiDXDRfa8VshkTj7Fym7ha+y8/XxIgD2okUIjLw= +github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cilium/ebpf v0.5.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= +github.com/cilium/ebpf v0.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/evilsocket/ftrace v1.2.0 h1:SHa+EQzNOtWO/BsOyL+6UNTSoVvnMYCKHZalWRtWvUw= -github.com/evilsocket/ftrace v1.2.0/go.mod h1:CJ9cMkpTofsHSNDovrcFezQ5NteqGDerh7psoSM38Dc= +github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -20,60 +24,159 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gopacket v1.1.14 h1:1+TEhSu8Mh154ZBVjyd1Nt2Bb7cnyOeE3GQyb1WGLqI= github.com/google/gopacket v1.1.14/go.mod h1:UCLx9mCmAwsVbn6qQl1WIEt2SO7Nd2fD0th1TBAsqBw= -github.com/google/nftables v0.0.0-20210514154851-a285acebcad3 h1:jv+t8JqcvaSeB0r4u3356q7RE5tagFbVC0Bi1x13YFc= -github.com/google/nftables v0.0.0-20210514154851-a285acebcad3/go.mod h1:cfspEyr/Ap+JDIITA+N9a0ernqG0qZ4W1aqMRgDZa1g= +github.com/google/nftables v0.1.0 h1:T6lS4qudrMufcNIZ8wSRrL+iuwhsKxpN+zFLxhUWOqk= +github.com/google/nftables v0.1.0/go.mod h1:b97ulCCFipUC+kSin+zygkvUVpx0vyIAwxXFdY3PlNc= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/iovisor/gobpf v0.2.0 h1:34xkQxft+35GagXBk3n23eqhm0v7q0ejeVirb8sqEOQ= github.com/iovisor/gobpf v0.2.0/go.mod h1:WSY9Jj5RhdgC3ci1QaacvbFdQ8cbrEjrpiZbLHLt2s4= -github.com/jsimonetti/rtnetlink v0.0.0-20190606172950-9527aa82566a h1:84IpUNXj4mCR9CuCEvSiCArMbzr/TMbuPIadKDwypkI= +github.com/josharian/native v0.0.0-20200817173448-b6b71def0850 h1:uhL5Gw7BINiiPAo24A2sxkcDI0Jt/sqp1v5xQCniEFA= +github.com/josharian/native v0.0.0-20200817173448-b6b71def0850/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w= github.com/jsimonetti/rtnetlink v0.0.0-20190606172950-9527aa82566a/go.mod h1:Oz+70psSo5OFh8DBl0Zv2ACw7Esh6pPUphlvZG9x7uw= -github.com/koneu/natend v0.0.0-20150829182554-ec0926ea948d h1:MFX8DxRnKMY/2M3H61iSsVbo/n3h0MWGmWNN1UViOU0= -github.com/koneu/natend v0.0.0-20150829182554-ec0926ea948d/go.mod h1:QHb4k4cr1fQikUahfcRVPcEXiUgFsdIstGqlurL0XL4= +github.com/jsimonetti/rtnetlink v0.0.0-20200117123717-f846d4f6c1f4/go.mod h1:WGuG/smIU4J/54PblvSbh+xvCZmpJnFgr3ds6Z55XMQ= +github.com/jsimonetti/rtnetlink v0.0.0-20201009170750-9c6f07d100c1/go.mod h1:hqoO/u39cqLeBLebZ8fWdE96O7FxrAsRYhnVOdgHxok= +github.com/jsimonetti/rtnetlink v0.0.0-20201216134343-bde56ed16391/go.mod h1:cR77jAZG3Y3bsb8hF6fHJbFoyFukLFOkQ98S0pQz3xw= +github.com/jsimonetti/rtnetlink v0.0.0-20201220180245-69540ac93943/go.mod h1:z4c53zj6Eex712ROyh8WI0ihysb5j2ROyV42iNogmAs= +github.com/jsimonetti/rtnetlink v0.0.0-20210122163228-8d122574c736/go.mod h1:ZXpIyOK59ZnN7J0BV99cZUPmsqDRZ3eq5X+st7u/oSA= +github.com/jsimonetti/rtnetlink v0.0.0-20210212075122-66c871082f2b/go.mod h1:8w9Rh8m+aHZIG69YPGGem1i5VzoyRC8nw2kA8B+ik5U= +github.com/jsimonetti/rtnetlink v0.0.0-20210525051524-4cc836578190/go.mod h1:NmKSdU4VGSiv1bMsdqNALI4RSvvjtz65tTMCnD05qLo= +github.com/jsimonetti/rtnetlink v0.0.0-20211022192332-93da33804786 h1:N527AHMa793TP5z5GNAn/VLPzlc0ewzWdeP/25gDfgQ= +github.com/jsimonetti/rtnetlink v0.0.0-20211022192332-93da33804786/go.mod h1:v4hqbTdfQngbVSZJVWUhGE/lbTFf9jb+ygmNUDQMuOs= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/mdlayher/ethtool v0.0.0-20210210192532-2b88debcdd43/go.mod h1:+t7E0lkKfbBsebllff1xdTmyJt8lH37niI6kwFk9OTo= +github.com/mdlayher/ethtool v0.0.0-20211028163843-288d040e9d60 h1:tHdB+hQRHU10CfcK0furo6rSNgZ38JT8uPh70c/pFD8= +github.com/mdlayher/ethtool v0.0.0-20211028163843-288d040e9d60/go.mod h1:aYbhishWc4Ai3I2U4Gaa2n3kHWSwzme6EsG/46HRQbE= +github.com/mdlayher/genetlink v1.0.0 h1:OoHN1OdyEIkScEmRgxLEe2M9U8ClMytqA5niynLtfj0= +github.com/mdlayher/genetlink v1.0.0/go.mod h1:0rJ0h4itni50A86M2kHcgS85ttZazNt7a8H2a2cw0Gc= github.com/mdlayher/netlink v0.0.0-20190409211403-11939a169225/go.mod h1:eQB3mZE4aiYnlUsyGGCOpPETfdQq4Jhsgf1fk3cwQaA= -github.com/mdlayher/netlink v0.0.0-20191009155606-de872b0d824b h1:W3er9pI7mt2gOqOWzwvx20iJ8Akiqz1mUMTxU6wdvl8= -github.com/mdlayher/netlink v0.0.0-20191009155606-de872b0d824b/go.mod h1:KxeJAFOFLG6AjpyDkQ/iIhxygIUKD+vcwqcnu43w/+M= +github.com/mdlayher/netlink v1.0.0/go.mod h1:KxeJAFOFLG6AjpyDkQ/iIhxygIUKD+vcwqcnu43w/+M= +github.com/mdlayher/netlink v1.1.0/go.mod h1:H4WCitaheIsdF9yOYu8CFmCgQthAPIWZmcKp9uZHgmY= +github.com/mdlayher/netlink v1.1.1/go.mod h1:WTYpFb/WTvlRJAyKhZL5/uy69TDDpHHu2VZmb2XgV7o= +github.com/mdlayher/netlink v1.2.0/go.mod h1:kwVW1io0AZy9A1E2YYgaD4Cj+C+GPkU6klXCMzIJ9p8= +github.com/mdlayher/netlink v1.2.1/go.mod h1:bacnNlfhqHqqLo4WsYeXSqfyXkInQ9JneWI68v1KwSU= +github.com/mdlayher/netlink v1.2.2-0.20210123213345-5cc92139ae3e/go.mod h1:bacnNlfhqHqqLo4WsYeXSqfyXkInQ9JneWI68v1KwSU= +github.com/mdlayher/netlink v1.3.0/go.mod h1:xK/BssKuwcRXHrtN04UBkwQ6dY9VviGGuriDdoPSWys= +github.com/mdlayher/netlink v1.4.0/go.mod h1:dRJi5IABcZpBD2A3D0Mv/AiX8I9uDEu5oGkAVrekmf8= +github.com/mdlayher/netlink v1.4.1/go.mod h1:e4/KuJ+s8UhfUpO9z00/fDZZmhSrs+oxyqAS9cNgn6Q= +github.com/mdlayher/netlink v1.4.2 h1:3sbnJWe/LETovA7yRZIX3f9McVOWV3OySH6iIBxiFfI= +github.com/mdlayher/netlink v1.4.2/go.mod h1:13VaingaArGUTUxFLf/iEovKxXji32JAtF858jZYEug= +github.com/mdlayher/socket v0.0.0-20210307095302-262dc9984e00/go.mod h1:GAFlyu4/XV68LkQKYzKhIo/WW7j3Zi0YRAz/BOoanUc= +github.com/mdlayher/socket v0.0.0-20211007213009-516dcbdf0267/go.mod h1:nFZ1EtZYK8Gi/k6QNu7z7CgO20i/4ExeQswwWuPmG/g= +github.com/mdlayher/socket v0.0.0-20211102153432-57e3fa563ecb h1:2dC7L10LmTqlyMVzFJ00qM25lqESg9Z4u3GuEXN5iHY= +github.com/mdlayher/socket v0.0.0-20211102153432-57e3fa563ecb/go.mod h1:nFZ1EtZYK8Gi/k6QNu7z7CgO20i/4ExeQswwWuPmG/g= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/varlink/go v0.4.0 h1:+/BQoUO9eJK/+MTSHwFcJch7TMsb6N6Dqp6g0qaXXRo= +github.com/varlink/go v0.4.0/go.mod h1:DKg9Y2ctoNkesREGAEak58l+jOC6JU2aqZvUYs5DynU= github.com/vishvananda/netlink v0.0.0-20210811191823-e1a867c6b452 h1:xe1bLd/sNkKVWdZuAb2+4JeMQMYyQ7Av38iRrE1lhm8= github.com/vishvananda/netlink v0.0.0-20210811191823-e1a867c6b452/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc/go.mod h1:ZjcWmFBXmLKZu9Nxj3WKYEafiSqer2rnvPr0en9UNpI= github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae h1:4hwBBUfQCFe3Cym0ZtKyq7L16eZUtYKs+BaHDN6mAns= github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.1 h1:OJxoQ/rynoF0dcCdI7cLPktw/hR2cueqYfjm43oqK38= +golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191028085509-fe3aa8a45271 h1:N66aaryRB3Ax92gH0v3hp1QYZ3zWWCCUR/j8Ifh45Ss= -golang.org/x/net v0.0.0-20191028085509-fe3aa8a45271/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191007182048-72f939374954/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201216054612-986b41b23924/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210928044308-7d9f5e0b762b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211020060615-d418f374d309/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211201190559-0a0e4e1bb54c/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211209124913-491a49abca63 h1:iocB37TsdFuN6IBRZ+ry36wrkoV51/tl5vOWqkcPGvY= +golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190411185658-b44545bcd369/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191029155521-f43be2a4598c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200217220822-9197077df867/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1 h1:sIky/MyNRSHTrdxfsiUSS4WIAMvInbeXljJz+jDjeYE= golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201009025420-dfb3f7c4e634/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201118182958-a01c418693c7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201218084310-7d0127a74742/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210110051926-789bb1bd4061/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210123111255-9b0068b26619/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210216163648-f7da38b97c65/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210525143221-35b2ab0089ea/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211205182925-97ca703d548d h1:FjkYO/PPp4Wi0EAUOVLxePm7qVW4r4ctbWpURyuOD0E= +golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= +golang.org/x/tools v0.1.8 h1:P1HhGGuLW4aAclzjtmJdf0mJOjVUZUzOTqkAkWL+l6w= +golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -89,3 +192,6 @@ google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/l google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.2.1/go.mod h1:lPVVZ2BS5TfnjLyizF7o7hv7j9/L+8cZY2hLyjP9cGY= +honnef.co/go/tools v0.2.2 h1:MNh1AVMyVX23VUHE2O27jm6lNj3vjO5DexS4A1xvnzk= +honnef.co/go/tools v0.2.2/go.mod h1:lPVVZ2BS5TfnjLyizF7o7hv7j9/L+8cZY2hLyjP9cGY= From c318c25d2207f10397978e1c65ca8f22daeb90f5 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sun, 6 Aug 2023 10:06:51 +0300 Subject: [PATCH 23/28] python3.pkgs.quantulum3: fix build by adding setuptools --- pkgs/development/python-modules/quantulum3/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/quantulum3/default.nix b/pkgs/development/python-modules/quantulum3/default.nix index 364a5e6098a1..259871b4ef0c 100644 --- a/pkgs/development/python-modules/quantulum3/default.nix +++ b/pkgs/development/python-modules/quantulum3/default.nix @@ -12,6 +12,7 @@ , joblib , wikipedia , stemming +, setuptools }: let pname = "quantulum3"; @@ -40,6 +41,7 @@ buildPythonPackage { joblib wikipedia stemming + setuptools ]; pythonImportsCheck = [ "quantulum3" ]; From d1bc24643dd51642b30f7bdf7605990f66174bb8 Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Sat, 5 Aug 2023 16:34:09 -0700 Subject: [PATCH 24/28] mlflow-server: apply patch from python3.pkgs.mflow --- pkgs/servers/mlflow-server/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/mlflow-server/default.nix b/pkgs/servers/mlflow-server/default.nix index e140eac00748..a043d22aa978 100644 --- a/pkgs/servers/mlflow-server/default.nix +++ b/pkgs/servers/mlflow-server/default.nix @@ -11,7 +11,7 @@ py.toPythonApplication py.mysqlclient ]; - postPatch = '' + postPatch = (old.postPatch or "") + '' substituteInPlace mlflow/utils/process.py --replace \ "child = subprocess.Popen(cmd, env=cmd_env, cwd=cwd, universal_newlines=True," \ "cmd[0]='$out/bin/gunicornMlflow'; child = subprocess.Popen(cmd, env=cmd_env, cwd=cwd, universal_newlines=True," From 3a1f5757b9684c2636ffae30169f68eba08e2e0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Christ?= Date: Sun, 6 Aug 2023 11:03:17 +0200 Subject: [PATCH 25/28] mautrix-whatsapp: move defaults back to options. As suggested by @nickcao this commit moves the defaults back to the options. Only `homeserver.domain` stays in the config section since the documentation module does not support referencing attributes of other modules. --- .../services/matrix/mautrix-whatsapp.nix | 83 +++++++++---------- 1 file changed, 41 insertions(+), 42 deletions(-) diff --git a/nixos/modules/services/matrix/mautrix-whatsapp.nix b/nixos/modules/services/matrix/mautrix-whatsapp.nix index c047d6638854..80c85980196f 100644 --- a/nixos/modules/services/matrix/mautrix-whatsapp.nix +++ b/nixos/modules/services/matrix/mautrix-whatsapp.nix @@ -18,7 +18,46 @@ in { settings = lib.mkOption { type = settingsFormat.type; - default = {}; + default = { + appservice = { + address = "http://localhost:${toString appservicePort}"; + hostname = "[::]"; + port = appservicePort; + database = { + type = "sqlite3"; + uri = "${dataDir}/mautrix-whatsapp.db"; + }; + id = "whatsapp"; + bot = { + username = "whatsappbot"; + displayname = "WhatsApp Bridge Bot"; + }; + as_token = ""; + hs_token = ""; + }; + bridge = { + username_template = "whatsapp_{{.}}"; + displayname_template = "{{if .BusinessName}}{{.BusinessName}}{{else if .PushName}}{{.PushName}}{{else}}{{.JID}}{{end}} (WA)"; + double_puppet_server_map = {}; + login_shared_secret_map = {}; + command_prefix = "!wa"; + permissions."*" = "relay"; + relay.enabled = true; + }; + logging = { + min_level = "info"; + writers = [ + { + type = "stdout"; + format = "pretty-colored"; + } + { + type = "file"; + format = "json"; + } + ]; + }; + }; description = lib.mdDoc '' {file}`config.yaml` configuration as a Nix attribute set. Configuration options should match those described in @@ -79,47 +118,7 @@ in { config = lib.mkIf cfg.enable { services.mautrix-whatsapp.settings = { - homeserver = { - domain = lib.mkDefault config.services.matrix-synapse.settings.server_name; - }; - appservice = { - address = lib.mkDefault "http://localhost:${toString appservicePort}"; - hostname = lib.mkDefault "[::]"; - port = lib.mkDefault appservicePort; - database = { - type = lib.mkDefault "sqlite3"; - uri = lib.mkDefault "${dataDir}/mautrix-whatsapp.db"; - }; - id = lib.mkDefault "whatsapp"; - bot = { - username = lib.mkDefault "whatsappbot"; - displayname = lib.mkDefault "WhatsApp Bridge Bot"; - }; - as_token = lib.mkDefault ""; - hs_token = lib.mkDefault ""; - }; - bridge = { - username_template = lib.mkDefault "whatsapp_{{.}}"; - displayname_template = lib.mkDefault "{{if .BusinessName}}{{.BusinessName}}{{else if .PushName}}{{.PushName}}{{else}}{{.JID}}{{end}} (WA)"; - double_puppet_server_map = lib.mkDefault {}; - login_shared_secret_map = lib.mkDefault {}; - command_prefix = lib.mkDefault "!wa"; - permissions."*" = lib.mkDefault "relay"; - relay.enabled = lib.mkDefault true; - }; - logging = { - min_level = lib.mkDefault "info"; - writers = [ - { - type = lib.mkDefault "stdout"; - format = lib.mkDefault "pretty-colored"; - } - { - type = lib.mkDefault "file"; - format = lib.mkDefault "json"; - } - ]; - }; + homeserver.domain = lib.mkDefault config.services.matrix-synapse.settings.server_name; }; systemd.services.mautrix-whatsapp = { From 29bbabc5f55c5695415ae37670ab3bca28722d23 Mon Sep 17 00:00:00 2001 From: natsukium Date: Tue, 1 Aug 2023 23:59:46 +0900 Subject: [PATCH 26/28] python310Packages.cattrs: add meta.changelog --- pkgs/development/python-modules/cattrs/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/python-modules/cattrs/default.nix b/pkgs/development/python-modules/cattrs/default.nix index ddca9628f0fe..fcff82c1ef58 100644 --- a/pkgs/development/python-modules/cattrs/default.nix +++ b/pkgs/development/python-modules/cattrs/default.nix @@ -94,6 +94,7 @@ buildPythonPackage rec { meta = with lib; { description = "Python custom class converters for attrs"; homepage = "https://github.com/python-attrs/cattrs"; + changelog = "https://github.com/python-attrs/cattrs/blob/${src.rev}/HISTORY.md"; license = with licenses; [ mit ]; maintainers = with maintainers; [ fab ]; }; From ce2c71c6b33489b3f9ca0737af6a935d809a35a2 Mon Sep 17 00:00:00 2001 From: natsukium Date: Wed, 2 Aug 2023 00:06:18 +0900 Subject: [PATCH 27/28] python310Packages.cattrs: 22.2.0 -> 23.1.2 Diff: https://github.com/python-attrs/cattrs/compare/v22.2.0...v23.1.2 Changelog: https://github.com/python-attrs/cattrs/blob/v23.1.2/HISTORY.md --- pkgs/development/python-modules/cattrs/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/cattrs/default.nix b/pkgs/development/python-modules/cattrs/default.nix index fcff82c1ef58..b637f714d26d 100644 --- a/pkgs/development/python-modules/cattrs/default.nix +++ b/pkgs/development/python-modules/cattrs/default.nix @@ -1,6 +1,7 @@ { lib , attrs , buildPythonPackage +, cbor2 , fetchFromGitHub , exceptiongroup , hypothesis @@ -20,7 +21,7 @@ buildPythonPackage rec { pname = "cattrs"; - version = "22.2.0"; + version = "23.1.2"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -29,7 +30,7 @@ buildPythonPackage rec { owner = "python-attrs"; repo = pname; rev = "v${version}"; - hash = "sha256-Qnrq/mIA/t0mur6IAen4vTmMIhILWS6v5nuf+Via2hA="; + hash = "sha256-YO4Clbo5fmXbysxwwM2qCHJwO5KwDC05VctRVFruJcw="; }; nativeBuildInputs = [ @@ -40,11 +41,11 @@ buildPythonPackage rec { attrs ] ++ lib.optionals (pythonOlder "3.11") [ exceptiongroup - ] ++ lib.optionals (pythonOlder "3.7") [ typing-extensions ]; nativeCheckInputs = [ + cbor2 hypothesis immutables motor @@ -54,6 +55,7 @@ buildPythonPackage rec { pytestCheckHook pyyaml tomlkit + typing-extensions ujson ]; From acb3384672df9420fe544630411d4fad8e21385b Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 6 Aug 2023 09:25:19 +0000 Subject: [PATCH 28/28] kid3: 3.9.3 -> 3.9.4 --- pkgs/applications/audio/kid3/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/audio/kid3/default.nix b/pkgs/applications/audio/kid3/default.nix index 843738babbc5..3b59806592fd 100644 --- a/pkgs/applications/audio/kid3/default.nix +++ b/pkgs/applications/audio/kid3/default.nix @@ -27,11 +27,11 @@ stdenv.mkDerivation rec { pname = "kid3"; - version = "3.9.3"; + version = "3.9.4"; src = fetchurl { url = "https://download.kde.org/stable/${pname}/${version}/${pname}-${version}.tar.xz"; - sha256 = "sha256-D2hrdej2Q69AYjDn2Ey4vBSOmzBY3UzZMUdJSRjurdA="; + sha256 = "sha256-xBCWDpYiXeChxIiMPqHG3CyiRau2kUdDJtzcPtvWpSA="; }; nativeBuildInputs = [