Merge master into staging-next

Changed files
+541 -145
doc
lib
maintainers
nixos
modules
services
matrix
networking
tests
pkgs
applications
emulators
emulationstation
graphics
scantailor
networking
instant-messengers
signalbackup-tools
p2p
gnunet
by-name
co
cowsql
development
interpreters
python
cpython
libraries
geos
gsasl
libicns
libidn
libpng
libsass
pdfhummus
taglib
python-modules
devito
scikit-build-core
tskit
w1thermsensor
west
zigpy-xbee
zigpy-znp
servers
deconz
sql
postgresql
shells
tools
misc
file
kak-lsp
security
mktemp
top-level
+1
doc/README.md
···
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.
+64 -26
lib/options.nix
···
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
···
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
+8
lib/tests/modules.sh
···
# 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
+34
lib/tests/modules/declare-mkPackageOption.nix
···
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;
};
···
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" { };
};
}
+10
maintainers/maintainer-list.nix
···
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";
+1
nixos/modules/module-list.nix
···
./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
+60 -22
nixos/modules/services/matrix/synapse.nix
···
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";
···
};
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 = [
···
description = lib.mdDoc ''
The directory where matrix-synapse stores its stateful data such as
certificates, media and uploads.
+
'';
+
};
+
+
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.
'';
};
···
# 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";
+125
nixos/modules/services/networking/deconz.nix
···
+
{ 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;
+
};
+
};
+
};
+
}
+1
nixos/tests/all-tests.nix
···
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
···
+
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}")
+
'';
+
})
+9 -18
pkgs/applications/emulators/emulationstation/default.nix
···
{ 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 = {
+41
pkgs/applications/graphics/scantailor/universal.nix
···
+
{ 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";
+
};
+
}
+2 -2
pkgs/applications/networking/instant-messengers/signalbackup-tools/default.nix
···
(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 = ''
+2 -2
pkgs/applications/networking/p2p/gnunet/default.nix
···
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;
+4 -4
pkgs/by-name/co/cowsql/package.nix
···
, 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=";
};
···
maintainers = with maintainers; [ adamcstephens ];
platforms = platforms.unix;
};
-
}
+
})
+6 -2
pkgs/development/interpreters/python/cpython/default.nix
···
, 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
···
'';
execSuffix = stdenv.hostPlatform.extensions.executable;
-
in with passthru; stdenv.mkDerivation {
+
in with passthru; stdenv.mkDerivation (finalAttrs: {
pname = "python3";
inherit src version;
···
nativeBuildInputs = with pkgsBuildBuild.python3.pkgs; [ sphinxHook python_docs_theme ];
};
+
+
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
};
enableParallelBuilding = true;
···
high level dynamic data types.
'';
license = licenses.psfl;
+
pkgConfigModules = [ "python3" ];
platforms = platforms.linux ++ platforms.darwin ++ platforms.windows;
maintainers = with maintainers; [ fridh ];
mainProgram = executable;
};
-
}
+
})
+1 -1
pkgs/development/libraries/geos/default.nix
···
doCheck = true;
passthru.tests = {
-
pkg-config = testers.hasPkgConfigModules { package = finalAttrs.finalPackage; };
+
pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
geos = callPackage ./tests.nix { geos = finalAttrs.finalPackage; };
};
+9 -4
pkgs/development/libraries/gsasl/default.nix
···
-
{ 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=";
};
···
export LOCALDOMAIN="dummydomain"
'';
doCheck = !stdenv.hostPlatform.isDarwin;
+
+
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = {
description = "GNU SASL, Simple Authentication and Security Layer library";
···
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ shlevy ];
+
pkgConfigModules = [ "libgsasl" ];
platforms = lib.platforms.all;
};
-
}
+
})
+1 -1
pkgs/development/libraries/libicns/default.nix
···
stdenv.mkDerivation {
pname = "libicns";
-
version = "unstable-2022-04-10";
+
version = "0.8.1-unstable-2022-04-10";
src = fetchgit {
name = "libicns";
+9 -4
pkgs/development/libraries/libidn/default.nix
···
-
{ 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=";
};
···
hardeningDisable = [ "format" ];
buildInputs = lib.optional stdenv.isDarwin libiconv;
+
+
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = {
homepage = "https://www.gnu.org/software/libidn/";
···
'';
license = lib.licenses.lgpl2Plus;
+
pkgConfigModules = [ "libidn" ];
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ lsix ];
};
-
}
+
})
+13 -6
pkgs/development/libraries/libpng/12.nix
···
-
{ 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";
};
outputs = [ "out" "dev" "man" ];
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;
};
-
}
+
})
+12 -5
pkgs/development/libraries/libpng/default.nix
···
-
{ lib, stdenv, fetchurl, zlib, apngSupport ? true }:
+
{ lib, stdenv, fetchurl, zlib, apngSupport ? true
+
, testers
+
}:
assert zlib != null;
···
};
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";
···
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 ];
};
-
}
+
})
+11 -6
pkgs/development/libraries/libsass/default.nix
···
-
{ 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.
···
};
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;
};
-
}
+
})
+2 -2
pkgs/development/libraries/pdfhummus/default.nix
···
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 = [
+7 -3
pkgs/development/libraries/taglib/default.nix
···
, 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=";
};
···
"-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";
···
'';
license = with licenses; [ lgpl3 mpl11 ];
maintainers = with maintainers; [ ttuegel ];
+
pkgConfigModules = [ "taglib" "taglib_c" ];
};
-
}
+
})
+2 -2
pkgs/development/python-modules/devito/default.nix
···
buildPythonPackage rec {
pname = "devito";
-
version = "4.8.2";
+
version = "4.8.3";
format = "setuptools";
disabled = pythonOlder "3.7";
···
owner = "devitocodes";
repo = "devito";
rev = "refs/tags/v${version}";
-
hash = "sha256-zckFU9Q5Rpj0TPeT96lXfR/yp2SYrV4sjAjqN/y8GDw=";
+
hash = "sha256-g9rRJF1JrZ6+s3tj4RZHuGOjt5LJjtK9I5CJmq4CJL4=";
};
pythonRemoveDeps = [
+2 -2
pkgs/development/python-modules/scikit-build-core/default.nix
···
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 = ''
+2 -2
pkgs/development/python-modules/tskit/default.nix
···
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 = [
+14 -9
pkgs/development/python-modules/w1thermsensor/default.nix
···
, 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 = ''
···
];
propagatedBuildInputs = [
-
aiofiles
click
];
+
passthru.optional-dependencies = {
+
async = [
+
aiofiles
+
];
+
};
+
# Don't try to load the kernel module in tests.
env.W1THERMSENSOR_NO_KERNEL_MODULE = 1;
···
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"
···
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;
+2 -2
pkgs/development/python-modules/west/default.nix
···
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 = [
+2 -2
pkgs/development/python-modules/zigpy-xbee/default.nix
···
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
···
owner = "zigpy";
repo = "zigpy-xbee";
rev = "refs/tags/${version}";
-
hash = "sha256-+qtbOC3rsse57kqd4RLl9EKXzru0vdgIIPSl1OQ652U=";
+
hash = "sha256-KUXXOySuPFNKcW3O08FBYIfm4WwVjOuIF+GefmKnwl0=";
};
buildInputs = [
+2 -2
pkgs/development/python-modules/zigpy-znp/default.nix
···
buildPythonPackage rec {
pname = "zigpy-znp";
-
version = "0.11.5";
+
version = "0.11.6";
format = "setuptools";
disabled = pythonOlder "3.7";
···
owner = "zigpy";
repo = pname;
rev = "refs/tags/v${version}";
-
hash = "sha256-Ti8H9FC8/xYS4je+d7EgRmDvBTmlOdiWUbuX+cbE2hY=";
+
hash = "sha256-K85AmksP/dXKL4DQKadyvjK7y5x6yEgc6vDJAPfblTw=";
};
postPatch = ''
+8 -1
pkgs/servers/deconz/default.nix
···
, makeWrapper
, gzip
, gnutar
+
, nixosTests
}:
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";
};
}
+8 -5
pkgs/servers/sql/postgresql/default.nix
···
, version, hash, psqlSchema
# for tests
-
, nixosTests, thisAttr
+
, testers, nixosTests, thisAttr
# JIT
, jitSupport ? false
···
lz4Enabled = atLeast "14";
zstdEnabled = atLeast "15";
+
pname = "postgresql";
+
stdenv' = if jitSupport then llvmPackages.stdenv else stdenv;
-
in stdenv'.mkDerivation rec {
-
pname = "postgresql";
-
inherit version;
+
in stdenv'.mkDerivation (finalAttrs: {
+
inherit pname version;
src = fetchurl {
url = "mirror://postgresql/source/v${version}/${pname}-${version}.tar.bz2";
···
tests = {
postgresql = nixosTests.postgresql-wal-receiver.${thisAttr};
+
pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
} // lib.optionalAttrs jitSupport {
postgresql-jit = nixosTests.postgresql-jit.${thisAttr};
};
···
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
···
# 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}";
+6 -1
pkgs/shells/zsh/default.nix
···
, ncurses
, pcre
, pkg-config
-
, buildPackages }:
+
, buildPackages
+
, nixosTests
+
}:
let
version = "5.9";
···
passthru = {
shellPath = "/bin/zsh";
+
tests = {
+
inherit (nixosTests) zsh-history oh-my-zsh;
+
};
};
}
+10 -5
pkgs/tools/misc/file/default.nix
···
-
{ 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=";
};
···
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";
};
-
}
+
})
+3 -3
pkgs/tools/misc/kak-lsp/default.nix
···
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 ];
+17 -1
pkgs/tools/security/mktemp/default.nix
···
-
{ lib, stdenv, fetchurl, groff }:
+
{ lib
+
, stdenv
+
, fetchurl
+
, fetchpatch
+
, groff
+
}:
stdenv.mkDerivation rec {
pname = "mktemp";
···
# 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 "
···
url = "ftp://ftp.mktemp.org/pub/mktemp/mktemp-${version}.tar.gz";
sha256 = "0x969152znxxjbj7387xb38waslr4yv6bnj5jmhb4rpqxphvk54f";
};
+
+
enableParallelBuilding = true;
meta = with lib; {
description = "Simple tool to make temporary file handling in shells scripts safe and simple";
+2
pkgs/top-level/all-packages.nix
···
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 { };