Merge master into staging-next

This commit is contained in:
github-actions[bot] 2023-10-17 00:02:14 +00:00 committed by GitHub
commit 8c62479810
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
39 changed files with 541 additions and 145 deletions

View file

@ -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](../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.

View file

@ -109,7 +109,13 @@ rec {
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.
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
@ -118,68 +124,100 @@ 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, pkgsText? :: 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; }
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 (a specific version of nixpkgs or a subset)
# 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:
{
# 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,
# 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;
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 pkgs") pkgs;
in {
default = defaultValue;
defaultText = literalExpression ("pkgs." + 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 "pkgs." + concatStringsSep "." example else example);
(if isList example then "${pkgsText}." + concatStringsSep "." example else example);
});
/* Alias of mkPackageOption. Previously used to create options with markdown

View file

@ -227,8 +227,16 @@ 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
checkConfigOutput '^"myPkgs\.hello"$' options.packageWithPkgsText.defaultText.text ./declare-mkPackageOption.nix
checkConfigOutput '^"hello-other"$' options.packageFromOtherSet.default.pname ./declare-mkPackageOption.nix
# submoduleWith

View file

@ -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,17 @@ in {
nullable = true;
default = null;
};
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" { };
};
}

View file

@ -18062,6 +18062,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";

View file

@ -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

View file

@ -72,13 +72,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";
@ -86,33 +85,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 = [
@ -396,6 +389,49 @@ 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. 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 = "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-<worker name>` for `matrix-synapse-worker-<worker name>.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 ''
@ -993,6 +1029,8 @@ in {
# default them, so they are additive
services.matrix-synapse.extras = defaultExtras;
services.matrix-synapse.log = mapAttrsRecursive (const mkDefault) defaultCommonLogConfig;
users.users.matrix-synapse = {
group = "matrix-synapse";
home = cfg.dataDir;

View file

@ -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;
};
};
};
}

View file

@ -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 {};

28
nixos/tests/deconz.nix Normal file
View file

@ -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}")
'';
})

View file

@ -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 <stack>" 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 = {

View file

@ -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";
};
}

View file

@ -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 = ''

View file

@ -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;

View file

@ -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;
};
}
})

View file

@ -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;
@ -582,6 +583,8 @@ in with passthru; stdenv.mkDerivation {
nativeBuildInputs = with pkgsBuildBuild.python3.pkgs; [ sphinxHook python_docs_theme ];
};
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
};
enableParallelBuilding = true;
@ -607,8 +610,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;
};
}
})

View file

@ -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; };
};

View file

@ -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;
};
}
})

View file

@ -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";

View file

@ -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 ];
};
}
})

View file

@ -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;
};
}
})

View file

@ -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 ];
};
}
})

View file

@ -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;
};
}
})

View file

@ -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 = [

View file

@ -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" ];
};
}
})

View file

@ -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 = [

View file

@ -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 = ''

View file

@ -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 = [

View file

@ -13,14 +13,17 @@
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "w1thermsensor";
version = "2.0.0";
format = "pyproject";
version = "2.3.0";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-EcaEr4B8icbwZu2Ty3z8AAgglf74iZ5BLpLnSOZC2cE=";
hash = "sha256-n7wK4N1mzZtUxtYu17qyuI4UjJh/59UGD0dvkOgcInA=";
};
postPatch = ''
@ -32,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;
@ -45,11 +53,7 @@ buildPythonPackage rec {
pytestCheckHook
] ++ lib.optionals (pythonOlder "3.11") [
tomli
];
# Tests for 2.0.0 currently fail on python3.11
# https://github.com/timofurrer/w1thermsensor/issues/116
doCheck = pythonOlder "3.11";
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
pythonImportsCheck = [
"w1thermsensor"
@ -63,6 +67,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;

View file

@ -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 = [

View file

@ -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 = [

View file

@ -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 = ''

View file

@ -11,6 +11,7 @@
, makeWrapper
, gzip
, gnutar
, nixosTests
}:
stdenv.mkDerivation rec {
@ -73,11 +74,17 @@ 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";
license = licenses.unfree;
platforms = with platforms; linux;
platforms = with platforms; [ "x86_64-linux" ];
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
maintainers = with maintainers; [ bjornfor ];
mainProgram = "deCONZ";
};
}

View file

@ -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}";

View file

@ -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;
};
};
}

View file

@ -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";
};
}
})

View file

@ -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 ];

View file

@ -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";

View file

@ -35212,6 +35212,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 { };