mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-20 23:51:03 +00:00
Merge staging-next-23.11 into staging-23.11
This commit is contained in:
@@ -45,7 +45,7 @@ rec {
|
||||
else args';
|
||||
|
||||
# TODO: deprecate args.rustc in favour of args.rust after 23.05 is EOL.
|
||||
rust = assert !(args ? rust && args ? rustc); args.rust or args.rustc or {};
|
||||
rust = args.rust or args.rustc or {};
|
||||
|
||||
final = {
|
||||
# Prefer to parse `config` as it is strictly more informative.
|
||||
@@ -169,96 +169,6 @@ rec {
|
||||
# TODO: remove after 23.05 is EOL, with an error pointing to the rust.* attrs.
|
||||
rustc = args.rustc or {};
|
||||
|
||||
rust = rust // {
|
||||
# Once args.rustc.platform.target-family is deprecated and
|
||||
# removed, there will no longer be any need to modify any
|
||||
# values from args.rust.platform, so we can drop all the
|
||||
# "args ? rust" etc. checks, and merge args.rust.platform in
|
||||
# /after/.
|
||||
platform = rust.platform or {} // {
|
||||
# https://doc.rust-lang.org/reference/conditional-compilation.html#target_arch
|
||||
arch =
|
||||
/**/ if rust ? platform then rust.platform.arch
|
||||
else if final.isAarch32 then "arm"
|
||||
else if final.isMips64 then "mips64" # never add "el" suffix
|
||||
else if final.isPower64 then "powerpc64" # never add "le" suffix
|
||||
else final.parsed.cpu.name;
|
||||
|
||||
# https://doc.rust-lang.org/reference/conditional-compilation.html#target_os
|
||||
os =
|
||||
/**/ if rust ? platform then rust.platform.os or "none"
|
||||
else if final.isDarwin then "macos"
|
||||
else final.parsed.kernel.name;
|
||||
|
||||
# https://doc.rust-lang.org/reference/conditional-compilation.html#target_family
|
||||
target-family =
|
||||
/**/ if args ? rust.platform.target-family then args.rust.platform.target-family
|
||||
else if args ? rustc.platform.target-family
|
||||
then
|
||||
(
|
||||
# Since https://github.com/rust-lang/rust/pull/84072
|
||||
# `target-family` is a list instead of single value.
|
||||
let
|
||||
f = args.rustc.platform.target-family;
|
||||
in
|
||||
if builtins.isList f then f else [ f ]
|
||||
)
|
||||
else lib.optional final.isUnix "unix"
|
||||
++ lib.optional final.isWindows "windows";
|
||||
|
||||
# https://doc.rust-lang.org/reference/conditional-compilation.html#target_vendor
|
||||
vendor = let
|
||||
inherit (final.parsed) vendor;
|
||||
in rust.platform.vendor or {
|
||||
"w64" = "pc";
|
||||
}.${vendor.name} or vendor.name;
|
||||
};
|
||||
|
||||
# The name of the rust target, even if it is custom. Adjustments are
|
||||
# because rust has slightly different naming conventions than we do.
|
||||
rustcTarget = let
|
||||
inherit (final.parsed) cpu kernel abi;
|
||||
cpu_ = rust.platform.arch or {
|
||||
"armv7a" = "armv7";
|
||||
"armv7l" = "armv7";
|
||||
"armv6l" = "arm";
|
||||
"armv5tel" = "armv5te";
|
||||
"riscv64" = "riscv64gc";
|
||||
}.${cpu.name} or cpu.name;
|
||||
vendor_ = final.rust.platform.vendor;
|
||||
in rust.config
|
||||
or "${cpu_}-${vendor_}-${kernel.name}${lib.optionalString (abi.name != "unknown") "-${abi.name}"}";
|
||||
|
||||
# The name of the rust target if it is standard, or the json file
|
||||
# containing the custom target spec.
|
||||
rustcTargetSpec =
|
||||
/**/ if rust ? platform
|
||||
then builtins.toFile (final.rust.rustcTarget + ".json") (builtins.toJSON rust.platform)
|
||||
else final.rust.rustcTarget;
|
||||
|
||||
# The name of the rust target if it is standard, or the
|
||||
# basename of the file containing the custom target spec,
|
||||
# without the .json extension.
|
||||
#
|
||||
# This is the name used by Cargo for target subdirectories.
|
||||
cargoShortTarget =
|
||||
lib.removeSuffix ".json" (baseNameOf "${final.rust.rustcTargetSpec}");
|
||||
|
||||
# When used as part of an environment variable name, triples are
|
||||
# uppercased and have all hyphens replaced by underscores:
|
||||
#
|
||||
# https://github.com/rust-lang/cargo/pull/9169
|
||||
# https://github.com/rust-lang/cargo/issues/8285#issuecomment-634202431
|
||||
cargoEnvVarTarget =
|
||||
lib.strings.replaceStrings ["-"] ["_"]
|
||||
(lib.strings.toUpper final.rust.cargoShortTarget);
|
||||
|
||||
# True if the target is no_std
|
||||
# https://github.com/rust-lang/rust/blob/2e44c17c12cec45b6a682b1e53a04ac5b5fcc9d2/src/bootstrap/config.rs#L415-L421
|
||||
isNoStdTarget =
|
||||
builtins.any (t: lib.hasInfix t final.rust.rustcTarget) ["-none" "nvptx" "switch" "-uefi"];
|
||||
};
|
||||
|
||||
linuxArch =
|
||||
if final.isAarch32 then "arm"
|
||||
else if final.isAarch64 then "arm64"
|
||||
@@ -356,7 +266,97 @@ rec {
|
||||
|
||||
}) // mapAttrs (n: v: v final.parsed) inspect.predicates
|
||||
// mapAttrs (n: v: v final.gcc.arch or "default") architectures.predicates
|
||||
// args;
|
||||
// args // {
|
||||
rust = rust // {
|
||||
# Once args.rustc.platform.target-family is deprecated and
|
||||
# removed, there will no longer be any need to modify any
|
||||
# values from args.rust.platform, so we can drop all the
|
||||
# "args ? rust" etc. checks, and merge args.rust.platform in
|
||||
# /after/.
|
||||
platform = rust.platform or {} // {
|
||||
# https://doc.rust-lang.org/reference/conditional-compilation.html#target_arch
|
||||
arch =
|
||||
/**/ if rust ? platform then rust.platform.arch
|
||||
else if final.isAarch32 then "arm"
|
||||
else if final.isMips64 then "mips64" # never add "el" suffix
|
||||
else if final.isPower64 then "powerpc64" # never add "le" suffix
|
||||
else final.parsed.cpu.name;
|
||||
|
||||
# https://doc.rust-lang.org/reference/conditional-compilation.html#target_os
|
||||
os =
|
||||
/**/ if rust ? platform then rust.platform.os or "none"
|
||||
else if final.isDarwin then "macos"
|
||||
else final.parsed.kernel.name;
|
||||
|
||||
# https://doc.rust-lang.org/reference/conditional-compilation.html#target_family
|
||||
target-family =
|
||||
/**/ if args ? rust.platform.target-family then args.rust.platform.target-family
|
||||
else if args ? rustc.platform.target-family
|
||||
then
|
||||
(
|
||||
# Since https://github.com/rust-lang/rust/pull/84072
|
||||
# `target-family` is a list instead of single value.
|
||||
let
|
||||
f = args.rustc.platform.target-family;
|
||||
in
|
||||
if builtins.isList f then f else [ f ]
|
||||
)
|
||||
else lib.optional final.isUnix "unix"
|
||||
++ lib.optional final.isWindows "windows";
|
||||
|
||||
# https://doc.rust-lang.org/reference/conditional-compilation.html#target_vendor
|
||||
vendor = let
|
||||
inherit (final.parsed) vendor;
|
||||
in rust.platform.vendor or {
|
||||
"w64" = "pc";
|
||||
}.${vendor.name} or vendor.name;
|
||||
};
|
||||
|
||||
# The name of the rust target, even if it is custom. Adjustments are
|
||||
# because rust has slightly different naming conventions than we do.
|
||||
rustcTarget = let
|
||||
inherit (final.parsed) cpu kernel abi;
|
||||
cpu_ = rust.platform.arch or {
|
||||
"armv7a" = "armv7";
|
||||
"armv7l" = "armv7";
|
||||
"armv6l" = "arm";
|
||||
"armv5tel" = "armv5te";
|
||||
"riscv64" = "riscv64gc";
|
||||
}.${cpu.name} or cpu.name;
|
||||
vendor_ = final.rust.platform.vendor;
|
||||
in rust.config
|
||||
or "${cpu_}-${vendor_}-${kernel.name}${lib.optionalString (abi.name != "unknown") "-${abi.name}"}";
|
||||
|
||||
# The name of the rust target if it is standard, or the json file
|
||||
# containing the custom target spec.
|
||||
rustcTargetSpec = rust.rustcTargetSpec or (
|
||||
/**/ if rust ? platform
|
||||
then builtins.toFile (final.rust.rustcTarget + ".json") (builtins.toJSON rust.platform)
|
||||
else final.rust.rustcTarget);
|
||||
|
||||
# The name of the rust target if it is standard, or the
|
||||
# basename of the file containing the custom target spec,
|
||||
# without the .json extension.
|
||||
#
|
||||
# This is the name used by Cargo for target subdirectories.
|
||||
cargoShortTarget =
|
||||
lib.removeSuffix ".json" (baseNameOf "${final.rust.rustcTargetSpec}");
|
||||
|
||||
# When used as part of an environment variable name, triples are
|
||||
# uppercased and have all hyphens replaced by underscores:
|
||||
#
|
||||
# https://github.com/rust-lang/cargo/pull/9169
|
||||
# https://github.com/rust-lang/cargo/issues/8285#issuecomment-634202431
|
||||
cargoEnvVarTarget =
|
||||
lib.strings.replaceStrings ["-"] ["_"]
|
||||
(lib.strings.toUpper final.rust.cargoShortTarget);
|
||||
|
||||
# True if the target is no_std
|
||||
# https://github.com/rust-lang/rust/blob/2e44c17c12cec45b6a682b1e53a04ac5b5fcc9d2/src/bootstrap/config.rs#L415-L421
|
||||
isNoStdTarget =
|
||||
builtins.any (t: lib.hasInfix t final.rust.rustcTarget) ["-none" "nvptx" "switch" "-uefi"];
|
||||
};
|
||||
};
|
||||
in assert final.useAndroidPrebuilt -> final.isAndroid;
|
||||
assert lib.foldl
|
||||
(pass: { assertion, message }:
|
||||
|
||||
@@ -4970,6 +4970,12 @@
|
||||
githubId = 424946;
|
||||
name = "James Earl Douglas";
|
||||
};
|
||||
EBADBEEF = {
|
||||
name = "EBADBEEF";
|
||||
email = "errno@ebadf.com";
|
||||
github = "EBADBEEF";
|
||||
githubId = 4167946;
|
||||
};
|
||||
ebbertd = {
|
||||
email = "daniel@ebbert.nrw";
|
||||
github = "ebbertd";
|
||||
|
||||
@@ -316,12 +316,21 @@
|
||||
|
||||
- The binary of the package `cloud-sql-proxy` has changed from `cloud_sql_proxy` to `cloud-sql-proxy`.
|
||||
|
||||
- The module `services.apache-kafka` was largely rewritten and has certain breaking changes. To be precise, this means that the following things have changed:
|
||||
|
||||
- Most settings have been migrated to [services.apache-kafka.settings](#opt-services.apache-kafka.settings).
|
||||
- Care must be taken when adapting an existing cluster to these changes, see [](#module-services-apache-kafka-migrating-to-settings).
|
||||
- By virtue of being less opinionated, it is now possible to use the module to run Apache Kafka in KRaft mode instead of Zookeeper mode.
|
||||
- [A few options](#module-services-apache-kafka-kraft) have been added to assist in this mode.
|
||||
|
||||
- Garage has been upgraded to 0.9.x. `services.garage.package` now needs to be explicitly set, so version upgrades can be done in a controlled fashion. For this, we expose `garage_x_y` attributes which can be set here.
|
||||
|
||||
- `voms` and `xrootd` now moves the `$out/etc` content to the `$etc` output instead of `$out/etc.orig`, when input argument `externalEtc` is not `null`.
|
||||
|
||||
- The `woodpecker-*` CI packages have been updated to 1.0.0. This release is wildly incompatible with the 0.15.X versions that were previously packaged. Please read [upstream's documentation](https://woodpecker-ci.org/docs/next/migrations#100) to learn how to update your CI configurations.
|
||||
|
||||
- Meilisearch was updated from 1.3.1 to 1.5.0. The update has breaking changes about backslashes and filtering. See the [release announcement](https://blog.meilisearch.com/v1-4-release/) for more information.
|
||||
|
||||
- The Caddy module gained a new option named `services.caddy.enableReload` which is enabled by default. It allows reloading the service instead of restarting it, if only a config file has changed. This option must be disabled if you have turned off the [Caddy admin API](https://caddyserver.com/docs/caddyfile/options#admin). If you keep this option enabled, you should consider setting [`grace_period`](https://caddyserver.com/docs/caddyfile/options#grace-period) to a non-infinite value to prevent Caddy from delaying the reload indefinitely.
|
||||
|
||||
- mdraid support is now optional. This reduces initramfs size and prevents the potentially undesired automatic detection and activation of software RAID pools. It is disabled by default in new configurations (determined by `stateVersion`), but the appropriate settings will be generated by `nixos-generate-config` when installing to a software RAID device, so the standard installation procedure should be unaffected. If you have custom configs relying on mdraid, ensure that you use `stateVersion` correctly or set `boot.swraid.enable` manually. On systems with an updated `stateVersion` we now also emit warnings if `mdadm.conf` does not contain the minimum required configuration necessary to run the dynamically enabled monitoring daemons.
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
imports =
|
||||
[
|
||||
# Include the default lxd configuration.
|
||||
"${modulesPath}/modules/virtualisation/lxc-container.nix"
|
||||
"${modulesPath}/virtualisation/lxc-container.nix"
|
||||
# Include the container-specific autogenerated configuration.
|
||||
./lxd.nix
|
||||
];
|
||||
|
||||
@@ -5,77 +5,119 @@ with lib;
|
||||
let
|
||||
cfg = config.services.apache-kafka;
|
||||
|
||||
serverProperties =
|
||||
if cfg.serverProperties != null then
|
||||
cfg.serverProperties
|
||||
else
|
||||
''
|
||||
# Generated by nixos
|
||||
broker.id=${toString cfg.brokerId}
|
||||
port=${toString cfg.port}
|
||||
host.name=${cfg.hostname}
|
||||
log.dirs=${concatStringsSep "," cfg.logDirs}
|
||||
zookeeper.connect=${cfg.zookeeper}
|
||||
${toString cfg.extraProperties}
|
||||
'';
|
||||
# The `javaProperties` generator takes care of various escaping rules and
|
||||
# generation of the properties file, but we'll handle stringly conversion
|
||||
# ourselves in mkPropertySettings and stringlySettings, since we know more
|
||||
# about the specifically allowed format eg. for lists of this type, and we
|
||||
# don't want to coerce-downsample values to str too early by having the
|
||||
# coercedTypes from javaProperties directly in our NixOS option types.
|
||||
#
|
||||
# Make sure every `freeformType` and any specific option type in `settings` is
|
||||
# supported here.
|
||||
|
||||
serverConfig = pkgs.writeText "server.properties" serverProperties;
|
||||
logConfig = pkgs.writeText "log4j.properties" cfg.log4jProperties;
|
||||
mkPropertyString = let
|
||||
render = {
|
||||
bool = boolToString;
|
||||
int = toString;
|
||||
list = concatMapStringsSep "," mkPropertyString;
|
||||
string = id;
|
||||
};
|
||||
in
|
||||
v: render.${builtins.typeOf v} v;
|
||||
|
||||
stringlySettings = mapAttrs (_: mkPropertyString)
|
||||
(filterAttrs (_: v: v != null) cfg.settings);
|
||||
|
||||
generator = (pkgs.formats.javaProperties {}).generate;
|
||||
in {
|
||||
|
||||
options.services.apache-kafka = {
|
||||
enable = mkOption {
|
||||
description = lib.mdDoc "Whether to enable Apache Kafka.";
|
||||
default = false;
|
||||
type = types.bool;
|
||||
};
|
||||
enable = mkEnableOption (lib.mdDoc "Apache Kafka event streaming broker");
|
||||
|
||||
brokerId = mkOption {
|
||||
description = lib.mdDoc "Broker ID.";
|
||||
default = -1;
|
||||
type = types.int;
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
description = lib.mdDoc "Port number the broker should listen on.";
|
||||
default = 9092;
|
||||
type = types.port;
|
||||
};
|
||||
|
||||
hostname = mkOption {
|
||||
description = lib.mdDoc "Hostname the broker should bind to.";
|
||||
default = "localhost";
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
logDirs = mkOption {
|
||||
description = lib.mdDoc "Log file directories";
|
||||
default = [ "/tmp/kafka-logs" ];
|
||||
type = types.listOf types.path;
|
||||
};
|
||||
|
||||
zookeeper = mkOption {
|
||||
description = lib.mdDoc "Zookeeper connection string";
|
||||
default = "localhost:2181";
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
extraProperties = mkOption {
|
||||
description = lib.mdDoc "Extra properties for server.properties.";
|
||||
type = types.nullOr types.lines;
|
||||
default = null;
|
||||
};
|
||||
|
||||
serverProperties = mkOption {
|
||||
settings = mkOption {
|
||||
description = lib.mdDoc ''
|
||||
Complete server.properties content. Other server.properties config
|
||||
options will be ignored if this option is used.
|
||||
[Kafka broker configuration](https://kafka.apache.org/documentation.html#brokerconfigs)
|
||||
{file}`server.properties`.
|
||||
|
||||
Note that .properties files contain mappings from string to string.
|
||||
Keys with dots are NOT represented by nested attrs in these settings,
|
||||
but instead as quoted strings (ie. `settings."broker.id"`, NOT
|
||||
`settings.broker.id`).
|
||||
'';
|
||||
type = types.submodule {
|
||||
freeformType = with types; let
|
||||
primitive = oneOf [bool int str];
|
||||
in lazyAttrsOf (nullOr (either primitive (listOf primitive)));
|
||||
|
||||
options = {
|
||||
"broker.id" = mkOption {
|
||||
description = lib.mdDoc "Broker ID. -1 or null to auto-allocate in zookeeper mode.";
|
||||
default = null;
|
||||
type = with types; nullOr int;
|
||||
};
|
||||
|
||||
"log.dirs" = mkOption {
|
||||
description = lib.mdDoc "Log file directories.";
|
||||
# Deliberaly leave out old default and use the rewrite opportunity
|
||||
# to have users choose a safer value -- /tmp might be volatile and is a
|
||||
# slightly scary default choice.
|
||||
# default = [ "/tmp/apache-kafka" ];
|
||||
type = with types; listOf path;
|
||||
};
|
||||
|
||||
"listeners" = mkOption {
|
||||
description = lib.mdDoc ''
|
||||
Kafka Listener List.
|
||||
See [listeners](https://kafka.apache.org/documentation/#brokerconfigs_listeners).
|
||||
'';
|
||||
type = types.listOf types.str;
|
||||
default = [ "PLAINTEXT://localhost:9092" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
clusterId = mkOption {
|
||||
description = lib.mdDoc ''
|
||||
KRaft mode ClusterId used for formatting log directories. Can be generated with `kafka-storage.sh random-uuid`
|
||||
'';
|
||||
type = types.nullOr types.lines;
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
};
|
||||
|
||||
configFiles.serverProperties = mkOption {
|
||||
description = lib.mdDoc ''
|
||||
Kafka server.properties configuration file path.
|
||||
Defaults to the rendered `settings`.
|
||||
'';
|
||||
type = types.path;
|
||||
};
|
||||
|
||||
configFiles.log4jProperties = mkOption {
|
||||
description = lib.mdDoc "Kafka log4j property configuration file path";
|
||||
type = types.path;
|
||||
default = pkgs.writeText "log4j.properties" cfg.log4jProperties;
|
||||
defaultText = ''pkgs.writeText "log4j.properties" cfg.log4jProperties'';
|
||||
};
|
||||
|
||||
formatLogDirs = mkOption {
|
||||
description = lib.mdDoc ''
|
||||
Whether to format log dirs in KRaft mode if all log dirs are
|
||||
unformatted, ie. they contain no meta.properties.
|
||||
'';
|
||||
type = types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
formatLogDirsIgnoreFormatted = mkOption {
|
||||
description = lib.mdDoc ''
|
||||
Whether to ignore already formatted log dirs when formatting log dirs,
|
||||
instead of failing. Useful when replacing or adding disks.
|
||||
'';
|
||||
type = types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
log4jProperties = mkOption {
|
||||
description = lib.mdDoc "Kafka log4j property configuration.";
|
||||
default = ''
|
||||
@@ -112,40 +154,70 @@ in {
|
||||
defaultText = literalExpression "pkgs.apacheKafka.passthru.jre";
|
||||
type = types.package;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
imports = [
|
||||
(mkRenamedOptionModule
|
||||
[ "services" "apache-kafka" "brokerId" ]
|
||||
[ "services" "apache-kafka" "settings" ''broker.id'' ])
|
||||
(mkRenamedOptionModule
|
||||
[ "services" "apache-kafka" "logDirs" ]
|
||||
[ "services" "apache-kafka" "settings" ''log.dirs'' ])
|
||||
(mkRenamedOptionModule
|
||||
[ "services" "apache-kafka" "zookeeper" ]
|
||||
[ "services" "apache-kafka" "settings" ''zookeeper.connect'' ])
|
||||
|
||||
environment.systemPackages = [cfg.package];
|
||||
(mkRemovedOptionModule [ "services" "apache-kafka" "port" ]
|
||||
"Please see services.apache-kafka.settings.listeners and its documentation instead")
|
||||
(mkRemovedOptionModule [ "services" "apache-kafka" "hostname" ]
|
||||
"Please see services.apache-kafka.settings.listeners and its documentation instead")
|
||||
(mkRemovedOptionModule [ "services" "apache-kafka" "extraProperties" ]
|
||||
"Please see services.apache-kafka.settings and its documentation instead")
|
||||
(mkRemovedOptionModule [ "services" "apache-kafka" "serverProperties" ]
|
||||
"Please see services.apache-kafka.settings and its documentation instead")
|
||||
];
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.apache-kafka.configFiles.serverProperties = generator "server.properties" stringlySettings;
|
||||
|
||||
users.users.apache-kafka = {
|
||||
isSystemUser = true;
|
||||
group = "apache-kafka";
|
||||
description = "Apache Kafka daemon user";
|
||||
home = head cfg.logDirs;
|
||||
};
|
||||
users.groups.apache-kafka = {};
|
||||
|
||||
systemd.tmpfiles.rules = map (logDir: "d '${logDir}' 0700 apache-kafka - - -") cfg.logDirs;
|
||||
systemd.tmpfiles.rules = map (logDir: "d '${logDir}' 0700 apache-kafka - - -") cfg.settings."log.dirs";
|
||||
|
||||
systemd.services.apache-kafka = {
|
||||
description = "Apache Kafka Daemon";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
preStart = mkIf cfg.formatLogDirs
|
||||
(if cfg.formatLogDirsIgnoreFormatted then ''
|
||||
${cfg.package}/bin/kafka-storage.sh format -t "${cfg.clusterId}" -c ${cfg.configFiles.serverProperties} --ignore-formatted
|
||||
'' else ''
|
||||
if ${concatMapStringsSep " && " (l: ''[ ! -f "${l}/meta.properties" ]'') cfg.settings."log.dirs"}; then
|
||||
${cfg.package}/bin/kafka-storage.sh format -t "${cfg.clusterId}" -c ${cfg.configFiles.serverProperties}
|
||||
fi
|
||||
'');
|
||||
serviceConfig = {
|
||||
ExecStart = ''
|
||||
${cfg.jre}/bin/java \
|
||||
-cp "${cfg.package}/libs/*" \
|
||||
-Dlog4j.configuration=file:${logConfig} \
|
||||
-Dlog4j.configuration=file:${cfg.configFiles.log4jProperties} \
|
||||
${toString cfg.jvmOptions} \
|
||||
kafka.Kafka \
|
||||
${serverConfig}
|
||||
${cfg.configFiles.serverProperties}
|
||||
'';
|
||||
User = "apache-kafka";
|
||||
SuccessExitStatus = "0 143";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
meta.doc = ./kafka.md;
|
||||
meta.maintainers = with lib.maintainers; [
|
||||
srhb
|
||||
];
|
||||
}
|
||||
|
||||
63
nixos/modules/services/misc/kafka.md
Normal file
63
nixos/modules/services/misc/kafka.md
Normal file
@@ -0,0 +1,63 @@
|
||||
# Apache Kafka {#module-services-apache-kafka}
|
||||
|
||||
[Apache Kafka](https://kafka.apache.org/) is an open-source distributed event
|
||||
streaming platform
|
||||
|
||||
## Basic Usage {#module-services-apache-kafka-basic-usage}
|
||||
|
||||
The Apache Kafka service is configured almost exclusively through its
|
||||
[settings](#opt-services.apache-kafka.settings) option, with each attribute
|
||||
corresponding to the [upstream configuration
|
||||
manual](https://kafka.apache.org/documentation/#configuration) broker settings.
|
||||
|
||||
## KRaft {#module-services-apache-kafka-kraft}
|
||||
|
||||
Unlike in Zookeeper mode, Kafka in
|
||||
[KRaft](https://kafka.apache.org/documentation/#kraft) mode requires each log
|
||||
dir to be "formatted" (which means a cluster-specific a metadata file must
|
||||
exist in each log dir)
|
||||
|
||||
The upstream intention is for users to execute the [storage
|
||||
tool](https://kafka.apache.org/documentation/#kraft_storage) to achieve this,
|
||||
but this module contains a few extra options to automate this:
|
||||
|
||||
- [](#opt-services.apache-kafka.clusterId)
|
||||
- [](#opt-services.apache-kafka.formatLogDirs)
|
||||
- [](#opt-services.apache-kafka.formatLogDirsIgnoreFormatted)
|
||||
|
||||
## Migrating to settings {#module-services-apache-kafka-migrating-to-settings}
|
||||
|
||||
Migrating a cluster to the new `settings`-based changes requires adapting removed options to the corresponding upstream settings.
|
||||
|
||||
This means that the upstream [Broker Configs documentation](https://kafka.apache.org/documentation/#brokerconfigs) should be followed closely.
|
||||
|
||||
Note that dotted options in the upstream docs do _not_ correspond to nested Nix attrsets, but instead as quoted top level `settings` attributes, as in `services.apache-kafka.settings."broker.id"`, *NOT* `services.apache-kafka.settings.broker.id`.
|
||||
|
||||
Care should be taken, especially when migrating clusters from the old module, to ensure that the same intended configuration is reproduced faithfully via `settings`.
|
||||
|
||||
To assist in the comparison, the final config can be inspected by building the config file itself, ie. with: `nix-build <nixpkgs/nixos> -A config.services.apache-kafka.configFiles.serverProperties`.
|
||||
|
||||
Notable changes to be aware of include:
|
||||
|
||||
- Removal of `services.apache-kafka.extraProperties` and `services.apache-kafka.serverProperties`
|
||||
- Translate using arbitrary properties using [](#opt-services.apache-kafka.settings)
|
||||
- [Upstream docs](https://kafka.apache.org/documentation.html#brokerconfigs)
|
||||
- The intention is for all broker properties to be fully representable via [](#opt-services.apache-kafka.settings).
|
||||
- If this is not the case, please do consider raising an issue.
|
||||
- Until it can be remedied, you *can* bail out by using [](#opt-services.apache-kafka.configFiles.serverProperties) to the path of a fully rendered properties file.
|
||||
|
||||
- Removal of `services.apache-kafka.hostname` and `services.apache-kafka.port`
|
||||
- Translate using: `services.apache-kafka.settings.listeners`
|
||||
- [Upstream docs](https://kafka.apache.org/documentation.html#brokerconfigs_listeners)
|
||||
|
||||
- Removal of `services.apache-kafka.logDirs`
|
||||
- Translate using: `services.apache-kafka.settings."log.dirs"`
|
||||
- [Upstream docs](https://kafka.apache.org/documentation.html#brokerconfigs_log.dirs)
|
||||
|
||||
- Removal of `services.apache-kafka.brokerId`
|
||||
- Translate using: `services.apache-kafka.settings."broker.id"`
|
||||
- [Upstream docs](https://kafka.apache.org/documentation.html#brokerconfigs_broker.id)
|
||||
|
||||
- Removal of `services.apache-kafka.zookeeper`
|
||||
- Translate using: `services.apache-kafka.settings."zookeeper.connect"`
|
||||
- [Upstream docs](https://kafka.apache.org/documentation.html#brokerconfigs_zookeeper.connect)
|
||||
@@ -378,7 +378,7 @@ in
|
||||
LogsDirectory = mkIf (cfg.logDir == "/var/log/caddy") [ "caddy" ];
|
||||
Restart = "on-failure";
|
||||
RestartPreventExitStatus = 1;
|
||||
RestartSecs = "5s";
|
||||
RestartSec = "5s";
|
||||
|
||||
# TODO: attempt to upstream these options
|
||||
NoNewPrivileges = true;
|
||||
|
||||
@@ -6,13 +6,62 @@
|
||||
with pkgs.lib;
|
||||
|
||||
let
|
||||
makeKafkaTest = name: kafkaPackage: (import ./make-test-python.nix ({
|
||||
makeKafkaTest = name: { kafkaPackage, mode ? "zookeeper" }: (import ./make-test-python.nix ({
|
||||
inherit name;
|
||||
meta = with pkgs.lib.maintainers; {
|
||||
maintainers = [ nequissimus ];
|
||||
};
|
||||
|
||||
nodes = {
|
||||
kafka = { ... }: {
|
||||
services.apache-kafka = mkMerge [
|
||||
({
|
||||
enable = true;
|
||||
package = kafkaPackage;
|
||||
settings = {
|
||||
"offsets.topic.replication.factor" = 1;
|
||||
"log.dirs" = [
|
||||
"/var/lib/kafka/logdir1"
|
||||
"/var/lib/kafka/logdir2"
|
||||
];
|
||||
};
|
||||
})
|
||||
(mkIf (mode == "zookeeper") {
|
||||
settings = {
|
||||
"zookeeper.session.timeout.ms" = 600000;
|
||||
"zookeeper.connect" = [ "zookeeper1:2181" ];
|
||||
};
|
||||
})
|
||||
(mkIf (mode == "kraft") {
|
||||
clusterId = "ak2fIHr4S8WWarOF_ODD0g";
|
||||
formatLogDirs = true;
|
||||
settings = {
|
||||
"node.id" = 1;
|
||||
"process.roles" = [
|
||||
"broker"
|
||||
"controller"
|
||||
];
|
||||
"listeners" = [
|
||||
"PLAINTEXT://:9092"
|
||||
"CONTROLLER://:9093"
|
||||
];
|
||||
"listener.security.protocol.map" = [
|
||||
"PLAINTEXT:PLAINTEXT"
|
||||
"CONTROLLER:PLAINTEXT"
|
||||
];
|
||||
"controller.quorum.voters" = [
|
||||
"1@kafka:9093"
|
||||
];
|
||||
"controller.listener.names" = [ "CONTROLLER" ];
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 9092 9093 ];
|
||||
# i686 tests: qemu-system-i386 can simulate max 2047MB RAM (not 2048)
|
||||
virtualisation.memorySize = 2047;
|
||||
};
|
||||
} // optionalAttrs (mode == "zookeeper") {
|
||||
zookeeper1 = { ... }: {
|
||||
services.zookeeper = {
|
||||
enable = true;
|
||||
@@ -20,29 +69,16 @@ let
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 2181 ];
|
||||
};
|
||||
kafka = { ... }: {
|
||||
services.apache-kafka = {
|
||||
enable = true;
|
||||
extraProperties = ''
|
||||
offsets.topic.replication.factor = 1
|
||||
zookeeper.session.timeout.ms = 600000
|
||||
'';
|
||||
package = kafkaPackage;
|
||||
zookeeper = "zookeeper1:2181";
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 9092 ];
|
||||
# i686 tests: qemu-system-i386 can simulate max 2047MB RAM (not 2048)
|
||||
virtualisation.memorySize = 2047;
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
start_all()
|
||||
|
||||
${optionalString (mode == "zookeeper") ''
|
||||
zookeeper1.wait_for_unit("default.target")
|
||||
zookeeper1.wait_for_unit("zookeeper.service")
|
||||
zookeeper1.wait_for_open_port(2181)
|
||||
''}
|
||||
|
||||
kafka.wait_for_unit("default.target")
|
||||
kafka.wait_for_unit("apache-kafka.service")
|
||||
@@ -67,12 +103,13 @@ let
|
||||
}) { inherit system; });
|
||||
|
||||
in with pkgs; {
|
||||
kafka_2_8 = makeKafkaTest "kafka_2_8" apacheKafka_2_8;
|
||||
kafka_3_0 = makeKafkaTest "kafka_3_0" apacheKafka_3_0;
|
||||
kafka_3_1 = makeKafkaTest "kafka_3_1" apacheKafka_3_1;
|
||||
kafka_3_2 = makeKafkaTest "kafka_3_2" apacheKafka_3_2;
|
||||
kafka_3_3 = makeKafkaTest "kafka_3_3" apacheKafka_3_3;
|
||||
kafka_3_4 = makeKafkaTest "kafka_3_4" apacheKafka_3_4;
|
||||
kafka_3_5 = makeKafkaTest "kafka_3_5" apacheKafka_3_5;
|
||||
kafka = makeKafkaTest "kafka" apacheKafka;
|
||||
kafka_2_8 = makeKafkaTest "kafka_2_8" { kafkaPackage = apacheKafka_2_8; };
|
||||
kafka_3_0 = makeKafkaTest "kafka_3_0" { kafkaPackage = apacheKafka_3_0; };
|
||||
kafka_3_1 = makeKafkaTest "kafka_3_1" { kafkaPackage = apacheKafka_3_1; };
|
||||
kafka_3_2 = makeKafkaTest "kafka_3_2" { kafkaPackage = apacheKafka_3_2; };
|
||||
kafka_3_3 = makeKafkaTest "kafka_3_3" { kafkaPackage = apacheKafka_3_3; };
|
||||
kafka_3_4 = makeKafkaTest "kafka_3_4" { kafkaPackage = apacheKafka_3_4; };
|
||||
kafka_3_5 = makeKafkaTest "kafka_3_5" { kafkaPackage = apacheKafka_3_5; };
|
||||
kafka = makeKafkaTest "kafka" { kafkaPackage = apacheKafka; };
|
||||
kafka_kraft = makeKafkaTest "kafka_kraft" { kafkaPackage = apacheKafka; mode = "kraft"; };
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "touchosc";
|
||||
version = "1.2.4.180";
|
||||
version = "1.2.5.183";
|
||||
|
||||
suffix = {
|
||||
aarch64-linux = "linux-arm64";
|
||||
@@ -56,9 +56,9 @@ stdenv.mkDerivation rec {
|
||||
src = fetchurl {
|
||||
url = "https://hexler.net/pub/${pname}/${pname}-${version}-${suffix}.deb";
|
||||
hash = {
|
||||
aarch64-linux = "sha256-Z3vHcfimchshFTRbSsVhAw4DJPetZF59zyAnnbQ3YAM=";
|
||||
armv7l-linux = "sha256-KUA6UFenEVme0AMuE69dR13RfYSGAd9GEdikh3DS0ko=";
|
||||
x86_64-linux = "sha256-3RA+piRJ4UE4tPYALaifENJg7+0BZDmSwS36VJiEn8Q=";
|
||||
aarch64-linux = "sha256-V5615E2jVqk7CcCBbW5A0JEyEi6secC0Rj8KrQpfjns=";
|
||||
armv7l-linux = "sha256-0nyRffx8/OieVJTvJRtUIvrx5IyqmqEMMEZszPPDXb0=";
|
||||
x86_64-linux = "sha256-oV2T7l5/3JqXXoyiR3PeYJyHQe4GcDUxsi6cNxLUcng=";
|
||||
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
||||
};
|
||||
|
||||
|
||||
@@ -12,14 +12,14 @@
|
||||
|
||||
python3Packages.buildPythonPackage rec {
|
||||
pname = "hydrus";
|
||||
version = "552";
|
||||
version = "553";
|
||||
format = "other";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hydrusnetwork";
|
||||
repo = "hydrus";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-MaS9WxYlbQ7V/2mrETKS0UyWb5IzCrSwDcp4UlVS3zk=";
|
||||
hash = "sha256-AQq5ljaxNzh0ZsoUqKgzz5kZKZMav99Jj8fI+e0wv7s=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -66,7 +66,7 @@ let
|
||||
deprecatedNativeMessagingHost = option: pkg:
|
||||
if (cfg.${option} or false)
|
||||
then
|
||||
lib.warn "The cfg.${option} argument for `firefox.override` is deprecated, please add `pkgs.${pkg.pname}` to `nativeMessagingHosts` instead"
|
||||
lib.warn "The cfg.${option} argument for `firefox.override` is deprecated, please add `pkgs.${pkg.pname}` to `nativeMessagingHosts.packages` instead"
|
||||
[pkg]
|
||||
else [];
|
||||
|
||||
|
||||
@@ -26,14 +26,14 @@ let
|
||||
stripRoot = false;
|
||||
};
|
||||
|
||||
pname = "qutebrowser";
|
||||
version = "3.0.2";
|
||||
in
|
||||
|
||||
python3.pkgs.buildPythonApplication {
|
||||
inherit pname version;
|
||||
pname = "qutebrowser" + lib.optionalString (!isQt6) "-qt5";
|
||||
inherit version;
|
||||
src = fetchurl {
|
||||
url = "https://github.com/qutebrowser/qutebrowser/releases/download/v${version}/${pname}-${version}.tar.gz";
|
||||
url = "https://github.com/qutebrowser/qutebrowser/releases/download/v${version}/qutebrowser-${version}.tar.gz";
|
||||
hash = "sha256-pRiT3koSNRmvuDcjuc7SstmPTKUoUnjIHpvdqR7VvFE=";
|
||||
};
|
||||
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "kyverno";
|
||||
version = "1.10.4";
|
||||
version = "1.10.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kyverno";
|
||||
repo = "kyverno";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-Qcy+LGvoDJZ+zpIJvC8P0c5pl6GpiDuq7sWdrdMojmg=";
|
||||
sha256 = "sha256-APv9Z8cxcG283sEvC3/xwNMXStytM2dr/pemTES0Ltk=";
|
||||
};
|
||||
|
||||
ldflags = [
|
||||
@@ -18,7 +18,7 @@ buildGoModule rec {
|
||||
"-X github.com/kyverno/kyverno/pkg/version.BuildTime=1970-01-01_00:00:00"
|
||||
];
|
||||
|
||||
vendorHash = "sha256-6JM5r/MUETmlMB/8Z82mpUe8bAym9ekb1HL24ik2OlE=";
|
||||
vendorHash = "sha256-R2810TRxKDPOBfdCSNFJ4425tHQC6R4d5Xltd7jK2V8=";
|
||||
|
||||
subPackages = [ "cmd/cli/kubectl-kyverno" ];
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{ callPackage }: builtins.mapAttrs (pname: attrs: callPackage ./generic.nix (attrs // { inherit pname; })) {
|
||||
signal-desktop = {
|
||||
dir = "Signal";
|
||||
version = "6.39.0";
|
||||
hash = "sha256-cG8ZFWpx92haTgMkpMMcFDV0OB7lmU540g9fNj4ofy8=";
|
||||
version = "6.39.1";
|
||||
hash = "sha256-dDbUpxXpQg1SoVyYO33Nczqf+WmWDPNE6cmw792wjGY=";
|
||||
};
|
||||
signal-desktop-beta = {
|
||||
dir = "Signal Beta";
|
||||
version = "6.40.0-beta.1";
|
||||
hash = "sha256-daXh1Uh2lHw0NA/j7qhQK7nrVljbr/fP2iLjcqnuvns=";
|
||||
version = "6.40.0-beta.2";
|
||||
hash = "sha256-pfedkxbZ25DFgz+/N7ZEb9LwKrHuoMM+Zi+Tc21QPsg=";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -48,6 +48,11 @@ stdenv.mkDerivation rec {
|
||||
"-DUSE_GITHASH=OFF"
|
||||
];
|
||||
|
||||
# Work around https://github.com/NixOS/nixpkgs/issues/166205.
|
||||
env = lib.optionalAttrs stdenv.cc.isClang {
|
||||
NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Automatic and interactive theorem prover";
|
||||
homepage = "https://leanprover.github.io/";
|
||||
|
||||
20
pkgs/by-name/zx/zxtune/disable_updates.patch
Normal file
20
pkgs/by-name/zx/zxtune/disable_updates.patch
Normal file
@@ -0,0 +1,20 @@
|
||||
--- ./apps/zxtune-qt/ui/desktop/mainwindow.cpp.orig 2023-11-03 10:58:54.073651511 -0700
|
||||
+++ ./apps/zxtune-qt/ui/desktop/mainwindow.cpp 2023-11-03 10:59:08.900608850 -0700
|
||||
@@ -106,14 +106,9 @@
|
||||
Require(connect(actionReportBug, &QAction::triggered, this, &DesktopMainWindowImpl::ReportIssue));
|
||||
Require(connect(actionAboutQt, &QAction::triggered, this, &DesktopMainWindowImpl::ShowAboutQt));
|
||||
Require(connect(actionPreferences, &QAction::triggered, this, &DesktopMainWindowImpl::ShowPreferences));
|
||||
- if (Update::CheckOperation* op = Update::CheckOperation::Create(*this))
|
||||
- {
|
||||
- Require(connect(actionCheckUpdates, &QAction::triggered, op, &Update::CheckOperation::Execute));
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- actionCheckUpdates->setEnabled(false);
|
||||
- }
|
||||
+
|
||||
+ // Nix: disable update checks completely
|
||||
+ actionCheckUpdates->setEnabled(false);
|
||||
|
||||
Require(connect(Controls, &PlaybackControls::OnPrevious, MultiPlaylist, &Playlist::UI::ContainerView::Prev));
|
||||
Require(connect(Controls, &PlaybackControls::OnNext, MultiPlaylist, &Playlist::UI::ContainerView::Next));
|
||||
148
pkgs/by-name/zx/zxtune/package.nix
Normal file
148
pkgs/by-name/zx/zxtune/package.nix
Normal file
@@ -0,0 +1,148 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromBitbucket
|
||||
, nix-update-script
|
||||
, boost
|
||||
, zlib
|
||||
# File backends (for decoding and encoding)
|
||||
, withMp3 ? true
|
||||
, lame
|
||||
, withOgg ? true
|
||||
, libvorbis
|
||||
, withFlac ? true
|
||||
, flac
|
||||
# Audio backends (for playback)
|
||||
, withOpenal ? false
|
||||
, openal
|
||||
, withSDL ? false
|
||||
, SDL
|
||||
, withOss ? false
|
||||
, withAlsa ? stdenv.hostPlatform.isLinux
|
||||
, alsa-lib
|
||||
, withPulse ? stdenv.hostPlatform.isLinux
|
||||
, libpulseaudio
|
||||
# GUI audio player
|
||||
, withQt ? true
|
||||
, qt5
|
||||
, zip
|
||||
}:
|
||||
let
|
||||
dlopenBuildInputs = []
|
||||
++ lib.optional withMp3 lame
|
||||
++ lib.optional withOgg libvorbis
|
||||
++ lib.optional withFlac flac
|
||||
++ lib.optional withOpenal openal
|
||||
++ lib.optional withSDL SDL
|
||||
++ lib.optional withAlsa alsa-lib
|
||||
++ lib.optional withPulse libpulseaudio;
|
||||
supportWayland = (!stdenv.hostPlatform.isDarwin);
|
||||
platformName = "linux";
|
||||
staticBuildInputs = [ boost zlib ]
|
||||
++ lib.optional withQt (if (supportWayland) then qt5.qtwayland else qt5.qtbase);
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "zxtune";
|
||||
version = "5055";
|
||||
|
||||
outputs = [ "out" ];
|
||||
|
||||
src = fetchFromBitbucket {
|
||||
owner = "zxtune";
|
||||
repo = "zxtune";
|
||||
rev = "r${version}";
|
||||
hash = "sha256-ABXGbzjdsPUuQnwZQOho4s2xRSDGzbZdA6/hCkBb7zE=";
|
||||
};
|
||||
|
||||
passthru.updateScript = nix-update-script {
|
||||
extraArgs = [ "--version-regex" "r([0-9]+)" ];
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = lib.optionals withQt [ zip qt5.wrapQtAppsHook ];
|
||||
|
||||
buildInputs = staticBuildInputs ++ dlopenBuildInputs;
|
||||
|
||||
patches = [
|
||||
./disable_updates.patch
|
||||
];
|
||||
|
||||
# Fix use of old OpenAL header path
|
||||
postPatch = ''
|
||||
substituteInPlace src/sound/backends/gates/openal_api.h \
|
||||
--replace "#include <OpenAL/" "#include <AL/"
|
||||
'';
|
||||
|
||||
buildPhase = let
|
||||
setOptionalSupport = name: var:
|
||||
"support_${name}=" + (if (var) then "1" else "");
|
||||
makeOptsCommon = [
|
||||
''-j$NIX_BUILD_CORES''
|
||||
''root.version=${src.rev}''
|
||||
''system.zlib=1''
|
||||
''platform=${platformName}''
|
||||
''includes.dirs.${platformName}="${lib.makeSearchPathOutput "dev" "include" buildInputs}"''
|
||||
''libraries.dirs.${platformName}="${lib.makeLibraryPath staticBuildInputs}"''
|
||||
''ld_flags="-Wl,-rpath=\"${lib.makeLibraryPath dlopenBuildInputs}\""''
|
||||
(setOptionalSupport "mp3" withMp3)
|
||||
(setOptionalSupport "ogg" withOgg)
|
||||
(setOptionalSupport "flac" withFlac)
|
||||
(setOptionalSupport "openal" withOpenal)
|
||||
(setOptionalSupport "sdl" withSDL)
|
||||
(setOptionalSupport "oss" withOss)
|
||||
(setOptionalSupport "alsa" withAlsa)
|
||||
(setOptionalSupport "pulseaudio" withPulse)
|
||||
];
|
||||
makeOptsQt = [
|
||||
''tools.uic=${qt5.qtbase.dev}/bin/uic''
|
||||
''tools.moc=${qt5.qtbase.dev}/bin/moc''
|
||||
''tools.rcc=${qt5.qtbase.dev}/bin/rcc''
|
||||
];
|
||||
in ''
|
||||
runHook preBuild
|
||||
make ${builtins.toString makeOptsCommon} -C apps/xtractor
|
||||
make ${builtins.toString makeOptsCommon} -C apps/zxtune123
|
||||
'' + lib.optionalString withQt ''
|
||||
make ${builtins.toString (makeOptsCommon ++ makeOptsQt)} -C apps/zxtune-qt
|
||||
'' + ''
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
# Libs from dlopenBuildInputs are found with dlopen. Do not shrink rpath. Can
|
||||
# check output of 'out/bin/zxtune123 --list-backends' to verify all plugins
|
||||
# load ("Status: Available" or "Status: Failed to load dynamic library...").
|
||||
dontPatchELF = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
install -Dm755 bin/linux/release/xtractor -t $out/bin
|
||||
install -Dm755 bin/linux/release/zxtune123 -t $out/bin
|
||||
'' + lib.optionalString withQt ''
|
||||
install -Dm755 bin/linux/release/zxtune-qt -t $out/bin
|
||||
'' + ''
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
# Only wrap the gui
|
||||
dontWrapQtApps = true;
|
||||
preFixup = lib.optionalString withQt ''
|
||||
wrapQtApp "$out/bin/zxtune-qt"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Crossplatform chiptunes player";
|
||||
longDescription = ''
|
||||
Chiptune music player with truly extensive format support. Supported
|
||||
formats/chips include AY/YM, ZX Spectrum, PC, Amiga, Atari, Acorn, Philips
|
||||
SAA1099, MOS6581 (Commodore 64), NES, SNES, GameBoy, Atari, TurboGrafX,
|
||||
Nintendo DS, Sega Master System, and more. Powered by vgmstream, OpenMPT,
|
||||
sidplay, and many other libraries.
|
||||
'';
|
||||
homepage = "https://zxtune.bitbucket.io/";
|
||||
license = licenses.gpl3;
|
||||
# zxtune supports mac and windows, but more work will be needed to
|
||||
# integrate with the custom make system (see platformName above)
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ EBADBEEF ];
|
||||
mainProgram = if withQt then "zxtune-qt" else "zxtune123";
|
||||
};
|
||||
}
|
||||
@@ -375,6 +375,5 @@ let
|
||||
if stdenv.buildPlatform == stdenv.hostPlatform
|
||||
then bootstrapScope.qttranslations
|
||||
else null;
|
||||
qutebrowser = final.callPackage ../../../../applications/networking/browsers/qutebrowser { };
|
||||
});
|
||||
in finalScope
|
||||
|
||||
@@ -5,21 +5,22 @@
|
||||
, hatchling
|
||||
, platformdirs
|
||||
, traitlets
|
||||
, pip
|
||||
, pytestCheckHook
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "jupyter-core";
|
||||
version = "5.3.1";
|
||||
version = "5.5.0";
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
format = "pyproject";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jupyter";
|
||||
repo = "jupyter_core";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-kQ7oNEC5L19PTPaX6C2bP5FYuzlsFsS0TABsw6VvoL8=";
|
||||
hash = "sha256-GufCQUkR4283xMsyrbv5tDfJ8SeL35WBW5Aw2z6Ardc=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
@@ -36,6 +37,7 @@ buildPythonPackage rec {
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pip
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
@@ -43,6 +45,11 @@ buildPythonPackage rec {
|
||||
export HOME=$TMPDIR
|
||||
'';
|
||||
|
||||
pytestFlagsArray = [
|
||||
# suppress pytest.PytestUnraisableExceptionWarning: Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>
|
||||
"-W ignore::pytest.PytestUnraisableExceptionWarning"
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# creates a temporary script, which isn't aware of PYTHONPATH
|
||||
"test_argv0"
|
||||
@@ -57,7 +64,8 @@ buildPythonPackage rec {
|
||||
meta = with lib; {
|
||||
description = "Base package on which Jupyter projects rely";
|
||||
homepage = "https://jupyter.org/";
|
||||
changelog = "https://github.com/jupyter/jupyter_core/blob/${src.rev}/CHANGELOG.md";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ fridh ];
|
||||
maintainers = teams.jupyter.members;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/jupyter_core/tests/test_command.py b/jupyter_core/tests/test_command.py
|
||||
index 4ef38cd..08fba22 100644
|
||||
--- a/jupyter_core/tests/test_command.py
|
||||
+++ b/jupyter_core/tests/test_command.py
|
||||
@@ -174,7 +174,7 @@ def test_not_on_path(tmpdir):
|
||||
diff --git a/tests/test_command.py b/tests/test_command.py
|
||||
index a0833c1..67c2110 100644
|
||||
--- a/tests/test_command.py
|
||||
+++ b/tests/test_command.py
|
||||
@@ -191,7 +191,7 @@ def test_not_on_path(tmpdir):
|
||||
witness_src = "#!{}\n{}\n".format(sys.executable, 'print("WITNESS ME")')
|
||||
write_executable(witness, witness_src)
|
||||
|
||||
@@ -11,7 +11,7 @@ index 4ef38cd..08fba22 100644
|
||||
if "SYSTEMROOT" in os.environ: # Windows http://bugs.python.org/issue20614
|
||||
env["SYSTEMROOT"] = os.environ["SYSTEMROOT"]
|
||||
if sys.platform == "win32":
|
||||
@@ -198,7 +198,7 @@ def test_path_priority(tmpdir):
|
||||
@@ -216,7 +216,7 @@ def test_path_priority(tmpdir):
|
||||
witness_b_src = "#!{}\n{}\n".format(sys.executable, 'print("WITNESS B")')
|
||||
write_executable(witness_b, witness_b_src)
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{ lib
|
||||
, backoff
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, geojson
|
||||
@@ -7,21 +6,17 @@
|
||||
, imagesize
|
||||
, nbconvert
|
||||
, nbformat
|
||||
, ndjson
|
||||
, numpy
|
||||
, opencv
|
||||
# , opencv-python
|
||||
, opencv4
|
||||
, packaging
|
||||
, pillow
|
||||
, pydantic
|
||||
# , pygeotile
|
||||
, pyproj
|
||||
, pytest-cases
|
||||
, pytestCheckHook
|
||||
, python-dateutil
|
||||
, pythonOlder
|
||||
, pythonRelaxDepsHook
|
||||
, rasterio
|
||||
, requests
|
||||
, setuptools
|
||||
, shapely
|
||||
, tqdm
|
||||
, typeguard
|
||||
@@ -30,8 +25,8 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "labelbox";
|
||||
version = "3.52.0";
|
||||
format = "setuptools";
|
||||
version = "3.56.0";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
@@ -39,7 +34,7 @@ buildPythonPackage rec {
|
||||
owner = "Labelbox";
|
||||
repo = "labelbox-python";
|
||||
rev = "refs/tags/v.${version}";
|
||||
hash = "sha256-t0Q+6tnUPK2oqjdAwwYeSebgn2EQ1fBivw115L8ndOg=";
|
||||
hash = "sha256-JRh14XpW/iGeBWrslm7weCP/vyJ7eZICqRgQpE2wjXs=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
@@ -48,18 +43,13 @@ buildPythonPackage rec {
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
pythonRelaxDepsHook
|
||||
];
|
||||
|
||||
pythonRelaxDeps = [
|
||||
"backoff"
|
||||
setuptools
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
backoff
|
||||
google-api-core
|
||||
ndjson
|
||||
pydantic
|
||||
python-dateutil
|
||||
requests
|
||||
tqdm
|
||||
];
|
||||
@@ -70,7 +60,7 @@ buildPythonPackage rec {
|
||||
geojson
|
||||
numpy
|
||||
pillow
|
||||
# opencv-python
|
||||
opencv4
|
||||
typeguard
|
||||
imagesize
|
||||
pyproj
|
||||
@@ -83,10 +73,15 @@ buildPythonPackage rec {
|
||||
nativeCheckInputs = [
|
||||
nbconvert
|
||||
nbformat
|
||||
pytest-cases
|
||||
pytestCheckHook
|
||||
] ++ passthru.optional-dependencies.data;
|
||||
|
||||
# disable pytest_plugins which requires `pygeotile`
|
||||
preCheck = ''
|
||||
substituteInPlace tests/conftest.py \
|
||||
--replace "pytest_plugins" "_pytest_plugins"
|
||||
'';
|
||||
|
||||
disabledTestPaths = [
|
||||
# Requires network access
|
||||
"tests/integration"
|
||||
@@ -94,11 +89,6 @@ buildPythonPackage rec {
|
||||
"tests/data"
|
||||
];
|
||||
|
||||
pytestFlagsArray = [
|
||||
# see tox.ini
|
||||
"-k 'not notebooks'"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"labelbox"
|
||||
];
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
, importlib-metadata
|
||||
, flaky
|
||||
, ipywidgets
|
||||
, pyppeteer
|
||||
, pytestCheckHook
|
||||
}:
|
||||
|
||||
@@ -33,15 +32,14 @@ let
|
||||
};
|
||||
in buildPythonPackage rec {
|
||||
pname = "nbconvert";
|
||||
version = "7.8.0";
|
||||
version = "7.11.0";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
format = "pyproject";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-9bwVoSR+FN1Bzu8MCjvHACDgFldusFeNpi8cW0+VBHk=";
|
||||
hash = "sha256-q+3AHPVDF3/94L/Cppcm1aR49q8QozL8G/Kfy08M8AA=";
|
||||
};
|
||||
|
||||
# Add $out/share/jupyter to the list of paths that are used to search for
|
||||
@@ -87,7 +85,6 @@ in buildPythonPackage rec {
|
||||
nativeCheckInputs = [
|
||||
flaky
|
||||
ipywidgets
|
||||
pyppeteer
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
@@ -105,8 +102,9 @@ in buildPythonPackage rec {
|
||||
|
||||
meta = {
|
||||
description = "Converting Jupyter Notebooks";
|
||||
homepage = "https://jupyter.org/";
|
||||
homepage = "https://github.com/jupyter/nbconvert";
|
||||
changelog = "https://github.com/jupyter/nbconvert/blob/v${version}/CHANGELOG.md";
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = with lib.maintainers; [ fridh ];
|
||||
maintainers = lib.teams.jupyter.members;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -23,6 +23,6 @@ stdenv.mkDerivation {
|
||||
homepage = "https://git.openwrt.org/?p=project/libnl-tiny.git;a=summary";
|
||||
license = licenses.isc;
|
||||
maintainers = with maintainers; [ mkg20001 ];
|
||||
platforms = platforms.all;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetchFromGitHub, autoreconfHook, makeWrapper, glibc, augeas, dnsutils, c-ares, curl,
|
||||
{ lib, stdenv, fetchFromGitHub, autoreconfHook, makeWrapper, glibc, adcli, augeas, dnsutils, c-ares, curl,
|
||||
cyrus_sasl, ding-libs, libnl, libunistring, nss, samba, nfs-utils, doxygen,
|
||||
python3, pam, popt, talloc, tdb, tevent, pkg-config, ldb, openldap,
|
||||
pcre2, libkrb5, cifs-utils, glib, keyutils, dbus, fakeroot, libxslt, libxml2,
|
||||
@@ -27,7 +27,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
'';
|
||||
|
||||
# Something is looking for <libxml/foo.h> instead of <libxml2/libxml/foo.h>
|
||||
env.NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2";
|
||||
env.NIX_CFLAGS_COMPILE = toString [
|
||||
"-DRENEWAL_PROG_PATH=\"${adcli}/bin/adcli\""
|
||||
"-I${libxml2.dev}/include/libxml2"
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
export SGML_CATALOG_FILES="${docbookFiles}"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ lib, buildGo121Module, fetchFromGitHub, installShellFiles, nixosTests }:
|
||||
{ lib, buildGo121Module, fetchFromGitHub, fetchpatch, installShellFiles, nixosTests }:
|
||||
|
||||
let
|
||||
pname = "miniflux";
|
||||
@@ -14,6 +14,15 @@ in buildGo121Module {
|
||||
sha256 = "sha256-+oNF/Zwc1Z/cu3SQC/ZTekAW5Qef9RKrdszunLomGII=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
# https://github.com/miniflux/v2/pull/2193, remove after 2.0.50
|
||||
name = "miniflux-user-agent-regression.patch";
|
||||
url = "https://github.com/miniflux/v2/commit/7a03291442a4e35572c73a2fcfe809fa8e03063e.patch";
|
||||
hash = "sha256-tJ1l5rqD0x0xtQs+tDwpFHOY+7k6X02bkwVJo6RAdb8=";
|
||||
})
|
||||
];
|
||||
|
||||
vendorHash = "sha256-jLyjQ+w/QS9uA0pGWF2X6dEfOifcI2gC2sgi1STEzpU=";
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
1556
pkgs/servers/search/meilisearch/Cargo.lock
generated
1556
pkgs/servers/search/meilisearch/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -7,7 +7,7 @@
|
||||
, nix-update-script
|
||||
}:
|
||||
|
||||
let version = "1.3.1";
|
||||
let version = "1.5.0";
|
||||
in
|
||||
rustPlatform.buildRustPackage {
|
||||
pname = "meilisearch";
|
||||
@@ -17,7 +17,7 @@ rustPlatform.buildRustPackage {
|
||||
owner = "meilisearch";
|
||||
repo = "MeiliSearch";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-jttT4qChoqwTnjjoW0Zc15ZieZN7KD1Us64Tk0eDG3Y=";
|
||||
hash = "sha256-UP5i89hXmbATbHwN4wu42L6zX2fnd/hF4NEGK5VwmiM=";
|
||||
};
|
||||
|
||||
cargoBuildFlags = [
|
||||
|
||||
@@ -31,7 +31,10 @@ stdenv.mkDerivation rec {
|
||||
dontDisableStatic = true;
|
||||
|
||||
# postgis config directory assumes /include /lib from the same root for json-c library
|
||||
NIX_LDFLAGS = "-L${lib.getLib json_c}/lib";
|
||||
NIX_LDFLAGS = "-L${lib.getLib json_c}/lib"
|
||||
# Work around https://github.com/NixOS/nixpkgs/issues/166205.
|
||||
+ lib.optionalString (stdenv.cc.isClang && stdenv.cc.libcxx != null) " -l${stdenv.cc.libcxx.cxxabi.libName}";
|
||||
|
||||
|
||||
preConfigure = ''
|
||||
sed -i 's@/usr/bin/file@${file}/bin/file@' configure
|
||||
|
||||
@@ -16,14 +16,14 @@ let
|
||||
in
|
||||
python.pkgs.buildPythonApplication rec {
|
||||
pname = "esphome";
|
||||
version = "2023.11.2";
|
||||
version = "2023.11.4";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-7VYGrWoElc/urs+jomJrRt0dzdmJhCenRvb9bHCl6H4=";
|
||||
hash = "sha256-KIDqIf9aJP5IS+qE0Gy5j3F2DGz/WGbN4Wf9SGzgnzA=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
@@ -57,6 +57,7 @@ python.pkgs.buildPythonApplication rec {
|
||||
protobuf
|
||||
pyparsing
|
||||
pyserial
|
||||
python-magic
|
||||
pyyaml
|
||||
requests
|
||||
tornado
|
||||
|
||||
@@ -1,7 +1,28 @@
|
||||
{ stdenv, lib
|
||||
, pkg-config, autoreconfHook, pandoc
|
||||
, fetchurl, cpio, zlib, bzip2, file, elfutils, libbfd, libgcrypt, libarchive, nspr, nss, popt, db, xz, python, lua, llvmPackages
|
||||
, sqlite, zstd, libcap
|
||||
{ stdenv
|
||||
, lib
|
||||
, pkg-config
|
||||
, autoreconfHook
|
||||
, pandoc
|
||||
, fetchurl
|
||||
, cpio
|
||||
, zlib
|
||||
, bzip2
|
||||
, file
|
||||
, elfutils
|
||||
, libbfd
|
||||
, libgcrypt
|
||||
, libarchive
|
||||
, nspr
|
||||
, nss
|
||||
, popt
|
||||
, db
|
||||
, xz
|
||||
, python
|
||||
, lua
|
||||
, llvmPackages
|
||||
, sqlite
|
||||
, zstd
|
||||
, libcap
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@@ -18,8 +39,8 @@ stdenv.mkDerivation rec {
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook pkg-config pandoc ];
|
||||
buildInputs = [ cpio zlib zstd bzip2 file libarchive libgcrypt nspr nss db xz python lua sqlite ]
|
||||
++ lib.optional stdenv.cc.isClang llvmPackages.openmp
|
||||
++ lib.optional stdenv.isLinux libcap;
|
||||
++ lib.optional stdenv.cc.isClang llvmPackages.openmp
|
||||
++ lib.optional stdenv.isLinux libcap;
|
||||
|
||||
# rpm/rpmlib.h includes popt.h, and then the pkg-config file mentions these as linkage requirements
|
||||
propagatedBuildInputs = [ popt nss db bzip2 libarchive libbfd ]
|
||||
@@ -72,5 +93,8 @@ stdenv.mkDerivation rec {
|
||||
description = "The RPM Package Manager";
|
||||
maintainers = with maintainers; [ copumpkin ];
|
||||
platforms = platforms.linux;
|
||||
# Support for darwin was removed in https://github.com/NixOS/nixpkgs/pull/196350.
|
||||
# This can be re-enables for apple_sdk.version >= 13.0.
|
||||
badPlatforms = platforms.darwin;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -34,6 +34,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
homepage = "https://www.cgsecurity.org/wiki/CmosPwd";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ t4ccer ];
|
||||
platforms = platforms.x86_64;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
})
|
||||
|
||||
4052
pkgs/tools/security/vaultwarden/Cargo.lock
generated
4052
pkgs/tools/security/vaultwarden/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -9,21 +9,16 @@ in
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "vaultwarden";
|
||||
version = "1.30.0";
|
||||
version = "1.30.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dani-garcia";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
hash = "sha256-mBKedJvb67FR4e8ZzdL8umg9XTgch1OWhbR1k46Lkn4=";
|
||||
hash = "sha256-9JCrEe0tla4v207XPgprLqP3g0BslpX8f7xa9aUhQcg=";
|
||||
};
|
||||
|
||||
cargoLock = {
|
||||
lockFile = ./Cargo.lock;
|
||||
outputHashes = {
|
||||
"rocket-0.5.0-rc.3" = "sha256-E71cktkHCbmQyjkjWWJ20KfCm3B/h3jQ2TMluYhvCQw=";
|
||||
};
|
||||
};
|
||||
cargoHash = "sha256-4KyBMOdTAHe5uD6X69gMd0aqIo4w2Rqrlg+25yY2B6o=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = with lib; [ openssl ]
|
||||
|
||||
@@ -16937,13 +16937,10 @@ with pkgs;
|
||||
# https://github.com/NixOS/nixpkgs/issues/89426
|
||||
rustc-wasm32 = (rustc.override {
|
||||
stdenv = stdenv.override {
|
||||
targetPlatform = stdenv.targetPlatform // {
|
||||
parsed = {
|
||||
cpu.name = "wasm32";
|
||||
vendor.name = "unknown";
|
||||
kernel.name = "unknown";
|
||||
abi.name = "unknown";
|
||||
};
|
||||
targetPlatform = lib.systems.elaborate {
|
||||
# lib.systems.elaborate won't recognize "unknown" as the last component.
|
||||
config = "wasm32-unknown-wasi";
|
||||
rust.config = "wasm32-unknown-unknown";
|
||||
};
|
||||
};
|
||||
}).overrideAttrs (old: {
|
||||
@@ -35028,7 +35025,11 @@ with pkgs;
|
||||
};
|
||||
|
||||
qutebrowser = callPackage ../applications/networking/browsers/qutebrowser {
|
||||
inherit (qt6Packages) qtbase qtwebengine wrapQtAppsHook qtwayland;
|
||||
inherit (__splicedPackages.qt6Packages) qtbase qtwebengine wrapQtAppsHook qtwayland;
|
||||
};
|
||||
|
||||
qutebrowser-qt5 = callPackage ../applications/networking/browsers/qutebrowser {
|
||||
inherit (__splicedPackages.libsForQt5) qtbase qtwebengine wrapQtAppsHook qtwayland;
|
||||
};
|
||||
|
||||
qxw = callPackage ../applications/editors/qxw { };
|
||||
|
||||
Reference in New Issue
Block a user