From 60d879e2571b55c8c86def5448594e4b20f2c5ff Mon Sep 17 00:00:00 2001 From: Alejandro Sanchez Medina Date: Thu, 24 Aug 2023 18:10:59 +0200 Subject: [PATCH 01/45] doc manuals: add reference to nixos-render-docs --- doc/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/README.md b/doc/README.md index 03df6ad61138..2a46cfe943cd 100644 --- a/doc/README.md +++ b/doc/README.md @@ -3,6 +3,7 @@ This directory houses the sources files for the Nixpkgs manual. You can find the [rendered documentation for Nixpkgs `unstable` on nixos.org](https://nixos.org/manual/nixpkgs/unstable/). +The rendering tool is [nixos-render-docs](https://github.com/NixOS/nixpkgs/tree/master/pkgs/tools/nix/nixos-render-docs/src/nixos_render_docs), sometimes abbreviated `nrd`. [Docs for Nixpkgs stable](https://nixos.org/manual/nixpkgs/stable/) are also available. From 4c3def1ae8335362147fd096a1d14e2b35c89786 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20S=C3=A1nchez=20Medina?= Date: Tue, 29 Aug 2023 16:07:41 +0200 Subject: [PATCH 02/45] doc manuals: change reference link to nixos-render-docs Co-authored-by: Silvan Mosberger --- doc/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/README.md b/doc/README.md index 2a46cfe943cd..3f9aff1a38a6 100644 --- a/doc/README.md +++ b/doc/README.md @@ -3,7 +3,7 @@ This directory houses the sources files for the Nixpkgs manual. You can find the [rendered documentation for Nixpkgs `unstable` on nixos.org](https://nixos.org/manual/nixpkgs/unstable/). -The rendering tool is [nixos-render-docs](https://github.com/NixOS/nixpkgs/tree/master/pkgs/tools/nix/nixos-render-docs/src/nixos_render_docs), sometimes abbreviated `nrd`. +The rendering tool is [nixos-render-docs](../pkgs/tools/nix/nixos-render-docs/src/nixos_render_docs), sometimes abbreviated `nrd`. [Docs for Nixpkgs stable](https://nixos.org/manual/nixpkgs/stable/) are also available. From 19241f5618f73974a3bd79853f5869c4f1dde537 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anselm=20Sch=C3=BCler?= Date: Fri, 6 Oct 2023 12:43:26 +0200 Subject: [PATCH 03/45] lib/options: correct and improve documentation of mkPackageOption --- lib/options.nix | 49 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 36 insertions(+), 13 deletions(-) diff --git a/lib/options.nix b/lib/options.nix index c42bc1e6c67e..7491055933f4 100644 --- a/lib/options.nix +++ b/lib/options.nix @@ -108,8 +108,8 @@ rec { package a module should use for some purpose. The package is specified in the third argument under `default` as a list of strings - representing its attribute path in nixpkgs (or another package set). - Because of this, you need to pass nixpkgs itself (or a subset) as the first argument. + representing its attribute path in nixpkgs. + Because of this, you need to pass nixpkgs itself as the first argument. The second argument may be either a string or a list of strings. It provides the display name of the package in the description of the generated option @@ -118,43 +118,66 @@ rec { To include extra information in the description, pass `extraDescription` to append arbitrary text to the generated description. + You can also pass an `example` value, either a literal string or an attribute path. - The default argument can be omitted if the provided name is - an attribute of pkgs (if name is a string) or a - valid attribute path in pkgs (if name is a list). + The `default` argument can be omitted if the provided name is + an attribute of pkgs (if `name` is a string) or a valid attribute path in pkgs (if `name` is a list). + You can also set `default` to just a string in which case it is interpreted as an attribute name + (a singleton attribute path, if you will). If you wish to explicitly provide no default, pass `null` as `default`. - Type: mkPackageOption :: pkgs -> (string|[string]) -> { default? :: [string], example? :: null|string|[string], extraDescription? :: string } -> option + If you want users to be able to set no package, pass `nullable = true`. + In this mode a `default = null` will not be interpreted as no default and is interpreted literally. + + Type: mkPackageOption :: pkgs -> (string|[string]) -> { nullable? :: bool, default? :: string|[string], example? :: null|string|[string], extraDescription? :: string } -> option Example: mkPackageOption pkgs "hello" { } - => { _type = "option"; default = «derivation /nix/store/3r2vg51hlxj3cx5vscp0vkv60bqxkaq0-hello-2.10.drv»; defaultText = { ... }; description = "The hello package to use."; type = { ... }; } + => { ...; default = pkgs.hello; defaultText = literalExpression "pkgs.hello"; description = "The hello package to use."; type = package; } Example: mkPackageOption pkgs "GHC" { default = [ "ghc" ]; example = "pkgs.haskell.packages.ghc92.ghc.withPackages (hkgs: [ hkgs.primes ])"; } - => { _type = "option"; default = «derivation /nix/store/jxx55cxsjrf8kyh3fp2ya17q99w7541r-ghc-8.10.7.drv»; defaultText = { ... }; description = "The GHC package to use."; example = { ... }; type = { ... }; } + => { ...; default = pkgs.ghc; defaultText = literalExpression "pkgs.ghc"; description = "The GHC package to use."; example = literalExpression "pkgs.haskell.packages.ghc92.ghc.withPackages (hkgs: [ hkgs.primes ])"; type = package; } Example: - mkPackageOption pkgs [ "python39Packages" "pytorch" ] { + mkPackageOption pkgs [ "python3Packages" "pytorch" ] { extraDescription = "This is an example and doesn't actually do anything."; } - => { _type = "option"; default = «derivation /nix/store/gvqgsnc4fif9whvwd9ppa568yxbkmvk8-python3.9-pytorch-1.10.2.drv»; defaultText = { ... }; description = "The pytorch package to use. This is an example and doesn't actually do anything."; type = { ... }; } + => { ...; default = pkgs.python3Packages.pytorch; defaultText = literalExpression "pkgs.python3Packages.pytorch"; description = "The pytorch package to use. This is an example and doesn't actually do anything."; type = package; } + Example: + mkPackageOption pkgs "nushell" { + nullable = true; + } + => { ...; default = pkgs.nushell; defaultText = literalExpression "pkgs.nushell"; description = "The nushell package to use."; type = nullOr package; } + + Example: + mkPackageOption pkgs "coreutils" { + default = null; + } + => { ...; description = "The coreutils package to use."; type = package; } + + Example: + mkPackageOption pkgs "dbus" { + nullable = true; + default = null; + } + => { ...; default = null; description = "The dbus package to use."; type = nullOr package; } */ mkPackageOption = - # Package set (a specific version of nixpkgs or a subset) + # Package set (an instantiation of nixpkgs such as pkgs in modules) pkgs: # Name for the package, shown in option description name: { - # Whether the package can be null, for example to disable installing a package altogether. + # Whether the package can be null, for example to disable installing a package altogether (defaults to false) nullable ? false, - # The attribute path where the default package is located (may be omitted) + # The attribute path where the default package is located (may be omitted, in which case it is copied from `name`) default ? name, # A string or an attribute path to use as an example (may be omitted) example ? null, From d27d38c13a8ec4e2a6adf314148986f2f7741a40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anselm=20Sch=C3=BCler?= Date: Fri, 6 Oct 2023 13:28:46 +0200 Subject: [PATCH 04/45] lib/tests: add more tests for mkPackageOption --- lib/tests/modules.sh | 6 +++++ lib/tests/modules/declare-mkPackageOption.nix | 26 +++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/lib/tests/modules.sh b/lib/tests/modules.sh index 05c99e6de83c..c2f1a426a342 100755 --- a/lib/tests/modules.sh +++ b/lib/tests/modules.sh @@ -227,8 +227,14 @@ checkConfigOutput '^false$' config.enableAlias ./alias-with-priority-can-overrid # Check mkPackageOption checkConfigOutput '^"hello"$' config.package.pname ./declare-mkPackageOption.nix +checkConfigOutput '^"hello"$' config.namedPackage.pname ./declare-mkPackageOption.nix +checkConfigOutput '^".*Hello.*"$' options.namedPackage.description ./declare-mkPackageOption.nix +checkConfigOutput '^"hello"$' config.pathPackage.pname ./declare-mkPackageOption.nix +checkConfigOutput '^"pkgs\.hello\.override \{ stdenv = pkgs\.clangStdenv; \}"$' options.packageWithExample.example.text ./declare-mkPackageOption.nix +checkConfigOutput '^".*Example extra description\..*"$' options.packageWithExtraDescription.description ./declare-mkPackageOption.nix checkConfigError 'The option .undefinedPackage. is used but not defined' config.undefinedPackage ./declare-mkPackageOption.nix checkConfigOutput '^null$' config.nullablePackage ./declare-mkPackageOption.nix +checkConfigOutput '^"null or package"$' options.nullablePackageWithDefault.type.description ./declare-mkPackageOption.nix # submoduleWith diff --git a/lib/tests/modules/declare-mkPackageOption.nix b/lib/tests/modules/declare-mkPackageOption.nix index 640b19a7bf22..37f070467b42 100644 --- a/lib/tests/modules/declare-mkPackageOption.nix +++ b/lib/tests/modules/declare-mkPackageOption.nix @@ -7,6 +7,28 @@ in { options = { package = lib.mkPackageOption pkgs "hello" { }; + namedPackage = lib.mkPackageOption pkgs "Hello" { + default = [ "hello" ]; + }; + + namedPackageSingletonDefault = lib.mkPackageOption pkgs "Hello" { + default = "hello"; + }; + + pathPackage = lib.mkPackageOption pkgs [ "hello" ] { }; + + packageWithExample = lib.mkPackageOption pkgs "hello" { + example = "pkgs.hello.override { stdenv = pkgs.clangStdenv; }"; + }; + + packageWithPathExample = lib.mkPackageOption pkgs "hello" { + example = [ "hello" ]; + }; + + packageWithExtraDescription = lib.mkPackageOption pkgs "hello" { + extraDescription = "Example extra description."; + }; + undefinedPackage = lib.mkPackageOption pkgs "hello" { default = null; }; @@ -15,5 +37,9 @@ in { nullable = true; default = null; }; + + nullablePackageWithDefault = lib.mkPackageOption pkgs "hello" { + nullable = true; + }; }; } From f07537da75e5ece7d223a1cfa7e59ad1825be2a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anselm=20Sch=C3=BCler?= Date: Fri, 6 Oct 2023 12:44:48 +0200 Subject: [PATCH 05/45] lib/options: add pkgsText parameter to mkPackageOption --- lib/options.nix | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/lib/options.nix b/lib/options.nix index 7491055933f4..30fc61c22dbb 100644 --- a/lib/options.nix +++ b/lib/options.nix @@ -108,8 +108,14 @@ rec { package a module should use for some purpose. The package is specified in the third argument under `default` as a list of strings - representing its attribute path in nixpkgs. - Because of this, you need to pass nixpkgs itself as the first argument. + representing its attribute path in nixpkgs (or another package set). + Because of this, you need to pass nixpkgs itself (usually `pkgs` in a module; + alternatively to nixpkgs itself, another package set) as the first argument. + + If you pass another package set you should set the `pkgsText` option. + This option is used to display the expression for the package set. It is `"pkgs"` by default. + If your expression is complex you should parenthesize it, as the `pkgsText` argument + is usually immediately followed by an attribute lookup (`.`). The second argument may be either a string or a list of strings. It provides the display name of the package in the description of the generated option @@ -131,7 +137,7 @@ rec { If you want users to be able to set no package, pass `nullable = true`. In this mode a `default = null` will not be interpreted as no default and is interpreted literally. - Type: mkPackageOption :: pkgs -> (string|[string]) -> { nullable? :: bool, default? :: string|[string], example? :: null|string|[string], extraDescription? :: string } -> option + Type: mkPackageOption :: pkgs -> (string|[string]) -> { nullable? :: bool, default? :: string|[string], example? :: null|string|[string], extraDescription? :: string, pkgsText? :: string } -> option Example: mkPackageOption pkgs "hello" { } @@ -168,9 +174,16 @@ rec { default = null; } => { ...; default = null; description = "The dbus package to use."; type = nullOr package; } + + Example: + mkPackageOption pkgs.javaPackages "OpenJFX" { + default = "openjfx20"; + pkgsText = "pkgs.javaPackages"; + } + => { ...; default = pkgs.javaPackages.openjfx20; defaultText = literalExpression "pkgs.javaPackages.openjfx20"; description = "The OpenJFX package to use."; type = package; } */ mkPackageOption = - # Package set (an instantiation of nixpkgs such as pkgs in modules) + # Package set (an instantiation of nixpkgs such as pkgs in modules or another package set) pkgs: # Name for the package, shown in option description name: @@ -183,6 +196,8 @@ rec { example ? null, # Additional text to include in the option description (may be omitted) extraDescription ? "", + # Representation of the package set passed as pkgs (defaults to `"pkgs"`) + pkgsText ? "pkgs" }: let name' = if isList name then last name else name; @@ -194,15 +209,15 @@ rec { default' = if isList default then default else [ default ]; defaultPath = concatStringsSep "." default'; defaultValue = attrByPath default' - (throw "${defaultPath} cannot be found in pkgs") pkgs; + (throw "${defaultPath} cannot be found in ${pkgsText}") pkgs; in { default = defaultValue; - defaultText = literalExpression ("pkgs." + defaultPath); + defaultText = literalExpression ("${pkgsText}." + defaultPath); } else if nullable then { default = null; } else { }) // lib.optionalAttrs (example != null) { example = literalExpression - (if isList example then "pkgs." + concatStringsSep "." example else example); + (if isList example then "${pkgsText}." + concatStringsSep "." example else example); }); /* Alias of mkPackageOption. Previously used to create options with markdown From cb67bb0335554e213b823f1561251dfb9dff857e Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Mon, 9 Oct 2023 17:06:21 +0200 Subject: [PATCH 06/45] nixos/matrix-synapse: mergeable log configuration Right now there's no trivial way to override parts of synapse's log config such as the log-level because the only thing that's changeable is the path to the log-file used by synapse and its workers. Now, there's a new option called `services.matrix-synapse.log` which contains the default log config as Nix attribute-set (except `handlers.journal.SYSLOG_IDENTIFIER`). It has default priority, so new things can be added like services.matrix-synapse.log = { my.extra.field = 23; } without discarding the rest. If desired, this can still be done via `lib.mkForce`. If the log configuration for a single worker or synapse, but not all workers should be changed, `services.matrix-synapse.settings.log_config` or `services.matrix-synapse.workers._name_.worker_log_config` can be used. --- nixos/modules/services/matrix/synapse.nix | 80 ++++++++++++++++------- 1 file changed, 58 insertions(+), 22 deletions(-) diff --git a/nixos/modules/services/matrix/synapse.nix b/nixos/modules/services/matrix/synapse.nix index 1354a8cb58b4..10534ea23521 100644 --- a/nixos/modules/services/matrix/synapse.nix +++ b/nixos/modules/services/matrix/synapse.nix @@ -70,13 +70,12 @@ let inherit (cfg) plugins; }; - logConfig = logName: { + defaultCommonLogConfig = { version = 1; formatters.journal_fmt.format = "%(name)s: [%(request)s] %(message)s"; handlers.journal = { class = "systemd.journal.JournalHandler"; formatter = "journal_fmt"; - SYSLOG_IDENTIFIER = logName; }; root = { level = "INFO"; @@ -84,33 +83,27 @@ let }; disable_existing_loggers = false; }; + + defaultCommonLogConfigText = generators.toPretty { } defaultCommonLogConfig; + logConfigText = logName: - let - expr = '' - { - version = 1; - formatters.journal_fmt.format = "%(name)s: [%(request)s] %(message)s"; - handlers.journal = { - class = "systemd.journal.JournalHandler"; - formatter = "journal_fmt"; - SYSLOG_IDENTIFIER = "${logName}"; - }; - root = { - level = "INFO"; - handlers = [ "journal" ]; - }; - disable_existing_loggers = false; - }; - ''; - in lib.literalMD '' Path to a yaml file generated from this Nix expression: ``` - ${expr} + ${generators.toPretty { } ( + recursiveUpdate defaultCommonLogConfig { handlers.journal.SYSLOG_IDENTIFIER = logName; } + )} ``` ''; - genLogConfigFile = logName: format.generate "synapse-log-${logName}.yaml" (logConfig logName); + + genLogConfigFile = logName: format.generate + "synapse-log-${logName}.yaml" + (cfg.log // optionalAttrs (cfg.log?handlers.journal) { + handlers.journal = cfg.log.handlers.journal // { + SYSLOG_IDENTIFIER = logName; + }; + }); in { imports = [ @@ -394,6 +387,47 @@ in { ''; }; + log = mkOption { + type = types.attrsOf format.type; + defaultText = literalExpression defaultCommonLogConfigText; + description = mdDoc '' + Default configuration for the loggers used by `matrix-synapse` and its workers. + The defaults are added with the default priority which means that + these will be merged with additional declarations. For instance + the log-level for synapse and its workers can be changed like this: + + ```nix + { lib, ... }: { + services.matrix-synapse.log.root.level = lib.mkForce "WARNING"; + } + ``` + + And another field can be added like this: + + ```nix + { + services.matrix-synapse.log = { + loggers."synapse.http.matrixfederationclient".level = "DEBUG"; + }; + } + ``` + + Additionally, the field `handlers.journal.SYSLOG_IDENTIFIER` will be added to + each log config, i.e. + * `synapse` for `matrix-synapse.service` + * `synapse-` for `matrix-synapse-worker-.service` + + This is only done if this option has a `handlers.journal` field declared. + + To discard all settings declared by this option for each worker and synapse, + `lib.mkForce` can be used. + + To discard all settings declared by this option for a single worker or synapse only, + [](#opt-services.matrix-synapse.workers._name_.worker_log_config) or + [](#opt-services.matrix-synapse.settings.log_config) can be used. + ''; + }; + settings = mkOption { default = { }; description = mdDoc '' @@ -1008,6 +1042,8 @@ in { # default them, so they are additive services.matrix-synapse.extras = defaultExtras; + services.matrix-synapse.log = defaultCommonLogConfig; + users.users.matrix-synapse = { group = "matrix-synapse"; home = cfg.dataDir; From a0e05c19009ed5b0da02ac56e8c3edc19fe34172 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 10 Oct 2023 04:48:39 +0000 Subject: [PATCH 07/45] gnunet: 0.19.4 -> 0.20.0 --- pkgs/applications/networking/p2p/gnunet/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/p2p/gnunet/default.nix b/pkgs/applications/networking/p2p/gnunet/default.nix index 2fdaf3c52f42..e593fd9f80ab 100644 --- a/pkgs/applications/networking/p2p/gnunet/default.nix +++ b/pkgs/applications/networking/p2p/gnunet/default.nix @@ -7,11 +7,11 @@ stdenv.mkDerivation rec { pname = "gnunet"; - version = "0.19.4"; + version = "0.20.0"; src = fetchurl { url = "mirror://gnu/gnunet/${pname}-${version}.tar.gz"; - sha256 = "sha256-AKY99AjVmH9bqaUEQfKncYK9n7MvHjAq5WOslOesAJs="; + sha256 = "sha256-VgKeeKmcBNUrE1gJSuUHTkzY6puYz2hV9XrZryeslRg="; }; enableParallelBuilding = true; From 55ab538abf0a476ad731ed7411063d966f832439 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anselm=20Sch=C3=BCler?= Date: Fri, 6 Oct 2023 13:32:49 +0200 Subject: [PATCH 08/45] lib/tests: add test for pkgsText parameter and package set selection of mkPackageOption --- lib/tests/modules.sh | 2 ++ lib/tests/modules/declare-mkPackageOption.nix | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/lib/tests/modules.sh b/lib/tests/modules.sh index c2f1a426a342..21d4978a1160 100755 --- a/lib/tests/modules.sh +++ b/lib/tests/modules.sh @@ -235,6 +235,8 @@ checkConfigOutput '^".*Example extra description\..*"$' options.packageWithExtra checkConfigError 'The option .undefinedPackage. is used but not defined' config.undefinedPackage ./declare-mkPackageOption.nix checkConfigOutput '^null$' config.nullablePackage ./declare-mkPackageOption.nix checkConfigOutput '^"null or package"$' options.nullablePackageWithDefault.type.description ./declare-mkPackageOption.nix +checkConfigOutput '^"myPkgs\.hello"$' options.packageWithPkgsText.defaultText.text ./declare-mkPackageOption.nix +checkConfigOutput '^"hello-other"$' options.packageFromOtherSet.default.pname ./declare-mkPackageOption.nix # submoduleWith diff --git a/lib/tests/modules/declare-mkPackageOption.nix b/lib/tests/modules/declare-mkPackageOption.nix index 37f070467b42..e13e68447e09 100644 --- a/lib/tests/modules/declare-mkPackageOption.nix +++ b/lib/tests/modules/declare-mkPackageOption.nix @@ -41,5 +41,13 @@ in { nullablePackageWithDefault = lib.mkPackageOption pkgs "hello" { nullable = true; }; + + packageWithPkgsText = lib.mkPackageOption pkgs "hello" { + pkgsText = "myPkgs"; + }; + + packageFromOtherSet = let myPkgs = { + hello = pkgs.hello // { pname = "hello-other"; }; + }; in lib.mkPackageOption myPkgs "hello" { }; }; } From 7e24b3619f6f7180988931d6743d2c7f2f5b8713 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anselm=20Sch=C3=BCler?= Date: Fri, 6 Oct 2023 12:51:23 +0200 Subject: [PATCH 09/45] lib/options: refactor mkPackageOption --- lib/options.nix | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/options.nix b/lib/options.nix index 30fc61c22dbb..7821924873dc 100644 --- a/lib/options.nix +++ b/lib/options.nix @@ -201,21 +201,21 @@ rec { }: let name' = if isList name then last name else name; - in mkOption ({ - type = with lib.types; (if nullable then nullOr else lib.id) package; + default' = if isList default then default else [ default ]; + defaultText = concatStringsSep "." default'; + defaultValue = attrByPath default' + (throw "${defaultText} cannot be found in ${pkgsText}") pkgs; + defaults = if default != null then { + default = defaultValue; + defaultText = literalExpression ("${pkgsText}." + defaultText); + } else optionalAttrs nullable { + default = null; + }; + in mkOption (defaults // { description = "The ${name'} package to use." + (if extraDescription == "" then "" else " ") + extraDescription; - } // (if default != null then let - default' = if isList default then default else [ default ]; - defaultPath = concatStringsSep "." default'; - defaultValue = attrByPath default' - (throw "${defaultPath} cannot be found in ${pkgsText}") pkgs; - in { - default = defaultValue; - defaultText = literalExpression ("${pkgsText}." + defaultPath); - } else if nullable then { - default = null; - } else { }) // lib.optionalAttrs (example != null) { + type = with lib.types; (if nullable then nullOr else lib.id) package; + } // optionalAttrs (example != null) { example = literalExpression (if isList example then "${pkgsText}." + concatStringsSep "." example else example); }); From 9b10f9a0c469699b211170f5d47b0324c7b4a0f7 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sat, 30 Apr 2022 22:39:45 +0100 Subject: [PATCH 10/45] zsh: add nixosTests zsh-history & oh-my-zsh to passthru.tests --- pkgs/shells/zsh/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/shells/zsh/default.nix b/pkgs/shells/zsh/default.nix index 4a05ee9ead57..5af94223ec83 100644 --- a/pkgs/shells/zsh/default.nix +++ b/pkgs/shells/zsh/default.nix @@ -11,7 +11,9 @@ , ncurses , pcre , pkg-config -, buildPackages }: +, buildPackages +, nixosTests +}: let version = "5.9"; @@ -143,5 +145,8 @@ EOF passthru = { shellPath = "/bin/zsh"; + tests = { + inherit (nixosTests) zsh-history oh-my-zsh; + }; }; } From af5b1dbeb29400e32101ac030ef0f1ffba4d36d9 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 15 Oct 2023 08:51:30 +0100 Subject: [PATCH 11/45] mktemp: fix parallel installing Without the upstream patch parallel install fails as: mktemp> mkdir /nix/store/k5b7wyhwyv9x3z5i6d88y7l1kdrkkfgj-mktemp-1.7/share/man/man1 mktemp> cp: cannot create regular file '/nix/store/k5b7wyhwyv9x3z5i6d88y7l1kdrkkfgj-mktemp-1.7/share/man/man1/1185.tmp': No such file or directory mktemp> make: *** [Makefile:101: install-man] Error 1 mktemp> make: *** Waiting for unfinished jobs.... --- pkgs/tools/security/mktemp/default.nix | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/security/mktemp/default.nix b/pkgs/tools/security/mktemp/default.nix index 02be5103cbf6..5010780800de 100644 --- a/pkgs/tools/security/mktemp/default.nix +++ b/pkgs/tools/security/mktemp/default.nix @@ -1,4 +1,9 @@ -{ lib, stdenv, fetchurl, groff }: +{ lib +, stdenv +, fetchurl +, fetchpatch +, groff +}: stdenv.mkDerivation rec { pname = "mktemp"; @@ -7,6 +12,15 @@ stdenv.mkDerivation rec { # Have `configure' avoid `/usr/bin/nroff' in non-chroot builds. NROFF = "${groff}/bin/nroff"; + patches = [ + # Pull upstream fix for parallel install failures. + (fetchpatch { + name = "parallel-install.patch"; + url = "https://www.mktemp.org/repos/mktemp/raw-rev/eb87d96ce8b7"; + hash = "sha256-cJ/0pFj8tOkByUwhlMwLNSQgTHyAU8svEkjKWWwsNmY="; + }) + ]; + # Don't use "install -s" postPatch = '' substituteInPlace Makefile.in --replace " 0555 -s " " 0555 " @@ -17,6 +31,8 @@ stdenv.mkDerivation rec { sha256 = "0x969152znxxjbj7387xb38waslr4yv6bnj5jmhb4rpqxphvk54f"; }; + enableParallelBuilding = true; + meta = with lib; { description = "Simple tool to make temporary file handling in shells scripts safe and simple"; homepage = "https://www.mktemp.org"; From e5928d9a73678749def663f838aef4b9d37b1488 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sun, 15 Oct 2023 16:16:28 +0200 Subject: [PATCH 12/45] nixos/synapse: `mkDefault` each value of the log config That way it's not even needed to specify an `mkForce` when changing existing attributes, e.g. root's log level. --- nixos/modules/services/matrix/synapse.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/matrix/synapse.nix b/nixos/modules/services/matrix/synapse.nix index 10534ea23521..0cf2736bad45 100644 --- a/nixos/modules/services/matrix/synapse.nix +++ b/nixos/modules/services/matrix/synapse.nix @@ -393,12 +393,14 @@ in { description = mdDoc '' Default configuration for the loggers used by `matrix-synapse` and its workers. The defaults are added with the default priority which means that - these will be merged with additional declarations. For instance + these will be merged with additional declarations. These additional + declarations also take precedence over the defaults when declared + with at least normal priority. For instance the log-level for synapse and its workers can be changed like this: ```nix { lib, ... }: { - services.matrix-synapse.log.root.level = lib.mkForce "WARNING"; + services.matrix-synapse.log.root.level = "WARNING"; } ``` @@ -1042,7 +1044,7 @@ in { # default them, so they are additive services.matrix-synapse.extras = defaultExtras; - services.matrix-synapse.log = defaultCommonLogConfig; + services.matrix-synapse.log = mapAttrsRecursive (const mkDefault) defaultCommonLogConfig; users.users.matrix-synapse = { group = "matrix-synapse"; From b0ffea2a32154fd98abee82809fca9cbaa1e524d Mon Sep 17 00:00:00 2001 From: unclamped Date: Sun, 15 Oct 2023 21:46:12 -0300 Subject: [PATCH 13/45] maintainers: add unclamped --- maintainers/maintainer-list.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 9698a503e118..d5fbc6743c83 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -18037,6 +18037,16 @@ githubId = 1607770; name = "Ulrik Strid"; }; + unclamped = { + name = "Maru"; + email = "clear6860@tutanota.com"; + matrix = "@unhidden0174:matrix.org"; + github = "unclamped"; + githubId = 104658278; + keys = [{ + fingerprint = "57A2 CC43 3068 CB62 89C1 F1DA 9137 BB2E 77AD DE7E"; + }]; + }; unclechu = { name = "Viacheslav Lotsmanov"; email = "lotsmanov89@gmail.com"; From 21e3645a9c6f1fbce6ed699d86ab9b966ce31a9e Mon Sep 17 00:00:00 2001 From: Meet Barot Date: Sun, 15 Oct 2023 22:52:05 -0400 Subject: [PATCH 14/45] libpng, libpng12: Add `meta.pkgConfigModules` and test --- pkgs/development/libraries/libpng/12.nix | 19 +++++++++++++------ pkgs/development/libraries/libpng/default.nix | 17 ++++++++++++----- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/pkgs/development/libraries/libpng/12.nix b/pkgs/development/libraries/libpng/12.nix index a76a1ada6c87..e94bd026a7a6 100644 --- a/pkgs/development/libraries/libpng/12.nix +++ b/pkgs/development/libraries/libpng/12.nix @@ -1,13 +1,15 @@ -{ lib, stdenv, fetchurl, zlib }: +{ lib, stdenv, fetchurl, zlib +, testers +}: assert stdenv.hostPlatform == stdenv.buildPlatform -> zlib != null; -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "libpng"; version = "1.2.59"; src = fetchurl { - url = "mirror://sourceforge/libpng/libpng-${version}.tar.xz"; + url = "mirror://sourceforge/libpng/libpng-${finalAttrs.version}.tar.xz"; sha256 = "1izw9ybm27llk8531w6h4jp4rk2rxy2s9vil16nwik5dp0amyqxl"; }; @@ -15,18 +17,23 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ zlib ]; - passthru = { inherit zlib; }; - configureFlags = [ "--enable-static" ]; postInstall = ''mv "$out/bin" "$dev/bin"''; + passthru = { + inherit zlib; + + tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + }; + meta = with lib; { description = "The official reference implementation for the PNG file format"; homepage = "http://www.libpng.org/pub/png/libpng.html"; license = licenses.libpng; maintainers = [ ]; branch = "1.2"; + pkgConfigModules = [ "libpng" "libpng12" ]; platforms = platforms.unix; }; -} +}) diff --git a/pkgs/development/libraries/libpng/default.nix b/pkgs/development/libraries/libpng/default.nix index f8ae5b828c25..e1d412b5006e 100644 --- a/pkgs/development/libraries/libpng/default.nix +++ b/pkgs/development/libraries/libpng/default.nix @@ -1,4 +1,6 @@ -{ lib, stdenv, fetchurl, zlib, apngSupport ? true }: +{ lib, stdenv, fetchurl, zlib, apngSupport ? true +, testers +}: assert zlib != null; @@ -10,12 +12,12 @@ let }; whenPatched = lib.optionalString apngSupport; -in stdenv.mkDerivation rec { +in stdenv.mkDerivation (finalAttrs: { pname = "libpng" + whenPatched "-apng"; version = "1.6.40"; src = fetchurl { - url = "mirror://sourceforge/libpng/libpng-${version}.tar.xz"; + url = "mirror://sourceforge/libpng/libpng-${finalAttrs.version}.tar.xz"; hash = "sha256-U1tHmyRn/yMaPsbZKlJZBvuO8nl4vk9m2+BdPzoBs6E="; }; postPatch = whenPatched "gunzip < ${patch_src} | patch -Np1"; @@ -27,14 +29,19 @@ in stdenv.mkDerivation rec { doCheck = true; - passthru = { inherit zlib; }; + passthru = { + inherit zlib; + + tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + }; meta = with lib; { description = "The official reference implementation for the PNG file format" + whenPatched " with animation patch"; homepage = "http://www.libpng.org/pub/png/libpng.html"; changelog = "https://github.com/glennrp/libpng/blob/v1.6.40/CHANGES"; license = licenses.libpng2; + pkgConfigModules = [ "libpng" "libpng16" ]; platforms = platforms.all; maintainers = with maintainers; [ vcunat ]; }; -} +}) From 3ddd9da3e3292db92e8c3c5ed4a7e895fc7b7f11 Mon Sep 17 00:00:00 2001 From: Meet Barot Date: Sun, 15 Oct 2023 23:00:53 -0400 Subject: [PATCH 15/45] libsass: Add `meta.pkgConfigModules` and test --- pkgs/development/libraries/libsass/default.nix | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/pkgs/development/libraries/libsass/default.nix b/pkgs/development/libraries/libsass/default.nix index f4293952b9f4..92f3853b5f71 100644 --- a/pkgs/development/libraries/libsass/default.nix +++ b/pkgs/development/libraries/libsass/default.nix @@ -1,13 +1,15 @@ -{ lib, stdenv, fetchFromGitHub, autoreconfHook }: +{ lib, stdenv, fetchFromGitHub, autoreconfHook +, testers +}: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "libsass"; version = "3.6.5"; # also check sassc for updates src = fetchFromGitHub { owner = "sass"; - repo = pname; - rev = version; + repo = finalAttrs.pname; + rev = finalAttrs.version; sha256 = "1cxj6r85d5f3qxdwzxrmkx8z875hig4cr8zsi30w6vj23cyds3l2"; # Remove unicode file names which leads to different checksums on HFS+ # vs. other filesystems because of unicode normalisation. @@ -17,16 +19,19 @@ stdenv.mkDerivation rec { }; preConfigure = '' - export LIBSASS_VERSION=${version} + export LIBSASS_VERSION=${finalAttrs.version} ''; nativeBuildInputs = [ autoreconfHook ]; + passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + meta = with lib; { description = "A C/C++ implementation of a Sass compiler"; homepage = "https://github.com/sass/libsass"; license = licenses.mit; maintainers = with maintainers; [ codyopel offline ]; + pkgConfigModules = [ "libsass" ]; platforms = platforms.unix; }; -} +}) From af55c599bf1715c6721770efba2f554b9f675fc7 Mon Sep 17 00:00:00 2001 From: Meet Barot Date: Sun, 15 Oct 2023 23:07:55 -0400 Subject: [PATCH 16/45] taglib: Add `meta.pkgConfigModules` and test --- pkgs/development/libraries/taglib/default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/taglib/default.nix b/pkgs/development/libraries/taglib/default.nix index 6eaab9623417..aa759ddbbb02 100644 --- a/pkgs/development/libraries/taglib/default.nix +++ b/pkgs/development/libraries/taglib/default.nix @@ -3,16 +3,17 @@ , fetchFromGitHub , cmake , zlib +, testers }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "taglib"; version = "1.13.1"; src = fetchFromGitHub { owner = "taglib"; repo = "taglib"; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; hash = "sha256-QX0EpHGT36UsgIfRf5iALnwxe0jjLpZvCTbk8vSMFF4="; }; @@ -28,6 +29,8 @@ stdenv.mkDerivation rec { "-DCMAKE_INSTALL_INCLUDEDIR=include" ]; + passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + meta = with lib; { homepage = "https://taglib.org/"; description = "A library for reading and editing audio file metadata"; @@ -39,5 +42,6 @@ stdenv.mkDerivation rec { ''; license = with licenses; [ lgpl3 mpl11 ]; maintainers = with maintainers; [ ttuegel ]; + pkgConfigModules = [ "taglib" "taglib_c" ]; }; -} +}) From 8264bd8bf3dbf8fe2cb2ca3bf1ae859795f06ff7 Mon Sep 17 00:00:00 2001 From: Meet Barot Date: Sun, 15 Oct 2023 23:15:58 -0400 Subject: [PATCH 17/45] file: Add `meta.pkgConfigModules` and test --- pkgs/tools/misc/file/default.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/misc/file/default.nix b/pkgs/tools/misc/file/default.nix index 6026f3c7adaa..8cff5ccd70af 100644 --- a/pkgs/tools/misc/file/default.nix +++ b/pkgs/tools/misc/file/default.nix @@ -1,18 +1,20 @@ -{ lib, stdenv, fetchurl, file, zlib, libgnurx }: +{ lib, stdenv, fetchurl, file, zlib, libgnurx +, testers +}: # Note: this package is used for bootstrapping fetchurl, and thus # cannot use fetchpatch! All mutable patches (generated by GitHub or # cgit) that are needed here should be included directly in Nixpkgs as # files. -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "file"; version = "5.45"; src = fetchurl { urls = [ - "https://astron.com/pub/file/${pname}-${version}.tar.gz" - "https://distfiles.macports.org/file/${pname}-${version}.tar.gz" + "https://astron.com/pub/file/${finalAttrs.pname}-${finalAttrs.version}.tar.gz" + "https://distfiles.macports.org/file/${finalAttrs.pname}-${finalAttrs.version}.tar.gz" ]; hash = "sha256-/Jf1ECm7DiyfTjv/79r2ePDgOe6HK53lwAKm0Jx4TYI="; }; @@ -37,12 +39,15 @@ stdenv.mkDerivation rec { makeFlags = lib.optional stdenv.hostPlatform.isWindows "FILE_COMPILE=file"; + passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + meta = with lib; { homepage = "https://darwinsys.com/file"; description = "A program that shows the type of files"; maintainers = with maintainers; [ doronbehar ]; license = licenses.bsd2; + pkgConfigModules = [ "libmagic" ]; platforms = platforms.all; mainProgram = "file"; }; -} +}) From 19a4154a7c17cad568faf0d1fa52a99a54dff1db Mon Sep 17 00:00:00 2001 From: Meet Barot Date: Sun, 15 Oct 2023 23:28:45 -0400 Subject: [PATCH 18/45] postgresql: Add `meta.pkgConfigModules` and test --- pkgs/servers/sql/postgresql/default.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/servers/sql/postgresql/default.nix b/pkgs/servers/sql/postgresql/default.nix index 81db9454f227..6bf881d52815 100644 --- a/pkgs/servers/sql/postgresql/default.nix +++ b/pkgs/servers/sql/postgresql/default.nix @@ -17,7 +17,7 @@ let , version, hash, psqlSchema # for tests - , nixosTests, thisAttr + , testers, nixosTests, thisAttr # JIT , jitSupport ? false @@ -34,10 +34,11 @@ let lz4Enabled = atLeast "14"; zstdEnabled = atLeast "15"; - stdenv' = if jitSupport then llvmPackages.stdenv else stdenv; - in stdenv'.mkDerivation rec { pname = "postgresql"; - inherit version; + + stdenv' = if jitSupport then llvmPackages.stdenv else stdenv; + in stdenv'.mkDerivation (finalAttrs: { + inherit pname version; src = fetchurl { url = "mirror://postgresql/source/v${version}/${pname}-${version}.tar.bz2"; @@ -283,6 +284,7 @@ let tests = { postgresql = nixosTests.postgresql-wal-receiver.${thisAttr}; + pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; } // lib.optionalAttrs jitSupport { postgresql-jit = nixosTests.postgresql-jit.${thisAttr}; }; @@ -295,6 +297,7 @@ let description = "A powerful, open source object-relational database system"; license = licenses.postgresql; maintainers = with maintainers; [ thoughtpolice danbst globin marsam ivan ma27 ]; + pkgConfigModules = [ "libecpg" "libecpg_compat" "libpgtypes" "libpq" ]; platforms = platforms.unix; # JIT support doesn't work with cross-compilation. It is attempted to build LLVM-bytecode @@ -309,7 +312,7 @@ let # a query, postgres would coredump with `Illegal instruction`. broken = jitSupport && (stdenv.hostPlatform != stdenv.buildPlatform); }; - }; + }); postgresqlWithPackages = { postgresql, makeWrapper, buildEnv }: pkgs: f: buildEnv { name = "postgresql-and-plugins-${postgresql.version}"; From a76390f69cbc559d7e10f42850d4d318a361f357 Mon Sep 17 00:00:00 2001 From: Meet Barot Date: Sun, 15 Oct 2023 23:54:42 -0400 Subject: [PATCH 19/45] python3*: Add `meta.pkgConfigModules` and test --- pkgs/development/interpreters/python/cpython/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index 4e60b15ba4cb..e48c8334ff07 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -58,6 +58,7 @@ , reproducibleBuild ? false , pythonAttr ? "python${sourceVersion.major}${sourceVersion.minor}" , noldconfigPatch ? ./. + "/${sourceVersion.major}.${sourceVersion.minor}/no-ldconfig.patch" +, testers } @ inputs: # Note: this package is used for bootstrapping fetchurl, and thus @@ -232,7 +233,7 @@ let ''; execSuffix = stdenv.hostPlatform.extensions.executable; -in with passthru; stdenv.mkDerivation { +in with passthru; stdenv.mkDerivation (finalAttrs: { pname = "python3"; inherit src version; @@ -579,6 +580,8 @@ in with passthru; stdenv.mkDerivation { nativeBuildInputs = with pkgsBuildBuild.python3.pkgs; [ sphinxHook python_docs_theme ]; }; + + tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; }; enableParallelBuilding = true; @@ -604,8 +607,9 @@ in with passthru; stdenv.mkDerivation { high level dynamic data types. ''; license = licenses.psfl; + pkgConfigModules = [ "python3" ]; platforms = platforms.linux ++ platforms.darwin ++ platforms.windows; maintainers = with maintainers; [ fridh ]; mainProgram = executable; }; -} +}) From bda5a3e229d97f0a0c12d8614edb080cceae2950 Mon Sep 17 00:00:00 2001 From: Meet Barot Date: Mon, 16 Oct 2023 00:28:24 -0400 Subject: [PATCH 20/45] libidn: Add `meta.pkgConfigModules` and test --- pkgs/development/libraries/libidn/default.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/libidn/default.nix b/pkgs/development/libraries/libidn/default.nix index 83f69cfaa02b..9e1d9e55c16a 100644 --- a/pkgs/development/libraries/libidn/default.nix +++ b/pkgs/development/libraries/libidn/default.nix @@ -1,11 +1,13 @@ -{ fetchurl, lib, stdenv, libiconv }: +{ fetchurl, lib, stdenv, libiconv +, testers +}: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "libidn"; version = "1.41"; src = fetchurl { - url = "mirror://gnu/libidn/${pname}-${version}.tar.gz"; + url = "mirror://gnu/libidn/${finalAttrs.pname}-${finalAttrs.version}.tar.gz"; sha256 = "sha256-iE1wY2S4Gr3Re+6Whtj/KudDHFoUZRBHxorfizH9iUU="; }; @@ -15,6 +17,8 @@ stdenv.mkDerivation rec { buildInputs = lib.optional stdenv.isDarwin libiconv; + passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + meta = { homepage = "https://www.gnu.org/software/libidn/"; description = "Library for internationalized domain names"; @@ -36,7 +40,8 @@ stdenv.mkDerivation rec { ''; license = lib.licenses.lgpl2Plus; + pkgConfigModules = [ "libidn" ]; platforms = lib.platforms.all; maintainers = with lib.maintainers; [ lsix ]; }; -} +}) From 886ae64cab61b0b803681c1e5ede4ab0d4d055cb Mon Sep 17 00:00:00 2001 From: Meet Barot Date: Mon, 16 Oct 2023 00:28:52 -0400 Subject: [PATCH 21/45] geos: Make pkg-config modules test like the others --- pkgs/development/libraries/geos/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/geos/default.nix b/pkgs/development/libraries/geos/default.nix index 1f3ce471dc0e..90bdfdb0d605 100644 --- a/pkgs/development/libraries/geos/default.nix +++ b/pkgs/development/libraries/geos/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation (finalAttrs: { doCheck = true; passthru.tests = { - pkg-config = testers.hasPkgConfigModules { package = finalAttrs.finalPackage; }; + pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; geos = callPackage ./tests.nix { geos = finalAttrs.finalPackage; }; }; From b3ac258c2ae1064c4dd50656d60f73fd9da3f447 Mon Sep 17 00:00:00 2001 From: Meet Barot Date: Mon, 16 Oct 2023 00:35:01 -0400 Subject: [PATCH 22/45] gsasl: Add and test --- pkgs/development/libraries/gsasl/default.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/gsasl/default.nix b/pkgs/development/libraries/gsasl/default.nix index c1003a6e33f6..cdc275874133 100644 --- a/pkgs/development/libraries/gsasl/default.nix +++ b/pkgs/development/libraries/gsasl/default.nix @@ -1,11 +1,13 @@ -{ fetchurl, lib, stdenv, libidn, libkrb5 }: +{ fetchurl, lib, stdenv, libidn, libkrb5 +, testers +}: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "gsasl"; version = "2.2.0"; src = fetchurl { - url = "mirror://gnu/gsasl/${pname}-${version}.tar.gz"; + url = "mirror://gnu/gsasl/${finalAttrs.pname}-${finalAttrs.version}.tar.gz"; sha256 = "sha256-ebho47mXbcSE1ZspygroiXvpbOTTbTKu1dk1p6Mwd1k="; }; @@ -24,6 +26,8 @@ stdenv.mkDerivation rec { ''; doCheck = !stdenv.hostPlatform.isDarwin; + passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + meta = { description = "GNU SASL, Simple Authentication and Security Layer library"; @@ -38,6 +42,7 @@ stdenv.mkDerivation rec { license = lib.licenses.gpl3Plus; maintainers = with lib.maintainers; [ shlevy ]; + pkgConfigModules = [ "libgsasl" ]; platforms = lib.platforms.all; }; -} +}) From a3d5a40c275f0b1f8f1a413984e62037fc06a5c7 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 16 Oct 2023 10:08:42 +0000 Subject: [PATCH 23/45] python310Packages.tskit: 0.5.5 -> 0.5.6 --- pkgs/development/python-modules/tskit/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/tskit/default.nix b/pkgs/development/python-modules/tskit/default.nix index bb5139b425b0..522d4a57adbc 100644 --- a/pkgs/development/python-modules/tskit/default.nix +++ b/pkgs/development/python-modules/tskit/default.nix @@ -10,13 +10,13 @@ buildPythonPackage rec { pname = "tskit"; - version = "0.5.5"; + version = "0.5.6"; format = "pyproject"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-phhBTAHAPlBnmzSiLmPYDMg1Mui85NZacni3WuYAc6c="; + hash = "sha256-3f4hPxywY822mCF3IwooBezX38fM1zAm4Th4q//SzkY="; }; nativeBuildInputs = [ From 5610ab2caef2d4fe489dbbdfab098e86a40a60e6 Mon Sep 17 00:00:00 2001 From: soyouzpanda Date: Mon, 16 Oct 2023 14:09:40 +0200 Subject: [PATCH 24/45] emulationstation: 2.0.1a -> 2.11.2 --- .../emulators/emulationstation/default.nix | 27 +++++++------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/pkgs/applications/emulators/emulationstation/default.nix b/pkgs/applications/emulators/emulationstation/default.nix index 170a3c30e547..f0434ecdedf4 100644 --- a/pkgs/applications/emulators/emulationstation/default.nix +++ b/pkgs/applications/emulators/emulationstation/default.nix @@ -1,34 +1,25 @@ { lib, stdenv, fetchFromGitHub, pkg-config, cmake, curl, boost, eigen -, freeimage, freetype, libGLU, libGL, SDL2, alsa-lib, libarchive -, fetchpatch }: +, freeimage, freetype, libGLU, libGL, rapidjson, SDL2, alsa-lib +, vlc }: stdenv.mkDerivation { pname = "emulationstation"; - version = "2.0.1a"; + version = "2.11.2"; src = fetchFromGitHub { - owner = "Aloshi"; + fetchSubmodules = true; + owner = "RetroPie"; repo = "EmulationStation"; - rev = "646bede3d9ec0acf0ae378415edac136774a66c5"; - sha256 = "0cm0sq2wri2l9cvab1l0g02za59q7klj0h3p028vr96n6njj4w9v"; + rev = "cda7de687924c4c1ab83d6b0ceb88aa734fe6cfe"; + hash = "sha256-J5h/578FVe4DXJx/AvpRnCIUpqBeFtmvFhUDYH5SErQ="; }; - patches = [ - (fetchpatch { - url = "https://github.com/Aloshi/EmulationStation/commit/49ccd8fc7a7b1dfd974fc57eb13317c42842f22c.patch"; - sha256 = "1v5d81l7bav0k5z4vybrc3rjcysph6lkm5pcfr6m42wlz7jmjw0p"; - }) - ]; - - postPatch = '' - sed -i "7i #include " es-app/src/views/gamelist/ISimpleGameListView.h - ''; - nativeBuildInputs = [ pkg-config cmake ]; - buildInputs = [ alsa-lib boost curl eigen freeimage freetype libarchive libGLU libGL SDL2 ]; + buildInputs = [ alsa-lib boost curl eigen freeimage freetype libGLU libGL rapidjson SDL2 vlc ]; installPhase = '' install -D ../emulationstation $out/bin/emulationstation + cp -r ../resources/ $out/bin/resources/ ''; meta = { From 1afa0705190f7382a5a67a84ff7c8f5bc07aeb8c Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 16 Oct 2023 12:20:11 +0000 Subject: [PATCH 25/45] pdfhummus: 4.5.12 -> 4.6 --- pkgs/development/libraries/pdfhummus/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/pdfhummus/default.nix b/pkgs/development/libraries/pdfhummus/default.nix index c811f0d4eb8b..7b9263a4209d 100644 --- a/pkgs/development/libraries/pdfhummus/default.nix +++ b/pkgs/development/libraries/pdfhummus/default.nix @@ -12,13 +12,13 @@ stdenv.mkDerivation rec { pname = "pdfhummus"; - version = "4.5.12"; + version = "4.6"; src = fetchFromGitHub { owner = "galkahana"; repo = "PDF-Writer"; rev = "v${version}"; - hash = "sha256-n5mzzIDU7Lb2V9YImPvceCBUt9Q+ZeF45CHtW52cGpY="; + hash = "sha256-TP/NDh5fPPHuiRaj6+YZfhtHZmlb+mqtnXfzyjVKAHY="; }; nativeBuildInputs = [ From 11e0428f602d466106ae32783ae386eb0d233a92 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Mon, 16 Oct 2023 14:56:25 +0200 Subject: [PATCH 26/45] python310Packages.devito: 4.8.2 -> 4.8.3 --- pkgs/development/python-modules/devito/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/devito/default.nix b/pkgs/development/python-modules/devito/default.nix index 208778465191..064899b8e78e 100644 --- a/pkgs/development/python-modules/devito/default.nix +++ b/pkgs/development/python-modules/devito/default.nix @@ -26,7 +26,7 @@ buildPythonPackage rec { pname = "devito"; - version = "4.8.2"; + version = "4.8.3"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -35,7 +35,7 @@ buildPythonPackage rec { owner = "devitocodes"; repo = "devito"; rev = "refs/tags/v${version}"; - hash = "sha256-zckFU9Q5Rpj0TPeT96lXfR/yp2SYrV4sjAjqN/y8GDw="; + hash = "sha256-g9rRJF1JrZ6+s3tj4RZHuGOjt5LJjtK9I5CJmq4CJL4="; }; pythonRemoveDeps = [ From 1097302bf2af23d2f5ce1886b69d02aeb35987a1 Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Mon, 16 Oct 2023 13:29:43 +0200 Subject: [PATCH 27/45] cowsql: 0.15.2 -> 1.15.3 tag v0.15.2 seems to have vanished and replaced by v1.15.3. As it's a relatively new project, we can hopefully rely on tags not vanishing from now on Signed-off-by: Sefa Eyeoglu --- pkgs/by-name/co/cowsql/package.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/co/cowsql/package.nix b/pkgs/by-name/co/cowsql/package.nix index 09cd77c52ce7..c7b7b97e9792 100644 --- a/pkgs/by-name/co/cowsql/package.nix +++ b/pkgs/by-name/co/cowsql/package.nix @@ -10,14 +10,14 @@ , gitUpdater }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "cowsql"; - version = "0.15.2"; + version = "1.15.3"; src = fetchFromGitHub { owner = "cowsql"; repo = "cowsql"; - rev = "refs/tags/v${version}"; + rev = "refs/tags/v${finalAttrs.version}"; hash = "sha256-+za3pIcV4BhoImKvJlKatCK372wL4OyPbApQvGxGGGk="; }; @@ -55,4 +55,4 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ adamcstephens ]; platforms = platforms.unix; }; -} +}) From 5651e0c263ed9ba49999080452d2c56e2acb03ae Mon Sep 17 00:00:00 2001 From: Aleksey Mikhaylov Date: Mon, 16 Oct 2023 16:34:36 +0300 Subject: [PATCH 28/45] kak-lsp: 14.1.0 -> 14.2.0 --- pkgs/tools/misc/kak-lsp/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/misc/kak-lsp/default.nix b/pkgs/tools/misc/kak-lsp/default.nix index 4b40b6131453..7ef363f75aa0 100644 --- a/pkgs/tools/misc/kak-lsp/default.nix +++ b/pkgs/tools/misc/kak-lsp/default.nix @@ -2,16 +2,16 @@ rustPlatform.buildRustPackage rec { pname = "kak-lsp"; - version = "14.1.0"; + version = "14.2.0"; src = fetchFromGitHub { owner = pname; repo = pname; rev = "v${version}"; - sha256 = "sha256-5eGp11qPLT1fen39bZmICReK2Ly8Kg9Y3g30ZV0gk04="; + sha256 = "sha256-U4eqIzvYzUfwprVpPHV/OFPKiBXK4/5z2p8kknX2iME="; }; - cargoSha256 = "sha256-+Sj+QSSXJAgGulMLRCWLgddVG8sIiHaB1xWPojVCgas="; + cargoSha256 = "sha256-g63Kfi4xJZO/+fq6eK2iB1dUGoSGWIIRaJr8BWO/txM="; buildInputs = lib.optionals stdenv.isDarwin [ Security SystemConfiguration ]; From ed8270ec36b4d9251a314fa6a70cf9743047bab2 Mon Sep 17 00:00:00 2001 From: toonn Date: Mon, 16 Oct 2023 16:00:19 +0200 Subject: [PATCH 29/45] libicns: unstable-2022-04-10 -> 0.8.1-unstable-2022-04-10 Conform to version format for non-released revision. Co-authored-by: Anders Kaseorg --- pkgs/development/libraries/libicns/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libicns/default.nix b/pkgs/development/libraries/libicns/default.nix index 45fad4459a8c..fc2fa9b66487 100644 --- a/pkgs/development/libraries/libicns/default.nix +++ b/pkgs/development/libraries/libicns/default.nix @@ -2,7 +2,7 @@ stdenv.mkDerivation { pname = "libicns"; - version = "unstable-2022-04-10"; + version = "0.8.1-unstable-2022-04-10"; src = fetchgit { name = "libicns"; From 584c8b9eca389be3adfad5e724906501c56e801c Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 16 Oct 2023 15:28:55 +0000 Subject: [PATCH 30/45] python310Packages.w1thermsensor: 2.0.0 -> 2.3.0 --- pkgs/development/python-modules/w1thermsensor/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/w1thermsensor/default.nix b/pkgs/development/python-modules/w1thermsensor/default.nix index 550ae76a03eb..51dceba76364 100644 --- a/pkgs/development/python-modules/w1thermsensor/default.nix +++ b/pkgs/development/python-modules/w1thermsensor/default.nix @@ -15,12 +15,12 @@ }: buildPythonPackage rec { pname = "w1thermsensor"; - version = "2.0.0"; + version = "2.3.0"; format = "pyproject"; src = fetchPypi { inherit pname version; - hash = "sha256-EcaEr4B8icbwZu2Ty3z8AAgglf74iZ5BLpLnSOZC2cE="; + hash = "sha256-n7wK4N1mzZtUxtYu17qyuI4UjJh/59UGD0dvkOgcInA="; }; postPatch = '' From 39d4555034ca60c2b2130e6be97a82f8e122629b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 16 Oct 2023 18:04:02 +0200 Subject: [PATCH 31/45] python311Packages.w1thermsensor: add changelog to meta --- pkgs/development/python-modules/w1thermsensor/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/w1thermsensor/default.nix b/pkgs/development/python-modules/w1thermsensor/default.nix index 51dceba76364..e1f5044021ce 100644 --- a/pkgs/development/python-modules/w1thermsensor/default.nix +++ b/pkgs/development/python-modules/w1thermsensor/default.nix @@ -13,6 +13,7 @@ , pytestCheckHook , pythonOlder }: + buildPythonPackage rec { pname = "w1thermsensor"; version = "2.3.0"; @@ -63,6 +64,7 @@ buildPythonPackage rec { devices. ''; homepage = "https://github.com/timofurrer/w1thermsensor"; + changelog = "https://github.com/timofurrer/w1thermsensor/blob/v${version}/CHANGELOG.rst"; license = licenses.mit; maintainers = with maintainers; [ quentin ]; platforms = platforms.all; From be93df7246cdc6fa3276b5058fb300e3fb4a461a Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 16 Oct 2023 16:36:57 +0000 Subject: [PATCH 32/45] python310Packages.west: 1.1.0 -> 1.2.0 --- pkgs/development/python-modules/west/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/west/default.nix b/pkgs/development/python-modules/west/default.nix index 39aa19c8ad60..b3cfcaa30b60 100644 --- a/pkgs/development/python-modules/west/default.nix +++ b/pkgs/development/python-modules/west/default.nix @@ -11,14 +11,14 @@ buildPythonPackage rec { pname = "west"; - version = "1.1.0"; + version = "1.2.0"; format = "setuptools"; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-40h/VLa9kEWASJtgPvGm4JnG8uZWAUwrg8SzwhdfpN8="; + hash = "sha256-tB5RrJA5OUT5wB974nAA1LMpYVt+0HT7DvaTtGRoEpc="; }; propagatedBuildInputs = [ From 9e7b0190b6e903560501fd62f308a27f6fc5d987 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 16 Oct 2023 18:08:07 +0200 Subject: [PATCH 33/45] python311Packages.w1thermsensor: disable on unsupported Python releases --- pkgs/development/python-modules/w1thermsensor/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/w1thermsensor/default.nix b/pkgs/development/python-modules/w1thermsensor/default.nix index e1f5044021ce..a60c545a2536 100644 --- a/pkgs/development/python-modules/w1thermsensor/default.nix +++ b/pkgs/development/python-modules/w1thermsensor/default.nix @@ -17,7 +17,9 @@ buildPythonPackage rec { pname = "w1thermsensor"; version = "2.3.0"; - format = "pyproject"; + pyproject = true; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; @@ -48,7 +50,7 @@ buildPythonPackage rec { tomli ]; - # Tests for 2.0.0 currently fail on python3.11 + # Tests for 2.0.0 currently fail on Python 3.11 # https://github.com/timofurrer/w1thermsensor/issues/116 doCheck = pythonOlder "3.11"; From 26be63b1eba01efd173f8caf2f4fda946a1fbaec Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 16 Oct 2023 18:30:09 +0200 Subject: [PATCH 34/45] python310Packages.w1thermsensor: add optional-dependencies --- pkgs/development/python-modules/w1thermsensor/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/w1thermsensor/default.nix b/pkgs/development/python-modules/w1thermsensor/default.nix index a60c545a2536..58158f77282b 100644 --- a/pkgs/development/python-modules/w1thermsensor/default.nix +++ b/pkgs/development/python-modules/w1thermsensor/default.nix @@ -35,10 +35,15 @@ buildPythonPackage rec { ]; propagatedBuildInputs = [ - aiofiles click ]; + passthru.optional-dependencies = { + async = [ + aiofiles + ]; + }; + # Don't try to load the kernel module in tests. env.W1THERMSENSOR_NO_KERNEL_MODULE = 1; From f56c2c067c9e6d50c2bb482003062f1ee4f6bb81 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 16 Oct 2023 18:44:22 +0200 Subject: [PATCH 35/45] python310Packages.w1thermsensor: enable tests on Python 3.11 --- pkgs/development/python-modules/w1thermsensor/default.nix | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/w1thermsensor/default.nix b/pkgs/development/python-modules/w1thermsensor/default.nix index 58158f77282b..e1592ab86287 100644 --- a/pkgs/development/python-modules/w1thermsensor/default.nix +++ b/pkgs/development/python-modules/w1thermsensor/default.nix @@ -53,11 +53,7 @@ buildPythonPackage rec { pytestCheckHook ] ++ lib.optionals (pythonOlder "3.11") [ tomli - ]; - - # Tests for 2.0.0 currently fail on Python 3.11 - # https://github.com/timofurrer/w1thermsensor/issues/116 - doCheck = pythonOlder "3.11"; + ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); pythonImportsCheck = [ "w1thermsensor" From 40d10a503d30dda8fd80be300937d68397426b14 Mon Sep 17 00:00:00 2001 From: Malo Bourgon Date: Mon, 16 Oct 2023 10:09:49 -0700 Subject: [PATCH 36/45] signalbackup-tools: 20231011-1 -> 20231015 Diff: https://github.com/bepaald/signalbackup-tools/compare/20231011-1...20231015 --- .../instant-messengers/signalbackup-tools/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/signalbackup-tools/default.nix b/pkgs/applications/networking/instant-messengers/signalbackup-tools/default.nix index b62b22882ed1..3b191570bfe1 100644 --- a/pkgs/applications/networking/instant-messengers/signalbackup-tools/default.nix +++ b/pkgs/applications/networking/instant-messengers/signalbackup-tools/default.nix @@ -2,13 +2,13 @@ (if stdenv.isDarwin then darwin.apple_sdk_11_0.llvmPackages_14.stdenv else stdenv).mkDerivation rec { pname = "signalbackup-tools"; - version = "20231011-1"; + version = "20231015"; src = fetchFromGitHub { owner = "bepaald"; repo = pname; rev = version; - hash = "sha256-AwlhKF7Tsx20v6t4P6j7E4XPlg9Nq+BSYOFVY+3byos="; + hash = "sha256-P3IbCWzc7V2yX8qZIPUncJXFFq9iFl7csDj2tiTZ7AY="; }; postPatch = '' From f7fca66be41aa5dce1b26fc5d66a4c703654fd8f Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 16 Oct 2023 18:03:49 +0000 Subject: [PATCH 37/45] python310Packages.zigpy-xbee: 0.18.3 -> 0.19.0 --- pkgs/development/python-modules/zigpy-xbee/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/zigpy-xbee/default.nix b/pkgs/development/python-modules/zigpy-xbee/default.nix index fe0eb8607582..92e995c1ec05 100644 --- a/pkgs/development/python-modules/zigpy-xbee/default.nix +++ b/pkgs/development/python-modules/zigpy-xbee/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "zigpy-xbee"; - version = "0.18.3"; + version = "0.19.0"; # https://github.com/Martiusweb/asynctest/issues/152 # broken by upstream python bug with asynctest and # is used exclusively by home-assistant with python 3.8 @@ -21,7 +21,7 @@ buildPythonPackage rec { owner = "zigpy"; repo = "zigpy-xbee"; rev = "refs/tags/${version}"; - hash = "sha256-+qtbOC3rsse57kqd4RLl9EKXzru0vdgIIPSl1OQ652U="; + hash = "sha256-KUXXOySuPFNKcW3O08FBYIfm4WwVjOuIF+GefmKnwl0="; }; buildInputs = [ From f5f32580cc7943bb2f38b5b015d0dd680657588d Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 16 Oct 2023 18:08:09 +0000 Subject: [PATCH 38/45] python310Packages.zigpy-znp: 0.11.5 -> 0.11.6 --- pkgs/development/python-modules/zigpy-znp/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/zigpy-znp/default.nix b/pkgs/development/python-modules/zigpy-znp/default.nix index f31c8b006b54..cf487cae0894 100644 --- a/pkgs/development/python-modules/zigpy-znp/default.nix +++ b/pkgs/development/python-modules/zigpy-znp/default.nix @@ -16,7 +16,7 @@ buildPythonPackage rec { pname = "zigpy-znp"; - version = "0.11.5"; + version = "0.11.6"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -25,7 +25,7 @@ buildPythonPackage rec { owner = "zigpy"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-Ti8H9FC8/xYS4je+d7EgRmDvBTmlOdiWUbuX+cbE2hY="; + hash = "sha256-K85AmksP/dXKL4DQKadyvjK7y5x6yEgc6vDJAPfblTw="; }; postPatch = '' From 4ae1656434eeefd58586b38e61d557745b0c1749 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Mon, 16 Oct 2023 19:09:05 +0100 Subject: [PATCH 39/45] indent: skip tests that can fail due to upstream bug 64751 --- pkgs/development/tools/misc/indent/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/tools/misc/indent/default.nix b/pkgs/development/tools/misc/indent/default.nix index 87061728b54d..0d4c272e414e 100644 --- a/pkgs/development/tools/misc/indent/default.nix +++ b/pkgs/development/tools/misc/indent/default.nix @@ -30,6 +30,12 @@ stdenv.mkDerivation rec { }) ]; + # avoid https://savannah.gnu.org/bugs/?64751 + postPatch = '' + sed -E -i '/output\/else-comment-2-br(-ce)?.c/d' regression/TEST + sed -E -i 's/else-comment-2-br(-ce)?.c//g' regression/TEST + ''; + makeFlags = [ "AR=${stdenv.cc.targetPrefix}ar" ]; strictDeps = true; From 528e89cdcb8b92d80c70697fd8d92078429fa2dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Sun, 17 Sep 2023 19:38:34 +0200 Subject: [PATCH 40/45] deconz: update meta * Set meta.mainProgram to silence lib.getExe warning. * Fix meta.platforms - the .deb file we use as source only supports x86_64 linux. * Set meta.sourceProvenance - the .deb file we use as source contains x86_64 linux binaries. --- pkgs/servers/deconz/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/deconz/default.nix b/pkgs/servers/deconz/default.nix index ae1fb6119187..0b0d9840f016 100644 --- a/pkgs/servers/deconz/default.nix +++ b/pkgs/servers/deconz/default.nix @@ -77,7 +77,9 @@ stdenv.mkDerivation rec { description = "Manage Zigbee network with ConBee, ConBee II or RaspBee hardware"; homepage = "https://www.dresden-elektronik.com/wireless/software/deconz.html"; license = licenses.unfree; - platforms = with platforms; linux; + platforms = with platforms; [ "x86_64-linux" ]; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; maintainers = with maintainers; [ bjornfor ]; + mainProgram = "deCONZ"; }; } From 4164383dd4f63c5725f099e618665fe0130b49ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Sun, 17 Sep 2023 20:03:50 +0200 Subject: [PATCH 41/45] nixos/deconz: init Add a NixOS module for the deCONZ Zigbee gateway service. --- nixos/modules/module-list.nix | 1 + nixos/modules/services/networking/deconz.nix | 125 +++++++++++++++++++ 2 files changed, 126 insertions(+) create mode 100644 nixos/modules/services/networking/deconz.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 9b347527ab01..f7549a6a0b0f 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -882,6 +882,7 @@ ./services/networking/croc.nix ./services/networking/dae.nix ./services/networking/dante.nix + ./services/networking/deconz.nix ./services/networking/dhcpcd.nix ./services/networking/dnscache.nix ./services/networking/dnscrypt-proxy2.nix diff --git a/nixos/modules/services/networking/deconz.nix b/nixos/modules/services/networking/deconz.nix new file mode 100644 index 000000000000..1fe103733212 --- /dev/null +++ b/nixos/modules/services/networking/deconz.nix @@ -0,0 +1,125 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.services.deconz; + name = "deconz"; + stateDir = "/var/lib/${name}"; + # ref. upstream deconz.service + capabilities = + lib.optionals (cfg.httpPort < 1024 || cfg.wsPort < 1024) [ "CAP_NET_BIND_SERVICE" ] + ++ lib.optionals (cfg.allowRebootSystem) [ "CAP_SYS_BOOT" ] + ++ lib.optionals (cfg.allowRestartService) [ "CAP_KILL" ] + ++ lib.optionals (cfg.allowSetSystemTime) [ "CAP_SYS_TIME" ]; +in +{ + options.services.deconz = { + + enable = lib.mkEnableOption "deCONZ, a Zigbee gateway for use with ConBee hardware (https://phoscon.de/en/conbee2)"; + + package = lib.mkOption { + type = lib.types.package; + default = pkgs.deconz; + defaultText = lib.literalExpression "pkgs.deconz"; + description = "Which deCONZ package to use."; + }; + + device = lib.mkOption { + type = lib.types.nullOr lib.types.str; + default = null; + description = '' + Force deCONZ to use a specific USB device (e.g. /dev/ttyACM0). By + default it does a search. + ''; + }; + + listenAddress = lib.mkOption { + type = lib.types.str; + default = "127.0.0.1"; + description = '' + Pin deCONZ to the network interface specified through the provided IP + address. This applies for the webserver as well as the websocket + notifications. + ''; + }; + + httpPort = lib.mkOption { + type = lib.types.port; + default = 80; + description = "TCP port for the web server."; + }; + + wsPort = lib.mkOption { + type = lib.types.port; + default = 443; + description = "TCP port for the WebSocket."; + }; + + openFirewall = lib.mkEnableOption "open up the service ports in the firewall"; + + allowRebootSystem = lib.mkEnableOption "allow rebooting the system"; + + allowRestartService = lib.mkEnableOption "allow killing/restarting processes"; + + allowSetSystemTime = lib.mkEnableOption "allow setting the system time"; + + extraArgs = lib.mkOption { + type = lib.types.listOf lib.types.str; + default = [ ]; + example = [ + "--dbg-info=1" + "--dbg-err=2" + ]; + description = '' + Extra command line arguments for deCONZ, see + https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/deCONZ-command-line-parameters. + ''; + }; + }; + + config = lib.mkIf cfg.enable { + + networking.firewall.allowedTCPPorts = lib.mkIf cfg.openFirewall [ + cfg.httpPort + cfg.wsPort + ]; + + services.udev.packages = [ cfg.package ]; + + systemd.services.deconz = { + description = "deCONZ Zigbee gateway"; + wantedBy = [ "multi-user.target" ]; + preStart = '' + # The service puts a nix store path reference in here, and that path can + # be garbage collected. Ensure the file gets "refreshed" on every start. + rm -f ${stateDir}/.local/share/dresden-elektronik/deCONZ/zcldb.txt + ''; + environment = { + HOME = stateDir; + XDG_RUNTIME_DIR = "/run/${name}"; + }; + serviceConfig = { + ExecStart = + "${lib.getExe cfg.package}" + + " -platform minimal" + + " --http-listen=${cfg.listenAddress}" + + " --http-port=${toString cfg.httpPort}" + + " --ws-port=${toString cfg.wsPort}" + + " --auto-connect=1" + + (lib.optionalString (cfg.device != null) " --dev=${cfg.device}") + + " " + (lib.escapeShellArgs cfg.extraArgs); + Restart = "on-failure"; + AmbientCapabilities = capabilities; + CapabilityBoundingSet = capabilities; + UMask = "0027"; + DynamicUser = true; + RuntimeDirectory = name; + RuntimeDirectoryMode = "0700"; + StateDirectory = name; + WorkingDirectory = stateDir; + # For access to /dev/ttyACM0 (ConBee). + SupplementaryGroups = [ "dialout" ]; + ProtectHome = true; + }; + }; + }; +} From f561e395bd8b59aff8fe04df30692c4ae9b2bf83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Sun, 17 Sep 2023 20:04:28 +0200 Subject: [PATCH 42/45] nixos/tests/deconz: init --- nixos/tests/all-tests.nix | 1 + nixos/tests/deconz.nix | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 nixos/tests/deconz.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 2d774bc19579..36c08252b7ae 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -216,6 +216,7 @@ in { darling = handleTest ./darling.nix {}; dae = handleTest ./dae.nix {}; dconf = handleTest ./dconf.nix {}; + deconz = handleTest ./deconz.nix {}; deepin = handleTest ./deepin.nix {}; deluge = handleTest ./deluge.nix {}; dendrite = handleTest ./matrix/dendrite.nix {}; diff --git a/nixos/tests/deconz.nix b/nixos/tests/deconz.nix new file mode 100644 index 000000000000..cbe721ba4925 --- /dev/null +++ b/nixos/tests/deconz.nix @@ -0,0 +1,28 @@ +import ./make-test-python.nix ({ pkgs, lib, ... }: +let + httpPort = 800; +in +{ + name = "deconz"; + + meta.maintainers = with lib.maintainers; [ + bjornfor + ]; + + nodes.machine = { config, pkgs, lib, ... }: { + nixpkgs.config.allowUnfree = true; + services.deconz = { + enable = true; + inherit httpPort; + extraArgs = [ + "--dbg-err=2" + "--dbg-info=2" + ]; + }; + }; + + testScript = '' + machine.wait_for_unit("deconz.service") + machine.succeed("curl -sfL http://localhost:${toString httpPort}") + ''; +}) From d62ebb37d4845ab57c67260ea29b4afe8c1ced3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Sun, 17 Sep 2023 20:05:48 +0200 Subject: [PATCH 43/45] deconz: add NixOS test to passthru.tests --- pkgs/servers/deconz/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/servers/deconz/default.nix b/pkgs/servers/deconz/default.nix index 0b0d9840f016..7f5d60b153f8 100644 --- a/pkgs/servers/deconz/default.nix +++ b/pkgs/servers/deconz/default.nix @@ -11,6 +11,7 @@ , makeWrapper , gzip , gnutar +, nixosTests }: stdenv.mkDerivation rec { @@ -73,6 +74,10 @@ stdenv.mkDerivation rec { runHook postInstall ''; + passthru = { + tests = { inherit (nixosTests) deconz; }; + }; + meta = with lib; { description = "Manage Zigbee network with ConBee, ConBee II or RaspBee hardware"; homepage = "https://www.dresden-elektronik.com/wireless/software/deconz.html"; From f19166f1cb67c0350330d6790cd0ee633bc17a7e Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 16 Oct 2023 03:21:25 +0000 Subject: [PATCH 44/45] python310Packages.scikit-build-core: 0.5.0 -> 0.5.1 --- pkgs/development/python-modules/scikit-build-core/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/scikit-build-core/default.nix b/pkgs/development/python-modules/scikit-build-core/default.nix index 7cf4f9943992..bea510faa93a 100644 --- a/pkgs/development/python-modules/scikit-build-core/default.nix +++ b/pkgs/development/python-modules/scikit-build-core/default.nix @@ -21,13 +21,13 @@ buildPythonPackage rec { pname = "scikit-build-core"; - version = "0.5.0"; + version = "0.5.1"; format = "pyproject"; src = fetchPypi { pname = "scikit_build_core"; inherit version; - hash = "sha256-pCqVAps0tc+JKFU0LZuURcd0y3l/yyTI/EwvtCsY38o="; + hash = "sha256-xtrVpRJ7Kr+qI8uR0jrCEFn9d83fcSKzP9B3kQJNz78="; }; postPatch = '' From ec65f9cfd908c1ed2adbbc122cce29830627e891 Mon Sep 17 00:00:00 2001 From: unclamped Date: Mon, 16 Oct 2023 19:38:26 -0300 Subject: [PATCH 45/45] scantailor-universal: init at 0.2.14 --- .../graphics/scantailor/universal.nix | 41 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 43 insertions(+) create mode 100644 pkgs/applications/graphics/scantailor/universal.nix diff --git a/pkgs/applications/graphics/scantailor/universal.nix b/pkgs/applications/graphics/scantailor/universal.nix new file mode 100644 index 000000000000..31d5c6ca6570 --- /dev/null +++ b/pkgs/applications/graphics/scantailor/universal.nix @@ -0,0 +1,41 @@ +{ lib +, stdenv +, mkDerivation +, fetchFromGitHub +, cmake +, qtbase +, qttools +, wrapQtAppsHook +, zlib +, openjpeg +, libjpeg_turbo +, libpng +, libtiff +, boost +, libcanberra +}: + +stdenv.mkDerivation rec { + pname = "scantailor-universal"; + version = "0.2.14"; + + src = fetchFromGitHub { + owner = "trufanov-nok"; + repo = pname; + rev = version; + fetchSubmodules = true; + hash = "sha256-n8NbokK+U0FAuYXtjRJcxlI1XAmI4hk5zV3sF86hB/s="; + }; + + buildInputs = [ qtbase zlib libjpeg_turbo libpng libtiff boost libcanberra openjpeg ]; + nativeBuildInputs = [ cmake wrapQtAppsHook qttools ]; + + meta = with lib; { + description = "Interactive post-processing tool for scanned pages"; + homepage = "https://github.com/trufanov-nok/scantailor"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ unclamped ]; + platforms = platforms.unix; + mainProgram = "scantailor-universal-cli"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ad3a3d781f2f..df6bdea4246c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -35199,6 +35199,8 @@ with pkgs; scantailor-advanced = libsForQt5.callPackage ../applications/graphics/scantailor/advanced.nix { }; + scantailor-universal = libsForQt5.callPackage ../applications/graphics/scantailor/universal.nix { }; + sc-im = callPackage ../applications/misc/sc-im { }; scite = callPackage ../applications/editors/scite { };