Merge branch master into haskell-updates

This commit is contained in:
sternenseemann
2024-09-03 16:28:39 +02:00
156 changed files with 3861 additions and 3272 deletions
+3 -1
View File
@@ -3,9 +3,11 @@ Anderson Torres <torres.anderson.85@protonmail.com>
Atemu <git@atemu.net> <atemu.main@gmail.com>
Daniel Løvbrøtte Olsen <me@dandellion.xyz> <daniel.olsen99@gmail.com>
Fabian Affolter <mail@fabian-affolter.ch> <fabian@affolter-engineering.ch>
goatastronaut0212 <goatastronaut0212@proton.me> <goatastronaut0212@outlook.com>
goatastronaut0212 <goatastronaut0212@outlook.com> <goatastronaut0212@proton.me>
Janne Heß <janne@hess.ooo> <dasJ@users.noreply.github.com>
Jörg Thalheim <joerg@thalheim.io> <Mic92@users.noreply.github.com>
Lin Jian <me@linj.tech> <linj.dev@outlook.com>
Lin Jian <me@linj.tech> <75130626+jian-lin@users.noreply.github.com>
Martin Weinelt <hexa@darmstadt.ccc.de> <mweinelt@users.noreply.github.com>
R. RyanTM <ryantm-bot@ryantm.com>
Robert Hensing <robert@roberthensing.nl> <roberth@users.noreply.github.com>
+24 -1
View File
@@ -4279,7 +4279,7 @@
keys = [ { fingerprint = "2017 E152 BB81 5C16 955C E612 45BC C1E2 709B 1788"; } ];
};
Cryolitia = {
name = "Beiyan Cryolitia";
name = "Cryolitia PukNgae";
email = "Cryolitia@gmail.com";
github = "Cryolitia";
githubId = 23723294;
@@ -15249,6 +15249,12 @@
github = "o0th";
githubId = 22490354;
};
oakenshield = {
email = "nix@thorin.theoakenshield.com";
github = "HritwikSinghal";
githubId = 29531474;
name = "Hritwik Singhal";
};
oaksoaj = {
email = "oaksoaj@riseup.net";
name = "Oaksoaj";
@@ -17035,6 +17041,12 @@
githubId = 1332289;
name = "Quentin Machu";
};
quincepie = {
email = "flaky@quincepie.dev";
github = "Quince-Pie";
githubId = 127546159;
name = "QuincePie";
};
quinn-dougherty = {
email = "quinnd@riseup.net";
github = "quinn-dougherty";
@@ -20377,6 +20389,11 @@
githubId = 156964;
name = "Thomas Boerger";
};
tbwanderer = {
github = "tbwanderer";
githubId = 125365236;
name = "Ice Layer";
};
tcbravo = {
email = "tomas.bravo@protonmail.ch";
github = "tcbravo";
@@ -22594,6 +22611,12 @@
githubId = 529003;
name = "Christine Dodrill";
};
xeals = {
email = "dev@xeal.me";
github = "xeals";
githubId = 21125058;
name = "xeals";
};
xeji = {
email = "xeji@cat3.de";
github = "xeji";
@@ -45,6 +45,7 @@ lpeglabel,,,,1.6.0,,
lrexlib-gnu,,,,,,
lrexlib-pcre,,,,,,vyp
lrexlib-posix,,,,,,
lsp-progress.nvim,,,,,,gepbird
lua-cjson,,,,,,
lua-cmsgpack,,,,,,
lua-curl,,,,,,
1 name rockspec ref server version luaversion maintainers
45 lrexlib-gnu
46 lrexlib-pcre vyp
47 lrexlib-posix
48 lsp-progress.nvim gepbird
49 lua-cjson
50 lua-cmsgpack
51 lua-curl
@@ -289,6 +289,12 @@
for `stateVersion` ≥ 24.11. (It was previously using SQLite for structured
data and the filesystem for blobs).
- The `stargazer` service has been hardened to improve security, but these
changes make break certain setups, particularly around traditional CGI.
- The `stargazer.allowCgiUser` option has been added, enabling
Stargazer's `cgi-user` option to work, which was previously broken.
- The `shiori` service now requires an HTTP secret value `SHIORI_HTTP_SECRET_KEY` to be provided via environment variable. The nixos module therefore, now provides an environmentFile option:
```
@@ -386,6 +392,9 @@
- The `antennas` package and the `services.antennas` module have been
removed as they only work with `tvheadend` (see above).
- The `services.syncplay` module now exposes all currently available command-line arguments for `syncplay-server` as options, as well as a `useACMEHost` option for easy TLS setup.
The systemd service now uses `DynamicUser`/`StateDirectory` and the `user` and `group` options have been deprecated.
## Other Notable Changes {#sec-release-24.11-notable-changes}
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
+1
View File
@@ -1479,6 +1479,7 @@
./services/web-apps/pretix.nix
./services/web-apps/prosody-filer.nix
./services/web-apps/rimgo.nix
./services/web-apps/rutorrent.nix
./services/web-apps/screego.nix
./services/web-apps/sftpgo.nix
./services/web-apps/suwayomi-server.nix
@@ -128,13 +128,13 @@ with lib;
nix.settings.trusted-users = [ "nixos" ];
# Install less voices for speechd to save some space
services.speechd.package = pkgs.speechd.override {
mbrola = pkgs.mbrola.override {
mbrola-voices = pkgs.mbrola-voices.override {
nixpkgs.overlays = [
(_: prev: {
mbrola-voices = prev.mbrola-voices.override {
# only ship with one voice per language
languages = [ "*1" ];
};
};
};
})
];
};
}
+3 -3
View File
@@ -12,16 +12,16 @@ osc7_cwd() {
done
printf '\e]7;file://%s%s\e\\' "${HOSTNAME}" "${encoded}"
}
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }osc7_cwd
PROMPT_COMMAND=${PROMPT_COMMAND:+${PROMPT_COMMAND%;}; }osc7_cwd
prompt_marker() {
printf '\e]133;A\e\\'
}
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }prompt_marker
PROMPT_COMMAND=${PROMPT_COMMAND:+${PROMPT_COMMAND%;}; }prompt_marker
PS0+='\e]133;C\e\\'
command_done() {
printf '\e]133;D\e\\'
}
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }command_done
PROMPT_COMMAND=${PROMPT_COMMAND:+${PROMPT_COMMAND%;}; }command_done
@@ -366,7 +366,7 @@ in {
};
};
services.kubernetes.kubelet.clusterDns = mkDefault cfg.clusterIp;
services.kubernetes.kubelet.clusterDns = mkDefault [ cfg.clusterIp ];
};
meta.buildDocsInSandbox = false;
+1 -1
View File
@@ -23,7 +23,7 @@ let
example = "LABEL=MyBulkDataDrive";
};
options.hashTableSizeMB = lib.mkOption {
type = lib.types.addCheck lib.types.int (n: mod n 16 == 0);
type = lib.types.addCheck lib.types.int (n: lib.mod n 16 == 0);
default = 1024; # 1GB; default from upstream beesd script
description = ''
Hash table size in MB; must be a multiple of 16.
+1
View File
@@ -34,6 +34,7 @@ in
ExecStart = "${lib.getExe cfg.package} -nobrowser -data=/var/lib/prowlarr";
Restart = "on-failure";
};
environment.HOME = "/var/empty";
};
networking.firewall = mkIf cfg.openFirewall {
+147 -150
View File
@@ -1,7 +1,4 @@
{ config, lib, pkgs, ... }:
with lib;
let
# The splicing information needed for nativeBuildInputs isn't available
@@ -17,8 +14,8 @@ let
let
# reports boolean as yes / no
mkValueString = with lib; v:
if isInt v then toString v
else if isString v then v
if lib.isInt v then toString v
else if lib.isString v then v
else if true == v then "yes"
else if false == v then "no"
else throw "unsupported type ${builtins.typeOf v}: ${(lib.generators.toPretty {}) v}";
@@ -37,10 +34,10 @@ let
in {
inherit (base) type;
generate = name: value:
let transformedValue = mapAttrs (key: val:
if isList val then
if elem key commaSeparated then concatStringsSep "," val
else if elem key spaceSeparated then concatStringsSep " " val
let transformedValue = lib.mapAttrs (key: val:
if lib.isList val then
if lib.elem key commaSeparated then lib.concatStringsSep "," val
else if lib.elem key spaceSeparated then lib.concatStringsSep " " val
else throw "list value for unknown key ${key}: ${(lib.generators.toPretty {}) val}"
else
val
@@ -49,7 +46,7 @@ let
base.generate name transformedValue;
};
configFile = settingsFormat.generate "sshd.conf-settings" (filterAttrs (n: v: v != null) cfg.settings);
configFile = settingsFormat.generate "sshd.conf-settings" (lib.filterAttrs (n: v: v != null) cfg.settings);
sshconf = pkgs.runCommand "sshd.conf-final" { } ''
cat ${configFile} - >$out <<EOL
${cfg.extraConfig}
@@ -65,8 +62,8 @@ let
userOptions = {
options.openssh.authorizedKeys = {
keys = mkOption {
type = types.listOf types.singleLineStr;
keys = lib.mkOption {
type = lib.types.listOf lib.types.singleLineStr;
default = [];
description = ''
A list of verbatim OpenSSH public keys that should be added to the
@@ -83,8 +80,8 @@ let
];
};
keyFiles = mkOption {
type = types.listOf types.path;
keyFiles = lib.mkOption {
type = lib.types.listOf lib.types.path;
default = [];
description = ''
A list of files each containing one OpenSSH public key that should be
@@ -96,8 +93,8 @@ let
};
};
options.openssh.authorizedPrincipals = mkOption {
type = with types; listOf types.singleLineStr;
options.openssh.authorizedPrincipals = lib.mkOption {
type = with lib.types; listOf lib.types.singleLineStr;
default = [];
description = ''
A list of verbatim principal names that should be added to the user's
@@ -112,46 +109,46 @@ let
};
authKeysFiles = let
mkAuthKeyFile = u: nameValuePair "ssh/authorized_keys.d/${u.name}" {
mkAuthKeyFile = u: lib.nameValuePair "ssh/authorized_keys.d/${u.name}" {
mode = "0444";
source = pkgs.writeText "${u.name}-authorized_keys" ''
${concatStringsSep "\n" u.openssh.authorizedKeys.keys}
${concatMapStrings (f: readFile f + "\n") u.openssh.authorizedKeys.keyFiles}
${lib.concatStringsSep "\n" u.openssh.authorizedKeys.keys}
${lib.concatMapStrings (f: lib.readFile f + "\n") u.openssh.authorizedKeys.keyFiles}
'';
};
usersWithKeys = attrValues (flip filterAttrs config.users.users (n: u:
length u.openssh.authorizedKeys.keys != 0 || length u.openssh.authorizedKeys.keyFiles != 0
usersWithKeys = lib.attrValues (lib.flip lib.filterAttrs config.users.users (n: u:
lib.length u.openssh.authorizedKeys.keys != 0 || lib.length u.openssh.authorizedKeys.keyFiles != 0
));
in listToAttrs (map mkAuthKeyFile usersWithKeys);
in lib.listToAttrs (map mkAuthKeyFile usersWithKeys);
authPrincipalsFiles = let
mkAuthPrincipalsFile = u: nameValuePair "ssh/authorized_principals.d/${u.name}" {
mkAuthPrincipalsFile = u: lib.nameValuePair "ssh/authorized_principals.d/${u.name}" {
mode = "0444";
text = concatStringsSep "\n" u.openssh.authorizedPrincipals;
text = lib.concatStringsSep "\n" u.openssh.authorizedPrincipals;
};
usersWithPrincipals = attrValues (flip filterAttrs config.users.users (n: u:
length u.openssh.authorizedPrincipals != 0
usersWithPrincipals = lib.attrValues (lib.flip lib.filterAttrs config.users.users (n: u:
lib.length u.openssh.authorizedPrincipals != 0
));
in listToAttrs (map mkAuthPrincipalsFile usersWithPrincipals);
in lib.listToAttrs (map mkAuthPrincipalsFile usersWithPrincipals);
in
{
imports = [
(mkAliasOptionModuleMD [ "services" "sshd" "enable" ] [ "services" "openssh" "enable" ])
(mkAliasOptionModuleMD [ "services" "openssh" "knownHosts" ] [ "programs" "ssh" "knownHosts" ])
(mkRenamedOptionModule [ "services" "openssh" "challengeResponseAuthentication" ] [ "services" "openssh" "kbdInteractiveAuthentication" ])
(lib.mkAliasOptionModuleMD [ "services" "sshd" "enable" ] [ "services" "openssh" "enable" ])
(lib.mkAliasOptionModuleMD [ "services" "openssh" "knownHosts" ] [ "programs" "ssh" "knownHosts" ])
(lib.mkRenamedOptionModule [ "services" "openssh" "challengeResponseAuthentication" ] [ "services" "openssh" "kbdInteractiveAuthentication" ])
(mkRenamedOptionModule [ "services" "openssh" "kbdInteractiveAuthentication" ] [ "services" "openssh" "settings" "KbdInteractiveAuthentication" ])
(mkRenamedOptionModule [ "services" "openssh" "passwordAuthentication" ] [ "services" "openssh" "settings" "PasswordAuthentication" ])
(mkRenamedOptionModule [ "services" "openssh" "useDns" ] [ "services" "openssh" "settings" "UseDns" ])
(mkRenamedOptionModule [ "services" "openssh" "permitRootLogin" ] [ "services" "openssh" "settings" "PermitRootLogin" ])
(mkRenamedOptionModule [ "services" "openssh" "logLevel" ] [ "services" "openssh" "settings" "LogLevel" ])
(mkRenamedOptionModule [ "services" "openssh" "macs" ] [ "services" "openssh" "settings" "Macs" ])
(mkRenamedOptionModule [ "services" "openssh" "ciphers" ] [ "services" "openssh" "settings" "Ciphers" ])
(mkRenamedOptionModule [ "services" "openssh" "kexAlgorithms" ] [ "services" "openssh" "settings" "KexAlgorithms" ])
(mkRenamedOptionModule [ "services" "openssh" "gatewayPorts" ] [ "services" "openssh" "settings" "GatewayPorts" ])
(mkRenamedOptionModule [ "services" "openssh" "forwardX11" ] [ "services" "openssh" "settings" "X11Forwarding" ])
(lib.mkRenamedOptionModule [ "services" "openssh" "kbdInteractiveAuthentication" ] [ "services" "openssh" "settings" "KbdInteractiveAuthentication" ])
(lib.mkRenamedOptionModule [ "services" "openssh" "passwordAuthentication" ] [ "services" "openssh" "settings" "PasswordAuthentication" ])
(lib.mkRenamedOptionModule [ "services" "openssh" "useDns" ] [ "services" "openssh" "settings" "UseDns" ])
(lib.mkRenamedOptionModule [ "services" "openssh" "permitRootLogin" ] [ "services" "openssh" "settings" "PermitRootLogin" ])
(lib.mkRenamedOptionModule [ "services" "openssh" "logLevel" ] [ "services" "openssh" "settings" "LogLevel" ])
(lib.mkRenamedOptionModule [ "services" "openssh" "macs" ] [ "services" "openssh" "settings" "Macs" ])
(lib.mkRenamedOptionModule [ "services" "openssh" "ciphers" ] [ "services" "openssh" "settings" "Ciphers" ])
(lib.mkRenamedOptionModule [ "services" "openssh" "kexAlgorithms" ] [ "services" "openssh" "settings" "KexAlgorithms" ])
(lib.mkRenamedOptionModule [ "services" "openssh" "gatewayPorts" ] [ "services" "openssh" "settings" "GatewayPorts" ])
(lib.mkRenamedOptionModule [ "services" "openssh" "forwardX11" ] [ "services" "openssh" "settings" "X11Forwarding" ])
];
###### interface
@@ -160,8 +157,8 @@ in
services.openssh = {
enable = mkOption {
type = types.bool;
enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
Whether to enable the OpenSSH secure shell daemon, which
@@ -169,15 +166,15 @@ in
'';
};
package = mkOption {
type = types.package;
package = lib.mkOption {
type = lib.types.package;
default = config.programs.ssh.package;
defaultText = literalExpression "programs.ssh.package";
defaultText = lib.literalExpression "programs.ssh.package";
description = "OpenSSH package to use for sshd.";
};
startWhenNeeded = mkOption {
type = types.bool;
startWhenNeeded = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
If set, {command}`sshd` is socket-activated; that
@@ -186,8 +183,8 @@ in
'';
};
allowSFTP = mkOption {
type = types.bool;
allowSFTP = lib.mkOption {
type = lib.types.bool;
default = true;
description = ''
Whether to enable the SFTP subsystem in the SSH daemon. This
@@ -196,8 +193,8 @@ in
'';
};
sftpServerExecutable = mkOption {
type = types.str;
sftpServerExecutable = lib.mkOption {
type = lib.types.str;
example = "internal-sftp";
description = ''
The sftp server executable. Can be a path or "internal-sftp" to use
@@ -205,8 +202,8 @@ in
'';
};
sftpFlags = mkOption {
type = with types; listOf str;
sftpFlags = lib.mkOption {
type = with lib.types; listOf str;
default = [];
example = [ "-f AUTHPRIV" "-l INFO" ];
description = ''
@@ -214,34 +211,34 @@ in
'';
};
ports = mkOption {
type = types.listOf types.port;
ports = lib.mkOption {
type = lib.types.listOf lib.types.port;
default = [22];
description = ''
Specifies on which ports the SSH daemon listens.
'';
};
openFirewall = mkOption {
type = types.bool;
openFirewall = lib.mkOption {
type = lib.types.bool;
default = true;
description = ''
Whether to automatically open the specified ports in the firewall.
'';
};
listenAddresses = mkOption {
type = with types; listOf (submodule {
listenAddresses = lib.mkOption {
type = with lib.types; listOf (submodule {
options = {
addr = mkOption {
type = types.nullOr types.str;
addr = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
description = ''
Host, IPv4 or IPv6 address to listen to.
'';
};
port = mkOption {
type = types.nullOr types.int;
port = lib.mkOption {
type = lib.types.nullOr lib.types.int;
default = null;
description = ''
Port to listen to.
@@ -261,8 +258,8 @@ in
'';
};
hostKeys = mkOption {
type = types.listOf types.attrs;
hostKeys = lib.mkOption {
type = lib.types.listOf lib.types.attrs;
default =
[ { type = "rsa"; bits = 4096; path = "/etc/ssh/ssh_host_rsa_key"; }
{ type = "ed25519"; path = "/etc/ssh/ssh_host_ed25519_key"; }
@@ -279,16 +276,16 @@ in
'';
};
banner = mkOption {
type = types.nullOr types.lines;
banner = lib.mkOption {
type = lib.types.nullOr lib.types.lines;
default = null;
description = ''
Message to display to the remote user before authentication is allowed.
'';
};
authorizedKeysFiles = mkOption {
type = types.listOf types.str;
authorizedKeysFiles = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [];
description = ''
Specify the rules for which files to read on the host.
@@ -303,8 +300,8 @@ in
'';
};
authorizedKeysInHomedir = mkOption {
type = types.bool;
authorizedKeysInHomedir = lib.mkOption {
type = lib.types.bool;
default = true;
description = ''
Enables the use of the `~/.ssh/authorized_keys` file.
@@ -314,8 +311,8 @@ in
'';
};
authorizedKeysCommand = mkOption {
type = types.str;
authorizedKeysCommand = lib.mkOption {
type = lib.types.str;
default = "none";
description = ''
Specifies a program to be used to look up the user's public
@@ -324,8 +321,8 @@ in
'';
};
authorizedKeysCommandUser = mkOption {
type = types.str;
authorizedKeysCommandUser = lib.mkOption {
type = lib.types.str;
default = "nobody";
description = ''
Specifies the user under whose account the AuthorizedKeysCommand
@@ -336,28 +333,28 @@ in
settings = mkOption {
settings = lib.mkOption {
description = "Configuration for `sshd_config(5)`.";
default = { };
example = literalExpression ''
example = lib.literalExpression ''
{
UseDns = true;
PasswordAuthentication = false;
}
'';
type = types.submodule ({name, ...}: {
type = lib.types.submodule ({name, ...}: {
freeformType = settingsFormat.type;
options = {
AuthorizedPrincipalsFile = mkOption {
type = types.nullOr types.str;
AuthorizedPrincipalsFile = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = "none"; # upstream default
description = ''
Specifies a file that lists principal names that are accepted for certificate authentication. The default
is `"none"`, i.e. not to use a principals file.
'';
};
LogLevel = mkOption {
type = types.nullOr (types.enum [ "QUIET" "FATAL" "ERROR" "INFO" "VERBOSE" "DEBUG" "DEBUG1" "DEBUG2" "DEBUG3" ]);
LogLevel = lib.mkOption {
type = lib.types.nullOr (lib.types.enum [ "QUIET" "FATAL" "ERROR" "INFO" "VERBOSE" "DEBUG" "DEBUG1" "DEBUG2" "DEBUG3" ]);
default = "INFO"; # upstream default
description = ''
Gives the verbosity level that is used when logging messages from sshd(8). Logging with a DEBUG level
@@ -365,10 +362,10 @@ in
'';
};
UsePAM =
mkEnableOption "PAM authentication"
// { default = true; type = types.nullOr types.bool; };
UseDns = mkOption {
type = types.nullOr types.bool;
lib.mkEnableOption "PAM authentication"
// { default = true; type = lib.types.nullOr lib.types.bool; };
UseDns = lib.mkOption {
type = lib.types.nullOr lib.types.bool;
# apply if cfg.useDns then "yes" else "no"
default = false;
description = ''
@@ -378,36 +375,36 @@ in
~/.ssh/authorized_keys from and sshd_config Match Host directives.
'';
};
X11Forwarding = mkOption {
type = types.nullOr types.bool;
X11Forwarding = lib.mkOption {
type = lib.types.nullOr lib.types.bool;
default = false;
description = ''
Whether to allow X11 connections to be forwarded.
'';
};
PasswordAuthentication = mkOption {
type = types.nullOr types.bool;
PasswordAuthentication = lib.mkOption {
type = lib.types.nullOr lib.types.bool;
default = true;
description = ''
Specifies whether password authentication is allowed.
'';
};
PermitRootLogin = mkOption {
PermitRootLogin = lib.mkOption {
default = "prohibit-password";
type = types.nullOr (types.enum ["yes" "without-password" "prohibit-password" "forced-commands-only" "no"]);
type = lib.types.nullOr (lib.types.enum ["yes" "without-password" "prohibit-password" "forced-commands-only" "no"]);
description = ''
Whether the root user can login using ssh.
'';
};
KbdInteractiveAuthentication = mkOption {
type = types.nullOr types.bool;
KbdInteractiveAuthentication = lib.mkOption {
type = lib.types.nullOr lib.types.bool;
default = true;
description = ''
Specifies whether keyboard-interactive authentication is allowed.
'';
};
GatewayPorts = mkOption {
type = types.nullOr types.str;
GatewayPorts = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = "no";
description = ''
Specifies whether remote hosts are allowed to connect to
@@ -415,8 +412,8 @@ in
{manpage}`sshd_config(5)`.
'';
};
KexAlgorithms = mkOption {
type = types.nullOr (types.listOf types.str);
KexAlgorithms = lib.mkOption {
type = lib.types.nullOr (lib.types.listOf lib.types.str);
default = [
"sntrup761x25519-sha512@openssh.com"
"curve25519-sha256"
@@ -432,8 +429,8 @@ in
<https://infosec.mozilla.org/guidelines/openssh#modern-openssh-67>
'';
};
Macs = mkOption {
type = types.nullOr (types.listOf types.str);
Macs = lib.mkOption {
type = lib.types.nullOr (lib.types.listOf lib.types.str);
default = [
"hmac-sha2-512-etm@openssh.com"
"hmac-sha2-256-etm@openssh.com"
@@ -448,15 +445,15 @@ in
<https://infosec.mozilla.org/guidelines/openssh#modern-openssh-67>
'';
};
StrictModes = mkOption {
type = types.nullOr (types.bool);
StrictModes = lib.mkOption {
type = lib.types.nullOr (lib.types.bool);
default = true;
description = ''
Whether sshd should check file modes and ownership of directories
'';
};
Ciphers = mkOption {
type = types.nullOr (types.listOf types.str);
Ciphers = lib.mkOption {
type = lib.types.nullOr (lib.types.listOf lib.types.str);
default = [
"chacha20-poly1305@openssh.com"
"aes256-gcm@openssh.com"
@@ -474,16 +471,16 @@ in
<https://infosec.mozilla.org/guidelines/openssh#modern-openssh-67>
'';
};
AllowUsers = mkOption {
type = with types; nullOr (listOf str);
AllowUsers = lib.mkOption {
type = with lib.types; nullOr (listOf str);
default = null;
description = ''
If specified, login is allowed only for the listed users.
See {manpage}`sshd_config(5)` for details.
'';
};
DenyUsers = mkOption {
type = with types; nullOr (listOf str);
DenyUsers = lib.mkOption {
type = with lib.types; nullOr (listOf str);
default = null;
description = ''
If specified, login is denied for all listed users. Takes
@@ -491,8 +488,8 @@ in
See {manpage}`sshd_config(5)` for details.
'';
};
AllowGroups = mkOption {
type = with types; nullOr (listOf str);
AllowGroups = lib.mkOption {
type = with lib.types; nullOr (listOf str);
default = null;
description = ''
If specified, login is allowed only for users part of the
@@ -500,8 +497,8 @@ in
See {manpage}`sshd_config(5)` for details.
'';
};
DenyGroups = mkOption {
type = with types; nullOr (listOf str);
DenyGroups = lib.mkOption {
type = with lib.types; nullOr (listOf str);
default = null;
description = ''
If specified, login is denied for all users part of the listed
@@ -512,21 +509,21 @@ in
};
# Disabled by default, since pam_motd handles this.
PrintMotd =
mkEnableOption "printing /etc/motd when a user logs in interactively"
// { type = types.nullOr types.bool; };
lib.mkEnableOption "printing /etc/motd when a user logs in interactively"
// { type = lib.types.nullOr lib.types.bool; };
};
});
};
extraConfig = mkOption {
type = types.lines;
extraConfig = lib.mkOption {
type = lib.types.lines;
default = "";
description = "Verbatim contents of {file}`sshd_config`.";
};
moduliFile = mkOption {
moduliFile = lib.mkOption {
example = "/etc/my-local-ssh-moduli;";
type = types.path;
type = lib.types.path;
description = ''
Path to `moduli` file to install in
`/etc/ssh/moduli`. If this option is unset, then
@@ -536,8 +533,8 @@ in
};
users.users = mkOption {
type = with types; attrsOf (submodule userOptions);
users.users = lib.mkOption {
type = with lib.types; attrsOf (submodule userOptions);
};
};
@@ -545,7 +542,7 @@ in
###### implementation
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sshd =
{
@@ -555,8 +552,8 @@ in
};
users.groups.sshd = {};
services.openssh.moduliFile = mkDefault "${cfg.package}/etc/ssh/moduli";
services.openssh.sftpServerExecutable = mkDefault "${cfg.package}/libexec/sftp-server";
services.openssh.moduliFile = lib.mkDefault "${cfg.package}/etc/ssh/moduli";
services.openssh.sftpServerExecutable = lib.mkDefault "${cfg.package}/libexec/sftp-server";
environment.etc = authKeysFiles // authPrincipalsFiles //
{ "ssh/moduli".source = cfg.moduliFile;
@@ -567,13 +564,13 @@ in
let
service =
{ description = "SSH Daemon";
wantedBy = optional (!cfg.startWhenNeeded) "multi-user.target";
wantedBy = lib.optional (!cfg.startWhenNeeded) "multi-user.target";
after = [ "network.target" ];
stopIfChanged = false;
path = [ cfg.package pkgs.gawk ];
environment.LD_LIBRARY_PATH = nssModulesPath;
restartTriggers = optionals (!cfg.startWhenNeeded) [
restartTriggers = lib.optionals (!cfg.startWhenNeeded) [
config.environment.etc."ssh/sshd_config".source
];
@@ -583,7 +580,7 @@ in
# socket activation, it goes to the remote side (#19589).
exec >&2
${flip concatMapStrings cfg.hostKeys (k: ''
${lib.flip lib.concatMapStrings cfg.hostKeys (k: ''
if ! [ -s "${k.path}" ]; then
if ! [ -h "${k.path}" ]; then
rm -f "${k.path}"
@@ -591,10 +588,10 @@ in
mkdir -m 0755 -p "$(dirname '${k.path}')"
ssh-keygen \
-t "${k.type}" \
${optionalString (k ? bits) "-b ${toString k.bits}"} \
${optionalString (k ? rounds) "-a ${toString k.rounds}"} \
${optionalString (k ? comment) "-C '${k.comment}'"} \
${optionalString (k ? openSSHFormat && k.openSSHFormat) "-o"} \
${lib.optionalString (k ? bits) "-b ${toString k.bits}"} \
${lib.optionalString (k ? rounds) "-a ${toString k.rounds}"} \
${lib.optionalString (k ? comment) "-C '${k.comment}'"} \
${lib.optionalString (k ? openSSHFormat && k.openSSHFormat) "-o"} \
-f "${k.path}" \
-N ""
fi
@@ -603,8 +600,8 @@ in
serviceConfig =
{ ExecStart =
(optionalString cfg.startWhenNeeded "-") +
"${cfg.package}/bin/sshd " + (optionalString cfg.startWhenNeeded "-i ") +
(lib.optionalString cfg.startWhenNeeded "-") +
"${cfg.package}/bin/sshd " + (lib.optionalString cfg.startWhenNeeded "-i ") +
"-D " + # don't detach into a daemon process
"-f /etc/ssh/sshd_config";
KillMode = "process";
@@ -625,7 +622,7 @@ in
{ description = "SSH Socket";
wantedBy = [ "sockets.target" ];
socketConfig.ListenStream = if cfg.listenAddresses != [] then
concatMap
lib.concatMap
({ addr, port }:
if port != null then [ "${addr}:${toString port}" ]
else map (p: "${addr}:${toString p}") cfg.ports)
@@ -645,7 +642,7 @@ in
};
networking.firewall.allowedTCPPorts = optionals cfg.openFirewall cfg.ports;
networking.firewall.allowedTCPPorts = lib.optionals cfg.openFirewall cfg.ports;
security.pam.services.sshd = lib.mkIf cfg.settings.UsePAM
{ startSession = true;
@@ -662,34 +659,34 @@ in
services.openssh.authorizedKeysFiles =
lib.optional cfg.authorizedKeysInHomedir "%h/.ssh/authorized_keys" ++ [ "/etc/ssh/authorized_keys.d/%u" ];
services.openssh.settings.AuthorizedPrincipalsFile = mkIf (authPrincipalsFiles != {}) "/etc/ssh/authorized_principals.d/%u";
services.openssh.settings.AuthorizedPrincipalsFile = lib.mkIf (authPrincipalsFiles != {}) "/etc/ssh/authorized_principals.d/%u";
services.openssh.extraConfig = mkOrder 0
services.openssh.extraConfig = lib.mkOrder 0
''
Banner ${if cfg.banner == null then "none" else pkgs.writeText "ssh_banner" cfg.banner}
AddressFamily ${if config.networking.enableIPv6 then "any" else "inet"}
${concatMapStrings (port: ''
${lib.concatMapStrings (port: ''
Port ${toString port}
'') cfg.ports}
${concatMapStrings ({ port, addr, ... }: ''
ListenAddress ${addr}${optionalString (port != null) (":" + toString port)}
${lib.concatMapStrings ({ port, addr, ... }: ''
ListenAddress ${addr}${lib.optionalString (port != null) (":" + toString port)}
'') cfg.listenAddresses}
${optionalString cfgc.setXAuthLocation ''
${lib.optionalString cfgc.setXAuthLocation ''
XAuthLocation ${pkgs.xorg.xauth}/bin/xauth
''}
${optionalString cfg.allowSFTP ''
Subsystem sftp ${cfg.sftpServerExecutable} ${concatStringsSep " " cfg.sftpFlags}
${lib.optionalString cfg.allowSFTP ''
Subsystem sftp ${cfg.sftpServerExecutable} ${lib.concatStringsSep " " cfg.sftpFlags}
''}
AuthorizedKeysFile ${toString cfg.authorizedKeysFiles}
${optionalString (cfg.authorizedKeysCommand != "none") ''
${lib.optionalString (cfg.authorizedKeysCommand != "none") ''
AuthorizedKeysCommand ${cfg.authorizedKeysCommand}
AuthorizedKeysCommandUser ${cfg.authorizedKeysCommandUser}
''}
${flip concatMapStrings cfg.hostKeys (k: ''
${lib.flip lib.concatMapStrings cfg.hostKeys (k: ''
HostKey ${k.path}
'')}
'';
@@ -699,13 +696,13 @@ in
{
nativeBuildInputs = [ validationPackage ];
} ''
${concatMapStringsSep "\n"
${lib.concatMapStringsSep "\n"
(lport: "sshd -G -T -C lport=${toString lport} -f ${sshconf} > /dev/null")
cfg.ports}
${concatMapStringsSep "\n"
${lib.concatMapStringsSep "\n"
(la:
concatMapStringsSep "\n"
(port: "sshd -G -T -C ${escapeShellArg "laddr=${la.addr},lport=${toString port}"} -f ${sshconf} > /dev/null")
lib.concatMapStringsSep "\n"
(port: "sshd -G -T -C ${lib.escapeShellArg "laddr=${la.addr},lport=${toString port}"} -f ${sshconf} > /dev/null")
(if la.port != null then [ la.port ] else cfg.ports)
)
cfg.listenAddresses}
@@ -726,7 +723,7 @@ in
# Grab the groups, we don't care about the group identifiers
lib.attrValues (
# Group the settings that are the same in lower case
lib.groupBy lib.strings.toLower (attrNames cfg.settings)
lib.groupBy lib.strings.toLower (lib.attrNames cfg.settings)
)
);
formattedDuplicates = lib.concatMapStringsSep ", " (dupl: "(${lib.concatStringsSep ", " dupl})") duplicates;
@@ -735,7 +732,7 @@ in
assertion = lib.length duplicates == 0;
message = ''Duplicate sshd config key; does your capitalization match the option's? Duplicate keys: ${formattedDuplicates}'';
})]
++ forEach cfg.listenAddresses ({ addr, ... }: {
++ lib.forEach cfg.listenAddresses ({ addr, ... }: {
assertion = addr != null;
message = "addr must be specified in each listenAddresses entry";
});
+213 -31
View File
@@ -7,18 +7,41 @@ let
cmdArgs =
[ "--port" cfg.port ]
++ optionals (cfg.isolateRooms) [ "--isolate-rooms" ]
++ optionals (!cfg.ready) [ "--disable-ready" ]
++ optionals (!cfg.chat) [ "--disable-chat" ]
++ optionals (cfg.salt != null) [ "--salt" cfg.salt ]
++ optionals (cfg.motdFile != null) [ "--motd-file" cfg.motdFile ]
++ optionals (cfg.roomsDBFile != null) [ "--rooms-db-file" cfg.roomsDBFile ]
++ optionals (cfg.permanentRoomsFile != null) [ "--permanent-rooms-file" cfg.permanentRoomsFile ]
++ [ "--max-chat-message-length" cfg.maxChatMessageLength ]
++ [ "--max-username-length" cfg.maxUsernameLength ]
++ optionals (cfg.statsDBFile != null) [ "--stats-db-file" cfg.statsDBFile ]
++ optionals (cfg.certDir != null) [ "--tls" cfg.certDir ]
++ optionals cfg.ipv4Only [ "--ipv4-only" ]
++ optionals cfg.ipv6Only [ "--ipv6-only" ]
++ optionals (cfg.interfaceIpv4 != "") [ "--interface-ipv4" cfg.interfaceIpv4 ]
++ optionals (cfg.interfaceIpv6 != "") [ "--interface-ipv6" cfg.interfaceIpv6 ]
++ cfg.extraArgs;
useACMEHostDir = optionalString (cfg.useACMEHost != null) config.security.acme.certs.${cfg.useACMEHost}.directory;
in
{
imports = [
(mkRemovedOptionModule [ "services" "syncplay" "user" ]
"The syncplay service now uses DynamicUser, override the systemd unit settings if you need the old functionality.")
(mkRemovedOptionModule [ "services" "syncplay" "group" ]
"The syncplay service now uses DynamicUser, override the systemd unit settings if you need the old functionality.")
];
options = {
services.syncplay = {
enable = mkOption {
type = types.bool;
default = false;
description = "If enabled, start the Syncplay server.";
description = ''
If enabled, start the Syncplay server.
'';
};
port = mkOption {
@@ -29,6 +52,39 @@ in
'';
};
passwordFile = mkOption {
type = types.nullOr types.path;
default = null;
description = ''
Path to the file that contains the server password. If
`null`, the server doesn't require a password.
'';
};
isolateRooms = mkOption {
type = types.bool;
default = false;
description = ''
Enable room isolation.
'';
};
ready = mkOption {
type = types.bool;
default = true;
description = ''
Check readiness of users.
'';
};
chat = mkOption {
type = types.bool;
default = true;
description = ''
Chat with users in the same room.
'';
};
salt = mkOption {
type = types.nullOr types.str;
default = null;
@@ -37,7 +93,7 @@ in
instance to still work when the server is restarted. The salt will be
readable in the nix store and the processlist. If this is not
intended use `saltFile` instead. Mutually exclusive with
<option>services.syncplay.saltFile</option>.
{option}`services.syncplay.saltFile`.
'';
};
@@ -49,7 +105,83 @@ in
operator passwords generated by this server instance to still work
when the server is restarted. `null`, the server doesn't load the
salt from a file. Mutually exclusive with
<option>services.syncplay.salt</option>.
{option}`services.syncplay.salt`.
'';
};
motd = mkOption {
type = types.nullOr types.str;
default = null;
description = ''
Text to display when users join. The motd will be readable in the nix store
and the processlist. If this is not intended use `motdFile` instead.
Will be overriden by {option}`services.syncplay.motdFile`.
'';
};
motdFile = mkOption {
type = types.nullOr types.str;
default = if cfg.motd != null then (builtins.toFile "motd" cfg.motd) else null;
defaultText = literalExpression ''if services.syncplay.motd != null then (builtins.toFile "motd" services.syncplay.motd) else null'';
description = ''
Path to text to display when users join.
Will override {option}`services.syncplay.motd`.
'';
};
roomsDBFile = mkOption {
type = types.nullOr types.str;
default = null;
example = "rooms.db";
description = ''
Path to SQLite database file to store room states.
Relative to the working directory provided by systemd.
'';
};
permanentRooms = mkOption {
type = types.listOf types.str;
default = [ ];
description = ''
List of rooms that will be listed even if the room is empty.
Will be overriden by {option}`services.syncplay.permanentRoomsFile`.
'';
};
permanentRoomsFile = mkOption {
type = types.nullOr types.str;
default = if cfg.permanentRooms != [ ] then (builtins.toFile "perm" (builtins.concatStringsSep "\n" cfg.permanentRooms)) else null;
defaultText = literalExpression ''if services.syncplay.permanentRooms != [ ] then (builtins.toFile "perm" (builtins.concatStringsSep "\n" services.syncplay.permanentRooms)) else null'';
description = ''
File with list of rooms that will be listed even if the room is empty,
newline delimited.
Will override {option}`services.syncplay.permanentRooms`.
'';
};
maxChatMessageLength = mkOption {
type = types.ints.unsigned;
default = 150;
description = ''
Maximum number of characters in a chat message.
'';
};
maxUsernameLength = mkOption {
type = types.ints.unsigned;
default = 16;
description = ''
Maximum number of characters in a username.
'';
};
statsDBFile = mkOption {
type = types.nullOr types.str;
default = null;
example = "stats.db";
description = ''
Path to SQLite database file to store stats.
Relative to the working directory provided by systemd.
'';
};
@@ -62,6 +194,49 @@ in
'';
};
useACMEHost = mkOption {
type = types.nullOr types.str;
default = null;
example = "syncplay.example.com";
description = ''
If set, use NixOS-generated ACME certificate with the specified name for TLS.
Note that it requires {option}`security.acme` to be setup, e.g., credentials provided if using DNS-01 validation.
'';
};
ipv4Only = mkOption {
type = types.bool;
default = false;
description = ''
Listen only on IPv4 when strting the server.
'';
};
ipv6Only = mkOption {
type = types.bool;
default = false;
description = ''
Listen only on IPv6 when strting the server.
'';
};
interfaceIpv4 = mkOption {
type = types.str;
default = "";
description = ''
The IP address to bind to for IPv4. Leaving it empty defaults to using all.
'';
};
interfaceIpv6 = mkOption {
type = types.str;
default = "";
description = ''
The IP address to bind to for IPv6. Leaving it empty defaults to using all.
'';
};
extraArgs = mkOption {
type = types.listOf types.str;
default = [ ];
@@ -70,28 +245,12 @@ in
'';
};
user = mkOption {
type = types.str;
default = "nobody";
package = mkOption {
type = types.package;
default = pkgs.syncplay-nogui;
defaultText = literalExpression "pkgs.syncplay-nogui";
description = ''
User to use when running Syncplay.
'';
};
group = mkOption {
type = types.str;
default = "nogroup";
description = ''
Group to use when running Syncplay.
'';
};
passwordFile = mkOption {
type = types.nullOr types.path;
default = null;
description = ''
Path to the file that contains the server password. If
`null`, the server doesn't require a password.
Package to use for syncplay.
'';
};
};
@@ -103,7 +262,24 @@ in
assertion = cfg.salt == null || cfg.saltFile == null;
message = "services.syncplay.salt and services.syncplay.saltFile are mutually exclusive.";
}
{
assertion = cfg.certDir == null || cfg.useACMEHost == null;
message = "services.syncplay.certDir and services.syncplay.useACMEHost are mutually exclusive.";
}
{
assertion = !cfg.ipv4Only || !cfg.ipv6Only;
message = "services.syncplay.ipv4Only and services.syncplay.ipv6Only are mutually exclusive.";
}
];
warnings = optional (cfg.interfaceIpv4 != "" && cfg.ipv6Only) "You have specified services.syncplay.interfaceIpv4 but IPv4 is disabled by services.syncplay.ipv6Only."
++ optional (cfg.interfaceIpv6 != "" && cfg.ipv4Only) "You have specified services.syncplay.interfaceIpv6 but IPv6 is disabled by services.syncplay.ipv4Only.";
security.acme.certs = mkIf (cfg.useACMEHost != null) {
"${cfg.useACMEHost}".reloadServices = [ "syncplay.service" ];
};
networking.firewall.allowedTCPPorts = [ cfg.port ];
systemd.services.syncplay = {
description = "Syncplay Service";
wantedBy = [ "multi-user.target" ];
@@ -111,20 +287,26 @@ in
after = [ "network-online.target" ];
serviceConfig = {
User = cfg.user;
Group = cfg.group;
LoadCredential = lib.optional (cfg.passwordFile != null) "password:${cfg.passwordFile}"
++ lib.optional (cfg.saltFile != null) "salt:${cfg.saltFile}";
DynamicUser = true;
StateDirectory = "syncplay";
WorkingDirectory = "%S/syncplay";
LoadCredential = optional (cfg.passwordFile != null) "password:${cfg.passwordFile}"
++ optional (cfg.saltFile != null) "salt:${cfg.saltFile}"
++ optionals (cfg.useACMEHost != null) [
"cert.pem:${useACMEHostDir}/cert.pem"
"privkey.pem:${useACMEHostDir}/key.pem"
"chain.pem:${useACMEHostDir}/chain.pem"
];
};
script = ''
${lib.optionalString (cfg.passwordFile != null) ''
${optionalString (cfg.passwordFile != null) ''
export SYNCPLAY_PASSWORD=$(cat "''${CREDENTIALS_DIRECTORY}/password")
''}
${lib.optionalString (cfg.saltFile != null) ''
${optionalString (cfg.saltFile != null) ''
export SYNCPLAY_SALT=$(cat "''${CREDENTIALS_DIRECTORY}/salt")
''}
exec ${pkgs.syncplay-nogui}/bin/syncplay-server ${escapeShellArgs cmdArgs}
exec ${cfg.package}/bin/syncplay-server ${escapeShellArgs cmdArgs} ${optionalString (cfg.useACMEHost != null) "--tls $CREDENTIALS_DIRECTORY"}
'';
};
};
@@ -0,0 +1,302 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.rutorrent;
rtorrentPluginDependencies = with pkgs; {
_task = [ procps ];
unpack = [ unzip unrar ];
rss = [ curl ];
mediainfo = [ mediainfo ];
spectrogram = [ sox ];
screenshots = [ ffmpeg ];
};
phpPluginDependencies = with pkgs; {
_cloudflare = [ python3 ];
};
getPluginDependencies = dependencies: concatMap (p: attrByPath [ p ] [] dependencies);
in {
options = {
services.rutorrent = {
enable = mkEnableOption "ruTorrent";
hostName = mkOption {
type = types.str;
description = "FQDN for the ruTorrent instance.";
};
dataDir = mkOption {
type = types.str;
default = "/var/lib/rutorrent";
description = "Storage path of ruTorrent.";
};
user = mkOption {
type = types.str;
default = "rutorrent";
description = ''
User which runs the ruTorrent service.
'';
};
group = mkOption {
type = types.str;
default = "rutorrent";
description = ''
Group which runs the ruTorrent service.
'';
};
rpcSocket = mkOption {
type = types.str;
default = config.services.rtorrent.rpcSocket;
defaultText = "config.services.rtorrent.rpcSocket";
description = ''
Path to rtorrent rpc socket.
'';
};
plugins = mkOption {
type = with types; listOf (either str package);
default = [ "httprpc" ];
example = literalExpression ''[ "httprpc" "data" "diskspace" "edit" "erasedata" "theme" "trafic" ]'';
description = ''
List of plugins to enable. See the list of <link xlink:href="https://github.com/Novik/ruTorrent/wiki/Plugins#currently-there-are-the-following-plugins">available plugins</link>. Note: the <literal>unpack</literal> plugin needs the nonfree <literal>unrar</literal> package.
You need to either enable one of the <literal>rpc</literal> or <literal>httprpc</literal> plugin or enable the <xref linkend="opt-services.rutorrent.nginx.exposeInsecureRPC2mount"/> option.
'';
};
poolSettings = mkOption {
type = with types; attrsOf (oneOf [ str int bool ]);
default = {
"pm" = "dynamic";
"pm.max_children" = 32;
"pm.start_servers" = 2;
"pm.min_spare_servers" = 2;
"pm.max_spare_servers" = 4;
"pm.max_requests" = 500;
};
description = ''
Options for ruTorrent's PHP pool. See the documentation on <literal>php-fpm.conf</literal> for details on configuration directives.
'';
};
nginx = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable nginx virtual host management.
Further nginx configuration can be done by adapting <literal>services.nginx.virtualHosts.&lt;name&gt;</literal>.
See <xref linkend="opt-services.nginx.virtualHosts"/> for further information.
'';
};
exposeInsecureRPC2mount = mkOption {
type = types.bool;
default = false;
description = ''
If you do not enable one of the <literal>rpc</literal> or <literal>httprpc</literal> plugins you need to expose an RPC mount through scgi using this option.
Warning: This allow to run arbitrary commands, as the rtorrent user, so make sure to use authentification. The simplest way would be to use the <literal>services.nginx.virtualHosts.&lt;name&gt;.basicAuth</literal> option.
'';
};
};
};
};
config = mkIf cfg.enable (mkMerge [
{ assertions = let
usedRpcPlugins = intersectLists cfg.plugins [ "httprpc" "rpc" ];
in [
{ assertion = (length usedRpcPlugins < 2);
message = "Please specify only one of httprpc or rpc plugins";
}
{ assertion = !(length usedRpcPlugins > 0 && cfg.nginx.exposeInsecureRPC2mount);
message = "Please do not use exposeInsecureRPC2mount if you use one of httprpc or rpc plugins";
}
];
warnings = let
nginxVhostCfg = config.services.nginx.virtualHosts."${cfg.hostName}";
in []
++ (optional (cfg.nginx.exposeInsecureRPC2mount && (nginxVhostCfg.basicAuth == {} || nginxVhostCfg.basicAuthFile == null )) ''
You are using exposeInsecureRPC2mount without using basic auth on the virtual host. The exposed rpc mount allow for remote command execution.
Please make sure it is not accessible from the outside.
'');
systemd = {
services = {
rtorrent.path = getPluginDependencies rtorrentPluginDependencies cfg.plugins;
rutorrent-setup = let
rutorrentConfig = pkgs.writeText "rutorrent-config.php" ''
<?php
// configuration parameters
// for snoopy client
@define('HTTP_USER_AGENT', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36', true);
@define('HTTP_TIME_OUT', 30, true); // in seconds
@define('HTTP_USE_GZIP', true, true);
$httpIP = null; // IP string. Or null for any.
$httpProxy = array
(
'use' => false,
'proto' => 'http', // 'http' or 'https'
'host' => 'PROXY_HOST_HERE',
'port' => 3128
);
@define('RPC_TIME_OUT', 5, true); // in seconds
@define('LOG_RPC_CALLS', false, true);
@define('LOG_RPC_FAULTS', true, true);
// for php
@define('PHP_USE_GZIP', false, true);
@define('PHP_GZIP_LEVEL', 2, true);
$schedule_rand = 10; // rand for schedulers start, +0..X seconds
$do_diagnostic = true;
$log_file = '${cfg.dataDir}/logs/errors.log'; // path to log file (comment or leave blank to disable logging)
$saveUploadedTorrents = true; // Save uploaded torrents to profile/torrents directory or not
$overwriteUploadedTorrents = false; // Overwrite existing uploaded torrents in profile/torrents directory or make unique name
$topDirectory = '/'; // Upper available directory. Absolute path with trail slash.
$forbidUserSettings = false;
$scgi_port = 0;
$scgi_host = "unix://${cfg.rpcSocket}";
$XMLRPCMountPoint = "/RPC2"; // DO NOT DELETE THIS LINE!!! DO NOT COMMENT THIS LINE!!!
$throttleMaxSpeed = 327625*1024;
$pathToExternals = array(
"php" => "${pkgs.php}/bin/php", // Something like /usr/bin/php. If empty, will be found in PATH.
"curl" => "${pkgs.curl}/bin/curl", // Something like /usr/bin/curl. If empty, will be found in PATH.
"gzip" => "${pkgs.gzip}/bin/gzip", // Something like /usr/bin/gzip. If empty, will be found in PATH.
"id" => "${pkgs.coreutils}/bin/id", // Something like /usr/bin/id. If empty, will be found in PATH.
"stat" => "${pkgs.coreutils}/bin/stat", // Something like /usr/bin/stat. If empty, will be found in PATH.
"pgrep" => "${pkgs.procps}/bin/pgrep", // TODO why can't we use phpEnv.PATH
);
$localhosts = array( // list of local interfaces
"127.0.0.1",
"localhost",
);
$profilePath = '${cfg.dataDir}/share'; // Path to user profiles
$profileMask = 0770; // Mask for files and directory creation in user profiles.
// Both Webserver and rtorrent users must have read-write access to it.
// For example, if Webserver and rtorrent users are in the same group then the value may be 0770.
$tempDirectory = null; // Temp directory. Absolute path with trail slash. If null, then autodetect will be used.
$canUseXSendFile = false; // If true then use X-Sendfile feature if it exist
$locale = "UTF8";
'';
in {
wantedBy = [ "multi-user.target" ];
before = [ "phpfpm-rutorrent.service" ];
script = ''
ln -sf ${pkgs.rutorrent}/{css,images,js,lang,index.html} ${cfg.dataDir}/
mkdir -p ${cfg.dataDir}/{conf,logs,plugins} ${cfg.dataDir}/share/{settings,torrents,users}
ln -sf ${pkgs.rutorrent}/conf/{access.ini,plugins.ini} ${cfg.dataDir}/conf/
ln -sf ${rutorrentConfig} ${cfg.dataDir}/conf/config.php
cp -r ${pkgs.rutorrent}/php ${cfg.dataDir}/
${optionalString (cfg.plugins != [])
''cp -r ${concatMapStringsSep " " (p: "${pkgs.rutorrent}/plugins/${p}") cfg.plugins} ${cfg.dataDir}/plugins/''}
chown -R ${cfg.user}:${cfg.group} ${cfg.dataDir}/{conf,share,logs,plugins}
chmod -R 755 ${cfg.dataDir}/{conf,share,logs,plugins}
'';
serviceConfig.Type = "oneshot";
};
};
tmpfiles.rules = [ "d '${cfg.dataDir}' 0775 ${cfg.user} ${cfg.group} -" ];
};
users.groups."${cfg.group}" = {};
users.users = {
"${cfg.user}" = {
home = cfg.dataDir;
group = cfg.group;
extraGroups = [ config.services.rtorrent.group ];
description = "ruTorrent Daemon user";
isSystemUser = true;
};
"${config.services.rtorrent.user}" = {
extraGroups = [ cfg.group ];
};
};
}
(mkIf cfg.nginx.enable (mkMerge [
{ services = {
phpfpm.pools.rutorrent = let
envPath = lib.makeBinPath (getPluginDependencies phpPluginDependencies cfg.plugins);
pool = {
user = cfg.user;
group = config.services.rtorrent.group;
settings = mapAttrs (name: mkDefault) {
"listen.owner" = config.services.nginx.user;
"listen.group" = config.services.nginx.group;
} // cfg.poolSettings;
};
in if (envPath == "") then pool else pool // { phpEnv.PATH = envPath; };
nginx = {
enable = true;
virtualHosts = {
${cfg.hostName} = {
root = cfg.dataDir;
locations = {
"~ [^/]\.php(/|$)" = {
extraConfig = ''
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
# Mitigate https://httpoxy.org/ vulnerabilities
fastcgi_param HTTP_PROXY "";
fastcgi_pass unix:${config.services.phpfpm.pools.rutorrent.socket};
fastcgi_index index.php;
include ${pkgs.nginx}/conf/fastcgi.conf;
'';
};
};
};
};
};
};
}
(mkIf cfg.nginx.exposeInsecureRPC2mount {
services.nginx.virtualHosts."${cfg.hostName}".locations."/RPC2" = {
extraConfig = ''
include ${pkgs.nginx}/conf/scgi_params;
scgi_pass unix:${cfg.rpcSocket};
'';
};
services.rtorrent.group = "nginx";
})
]))
]);
}
@@ -83,6 +83,21 @@ in
'';
};
allowCgiUser = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
When enabled, the stargazer process will be given `CAP_SETGID`
and `CAP_SETUID` so that it can run cgi processes as a different
user. This is required if the `cgi-user` option is used for a route.
Note that these capabilities could allow privilege escalation so be
careful. For that reason, this is disabled by default.
You will need to create the user mentioned `cgi-user` if it does not
already exist.
'';
};
store = lib.mkOption {
type = lib.types.path;
default = /var/lib/gemini/certs;
@@ -206,6 +221,48 @@ in
# User and group
User = cfg.user;
Group = cfg.group;
AmbientCapabilities = lib.mkIf cfg.allowCgiUser [
"CAP_SETGID"
"CAP_SETUID"
];
# Hardening
UMask = "0077";
PrivateTmp = true;
ProtectHome = true;
ProtectSystem = "full";
ProtectClock = true;
ProtectHostname = true;
ProtectControlGroups = true;
ProtectKernelLogs = true;
ProtectKernelModules = true;
ProtectKernelTunables = true;
ProtectProc = "invisible";
PrivateDevices = true;
NoNewPrivileges = true;
RestrictSUIDSGID = true;
PrivateMounts = true;
MemoryDenyWriteExecute = true;
LockPersonality = true;
RestrictRealtime = true;
RemoveIPC = true;
CapabilityBoundingSet = [
"~CAP_SYS_PTRACE"
"~CAP_SYS_ADMIN"
"~CAP_SETPCAP"
"~CAP_SYS_TIME"
"~CAP_SYS_PACCT"
"~CAP_SYS_TTY_CONFIG "
"~CAP_SYS_CHROOT"
"~CAP_SYS_BOOT"
"~CAP_NET_ADMIN"
] ++ lib.lists.optional (!cfg.allowCgiUser) [
"~CAP_SETGID"
"~CAP_SETUID"
];
SystemCallArchitectures = "native";
SystemCallFilter = [ "~@cpu-emulation @debug @keyring @mount @obsolete" ]
++ lib.lists.optional (!cfg.allowCgiUser) [ "@privileged @setuid" ];
};
};
@@ -712,9 +712,9 @@ in
(mkIf cfg.enable {
boot.loader.grub.devices = optional (cfg.device != "") cfg.device;
boot.loader.grub.devices = mkIf (cfg.device != "") [ cfg.device ];
boot.loader.grub.mirroredBoots = optionals (cfg.devices != [ ]) [
boot.loader.grub.mirroredBoots = mkIf (cfg.devices != [ ]) [
{ path = "/boot"; inherit (cfg) devices; inherit (efi) efiSysMountPoint; }
];
@@ -752,7 +752,7 @@ in
# set at once.
system.boot.loader.id = "grub";
environment.systemPackages = optional (grub != null) grub;
environment.systemPackages = mkIf (grub != null) [ grub ];
boot.loader.grub.extraPrepareConfig =
concatStrings (mapAttrsToList (n: v: ''
@@ -65,9 +65,9 @@ in
environment.etc.vmware-tools.source = "${open-vm-tools}/etc/vmware-tools/*";
services.xserver = mkIf (!cfg.headless) {
modules = [ xf86inputvmmouse ];
modules = lib.optionals pkgs.stdenv.hostPlatform.isx86 [ xf86inputvmmouse ];
config = ''
config = lib.optionalString (pkgs.stdenv.hostPlatform.isx86) ''
Section "InputClass"
Identifier "VMMouse"
MatchDevicePath "/dev/input/event*"
+26 -1
View File
@@ -117,16 +117,41 @@ in
};
};
};
cgiTestServer = { ... }: {
users.users.cgi = {
isSystemUser = true;
group = "cgi";
};
users.groups.cgi = { };
services.stargazer = {
enable = true;
connectionLogging = false;
requestTimeout = 1;
allowCgiUser = true;
routes = [
{
route = "localhost:/cgi-bin";
root = "${test_env}/test_data";
cgi = true;
cgi-timeout = 5;
cgi-user = "cgi";
}
];
};
};
};
testScript = { nodes, ... }: ''
geminiserver.wait_for_unit("scgi_server")
geminiserver.wait_for_open_port(1099)
geminiserver.wait_for_unit("stargazer")
geminiserver.wait_for_open_port(1965)
cgiTestServer.wait_for_open_port(1965)
with subtest("stargazer test suite"):
response = geminiserver.succeed("sh -c 'cd ${test_env}; ${test_script}/bin/test'")
print(response)
with subtest("stargazer cgi-user test"):
response = cgiTestServer.succeed("sh -c 'cd ${test_env}; ${test_script}/bin/test --checks CGIVars'")
print(response)
'';
}
@@ -21,7 +21,7 @@ index a572ed55dd..3dd6c2fda6 100644
lxvst_path = "/usr/local/lib64/lxvst:/usr/local/lib/lxvst:/usr/lib64/lxvst:/usr/lib/lxvst:"
"/usr/local/lib64/linux_vst:/usr/local/lib/linux_vst:/usr/lib64/linux_vst:/usr/lib/linux_vst:"
- "/usr/lib/vst:/usr/local/lib/vst";
+ "/usr/lib/vst:/usr/local/lib/vst:"
+ "/usr/lib/vst:/usr/local/lib/vst:$HOME/.nix-profile/lib/vst:"
+ "$HOME/.lxvst:$HOME/.nix-profile/lib/lxvst:/run/current-system/sw/lib/lxvst:/etc/profiles/per-user/$USER/lib/lxvst";
}
+8 -6
View File
@@ -1,17 +1,19 @@
{ fetchurl, lib, stdenv, pkg-config, libao, json_c, libgcrypt, ffmpeg, curl }:
{ fetchFromGitHub, lib, stdenv, pkg-config, libao, json_c, libgcrypt, ffmpeg_7, curl }:
stdenv.mkDerivation rec {
pname = "pianobar";
version = "2022.04.01";
version = "2022.04.01-unstable-2024-08-16";
src = fetchurl {
url = "https://6xq.net/projects/pianobar/${pname}-${version}.tar.bz2";
sha256 = "sha256-FnCyiGWouCpXu23+p/FuL6QUXS81SRC7FzgLMsm5R2M=";
src = fetchFromGitHub {
owner = "PromyLOPh";
repo = "pianobar";
rev = "41ac06c8585dc535c4b1737b4c2943bb3fe7beb0";
hash = "sha256-5LTZ6J9bvfsnpD/bGuojekutFVdH9feWLF+nLFvkeOA=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [
libao json_c libgcrypt ffmpeg curl
libao json_c libgcrypt ffmpeg_7 curl
];
makeFlags = [ "PREFIX=$(out)" ];
@@ -1004,6 +1004,11 @@
dependencies = with self; [ plenary-nvim ];
};
lsp-progress-nvim = neovimUtils.buildNeovimPlugin {
luaAttr = "lsp-progress-nvim";
nvimRequireCheck = "lsp-progress";
};
luasnip = super.luasnip.overrideAttrs {
dependencies = with self; [ luaPackages.jsregexp ];
};
@@ -1816,8 +1816,8 @@ let
mktplcRef = {
name = "dependi";
publisher = "fill-labs";
version = "0.7.7";
hash = "sha256-tskNhHWjfItmUAKPYvqB1knUcqoEmTzYasJSzw5KwTI=";
version = "0.7.8";
hash = "sha256-UxLpn86U5EI+qRUpEXt+ByirtCwOUknRwTwpfCF+tqQ=";
};
meta = {
changelog = "https://marketplace.visualstudio.com/items/fill-labs.dependi/changelog";
@@ -1,20 +1,27 @@
{ buildGoModule, buildNpmPackage, fetchFromGitHub, lib }:
{
buildGo123Module,
buildNpmPackage,
fetchFromGitHub,
lib,
}:
let
version = "2.31.0";
src = fetchFromGitHub {
owner = "filebrowser";
repo = "filebrowser";
rev = "v${version}";
hash = "sha256-zLM1fLrucIhzGdTTDu81ZnTIipK+iRnPhgfMiT1P+yg=";
};
frontend = buildNpmPackage rec {
pname = "filebrowser-frontend";
version = "2.23.0";
src = fetchFromGitHub {
owner = "filebrowser";
repo = "filebrowser";
rev = "v${version}";
hash = "sha256-xhBIJcEtxDdMXSgQtLAV0UWzPtrvKEil0WV76K5ycBc=";
};
inherit version src;
sourceRoot = "${src.name}/frontend";
npmDepsHash = "sha256-acNIMKHc4q7eiFLPBtKZBNweEsrt+//0VR6dqwXHTvA=";
npmDepsHash = "sha256-5/yEMWkNPAS8/PkaHlPBGFLiJu7xK2GHYo5dYqHAfCE=";
NODE_OPTIONS = "--openssl-legacy-provider";
@@ -28,18 +35,11 @@ let
'';
};
in
buildGoModule rec {
buildGo123Module {
pname = "filebrowser";
version = "2.23.0";
inherit version src;
src = fetchFromGitHub {
owner = "filebrowser";
repo = "filebrowser";
rev = "v${version}";
hash = "sha256-xhBIJcEtxDdMXSgQtLAV0UWzPtrvKEil0WV76K5ycBc=";
};
vendorHash = "sha256-MR0ju2Nomb3j78Z+1YcJY+jPd40MZpuOTuQJM94AM8A=";
vendorHash = "sha256-N5aUs8rgTYXeb0qJhPQBCa6lUDkT6lH1bh+1u4bixos=";
excludedPackages = [ "tools" ];
@@ -55,7 +55,8 @@ buildGoModule rec {
description = "Filebrowser is a web application for managing files and directories";
homepage = "https://filebrowser.org";
license = licenses.asl20;
maintainers = with maintainers; [ nielsegberts ];
maintainers = with maintainers; [ oakenshield ];
mainProgram = "filebrowser";
};
}
@@ -3,27 +3,27 @@
, fetchFromGitHub
, pnpm
, nodejs
, electron_30
, electron_31
, makeWrapper
, copyDesktopItems
, makeDesktopItem
}:
stdenv.mkDerivation rec {
pname = "armcord";
version = "3.2.8";
version = "3.3.0";
src = fetchFromGitHub {
owner = "ArmCord";
repo = "ArmCord";
rev = "v${version}";
hash = "sha256-H/Y3xA7gE24UsUkrxmrRFSvs16qZCVxli9vdnt7ihi8=";
hash = "sha256-nVirmGgR5yssMRXFUialMjTTSEa5nVNtue207eYUJCg=";
};
nativeBuildInputs = [ pnpm.configHook nodejs makeWrapper copyDesktopItems ];
pnpmDeps = pnpm.fetchDeps {
inherit pname version src;
hash = "sha256-hYp1XbWQL5NbIzzUSnZ7y7V+vYQmymRNo+EiSjn5d9E=";
hash = "sha256-ETnTWErdOIdcyK/v42bx+dFPPt+Lc0Lxyzo+RpxvEjU=";
};
ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
@@ -35,8 +35,8 @@ stdenv.mkDerivation rec {
npm exec electron-builder -- \
--dir \
-c.electronDist="${electron_30.dist}" \
-c.electronVersion="${electron_30.version}"
-c.electronDist="${electron_31.dist}" \
-c.electronVersion="${electron_31.version}"
runHook postBuild
'';
@@ -49,7 +49,7 @@ stdenv.mkDerivation rec {
install -Dm644 "build/icon.png" "$out/share/icons/hicolor/256x256/apps/armcord.png"
makeShellWrapper "${lib.getExe electron_30}" "$out/bin/armcord" \
makeShellWrapper "${lib.getExe electron_31}" "$out/bin/armcord" \
--add-flags "$out/share/lib/armcord/resources/app.asar" \
"''${gappsWrapperArgs[@]}" \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" \
@@ -238,7 +238,7 @@ stdenv.mkDerivation rec {
description = "Citrix Workspace";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
platforms = [ "x86_64-linux" ] ++ optional (versionOlder version "24") "i686-linux";
maintainers = with maintainers; [ michaeladler ];
maintainers = [ ];
inherit homepage;
};
}
+2 -2
View File
@@ -13,7 +13,7 @@
, rtl_sdr_source ? true, rtl-sdr-osmocom, libusb1 # osmocom better w/ rtlsdr v4
, rtl_tcp_source ? true
, sdrplay_source ? false, sdrplay
, soapy_source ? true, soapysdr
, soapy_source ? true, soapysdr-with-plugins
, spyserver_source ? true
, usrp_source ? false, uhd, boost
@@ -79,7 +79,7 @@ stdenv.mkDerivation rec {
++ lib.optional limesdr_source limesuite
++ lib.optionals rtl_sdr_source [ rtl-sdr-osmocom libusb1 ]
++ lib.optional sdrplay_source sdrplay
++ lib.optional soapy_source soapysdr
++ lib.optional soapy_source soapysdr-with-plugins
++ lib.optionals plutosdr_source [ libiio libad9361 ]
++ lib.optionals usrp_source [ uhd boost ]
++ lib.optional audio_sink rtaudio
@@ -1,5 +1,6 @@
{ stdenv
, lib
, fetchpatch
, fetchurl
, makeWrapper
, readline
@@ -73,6 +74,13 @@ stdenv.mkDerivation rec {
sha256 = "sha256-ZyMIdF63iiIklO6N1nhu3VvDMUVvzGRWrAZL2yjVh6g=";
};
patches = [
(fetchpatch {
url = "https://github.com/gap-system/gap/commit/c786e229413a44b7462196716b99ae9bb0071f4c.patch";
hash = "sha256-g3jrEMSavHAUKlHoPqWmOw49hWHU+29SA788Klnr0Uw=";
})
];
# remove all non-essential packages (which take up a lot of space)
preConfigure = lib.optionalString (!keepAll) (removeNonWhitelistedPkgs packagesToKeep) + ''
patchShebangs .
@@ -1,4 +1,4 @@
{lib, stdenv, fetchurl, gmp, mpir, cddlib}:
{lib, stdenv, fetchpatch, fetchurl, gmp, mpir, cddlib}:
stdenv.mkDerivation rec {
pname = "gfan";
version = "0.6.2";
@@ -10,6 +10,12 @@ stdenv.mkDerivation rec {
patches = [
./gfan-0.6.2-cddlib-prefix.patch
] ++ lib.optionals (stdenv.cc.isClang) [
(fetchpatch {
name = "clang-fix-miscompilation.patch";
url = "https://raw.githubusercontent.com/sagemath/sage/eea1f59394a5066e9acd8ae39a90302820914ee3/build/pkgs/gfan/patches/nodel.patch";
sha256 = "sha256-RrncSgFyrBIk/Bwe3accxiJ2rpOSJKQ84cV/uBvQsDc=";
})
];
postPatch = lib.optionalString stdenv.cc.isClang ''
@@ -9,18 +9,30 @@ assert (!blas.isILP64) && (!lapack.isILP64);
stdenv.mkDerivation rec {
pname = "giac${lib.optionalString enableGUI "-with-xcas"}";
version = "1.9.0-43"; # TODO try to remove preCheck phase on upgrade
version = "1.9.0-993"; # TODO try to remove preCheck phase on upgrade
src = fetchurl {
url = "https://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/giac_${version}.tar.gz";
sha256 = "sha256-466jB8ZRqHkU5XCY+j0Fh7Dq/mMaOu10rHECKbtNGrs=";
sha256 = "sha256-pqytFWrSWfEwQqRdRbaigGCq68s8mdgj2j8M+kclslE=";
};
patches = [
./remove-old-functional-patterns.patch
./fix-fltk-guard.patch
(fetchpatch {
name = "pari_2_11.patch";
url = "https://raw.githubusercontent.com/sagemath/sage/21ba7540d385a9864b44850d6987893dfa16bfc0/build/pkgs/giac/patches/pari_2_11.patch";
sha256 = "sha256-vEo/5MNzMdYRPWgLFPsDcMT1W80Qzj4EPBjx/B8j68k=";
name = "pari_2_15.patch";
url = "https://raw.githubusercontent.com/sagemath/sage/07a2afd65fb4b0a1c9cbc43ede7d4a18c921a000/build/pkgs/giac/patches/pari_2_15.patch";
sha256 = "sha256-Q3xBFED7XEAyNz6AHjzt63XtospmdGAIdS6iPq1C2UE=";
})
(fetchpatch {
name = "infinity.patch";
url = "https://github.com/geogebra/giac/commit/851c2cd91e879c79d6652f8a5d5bed03b65c6d39.patch";
sha256 = "sha256-WJRT2b8I9kgAkRuIugMiXoF4hT7yR7qyad8A6IspNTM=";
stripLen = 5;
extraPrefix = "/src/";
excludes = [ "src/kdisplay.cc" ];
})
# giac calls scanf/printf with non-constant first arguments, which
@@ -31,8 +43,12 @@ stdenv.mkDerivation rec {
sha256 = "sha256-r+M+9MRPRqhHcdhYWI6inxyNvWbXUbBcPCeDY7aulvk=";
})
# increase pari stack size for test chk_fhan{4,6}
./increase-pari-stack-size.patch
# issue with include path precedence
(fetchpatch {
name = "fix_implicit_declaration.patch";
url = "https://salsa.debian.org/science-team/giac/-/raw/c05ae9b9e74d3c6ee6411d391071989426a76201/debian/patches/fix_implicit_declaration.patch";
sha256 = "sha256-ompUceYJLiL0ftfjBkIMcYvX1YqG2/XA7e1yDyFY0IY=";
})
] ++ lib.optionals (!enableGUI) [
# when enableGui is false, giac is compiled without fltk. That
# means some outputs differ in the make check. Patch around this:
@@ -86,6 +102,12 @@ stdenv.mkDerivation rec {
# when fltk is disabled. disable these tests for now.
echo > check/chk_fhan2
echo > check/chk_fhan9
'' + lib.optionalString (stdenv.isDarwin) ''
# these cover a known regression in giac, likely due to how pari state
# is shared between multiple giac instances (see pari.cc.old).
# see https://github.com/NixOS/nixpkgs/pull/264126 for more information
echo > check/chk_fhan4
echo > check/chk_fhan6
'';
enableParallelBuilding = true;
@@ -96,6 +118,8 @@ stdenv.mkDerivation rec {
"--enable-ao" "--enable-ecm" "--enable-glpk"
] ++ lib.optionals enableGUI [
"--enable-gui" "--with-x"
] ++ lib.optionals stdenv.isDarwin [
"--disable-nls"
] ++ lib.optionals (!enableGUI) [
"--disable-fltk"
] ++ lib.optionals (!enableMicroPy) [
@@ -129,7 +153,6 @@ stdenv.mkDerivation rec {
homepage = "https://www-fourier.ujf-grenoble.fr/~parisse/giac.html";
license = licenses.gpl3Plus;
platforms = platforms.linux ++ (optionals (!enableGUI) platforms.darwin);
broken = stdenv.isDarwin && stdenv.isAarch64;
maintainers = [ maintainers.symphorien ];
};
}
@@ -0,0 +1,28 @@
From c7eafa2d7bde0d735b125912542acec2d5896c17 Mon Sep 17 00:00:00 2001
From: George Huebner <george@feyor.sh>
Date: Sat, 20 Jul 2024 02:31:20 -0500
Subject: [PATCH 3/4] remove erroneous HAVE_LIBFLTK guard
---
src/icas.cc | 4 ----
1 file changed, 4 deletions(-)
diff --git a/src/icas.cc b/src/icas.cc
index f91885b..17a0373 100644
--- a/src/icas.cc
+++ b/src/icas.cc
@@ -2407,11 +2407,7 @@ int main(int ARGC, char *ARGV[]){
#ifdef __APPLE__
startc=clock();
#endif
-#ifdef HAVE_LIBFLTK
xcas::icas_eval(gq,e,reading_file,filename,contextptr);
-#else
- e=eval(gq,1,contextptr);
-#endif
#ifdef __APPLE__
startc=clock()-startc;
#endif
--
2.44.1
@@ -1,18 +0,0 @@
diff -ur a/check/chk_fhan4 b/check/chk_fhan4
--- a/check/chk_fhan4 2018-03-13 19:27:11.000000000 +0100
+++ b/check/chk_fhan4 2023-05-20 16:31:30.349063063 +0200
@@ -1,4 +1,5 @@
#! /bin/sh
unset LANG
+export PARI_SIZE=2048000
../src/icas TP04-sol.cas > TP04.tst
diff TP04.tst TP04-sol.cas.out1
diff -ur a/check/chk_fhan6 b/check/chk_fhan6
--- a/check/chk_fhan6 2018-03-13 19:27:21.000000000 +0100
+++ b/check/chk_fhan6 2023-05-20 16:32:04.199407065 +0200
@@ -1,4 +1,5 @@
#! /bin/sh
unset LANG
+export PARI_SIZE=2048000
../src/icas TP06-sol.cas > TP06.tst
diff TP06.tst TP06-sol.cas.out1
@@ -0,0 +1,294 @@
From f1c5309d5b815acc2616cd9fbb5182b1e64d225f Mon Sep 17 00:00:00 2001
From: George Huebner <george@feyor.sh>
Date: Wed, 17 Jul 2024 18:12:36 -0500
Subject: [PATCH 1/4] remove old <functional> patterns
pointer_to_binary_function and ptr_fun are holdovers from pre c++11,
and can be replaced or entirely removed. This allows Giac to compile
with Clang 16>=.
---
src/all_global_var | 2 +-
src/gausspol.cc | 2 +-
src/gausspol.h | 2 +-
src/gen.cc | 2 +-
src/gen.h | 4 ++--
src/maple.cc | 2 +-
src/monomial.h | 16 ++++++++--------
src/plot.cc | 2 +-
src/poly.h | 17 +++++++++--------
src/solve.cc | 18 +++++++++---------
src/usual.cc | 2 +-
11 files changed, 35 insertions(+), 34 deletions(-)
diff --git a/src/all_global_var b/src/all_global_var
index 7d75d73..55f4782 100644
--- a/src/all_global_var
+++ b/src/all_global_var
@@ -16,7 +16,7 @@ Relatif a l'evaluation du tableur
// File Eqw.cc
vector<string> completion_tab;
// File alg_ext.cc
- rootmap symbolic_rootof_list(ptr_fun(islesscomplex));
+ rootmap symbolic_rootof_list(islesscomplex);
// File derive.cc
// File desolve.cc
identificateur laplace_var(" s");
diff --git a/src/gausspol.cc b/src/gausspol.cc
index 8fbd581..2f2121f 100644
--- a/src/gausspol.cc
+++ b/src/gausspol.cc
@@ -855,7 +855,7 @@ namespace giac {
std::vector< monomial<gen> >::const_iterator & itb_end,
std::vector< monomial<gen> > & new_coord,
bool (* is_strictly_greater)( const index_m &, const index_m &),
- const std::pointer_to_binary_function < const monomial<gen> &, const monomial<gen> &, bool> m_is_strictly_greater
+ const std::function<bool(const monomial<gen> &, const monomial<gen> &)> m_is_strictly_greater
) {
if (ita==ita_end || itb==itb_end){
new_coord.clear();
diff --git a/src/gausspol.h b/src/gausspol.h
index b5d214b..e6c7e0c 100644
--- a/src/gausspol.h
+++ b/src/gausspol.h
@@ -93,7 +93,7 @@ namespace giac {
std::vector< monomial<gen> >::const_iterator & itb_end,
std::vector< monomial<gen> > & new_coord,
bool (* is_strictly_greater)( const index_t &, const index_t &),
- const std::pointer_to_binary_function < const monomial<gen> &, const monomial<gen> &, bool> m_is_greater
+ const std::function<bool(const monomial<gen> &, const monomial<gen> &)> m_is_greater
) ;
void mulpoly(const polynome & th,const gen & fact,polynome & res);
polynome operator * (const polynome & th, const gen & fact) ;
diff --git a/src/gen.cc b/src/gen.cc
index 7d4874c..0b64afe 100644
--- a/src/gen.cc
+++ b/src/gen.cc
@@ -1126,7 +1126,7 @@ namespace giac {
#if 1 // def NSPIRE
g.__MAPptr = new ref_gen_map;
#else
- g.__MAPptr = new ref_gen_map(ptr_fun(islesscomplexthanf));
+ g.__MAPptr = new ref_gen_map(islesscomplexthanf);
#endif
#endif
g.type=_MAP;
diff --git a/src/gen.h b/src/gen.h
index 04d70af..496b25d 100644
--- a/src/gen.h
+++ b/src/gen.h
@@ -443,7 +443,7 @@ namespace giac {
};
typedef std::map<gen,gen,comparegen> gen_map;
#else
- typedef std::map<gen,gen,const std::pointer_to_binary_function < const gen &, const gen &, bool> > gen_map;
+ typedef std::map<gen,gen,const std::function<bool(const gen &, const gen &)> > gen_map;
#endif
struct ref_gen_map;
@@ -902,7 +902,7 @@ namespace giac {
#if 1 // def NSPIRE
ref_gen_map(): ref_count(1),m() {}
#else
- ref_gen_map(const std::pointer_to_binary_function < const gen &, const gen &, bool> & p): ref_count(1),m(p) {}
+ ref_gen_map(const std::function<bool(const gen &, const gen &)> & p): ref_count(1),m(p) {}
#endif
ref_gen_map(const gen_map & M):ref_count(1),m(M) {}
};
diff --git a/src/maple.cc b/src/maple.cc
index 3b33da8..d57a170 100644
--- a/src/maple.cc
+++ b/src/maple.cc
@@ -3626,7 +3626,7 @@ namespace giac {
#if 1 // def NSPIRE
gen_map m;
#else
- gen_map m(ptr_fun(islessthanf));
+ gen_map m(islessthanf);
#endif
int s=int(args.size());
vector<int> indexbegin,indexsize;
diff --git a/src/monomial.h b/src/monomial.h
index 6e606d0..637a76c 100644
--- a/src/monomial.h
+++ b/src/monomial.h
@@ -338,9 +338,9 @@ namespace giac {
template<class T> class sort_helper {
public:
- std::pointer_to_binary_function < const monomial<T> &, const monomial<T> &, bool> strictly_greater ;
- sort_helper(const std::pointer_to_binary_function < const monomial<T> &, const monomial<T> &, bool> is_strictly_greater):strictly_greater(is_strictly_greater) {};
- sort_helper():strictly_greater(std::ptr_fun<const monomial<T> &, const monomial<T> &, bool>(m_lex_is_strictly_greater<T>)) {};
+ std::function<bool(const monomial<T> &, const monomial<T> &)> strictly_greater ;
+ sort_helper(const std::function<bool(const monomial<T> &, const monomial<T> &)> is_strictly_greater):strictly_greater(is_strictly_greater) {};
+ sort_helper():strictly_greater(m_lex_is_strictly_greater<T>) {};
bool operator () (const monomial<T> & a, const monomial<T> & b){ return strictly_greater(a,b);}
};
@@ -677,7 +677,7 @@ namespace giac {
typename std::vector< monomial<T> >::const_iterator & itb_end,
std::vector< monomial<T> > & new_coord,
bool (* is_strictly_greater)( const index_m &, const index_m &),
- const std::pointer_to_binary_function < const monomial<T> &, const monomial<T> &, bool> m_is_strictly_greater
+ const std::function<bool(const monomial<T> &, const monomial<T> &)> m_is_strictly_greater
) {
if (ita==ita_end || itb==itb_end){
new_coord.clear();
@@ -726,8 +726,8 @@ namespace giac {
#endif
#ifndef NSPIRE
/* other algorithm using a map to avoid reserving too much space */
- typedef std::map< index_t,T,const std::pointer_to_binary_function < const index_m &, const index_m &, bool> > application;
- application produit(std::ptr_fun(is_strictly_greater));
+ typedef std::map< index_t,T,const std::function<bool(const index_m &, const index_m &)> > application;
+ application produit(is_strictly_greater);
// typedef std::map<index_t,T> application;
// application produit;
index_t somme(ita->index.size());
@@ -848,7 +848,7 @@ namespace giac {
typename std::vector< monomial<T> >::const_iterator a=v.begin(), a_end=v.end();
typename std::vector< monomial<T> >::const_iterator b=w.begin(), b_end=w.end();
std::vector< monomial<T> > res;
- Mul(a,a_end,b,b_end,res,i_lex_is_strictly_greater,std::ptr_fun< const monomial<T> &, const monomial<T> &, bool >((m_lex_is_strictly_greater<T>)));
+ Mul(a,a_end,b,b_end,res,i_lex_is_strictly_greater,m_lex_is_strictly_greater<T>);
return res ;
}
@@ -856,7 +856,7 @@ namespace giac {
std::vector< monomial<T> > & operator *= (std::vector< monomial<T> > & v,const std::vector< monomial<T> > & w){
typename std::vector< monomial<T> >::const_iterator a=v.begin(), a_end=v.end();
typename std::vector< monomial<T> >::const_iterator b=w.begin(), b_end=w.end();
- Mul(a,a_end,b,b_end,v,i_lex_is_strictly_greater,std::ptr_fun< const monomial<T> &, const monomial<T> &, bool >((m_lex_is_strictly_greater<T>)));
+ Mul(a,a_end,b,b_end,v,i_lex_is_strictly_greater,m_lex_is_strictly_greater<T>);
return v;
}
diff --git a/src/plot.cc b/src/plot.cc
index 288a1b5..ac85c9a 100755
--- a/src/plot.cc
+++ b/src/plot.cc
@@ -11886,7 +11886,7 @@ static vecteur densityscale(double xmin,double xmax,double ymin,double ymax,doub
#if 1 // def NSPIRE
gen_map m;
#else
- gen_map m(ptr_fun(islesscomplexthanf));
+ gen_map m(islesscomplexthanf);
#endif
int taille;
is >> taille;
diff --git a/src/poly.h b/src/poly.h
index 7d64e2c..d9ff991 100644
--- a/src/poly.h
+++ b/src/poly.h
@@ -40,23 +40,24 @@ namespace giac {
// T zero;
// functional object sorting function for monomial ordering
bool (* is_strictly_greater)( const index_m &, const index_m &);
- std::pointer_to_binary_function < const monomial<T> &, const monomial<T> &, bool> m_is_strictly_greater ;
+ std::function<bool(const monomial<T> &, const monomial<T> &)> m_is_strictly_greater ;
// constructors
tensor(const tensor<T> & t) : dim(t.dim), coord(t.coord), is_strictly_greater(t.is_strictly_greater), m_is_strictly_greater(t.m_is_strictly_greater) { }
tensor(const tensor<T> & t, const std::vector< monomial<T> > & v) : dim(t.dim), coord(v), is_strictly_greater(t.is_strictly_greater), m_is_strictly_greater(t.m_is_strictly_greater) { }
// warning: this constructor prohibits construction of tensor from a value
// of type T if this value is an int, except by using tensor<T>(T(int))
- tensor() : dim(0), is_strictly_greater(i_lex_is_strictly_greater), m_is_strictly_greater(std::ptr_fun<const monomial<T> &, const monomial<T> &, bool>(m_lex_is_strictly_greater<T>)) { }
- explicit tensor(int d) : dim(d), is_strictly_greater(i_lex_is_strictly_greater), m_is_strictly_greater(std::ptr_fun<const monomial<T> &, const monomial<T> &, bool>(m_lex_is_strictly_greater<T>)) { }
+ // DANGER
+ tensor() : dim(0), is_strictly_greater(i_lex_is_strictly_greater), m_is_strictly_greater(m_lex_is_strictly_greater<T>) { }
+ explicit tensor(int d) : dim(d), is_strictly_greater(i_lex_is_strictly_greater), m_is_strictly_greater(m_lex_is_strictly_greater<T>) { }
explicit tensor(int d,const tensor<T> & t) : dim(d),is_strictly_greater(t.is_strictly_greater), m_is_strictly_greater(t.m_is_strictly_greater) { }
- tensor(const monomial<T> & v) : dim(int(v.index.size())), is_strictly_greater(i_lex_is_strictly_greater), m_is_strictly_greater(std::ptr_fun<const monomial<T> &, const monomial<T> &, bool>(m_lex_is_strictly_greater<T>)) {
+ tensor(const monomial<T> & v) : dim(int(v.index.size())), is_strictly_greater(i_lex_is_strictly_greater), m_is_strictly_greater(m_lex_is_strictly_greater<T>) {
coord.push_back(v);
}
- tensor(const T & v, int d) : dim(d), is_strictly_greater(i_lex_is_strictly_greater), m_is_strictly_greater(std::ptr_fun<const monomial<T> &, const monomial<T> &, bool>(m_lex_is_strictly_greater<T>)) {
+ tensor(const T & v, int d) : dim(d), is_strictly_greater(i_lex_is_strictly_greater), m_is_strictly_greater(m_lex_is_strictly_greater<T>) {
if (!is_zero(v))
coord.push_back(monomial<T>(v,0,d));
}
- tensor(int d,const std::vector< monomial<T> > & c) : dim(d), coord(c), is_strictly_greater(i_lex_is_strictly_greater),m_is_strictly_greater(std::ptr_fun<const monomial<T> &, const monomial<T> &, bool>(m_lex_is_strictly_greater<T>)) { }
+ tensor(int d,const std::vector< monomial<T> > & c) : dim(d), coord(c), is_strictly_greater(i_lex_is_strictly_greater),m_is_strictly_greater(m_lex_is_strictly_greater<T>) { }
~tensor() { coord.clear(); }
// member functions
// ordering monomials in the tensor
@@ -519,10 +520,10 @@ namespace giac {
template <class T>
void lexsort(std::vector < monomial<T> > & v){
#if 1 // def NSPIRE
- sort_helper<T> M(std::ptr_fun<const monomial<T> &, const monomial<T> &, bool>(m_lex_is_strictly_greater<T>));
+ sort_helper<T> M(m_lex_is_strictly_greater<T>);
sort(v.begin(),v.end(),M);
#else
- sort(v.begin(),v.end(),std::ptr_fun<const monomial<T> &, const monomial<T> &, bool>(m_lex_is_strictly_greater<T>));
+ sort(v.begin(),v.end(),m_lex_is_strictly_greater<T>);
#endif
}
diff --git a/src/solve.cc b/src/solve.cc
index 889f824..2a51ab8 100755
--- a/src/solve.cc
+++ b/src/solve.cc
@@ -8684,39 +8684,39 @@ namespace giac {
switch (order.val){
case _PLEX_ORDER:
p.is_strictly_greater=i_lex_is_strictly_greater;
- p.m_is_strictly_greater=std::ptr_fun(m_lex_is_strictly_greater<gen>);
+ p.m_is_strictly_greater=m_lex_is_strictly_greater<gen>;
break;
case _REVLEX_ORDER:
p.is_strictly_greater=i_total_revlex_is_strictly_greater;
- p.m_is_strictly_greater=std::ptr_fun(m_total_revlex_is_strictly_greater<gen>);
+ p.m_is_strictly_greater=m_total_revlex_is_strictly_greater<gen>;
break;
case _TDEG_ORDER:
p.is_strictly_greater=i_total_lex_is_strictly_greater;
- p.m_is_strictly_greater=std::ptr_fun(m_total_lex_is_strictly_greater<gen>);
+ p.m_is_strictly_greater=m_total_lex_is_strictly_greater<gen>;
break;
case _3VAR_ORDER:
p.is_strictly_greater=i_3var_is_strictly_greater;
- p.m_is_strictly_greater=std::ptr_fun(m_3var_is_strictly_greater<gen>);
+ p.m_is_strictly_greater=m_3var_is_strictly_greater<gen>;
break;
case _7VAR_ORDER:
p.is_strictly_greater=i_7var_is_strictly_greater;
- p.m_is_strictly_greater=std::ptr_fun(m_7var_is_strictly_greater<gen>);
+ p.m_is_strictly_greater=m_7var_is_strictly_greater<gen>;
break;
case _11VAR_ORDER:
p.is_strictly_greater=i_11var_is_strictly_greater;
- p.m_is_strictly_greater=std::ptr_fun(m_11var_is_strictly_greater<gen>);
+ p.m_is_strictly_greater=m_11var_is_strictly_greater<gen>;
break;
case _16VAR_ORDER:
p.is_strictly_greater=i_16var_is_strictly_greater;
- p.m_is_strictly_greater=std::ptr_fun(m_16var_is_strictly_greater<gen>);
+ p.m_is_strictly_greater=m_16var_is_strictly_greater<gen>;
break;
case _32VAR_ORDER:
p.is_strictly_greater=i_32var_is_strictly_greater;
- p.m_is_strictly_greater=std::ptr_fun(m_32var_is_strictly_greater<gen>);
+ p.m_is_strictly_greater=m_32var_is_strictly_greater<gen>;
break;
case _64VAR_ORDER:
p.is_strictly_greater=i_64var_is_strictly_greater;
- p.m_is_strictly_greater=std::ptr_fun(m_64var_is_strictly_greater<gen>);
+ p.m_is_strictly_greater=m_64var_is_strictly_greater<gen>;
break;
}
p.tsort();
diff --git a/src/usual.cc b/src/usual.cc
index fddede6..eb7ae5e 100755
--- a/src/usual.cc
+++ b/src/usual.cc
@@ -5950,7 +5950,7 @@ namespace giac {
#if 1 // def NSPIRE
gen_map m;
#else
- gen_map m(ptr_fun(islesscomplexthanf));
+ gen_map m(islesscomplexthanf);
#endif
for (;it!=itend;++it){
if (is_equal(*it) || it->is_symb_of_sommet(at_deuxpoints)){
--
2.44.1
@@ -18,7 +18,7 @@ let
inherit flint3;
inherit sage-src env-locations singular;
inherit (maxima) lisp-compiler;
linbox = pkgs.linbox.override { withSage = true; };
linbox = pkgs.linbox;
pkg-config = pkgs.pkg-config; # not to confuse with pythonPackages.pkg-config
};
@@ -0,0 +1,36 @@
From d6362714c9acf4cab69f3e2e772ec0bb1dfd39fe Mon Sep 17 00:00:00 2001
From: George Huebner <george@feyor.sh>
Date: Mon, 22 Jul 2024 00:37:53 -0500
Subject: [PATCH] disable singular version doctest to avoid exceeding the stack
limit
It works fine interactively, only an issue for Nix builds
---
src/sage/interfaces/singular.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/sage/interfaces/singular.py b/src/sage/interfaces/singular.py
index c0ab80e0a6..c778acdb0c 100644
--- a/src/sage/interfaces/singular.py
+++ b/src/sage/interfaces/singular.py
@@ -1262,7 +1262,7 @@ class Singular(ExtraTabCompletion, Expect):
EXAMPLES::
- sage: singular.version()
+ sage: singular.version() # not tested
"Singular ... version 4...
"""
return singular_version()
@@ -2475,7 +2475,7 @@ def singular_version():
EXAMPLES::
- sage: singular.version()
+ sage: singular.version() # not tested
"Singular ... version 4...
"""
return singular.eval('system("--version");')
--
2.44.1
@@ -0,0 +1,27 @@
From 06d3bb5d8ef007bbcd71ee157fd97cd69557383b Mon Sep 17 00:00:00 2001
From: George Huebner <george@feyor.sh>
Date: Sat, 20 Jul 2024 18:46:04 -0500
Subject: [PATCH] sage.cython: silence linker
(Nix+LLVM specific issue) "ld: warning: directory not found" causes
any cython doctest to fail and is annoying, so I told ld to shut up.
---
src/sage/misc/cython.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/sage/misc/cython.py b/src/sage/misc/cython.py
index 545e1227b0..c5f4b69221 100644
--- a/src/sage/misc/cython.py
+++ b/src/sage/misc/cython.py
@@ -339,7 +339,7 @@ def cython(filename, verbose=0, compile_message=False,
Cython.Compiler.Options.pre_import = "sage.all" if sage_namespace else None
extra_compile_args = ['-w'] # no warnings
- extra_link_args = []
+ extra_link_args = ['-w']
ext = Extension(name,
sources=[pyxfile],
--
2.44.1
@@ -10,6 +10,7 @@
, coreutils
, gnused
, gnugrep
, gawk
, binutils
, pythonEnv
, python3
@@ -70,6 +71,7 @@ let
coreutils
gnused
gnugrep
gawk
binutils.bintools
pkg-config
pari
@@ -186,7 +188,7 @@ writeTextFile rec {
export SAGE_EXTCODE='${sagelib.src}/src/sage/ext_data'
# for find_library
export DYLD_LIBRARY_PATH="${lib.makeLibraryPath [stdenv.cc.libc singular giac]}''${DYLD_LIBRARY_PATH:+:}$DYLD_LIBRARY_PATH"
export DYLD_LIBRARY_PATH="${lib.makeLibraryPath [stdenv.cc.libc singular giac gap]}''${DYLD_LIBRARY_PATH:+:}$DYLD_LIBRARY_PATH"
'';
} // { # equivalent of `passthru`, which `writeTextFile` doesn't support
lib = sagelib;
@@ -1,4 +1,5 @@
{ stdenv
, lib
, fetchFromGitHub
, fetchpatch
, fetchurl
@@ -40,6 +41,13 @@ stdenv.mkDerivation rec {
# we can now set the cache dir to be within the .sage directory. This is
# not strictly necessary, but keeps us from littering in the user's HOME.
./patches/sympow-cache.patch
] ++ lib.optionals (stdenv.cc.isClang) [
# https://github.com/NixOS/nixpkgs/pull/264126
# Dead links in python sysconfig cause LLVM linker warnings, leading to cython doctest failures.
./patches/silence-linker.patch
# Stack overflows during doctests; this does not change functionality.
./patches/disable-singular-doctest.patch
];
# Since sage unfortunately does not release bugfix releases, packagers must
@@ -64,6 +72,13 @@ stdenv.mkDerivation rec {
# compile libs/gap/element.pyx with -O1
# a more conservative version of https://github.com/sagemath/sage/pull/37951
./patches/gap-element-crash.patch
# https://github.com/sagemath/sage/pull/37886, landed in 10.4.beta7
(fetchpatch {
name = "remove-xcode.patch";
url = "https://github.com/sagemath/sage/commit/8e72038b4ab24fb63c06b28f6eb43097b9ab24d6.patch";
sha256 = "sha256-hufDJFUBa/Trn1xsVNvzb2c1wE9iyhqewj3RMjVtENA=";
})
];
# Patches needed because of package updates. We could just pin the versions of
@@ -73,6 +88,12 @@ stdenv.mkDerivation rec {
# should come from or be proposed to upstream. This list will probably never
# be empty since dependencies update all the time.
packageUpgradePatches = [
# https://github.com/sagemath/sage/pull/37646, landed in 10.4.beta1
(fetchpatch {
name = "cpp-17.patch";
url = "https://github.com/sagemath/sage/commit/9b0a40d6cd17706db31d5ff8cdd78910409ba1c8.patch";
sha256 = "sha256-2pJ9eH+o9O76Tsmklc/frzDOFkvPjvs2JQWCSqA+tMs=";
})
# https://github.com/sagemath/sage/pull/37763, landed in 10.4.beta2
(fetchpatch {
name = "scipy-fault-tolerance.patch";
+1 -1
View File
@@ -60,6 +60,6 @@ stdenv.mkDerivation rec {
homepage = "https://www.sagemath.org";
license = licenses.gpl2Plus;
maintainers = teams.sage.members;
platforms = platforms.linux;
platforms = platforms.linux ++ [ "aarch64-darwin" ];
};
}
@@ -7,6 +7,7 @@
, getconf
, flint3
, ntl
, mpfr
, cddlib
, gfan
, lrcalc
@@ -15,8 +16,7 @@
, latex2html
, texinfo
, texliveSmall
, enableDocs ? !stdenv.isDarwin
, enableGfanlib ? true
, enableDocs ? true
}:
stdenv.mkDerivation rec {
@@ -40,12 +40,11 @@ stdenv.mkDerivation rec {
};
configureFlags = [
"--enable-gfanlib"
"--with-ntl=${ntl}"
"--disable-pyobject-module"
"--with-flint=${flint3}"
] ++ lib.optionals enableDocs [
"--enable-doc-build"
] ++ lib.optionals enableGfanlib [
"--enable-gfanlib"
];
prePatch = ''
@@ -61,14 +60,15 @@ stdenv.mkDerivation rec {
buildInputs = [
# necessary
gmp
flint3
# by upstream recommended but optional
ncurses
readline
ntl
flint3
mpfr
lrcalc
# for gfanlib
gfan
] ++ lib.optionals enableGfanlib [
cddlib
];
@@ -100,6 +100,8 @@ stdenv.mkDerivation rec {
doCheck = true; # very basic checks, does not test any libraries
installPhase = ''
# clean up any artefacts a previous non-sandboxed docbuild may have left behind
rm /tmp/conic.log /tmp/conic.tex /tmp/tropicalcurve*.tex || true
make install
'' + lib.optionalString enableDocs ''
# Sage uses singular.info, which is not installed by default
@@ -118,8 +120,8 @@ stdenv.mkDerivation rec {
"Buch/buch.lst"
"Plural/short.lst"
"Old/factor.tst"
] ++ lib.optionals enableGfanlib [
# tests that require gfanlib
# requires "DivRemIdU", a syzextra (undocumented) command
"Short/ok_s.lst"
];
+1 -1
View File
@@ -80,7 +80,7 @@ rec {
'';
};
} // lib.mapAttrs (old: new: platform:
lib.warn "`rust.${old} platform` is deprecated. Use `platform.rust.${new}` instead."
lib.warn "`rust.${old} platform` is deprecated. Use `platform.rust.${lib.showAttrPath new}` instead."
lib.getAttrFromPath new platform.rust)
{
toTargetArch = [ "platform" "arch" ];
+6 -6
View File
@@ -84,20 +84,20 @@ buildGoModule rec {
printf "#!/bin/sh\ntrue" > ./Tools/src/checkstyle.sh
substituteInPlace agent/platform/platform_unix.go \
--replace "/usr/bin/uname" "${coreutils}/bin/uname" \
--replace '"/bin", "hostname"' '"${nettools}/bin/hostname"' \
--replace '"lsb_release"' '"${fake-lsb-release}/bin/lsb_release"'
--replace-fail "/usr/bin/uname" "${coreutils}/bin/uname" \
--replace-fail '"/bin", "hostname"' '"${nettools}/bin/hostname"' \
--replace-fail '"lsb_release"' '"${fake-lsb-release}/bin/lsb_release"'
substituteInPlace agent/session/shell/shell_unix.go \
--replace '"script"' '"${util-linux}/bin/script"'
--replace-fail '"script"' '"${util-linux}/bin/script"'
substituteInPlace agent/rebooter/rebooter_unix.go \
--replace "/sbin/shutdown" "shutdown"
--replace-fail "/sbin/shutdown" "shutdown"
echo "${version}" > VERSION
'' + lib.optionalString stdenv.isLinux ''
substituteInPlace agent/managedInstances/fingerprint/hardwareInfo_unix.go \
--replace /usr/sbin/dmidecode ${dmidecode}/bin/dmidecode
--replace-fail /usr/sbin/dmidecode ${dmidecode}/bin/dmidecode
'';
preBuild = ''
+1 -1
View File
@@ -20,7 +20,7 @@ stdenv.mkDerivation (finalAttrs: {
in ''
substituteInPlace \
apfs-snap/Makefile apfsck/Makefile mkapfs/Makefile \
--replace \
--replace-fail \
'$(shell git describe --always HEAD | tail -c 9)' \
'${shortRev}'
'';
+2 -2
View File
@@ -87,13 +87,13 @@ stdenv.mkDerivation (finalAttrs: {
install -Dm755 dist/unix/armitage $out/bin/armitage
substituteInPlace $out/bin/armitage \
--replace "armitage.jar" "$JAR"
--replace-fail "armitage.jar" "$JAR"
wrapProgram $out/bin/armitage \
--prefix PATH : "${lib.makeBinPath [ jdk11 metasploit ]}"
install -Dm755 dist/unix/teamserver $out/bin/teamserver
substituteInPlace $out/bin/teamserver \
--replace "armitage.jar" "$JAR"
--replace-fail "armitage.jar" "$JAR"
wrapProgram $out/bin/teamserver \
--prefix PATH : "${lib.makeBinPath [ jdk11 metasploit ]}"
+44
View File
@@ -0,0 +1,44 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
mkfontdir,
mkfontscale,
}:
stdenvNoCC.mkDerivation {
pname = "beon";
version = "2024-02-26";
src = fetchFromGitHub {
owner = "noirblancrouge";
repo = "Beon";
rev = "c0379c80a3b7d01532413f43f49904b2567341ac";
hash = "sha256-jBLVVykHFJamOVF6GSRnQqYixqOrw5K1oV1B3sl4Zoc=";
};
nativeBuildInputs = [
mkfontscale
mkfontdir
];
installPhase = ''
runHook preInstall
install -D -v fonts/ttf/Beon-Regular.ttf $out/share/fonts/truetype/Beon-Regular.ttf
cd $out/share/fonts
mkfontdir
mkfontscale
runHook postInstall
'';
meta = {
description = "Neon stencil typeface";
homepage = "https://noirblancrouge.com/fonts/beon-display";
changelog = "https://github.com/noirblancrouge/Beon#changelog";
license = lib.licenses.ofl;
maintainers = with lib.maintainers; [ raboof ];
platforms = lib.platforms.all;
};
}
+4 -4
View File
@@ -5,16 +5,16 @@
rustPlatform.buildRustPackage rec {
pname = "cmd-wrapped";
version = "0.2.0";
version = "0.4.1";
src = fetchFromGitHub {
owner = "YiNNx";
repo = "cmd-wrapped";
rev = version;
hash = "sha256-YWX4T3EiBIbEG/NGShuHRyxfdVGrqQH6J42EDkRblNQ=";
rev = "v${version}";
hash = "sha256-tIvwJo33Jz9cPq6o4Ytc3VqkxEaxt0W9Fd8CNp+7vAE=";
};
cargoHash = "sha256-CM2IpWs1vGiXHvQNgHyD6cUgMYSkp5+23j+YyF9G9IE=";
cargoHash = "sha256-pAlAWG9Dfqhhvl7uVvzr4nx481seIwwzBg+5SSsje84=";
meta = with lib; {
description = "Find out what the past year looks like in commandline";
@@ -0,0 +1,35 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
glib,
dbus,
openssl_3,
}:
rustPlatform.buildRustPackage rec {
pname = "cwe-client-cli";
version = "0.3.2";
src = fetchFromGitHub {
owner = "NotBalds";
repo = "cwe-client-cli";
rev = "v${version}";
hash = "sha256-7zzmYwuQ+Sg8hf1zuKtKUMgk0Is1YJB4WdOKdxtWRA0=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [
glib
dbus
openssl_3
];
cargoHash = "sha256-VgbNwqDVcORWJB5QjH39gZZtW1n2Me9FxVUhb4vIg1A=";
meta = {
description = "Simple command line client for CWE";
homepage = "https://github.com/NotBalds/cwe-client-cli";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ tbwanderer ];
mainProgram = "cwe-client-cli";
platforms = lib.platforms.linux;
};
}
+5 -5
View File
@@ -15,7 +15,7 @@
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "dbeaver-bin";
version = "24.1.5";
version = "24.2.0";
src =
let
@@ -28,10 +28,10 @@ stdenvNoCC.mkDerivation (finalAttrs: {
aarch64-darwin = "macos-aarch64.dmg";
};
hash = selectSystem {
x86_64-linux = "sha256-FdrQDQ+2nsZp44+sARXT89/ZXlkl/OGej1JuezXGgU4=";
aarch64-linux = "sha256-oNP0ntsQ79ckNXuQ3TeVf9ooGzwCq7WXI0TbjTLC5DI=";
x86_64-darwin = "sha256-YcmMZPigykA9vNEF32NzCQWMWPt1GM7VaWGSAZp/1YM=";
aarch64-darwin = "sha256-tz+Ap/YZJbc+obCLqq2b2HgRUORWkaOHVGEEJtwEJXo=";
x86_64-linux = "sha256-N4r2immlH6B6rWluFX9abU5gnavPFY1ZoNtKpzCxwh4=";
aarch64-linux = "sha256-oRU+0iMLno1xIVI3NzeJfDrz5CuPlccICM/zpxRvV40=";
x86_64-darwin = "sha256-oUUof1HYeULP3qPr9mB69ZU83VuI4hJ09w03fjc+1Y4=";
aarch64-darwin = "sha256-JZfj0dgaqEndzyLgBwFrFebWxz7O/53qA9aTeOEWvLE=";
};
in
fetchurl {
+2 -2
View File
@@ -47,13 +47,13 @@ let
in
stdenv'.mkDerivation (finalAttrs: {
pname = "fastfetch";
version = "2.22.0";
version = "2.23.0";
src = fetchFromGitHub {
owner = "fastfetch-cli";
repo = "fastfetch";
rev = finalAttrs.version;
hash = "sha256-ncaBMSV7n4RVA2376ExBv+a8bzuvuMttv3GlNaOH23k=";
hash = "sha256-ry7FWja/FGSTQU1IhfXUA778yO0T3O1cvYsS4pcqURY=";
};
outputs = [
@@ -1,6 +1,19 @@
{ lib, stdenv, fetchurl, coreutils, openjdk17, makeWrapper, autoPatchelfHook
, zlib, libzen, libmediainfo, curlWithGnuTls, libmms, glib
, genericUpdater, writeShellScript
{
lib,
stdenv,
fetchurl,
coreutils,
openjdk17,
makeWrapper,
autoPatchelfHook,
zlib,
libzen,
libmediainfo,
curlWithGnuTls,
libmms,
glib,
genericUpdater,
writeShellScript,
}:
let
@@ -8,20 +21,31 @@ let
url = "https://search.maven.org/remotecontent?filepath=com/googlecode/lanterna/lanterna/3.1.1/lanterna-3.1.1.jar";
hash = "sha256-7zxCeXYW5v9ritnvkwRpPKdgSptCmkT3HJOaNgQHUmQ=";
};
in stdenv.mkDerivation (finalAttrs: {
in
stdenv.mkDerivation (finalAttrs: {
pname = "filebot";
version = "5.1.4";
version = "5.1.5";
src = fetchurl {
url = "https://web.archive.org/web/20230917142929/https://get.filebot.net/filebot/FileBot_${finalAttrs.version}/FileBot_${finalAttrs.version}-portable.tar.xz";
hash = "sha256-UEgG3bQT5GPMfh/nxC1aXGsb8HKE5Ov5ax0ULjLr73U=";
hash = "sha256-fwyo9J5O728xxWHWvq63bTJMV4IAMAHZR0yr3Pb6d7U=";
};
unpackPhase = "tar xvf $src";
nativeBuildInputs = [ makeWrapper autoPatchelfHook ];
nativeBuildInputs = [
makeWrapper
autoPatchelfHook
];
buildInputs = [ zlib libzen libmediainfo curlWithGnuTls libmms glib ];
buildInputs = [
zlib
libzen
libmediainfo
curlWithGnuTls
libmms
glib
];
postPatch = ''
# replace lanterna.jar to be able to specify `com.googlecode.lanterna.terminal.UnixTerminal.sttyCommand`
@@ -65,7 +89,10 @@ in stdenv.mkDerivation (finalAttrs: {
binaryNativeCode
];
license = licenses.unfreeRedistributable;
maintainers = with maintainers; [ gleber felschr ];
maintainers = with maintainers; [
gleber
felschr
];
platforms = platforms.linux;
mainProgram = "filebot";
};
+32
View File
@@ -0,0 +1,32 @@
{
lib,
python3Packages,
fetchFromGitHub,
}:
python3Packages.buildPythonApplication rec {
pname = "gersemi";
version = "0.15.1";
src = fetchFromGitHub {
owner = "BlankSpruce";
repo = "gersemi";
rev = version;
hash = "sha256-MyiGmMITD6TlZ98qsSDalQWOWnpqelTrXKn6MmBGYS0=";
};
propagatedBuildInputs = with python3Packages; [
appdirs
colorama
lark
pyyaml
];
meta = {
description = "Formatter to make your CMake code the real treasure";
homepage = "https://github.com/BlankSpruce/gersemi";
license = lib.licenses.mpl20;
maintainers = with lib.maintainers; [ xeals ];
mainProgram = "gersemi";
};
}
+3 -1
View File
@@ -120,6 +120,8 @@ stdenv.mkDerivation (finalAttrs: {
license = lib.licenses.gpl2Plus;
mainProgram = "ghdl";
maintainers = with lib.maintainers; [ lucus16 thoughtpolice ];
platforms = lib.platforms.linux;
platforms =
lib.platforms.linux
++ lib.optionals (backend == "mcode" || backend == "llvm") [ "x86_64-darwin" ];
};
})
+8 -1
View File
@@ -2,6 +2,8 @@
, fetchFromGitHub
, lib
, nix-update-script
, gitlab-ci-local
, testers
}:
buildNpmPackage rec {
@@ -23,7 +25,12 @@ buildNpmPackage rec {
--replace-fail "npm run cleanup" "true"
'';
passthru.updateScript = nix-update-script { };
passthru = {
updateScript = nix-update-script { };
tests.version = testers.testVersion {
package = gitlab-ci-local;
};
};
meta = with lib;{
description = "Run gitlab pipelines locally as shell executor or docker executor";
+3 -3
View File
@@ -2,16 +2,16 @@
buildNpmPackage rec {
pname = "inshellisense";
version = "0.0.1-rc.15";
version = "0.0.1-rc.16";
src = fetchFromGitHub {
owner = "microsoft";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-/6pU8ubasONPMe1qnE+Db0nzdHRQTo9fhMr7Xxjgsos=";
hash = "sha256-jqLYN251ZvLOjYsSQJmvQ1TupO4jz3Q23aDpKX+Puvs=";
};
npmDepsHash = "sha256-rOyvFA5X3o1TCgY54XxNSg0+QotA8IUauLngTtJuRj4=";
npmDepsHash = "sha256-rGUyA0RLnNZ6ocmHPXfBLJ6ZmeeTN9w+TJTtfTQQ24M=";
# Needed for dependency `@homebridge/node-pty-prebuilt-multiarch`
# On Darwin systems the build fails with,
+2 -2
View File
@@ -10,13 +10,13 @@
stdenv.mkDerivation rec {
pname = "marwaita-red";
version = "20.3.1";
version = "21";
src = fetchFromGitHub {
owner = "darkomarko42";
repo = pname;
rev = version;
hash = "sha256-cMZDd/WQFrfr6Zrq1/1It26OmML3cf7+ZU/I8IMjuX4=";
hash = "sha256-VCNwWtAzMORF+gXjcLhJCsmllGD2xGgRSS3WxaVoRfU=";
};
buildInputs = [
+2 -2
View File
@@ -6,13 +6,13 @@
buildGoModule rec {
pname = "meteor-git";
version = "0.23.0";
version = "0.23.1";
src = fetchFromGitHub {
owner = "stefanlogue";
repo = "meteor";
rev = "v${version}";
hash = "sha256-UA6bye9ti9AwnZkBIGjljDElkIEOhsiJ0NyYdKbF5m0=";
hash = "sha256-APsP9kzO5QMCgqIaMF01/NB3bT17gNNFZ1mxFThfvgQ=";
};
vendorHash = "sha256-jKd/eJwp5SZvTrP3RN7xT7ibAB0PQondGR3RT+HQXIo=";
+3 -3
View File
@@ -7,17 +7,17 @@
let
pname = "mqttx";
version = "1.9.9";
version = "1.10.1";
suffixedUrl = suffix: "https://github.com/emqx/MQTTX/releases/download/v${version}/MQTTX-${version}${suffix}.AppImage";
sources = {
"aarch64-linux" = fetchurl {
url = suffixedUrl "-arm64";
hash = "sha256-mCCRvLS6diKoKYZNUMsyiWyFWmyYYB0pAxNT0yriJHI=";
hash = "sha256-QumOqOOFXOXf0oqXWVaz0+69kHDk3HQKvNcQl8X7Fp8=";
};
"x86_64-linux" = fetchurl {
url = suffixedUrl "";
hash = "sha256-InGfGiT3c5M8ueFZl5/hFmYRPeXnwSCUPhAqmz0jsU8=";
hash = "sha256-+TyZnx3/qraoA3rcpIDKedGyTzFvdaAE/v4pzXrB0zU=";
};
};
+2 -2
View File
@@ -10,11 +10,11 @@
stdenv.mkDerivation rec {
pname = "nexus";
version = "3.69.0-02";
version = "3.70.1-02";
src = fetchurl {
url = "https://download.sonatype.com/nexus/3/nexus-${version}-unix.tar.gz";
hash = "sha256-7sgLPuM93mFEPlTd3qJY+FGVHErvgcTGJWwSBcqBgWI=";
hash = "sha256-oBappm8WRcgyD5HWqJKPbMHjlwCUo9y5+FtB2Kq1PCE=";
};
preferLocalBuild = true;
+25
View File
@@ -0,0 +1,25 @@
{stdenv, lib, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "rutorrent";
version = "4.2.10";
src = fetchFromGitHub {
owner = "Novik";
repo = "ruTorrent";
rev = "v${version}";
sha256 = "Hkh2fWaZpJLxUYaojR97XVQWXTRzmFkQe4xKsmY1E8M=";
};
installPhase = ''
mkdir -p $out/
cp -r . $out/
'';
meta = with lib; {
description = "Yet another web front-end for rTorrent";
homepage = "https://github.com/Novik/ruTorrent";
license = licenses.gpl3Plus;
platforms = platforms.unix;
};
}
+24 -29
View File
@@ -70,39 +70,34 @@ stdenv.mkDerivation (finalAttrs: {
vulkan-memory-allocator
];
configurePhase = let
gnFlags = let
cpu = {
"x86_64" = "x64";
"i686" = "x86";
"arm" = "arm";
"aarch64" = "arm64";
}.${stdenv.hostPlatform.parsed.cpu.name};
in ''
runHook preConfigure
gn gen build --args='${toString ([
# Build in release mode
"is_official_build=true"
"is_component_build=true"
# Don't use missing tools
"skia_use_dng_sdk=false"
"skia_use_wuffs=false"
# Use system dependencies
"extra_cflags=[\"-I${harfbuzzFull.dev}/include/harfbuzz\"]"
"cc=\"${stdenv.cc.targetPrefix}cc\""
"cxx=\"${stdenv.cc.targetPrefix}c++\""
"ar=\"${stdenv.cc.targetPrefix}ar\""
"target_cpu=\"${cpu}\""
] ++ map (lib: "skia_use_system_${lib}=true") [
"zlib"
"harfbuzz"
"libpng"
"libwebp"
] ++ lib.optionals enableVulkan [
"skia_use_vulkan=true"
])}'
cd build
runHook postConfigure
'';
in [
# Build in release mode
"is_official_build=true"
"is_component_build=true"
# Don't use missing tools
"skia_use_dng_sdk=false"
"skia_use_wuffs=false"
# Use system dependencies
"extra_cflags=[\"-I${harfbuzzFull.dev}/include/harfbuzz\"]"
"cc=\"${stdenv.cc.targetPrefix}cc\""
"cxx=\"${stdenv.cc.targetPrefix}c++\""
"ar=\"${stdenv.cc.targetPrefix}ar\""
"target_cpu=\"${cpu}\""
] ++ map (lib: "skia_use_system_${lib}=true") [
"zlib"
"harfbuzz"
"libpng"
"libwebp"
] ++ lib.optionals enableVulkan [
"skia_use_vulkan=true"
];
# Somewhat arbitrary, but similar to what other distros are doing
installPhase = ''
@@ -113,10 +108,10 @@ stdenv.mkDerivation (finalAttrs: {
cp *.so *.a $out/lib
# Includes
pushd ../include
pushd ../../include
find . -name '*.h' -exec install -Dm644 {} $out/include/skia/{} \;
popd
pushd ../modules
pushd ../../modules
find . -name '*.h' -exec install -Dm644 {} $out/include/skia/modules/{} \;
popd
+759 -722
View File
File diff suppressed because it is too large Load Diff
+4 -2
View File
@@ -12,13 +12,13 @@ let
in
stdenv.mkDerivation (finalAttrs: {
pname = "stirling-pdf";
version = "0.26.1";
version = "0.28.3";
src = fetchFromGitHub {
owner = "Stirling-Tools";
repo = "Stirling-PDF";
rev = "v${finalAttrs.version}";
hash = "sha256-msxP2n8Varc7/h9RVwYRBuD253JZu6/p7zQC1lmNmqc=";
hash = "sha256-88UdJPn9AeLtpKEu3efHm+xj4lheQ0EPyvId4vYskIo=";
};
patches = [
@@ -58,6 +58,8 @@ stdenv.mkDerivation (finalAttrs: {
runHook postInstall
'';
passthru.updateScript = ./update.sh;
meta = {
changelog = "https://github.com/Stirling-Tools/Stirling-PDF/releases/tag/v${finalAttrs.version}";
description = "Locally hosted web application that allows you to perform various operations on PDF files";
+6
View File
@@ -0,0 +1,6 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p nix-update
nix-update stirling-pdf
$(nix-build -A stirling-pdf.mitmCache.updateScript)
+2 -2
View File
@@ -26,13 +26,13 @@
}:
stdenv.mkDerivation (finalAttrs: {
pname = "swayimg";
version = "2.3";
version = "3.2";
src = fetchFromGitHub {
owner = "artemsen";
repo = "swayimg";
rev = "v${finalAttrs.version}";
hash = "sha256-MAVxOUM1x6dkvbWPz/JS+sITi3BhCeaweKZZserkXz8=";
hash = "sha256-Eqs8U2BpjcweDi4oGS9nWpoyoXeuiD+6jviPA3s9/YY=";
};
strictDeps = true;
+3 -3
View File
@@ -14,16 +14,16 @@
rustPlatform.buildRustPackage rec {
pname = "tpnote";
version = "1.24.7";
version = "1.24.8";
src = fetchFromGitHub {
owner = "getreu";
repo = "tp-note";
rev = "v${version}";
hash = "sha256-BSq+9qjBdJZvx65mumyPbjhbBHpHXgWeGqdx/xevL50=";
hash = "sha256-tn6GCBX3DrqyZZz2FJLTn1vJd4eEbawyJM5huco21/8=";
};
cargoHash = "sha256-jwG68aAG4D+ulsQa+UEyJu5fVwbrHeeW9bJNQfcpg4o=";
cargoHash = "sha256-2qGObTu7g6GbUwd4obgqufig7bABFLBsCWSyZt8AVac=";
nativeBuildInputs = [
cmake
+3 -2
View File
@@ -102,8 +102,9 @@ in stdenv.mkDerivation {
runHook postInstall
'';
# .so files in the SystemARM64 directory are not loaded properly on aarch64-linux
appendRunpaths = lib.optionals (stdenv.hostPlatform.system == "aarch64-linux") [
# Bring in game's .so files into lookup. Otherwise game fails to start
# as: `Object not found: Class Render.Render`
appendRunpaths = [
"${placeholder "out"}/${systemDir}"
];
+117 -160
View File
@@ -43,21 +43,6 @@ dependencies = [
"memchr",
]
[[package]]
name = "android-tzdata"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
[[package]]
name = "android_system_properties"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
dependencies = [
"libc",
]
[[package]]
name = "anes"
version = "0.1.6"
@@ -133,9 +118,9 @@ checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a"
[[package]]
name = "arrayvec"
version = "0.7.4"
version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711"
checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50"
[[package]]
name = "assert-json-diff"
@@ -307,9 +292,9 @@ dependencies = [
[[package]]
name = "axoupdater"
version = "0.7.0"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3adfac228780fcf162617739408bd8edeb1ae1d497c95082759c5e607cac1e71"
checksum = "14cd170d3b144de5288b99c69f30b36ee5eba837bed33f458f39c890e2049162"
dependencies = [
"axoasset",
"axoprocess",
@@ -486,9 +471,9 @@ dependencies = [
[[package]]
name = "bytemuck"
version = "1.16.3"
version = "1.17.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "102087e286b4677862ea56cf8fc58bb2cdfa8725c40ffb80fe3a008eb7f2fc83"
checksum = "773d90827bc3feecfb67fab12e24de0749aad83c74b9504ecde46237b5cd24e2"
[[package]]
name = "byteorder"
@@ -549,9 +534,9 @@ dependencies = [
[[package]]
name = "camino"
version = "1.1.7"
version = "1.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239"
checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3"
dependencies = [
"serde",
]
@@ -587,12 +572,13 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5"
[[package]]
name = "cc"
version = "1.1.8"
version = "1.1.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "504bdec147f2cc13c8b57ed9401fd8a147cc66b67ad5cb241394244f2c947549"
checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6"
dependencies = [
"jobserver",
"libc",
"shlex",
]
[[package]]
@@ -617,19 +603,6 @@ dependencies = [
"encoding_rs",
]
[[package]]
name = "chrono"
version = "0.4.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401"
dependencies = [
"android-tzdata",
"iana-time-zone",
"num-traits",
"serde",
"windows-targets 0.52.6",
]
[[package]]
name = "ciborium"
version = "0.2.2"
@@ -682,9 +655,9 @@ dependencies = [
[[package]]
name = "clap_complete"
version = "4.5.13"
version = "4.5.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa3c596da3cf0983427b0df0dba359df9182c13bd5b519b585a482b0c351f4e8"
checksum = "6d7db6eca8c205649e8d3ccd05aa5042b1800a784e56bc7c43524fde8abbfa9b"
dependencies = [
"clap",
]
@@ -730,9 +703,9 @@ checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97"
[[package]]
name = "cmake"
version = "0.1.50"
version = "0.1.51"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130"
checksum = "fb1e43aa7fd152b1f968787f7dbcdeb306d1867ff373c69955211876c053f91a"
dependencies = [
"cc",
]
@@ -821,15 +794,15 @@ dependencies = [
[[package]]
name = "core-foundation-sys"
version = "0.8.6"
version = "0.8.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f"
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
[[package]]
name = "cpufeatures"
version = "0.2.12"
version = "0.2.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504"
checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad"
dependencies = [
"libc",
]
@@ -1188,9 +1161,9 @@ dependencies = [
[[package]]
name = "fastrand"
version = "2.1.0"
version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a"
checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6"
[[package]]
name = "fdeflate"
@@ -1203,9 +1176,9 @@ dependencies = [
[[package]]
name = "filetime"
version = "0.2.24"
version = "0.2.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf401df4a4e3872c4fe8151134cf483738e74b67fc934d6532c882b3d24a4550"
checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586"
dependencies = [
"cfg-if",
"libc",
@@ -1485,9 +1458,9 @@ dependencies = [
[[package]]
name = "h2"
version = "0.4.5"
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab"
checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205"
dependencies = [
"atomic-waker",
"bytes",
@@ -1545,6 +1518,12 @@ version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024"
[[package]]
name = "hermit-abi"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc"
[[package]]
name = "hex"
version = "0.4.3"
@@ -1562,16 +1541,14 @@ dependencies = [
[[package]]
name = "homedir"
version = "0.2.1"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "22074da8bba2ef26fc1737ae6c777b5baab5524c2dc403b5c6a76166766ccda5"
checksum = "2bed305c13ce3829a09d627f5d43ff738482a09361ae4eb8039993b55fb10e5e"
dependencies = [
"cfg-if",
"nix 0.26.4",
"serde",
"widestring",
"windows-sys 0.48.0",
"wmi",
"windows 0.57.0",
]
[[package]]
@@ -1695,29 +1672,6 @@ dependencies = [
"tracing",
]
[[package]]
name = "iana-time-zone"
version = "0.1.60"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141"
dependencies = [
"android_system_properties",
"core-foundation-sys",
"iana-time-zone-haiku",
"js-sys",
"wasm-bindgen",
"windows-core 0.52.0",
]
[[package]]
name = "iana-time-zone-haiku"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
dependencies = [
"cc",
]
[[package]]
name = "idna"
version = "0.5.0"
@@ -1763,9 +1717,9 @@ checksum = "b72ad49b554c1728b1e83254a1b1565aea4161e28dabbfa171fc15fe62299caf"
[[package]]
name = "indexmap"
version = "2.4.0"
version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c"
checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5"
dependencies = [
"equivalent",
"hashbrown 0.14.5",
@@ -1863,11 +1817,11 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3"
[[package]]
name = "is-terminal"
version = "0.4.12"
version = "0.4.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b"
checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b"
dependencies = [
"hermit-abi",
"hermit-abi 0.4.0",
"libc",
"windows-sys 0.52.0",
]
@@ -1919,9 +1873,9 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"
[[package]]
name = "jiff"
version = "0.1.10"
version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ef8bc400f8312944a9f879db116fed372c4f0859af672eba2a80f79c767dd19"
checksum = "362be9c702bada57298130d0565e9c389e6d4024a541692f01819e21abc3e26a"
dependencies = [
"jiff-tzdb-platform",
"serde",
@@ -1960,9 +1914,9 @@ checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0"
[[package]]
name = "js-sys"
version = "0.3.69"
version = "0.3.70"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d"
checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a"
dependencies = [
"wasm-bindgen",
]
@@ -2003,9 +1957,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
[[package]]
name = "libc"
version = "0.2.155"
version = "0.2.158"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c"
checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439"
[[package]]
name = "libmimalloc-sys"
@@ -2227,11 +2181,11 @@ dependencies = [
[[package]]
name = "mio"
version = "1.0.1"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4569e456d394deccd22ce1c1913e6ea0e54519f577285001215d33557431afe4"
checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec"
dependencies = [
"hermit-abi",
"hermit-abi 0.3.9",
"libc",
"wasi",
"windows-sys 0.52.0",
@@ -2320,7 +2274,7 @@ version = "1.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43"
dependencies = [
"hermit-abi",
"hermit-abi 0.3.9",
"libc",
]
@@ -2332,9 +2286,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3"
[[package]]
name = "object"
version = "0.36.3"
version = "0.36.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9"
checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a"
dependencies = [
"memchr",
]
@@ -2714,9 +2668,9 @@ dependencies = [
[[package]]
name = "priority-queue"
version = "2.0.3"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "70c501afe3a2e25c9bd219aa56ec1e04cdb3fcdd763055be268778c13fa82c1f"
checksum = "560bcab673ff7f6ca9e270c17bf3affd8a05e3bd9207f123b0d45076fd8197e8"
dependencies = [
"autocfg",
"equivalent",
@@ -3016,9 +2970,9 @@ dependencies = [
[[package]]
name = "redox_users"
version = "0.4.5"
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891"
checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43"
dependencies = [
"getrandom",
"libredox",
@@ -3231,9 +3185,9 @@ dependencies = [
[[package]]
name = "rgb"
version = "0.8.48"
version = "0.8.49"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f86ae463694029097b846d8f99fd5536740602ae00022c0c50c5600720b2f71"
checksum = "09cd5a1e95672f201913966f39baf355b53b5d92833431847295ae0346a5b939"
dependencies = [
"bytemuck",
]
@@ -3355,9 +3309,9 @@ checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152"
[[package]]
name = "rustix"
version = "0.38.34"
version = "0.38.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f"
checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f"
dependencies = [
"bitflags 2.6.0",
"errno",
@@ -3382,9 +3336,9 @@ dependencies = [
[[package]]
name = "rustls-native-certs"
version = "0.7.1"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a88d6d420651b496bdd98684116959239430022a115c1240e6c3993be0b15fba"
checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5"
dependencies = [
"openssl-probe",
"rustls-pemfile",
@@ -3411,9 +3365,9 @@ checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0"
[[package]]
name = "rustls-webpki"
version = "0.102.6"
version = "0.102.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e6b52d4fda176fd835fdc55a835d4a89b8499cad995885a21149d5ad62f852e"
checksum = "84678086bd54edf2b415183ed7a94d0efb049f1b646a33e22a36f3794be6ae56"
dependencies = [
"ring",
"rustls-pki-types",
@@ -3636,6 +3590,12 @@ version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "45bb67a18fa91266cc7807181f62f9178a6873bfad7dc788c42e6430db40184f"
[[package]]
name = "shlex"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
[[package]]
name = "signal-hook-registry"
version = "1.4.2"
@@ -4071,9 +4031,9 @@ source = "git+https://github.com/charliermarsh/tl.git?rev=6e25b2ee2513d75385101a
[[package]]
name = "tokio"
version = "1.39.3"
version = "1.40.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9babc99b9923bfa4804bd74722ff02c0381021eafa4db9949217e3be8e84fff5"
checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998"
dependencies = [
"backtrace",
"bytes",
@@ -4201,15 +4161,15 @@ dependencies = [
[[package]]
name = "tower-layer"
version = "0.3.2"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0"
checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e"
[[package]]
name = "tower-service"
version = "0.3.2"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52"
checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3"
[[package]]
name = "tracing"
@@ -4492,7 +4452,7 @@ checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314"
[[package]]
name = "uv"
version = "0.4.1"
version = "0.4.3"
dependencies = [
"anstream",
"anyhow",
@@ -5044,7 +5004,7 @@ dependencies = [
"uv-warnings",
"which",
"windows-registry",
"windows-result",
"windows-result 0.2.0",
"windows-sys 0.59.0",
"winsafe 0.0.22",
]
@@ -5249,7 +5209,7 @@ dependencies = [
[[package]]
name = "uv-version"
version = "0.4.1"
version = "0.4.3"
[[package]]
name = "uv-virtualenv"
@@ -5354,19 +5314,20 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasm-bindgen"
version = "0.2.92"
version = "0.2.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8"
checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5"
dependencies = [
"cfg-if",
"once_cell",
"wasm-bindgen-macro",
]
[[package]]
name = "wasm-bindgen-backend"
version = "0.2.92"
version = "0.2.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da"
checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b"
dependencies = [
"bumpalo",
"log",
@@ -5379,9 +5340,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-futures"
version = "0.4.42"
version = "0.4.43"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0"
checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed"
dependencies = [
"cfg-if",
"js-sys",
@@ -5391,9 +5352,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
version = "0.2.92"
version = "0.2.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726"
checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@@ -5401,9 +5362,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
version = "0.2.92"
version = "0.2.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7"
checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836"
dependencies = [
"proc-macro2",
"quote",
@@ -5414,9 +5375,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-shared"
version = "0.2.92"
version = "0.2.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96"
checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484"
[[package]]
name = "wasm-streams"
@@ -5448,9 +5409,9 @@ dependencies = [
[[package]]
name = "web-sys"
version = "0.3.69"
version = "0.3.70"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef"
checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0"
dependencies = [
"js-sys",
"wasm-bindgen",
@@ -5523,13 +5484,11 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "windows"
version = "0.52.0"
version = "0.57.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be"
checksum = "12342cb4d8e3b046f3d80effd474a7a02447231330ef77d71daa6fbc40681143"
dependencies = [
"windows-core 0.52.0",
"windows-implement 0.52.0",
"windows-interface 0.52.0",
"windows-core 0.57.0",
"windows-targets 0.52.6",
]
@@ -5545,10 +5504,13 @@ dependencies = [
[[package]]
name = "windows-core"
version = "0.52.0"
version = "0.57.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
checksum = "d2ed2439a290666cd67ecce2b0ffaad89c2a56b976b736e6ece670297897832d"
dependencies = [
"windows-implement 0.57.0",
"windows-interface 0.57.0",
"windows-result 0.1.2",
"windows-targets 0.52.6",
]
@@ -5560,16 +5522,16 @@ checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99"
dependencies = [
"windows-implement 0.58.0",
"windows-interface 0.58.0",
"windows-result",
"windows-result 0.2.0",
"windows-strings",
"windows-targets 0.52.6",
]
[[package]]
name = "windows-implement"
version = "0.52.0"
version = "0.57.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "12168c33176773b86799be25e2a2ba07c7aab9968b37541f1094dbd7a60c8946"
checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7"
dependencies = [
"proc-macro2",
"quote",
@@ -5589,9 +5551,9 @@ dependencies = [
[[package]]
name = "windows-interface"
version = "0.52.0"
version = "0.57.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9d8dc32e0095a7eeccebd0e3f09e9509365ecb3fc6ac4d6f5f14a3f6392942d1"
checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7"
dependencies = [
"proc-macro2",
"quote",
@@ -5615,11 +5577,20 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0"
dependencies = [
"windows-result",
"windows-result 0.2.0",
"windows-strings",
"windows-targets 0.52.6",
]
[[package]]
name = "windows-result"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8"
dependencies = [
"windows-targets 0.52.6",
]
[[package]]
name = "windows-result"
version = "0.2.0"
@@ -5635,7 +5606,7 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10"
dependencies = [
"windows-result",
"windows-result 0.2.0",
"windows-targets 0.52.6",
]
@@ -5842,20 +5813,6 @@ dependencies = [
"url",
]
[[package]]
name = "wmi"
version = "0.13.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc2f0a4062ca522aad4705a2948fd4061b3857537990202a8ddd5af21607f79a"
dependencies = [
"chrono",
"futures",
"log",
"serde",
"thiserror",
"windows 0.52.0",
]
[[package]]
name = "wyz"
version = "0.5.1"
+2 -2
View File
@@ -16,14 +16,14 @@
python3Packages.buildPythonApplication rec {
pname = "uv";
version = "0.4.1";
version = "0.4.3";
pyproject = true;
src = fetchFromGitHub {
owner = "astral-sh";
repo = "uv";
rev = "refs/tags/${version}";
hash = "sha256-gjACm0q9j5Kx9E1rxiR7Bvg4FoAATesQyO0y8kbsTJI=";
hash = "sha256-NxnG7mKl0mB4sLKgzhgCBfp9e/Bz7bRqv5ShY4i01TY=";
};
cargoDeps = rustPlatform.importCargoLock {
+3 -3
View File
@@ -7,13 +7,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "uxn";
version = "1.0-unstable-2024-08-25";
version = "1.0-unstable-2024-08-29";
src = fetchFromSourcehut {
owner = "~rabbits";
repo = "uxn";
rev = "6d5e3848bdbd76420b93ca47de148cbf46baf9f6";
hash = "sha256-YTDL3NZSjbVqu6aPJBmUmsT3bDX2VUeufXq/Q+jn4Og=";
rev = "ea4aaca2a6e5bc1623bbd2bd892a6eff31439fcc";
hash = "sha256-1LA9IwnWcnr5fS1VP2wLWk6zNxNzJQ1VqAw5BsHz7tA=";
};
outputs = [ "out" "projects" ];
+3 -3
View File
@@ -34,7 +34,7 @@ let
in
python.pkgs.buildPythonApplication rec {
pname = "weblate";
version = "5.7";
version = "5.7.1";
pyproject = true;
@@ -46,8 +46,8 @@ python.pkgs.buildPythonApplication rec {
src = fetchFromGitHub {
owner = "WeblateOrg";
repo = "weblate";
rev = "weblate-${version}";
sha256 = "sha256-h5+0lOMD+H0ehtZ0bngA9bI5va1I5KjZH9boaEtXJPo=";
rev = "refs/tags/weblate-${version}";
hash = "sha256-mVcVthOiUTTYGRIp6pcubMsHZW55P86ZCfeno6JjN4I=";
};
patches = [
+1 -1
View File
@@ -19,7 +19,7 @@ stdenv.mkDerivation (finalAttrs: {
postPatch = ''
substituteInPlace Makefile \
--replace '/bin/echo' 'echo'
--replace-fail '/bin/echo' 'echo'
'';
dontConfigure = true;
+1 -1
View File
@@ -26,7 +26,7 @@ stdenv.mkDerivation (finalAttrs: {
postPatch = ''
patchShebangs findsymbols scripts/
substituteInPlace Makefile \
--replace '/bin/echo' 'echo'
--replace-fail '/bin/echo' 'echo'
'';
dontConfigure = true;
+4 -4
View File
@@ -1,7 +1,7 @@
{
"branch": "master",
"commit_hash": "4ac238a00ca0b36e9755e55e54a22d3107ba443c",
"commit_message": "Update packages",
"date": "2024-08-27",
"tag": "v5.13.2"
"commit_hash": "8d7a26f3f3095044dd08422d9bca5607aa173103",
"commit_message": "Merge pull request #105 from byBenPuls/master",
"date": "2024-09-02",
"tag": "v5.14.0"
}
+2 -2
View File
@@ -14,13 +14,13 @@
}:
stdenvNoCC.mkDerivation rec {
pname = "yandex-music";
version = "5.13.2";
version = "5.14.0";
src = fetchFromGitHub {
owner = "cucumber-sp";
repo = "yandex-music-linux";
rev = "v${version}";
hash = "sha256-yQX2GEulAQ02BndpwAAwGdTYtUlNXCgsCUdmXxPwtKU=";
hash = "sha256-M0UcnrYtlrRY1sN65UPXcgEAzcdSpKWeHn4kbLDRRaw=";
};
nativeBuildInputs = [
+4 -4
View File
@@ -1,9 +1,9 @@
{
"ym": {
"version": "5.13.2",
"exe_name": "Yandex_Music_x64_5.13.2.exe",
"exe_link": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.13.2.exe",
"exe_sha256": "ac7a489a59e074358559f544a26143ca81a6bdfa41481242f3419b76eaffdb0b"
"version": "5.14.0",
"exe_name": "Yandex_Music_x64_5.14.0.exe",
"exe_link": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.14.0.exe",
"exe_sha256": "b7a0a974666e68b5ed324a72ca9f53dcbdb35271e2b48fe5adc6bc6c8876e03d"
},
"electron": {
"version": "29.4.6",
+1 -1
View File
@@ -43,7 +43,7 @@ let
elvis-erlang = callPackage ./elvis-erlang { };
# BEAM-based languages.
elixir = elixir_1_16;
elixir = elixir_1_17;
elixir_1_17 = lib'.callElixir ../interpreters/elixir/1.17.nix {
inherit erlang;
@@ -84,8 +84,13 @@ let
}
{
after = "19";
before = "20";
path = ../19;
}
{
after = "20";
path = ../git;
}
];
"clang/purity.patch" = [
{
+3 -3
View File
@@ -25,9 +25,9 @@ let
"18.1.8".officialRelease.sha256 = "sha256-iiZKMRo/WxJaBXct9GdAcAT3cz9d9pnAcO1mmR6oPNE=";
"19.1.0-rc3".officialRelease.sha256 = "sha256-SRonSpXt1pH6Xk+rQZk9mrfMdvYIvOImwUfMUu3sBgs=";
"20.0.0-git".gitRelease = {
rev = "2579b411a13799534c8b8a22246134b88ba7785d";
rev-version = "20.0.0-unstable-2024-08-25";
sha256 = "sha256-/Gymj9bEoaAAH5kWPRflD+lBWyPjWBpYGnQsP5vAlsk=";
rev = "837ee5b46a5f7f898f0de7e46a19600b896a0a1f";
rev-version = "20.0.0-unstable-2024-09-01";
sha256 = "sha256-GZDc1o7dLhPWrHA/LELsKs5ydHv9gn1bNFMg6Lfjs5Y=";
};
} // llvmVersions;
@@ -0,0 +1,71 @@
diff --git a/cmake/modules/AddClang.cmake b/cmake/modules/AddClang.cmake
index 75b0080f6..c895b884c 100644
--- a/cmake/modules/AddClang.cmake
+++ b/cmake/modules/AddClang.cmake
@@ -119,8 +119,8 @@ macro(add_clang_library name)
install(TARGETS ${lib}
COMPONENT ${lib}
${export_to_clangtargets}
- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
if (NOT LLVM_ENABLE_IDE)
diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt
index e6ae4e19e..5ef01aea2 100644
--- a/lib/Headers/CMakeLists.txt
+++ b/lib/Headers/CMakeLists.txt
@@ -337,6 +337,7 @@ set(llvm_libc_wrapper_files
include(GetClangResourceDir)
get_clang_resource_dir(output_dir PREFIX ${LLVM_LIBRARY_OUTPUT_INTDIR}/.. SUBDIR include)
+set(header_install_dir ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION_MAJOR}/include)
set(out_files)
set(generated_files)
diff --git a/tools/libclang/CMakeLists.txt b/tools/libclang/CMakeLists.txt
index b5b6d2807..6b592d255 100644
--- a/tools/libclang/CMakeLists.txt
+++ b/tools/libclang/CMakeLists.txt
@@ -246,7 +246,7 @@ foreach(PythonVersion ${CLANG_PYTHON_BINDINGS_VERSIONS})
COMPONENT
libclang-python-bindings
DESTINATION
- "lib${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages")
+ "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages")
endforeach()
if(NOT LLVM_ENABLE_IDE)
add_custom_target(libclang-python-bindings)
diff --git a/tools/scan-build-py/CMakeLists.txt b/tools/scan-build-py/CMakeLists.txt
index 3aca22c0b..3115353e3 100644
--- a/tools/scan-build-py/CMakeLists.txt
+++ b/tools/scan-build-py/CMakeLists.txt
@@ -88,7 +88,7 @@ foreach(lib ${LibScanbuild})
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libscanbuild/${lib})
list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libscanbuild/${lib})
install(FILES lib/libscanbuild/${lib}
- DESTINATION lib/libscanbuild
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/libscanbuild"
COMPONENT scan-build-py)
endforeach()
@@ -106,7 +106,7 @@ foreach(resource ${LibScanbuildResources})
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libscanbuild/resources/${resource})
list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libscanbuild/resources/${resource})
install(FILES lib/libscanbuild/resources/${resource}
- DESTINATION lib/libscanbuild/resources
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/libscanbuild/resources"
COMPONENT scan-build-py)
endforeach()
@@ -122,7 +122,7 @@ foreach(lib ${LibEar})
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libear/${lib})
list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libear/${lib})
install(FILES lib/libear/${lib}
- DESTINATION lib/libear
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/libear"
COMPONENT scan-build-py)
endforeach()
@@ -5,13 +5,15 @@ mkCoqDerivation rec {
owner = "DeepSpec";
inherit version;
defaultVersion = with lib.versions; lib.switch coq.version [
{ case = range "8.13" "8.20"; out = "5.1.2"; }
{ case = range "8.13" "8.20"; out = "5.2.0"; }
{ case = range "8.10" "8.16"; out = "4.0.0"; }
] null;
release."5.2.0".sha256 = "sha256-rKLz7ekZf/9xcQefBRsAdULmk81olzQ1W28y61vCDsY=";
release."5.1.2".sha256 = "sha256-uKJIjNXGWl0YS0WH52Rnr9Jz98Eo2k0X0qWB9hUYJMk=";
release."5.1.1".sha256 = "sha256-VlmPNwaGkdWrH7Z6DGXRosGtjuuQ+FBiGcadN2Hg5pY=";
release."5.1.0".sha256 = "sha256-ny7Mi1KgWADiFznkNJiRgD7Djc5SUclNgKOmWRxK+eo=";
release."4.0.0".sha256 = "0h5rhndl8syc24hxq1gch86kj7mpmgr89bxp2hmf28fd7028ijsm";
release."3.2.0".sha256 = "sha256-10ckCAqSQ0I3CZKlSllI1obOgWVxDagTd7eyhrl1xpE=";
releaseRev = v: "${v}";
propagatedBuildInputs = [ coq-ext-lib paco ];
meta = {
@@ -4,6 +4,7 @@ stdenv.mkDerivation rec {
pname = "rakudo";
version = "2024.06";
# nixpkgs-update: no auto update
src = fetchFromGitHub {
owner = "rakudo";
repo = "rakudo";
@@ -10,6 +10,7 @@ stdenv.mkDerivation rec {
pname = "moarvm";
version = "2024.06";
# nixpkgs-update: no auto update
src = fetchFromGitHub {
owner = "moarvm";
repo = "moarvm";
@@ -4,6 +4,7 @@ stdenv.mkDerivation rec {
pname = "nqp";
version = "2024.06";
# nixpkgs-update: no auto update
src = fetchFromGitHub {
owner = "raku";
repo = "nqp";
@@ -13,7 +13,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "liblouis";
version = "3.30.0";
version = "3.31.0";
outputs = [ "out" "dev" "info" "doc" ]
# configure: WARNING: cannot generate manual pages while cross compiling
@@ -23,7 +23,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "liblouis";
repo = "liblouis";
rev = "v${finalAttrs.version}";
hash = "sha256-VeDthGET1PcKXzXkztJCcN6yXgf51bcIyawuyUurwBs=";
hash = "sha256-0OnIvRwoL7GsuQPXJixA0DRf/tf8CNqwe9lHSahQbwk=";
};
strictDeps = true;
@@ -14,13 +14,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "libphonenumber";
version = "8.13.43";
version = "8.13.44";
src = fetchFromGitHub {
owner = "google";
repo = "libphonenumber";
rev = "v${finalAttrs.version}";
hash = "sha256-EJjtPqSk2p+J4f6tiaGEnik5LrrqGpGa0XfcnLLp9vg=";
hash = "sha256-DnYWHrOePDdQ9tZnKu8W9jnqpp5MjhjrrSfbD1jV/fU=";
};
patches = [
@@ -8,7 +8,6 @@
, lapack
, fflas-ffpack
, gmpxx
, withSage ? false # sage support
}:
assert (!blas.isILP64) && (!lapack.isILP64);
@@ -56,8 +55,6 @@ stdenv.mkDerivation rec {
"--${if stdenv.hostPlatform.avx2Support then "enable" else "disable"}-avx2"
"--${if stdenv.hostPlatform.fmaSupport then "enable" else "disable"}-fma"
"--${if stdenv.hostPlatform.fma4Support then "enable" else "disable"}-fma4"
] ++ lib.optionals withSage [
"--enable-sage"
];
# https://github.com/linbox-team/linbox/issues/304
@@ -20,13 +20,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "indilib";
version = "2.0.8";
version = "2.0.9";
src = fetchFromGitHub {
owner = "indilib";
repo = "indi";
rev = "v${finalAttrs.version}";
hash = "sha256-qdPQMC8HCMdcbHyO8B0OFiefO+jM1ytA2dYNymE0Xuc=";
hash = "sha256-CV8nSz53wFeS/h7hGj9adN8qmyhsqOkTYj/0nuvhlSM=";
};
nativeBuildInputs = [
@@ -24,6 +24,7 @@
libexif,
libftdi1,
libgphoto2,
libgpiod_1,
libpng,
libraw,
ninja,
@@ -44,7 +45,7 @@ let
owner = "indilib";
repo = "indi-3rdparty";
rev = "v${indilib.version}";
hash = "sha256-0M+k3A2Lw9EU9V5bX9dGztmdcJzc71XQZv8srmY5NmY=";
hash = "sha256-RhtdhMvseQUUFcKDuR1N5qc/86IxmQ/7owpjT+qweqc=";
};
buildIndi3rdParty =
@@ -217,7 +218,7 @@ let
pname = "libfishcamp";
postPatch = ''
substituteInPlace CMakeLists.txt --replace "/lib/firmware" "lib/firmware"
substituteInPlace CMakeLists.txt --replace-fail "/lib/firmware" "lib/firmware"
'';
buildInputs = [
@@ -327,7 +328,7 @@ let
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace "set (PK_DATADIR /usr/share/pktriggercord)" "set (PK_DATADIR $out/share/pkgtriggercord)"
--replace-fail "set (PK_DATADIR /usr/share/pktriggercord)" "set (PK_DATADIR $out/share/pkgtriggercord)"
'';
buildInputs = [ indilib ];
@@ -342,7 +343,7 @@ let
pname = "libplayerone";
postPatch = ''
substituteInPlace 99-player_one_astronomy.rules \
--replace "/bin/echo" "${coreutils}/bin/echo" \
--replace-fail "/bin/echo" "${coreutils}/bin/echo" \
--replace "/bin/sh" "${bash}/bin/sh"
'';
@@ -362,14 +363,13 @@ let
pname = "libqhy";
postPatch = ''
sed -ie 's/LIBQHY_SOVERSION "24"/LIBQHY_SOVERSION "20"/' CMakeLists.txt
substituteInPlace CMakeLists.txt \
substituteInPlace --replace-fail CMakeLists.txt \
--replace "/lib/firmware" "lib/firmware"
substituteInPlace 85-qhyccd.rules \
--replace "/sbin/fxload" "${fxload}/sbin/fxload" \
--replace "/lib/firmware" "$out/lib/firmware" \
--replace "/bin/sleep" "${coreutils}/bin/sleep"
--replace-fail "/sbin/fxload" "${fxload}/sbin/fxload" \
--replace-fail "/lib/firmware" "$out/lib/firmware" \
--replace-fail "/bin/sleep" "${coreutils}/bin/sleep"
sed -e 's|-D $env{DEVNAME}|-p $env{BUSNUM},$env{DEVNUM}|' -i 85-qhyccd.rules
'';
@@ -418,10 +418,10 @@ let
pname = "libsbig";
postPatch = ''
substituteInPlace CMakeLists.txt --replace "/lib/firmware" "lib/firmware"
substituteInPlace CMakeLists.txt --replace-fail "/lib/firmware" "lib/firmware"
substituteInPlace 51-sbig-debian.rules \
--replace "/sbin/fxload" "${fxload}/sbin/fxload" \
--replace "/lib/firmware" "$out/lib/firmware"
--replace-fail "/sbin/fxload" "${fxload}/sbin/fxload" \
--replace-fail "/lib/firmware" "$out/lib/firmware"
sed -e 's|-D $env{DEVNAME}|-p $env{BUSNUM},$env{DEVNUM}|' -i 51-sbig-debian.rules
'';
@@ -516,7 +516,7 @@ in
libnova
];
postPatch = ''
substituteInPlace CMakeLists.txt --replace "/lib/udev/rules.d" "lib/udev/rules.d"
substituteInPlace CMakeLists.txt --replace-fail "/lib/udev/rules.d" "lib/udev/rules.d"
'';
};
@@ -637,11 +637,11 @@ in
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace "/lib/udev/rules.d" "lib/udev/rules.d" \
--replace "/lib/firmware" "lib/firmware"
--replace-fail "/lib/udev/rules.d" "lib/udev/rules.d" \
--replace-fail "/lib/firmware" "lib/firmware"
substituteInPlace 99-meadedsi.rules \
--replace "/sbin/fxload" "${fxload}/sbin/fxload" \
--replace "/lib/firmware" "$out/lib/firmware"
--replace-fail "/sbin/fxload" "${fxload}/sbin/fxload" \
--replace-fail "/lib/firmware" "$out/lib/firmware"
sed -e 's|-D $env{DEVNAME}|-p $env{BUSNUM},$env{DEVNUM}|' -i 99-meadedsi.rules
'';
@@ -725,6 +725,16 @@ in
propagatedBuildInputs = [ libgphoto2 ];
};
indi-gpio = buildIndi3rdParty {
pname = "indi-gpio";
buildInputs = [
indilib
libgpiod_1
libnova
zlib
];
};
indi-gpsd = buildIndi3rdParty {
pname = "indi-gpsd";
buildInputs = [
@@ -862,7 +872,7 @@ in
];
postPatch = ''
substituteInPlace CMakeLists.txt --replace "/lib/udev/rules.d" "lib/udev/rules.d"
substituteInPlace CMakeLists.txt --replace-fail "/lib/udev/rules.d" "lib/udev/rules.d"
'';
};
@@ -918,7 +928,7 @@ in
];
postPatch = ''
substituteInPlace CMakeLists.txt --replace "/lib/udev/rules.d" "lib/udev/rules.d"
substituteInPlace CMakeLists.txt --replace-fail "/lib/udev/rules.d" "lib/udev/rules.d"
'';
meta.platforms = libqsi.meta.platforms;
@@ -1015,7 +1025,7 @@ in
libusb1
];
postPatch = ''
substituteInPlace CMakeLists.txt --replace "/lib/udev/rules.d" "lib/udev/rules.d"
substituteInPlace CMakeLists.txt --replace-fail "/lib/udev/rules.d" "lib/udev/rules.d"
'';
};
@@ -59,10 +59,17 @@ stdenv.mkDerivation rec {
# Example from the README as a sanity check.
doInstallCheck = true;
installCheckPhase = ''
export HOME=$TMPDIR
"$out/bin/sympow" -sp 2p16 -curve "[1,2,3,4,5]" | grep '8.3705'
'';
installCheckPhase =
''
export HOME=$TMPDIR
"$out/bin/sympow" -curve "[1,2,3,4,5]" -moddeg | grep 'Modular Degree is 464'
echo "[1,-1,0,-79,289]" | "$out/bin/sympow" -analrank | grep ^"Analytic Rank is 4"
"$out/bin/sympow" -curve "[1,-1,0,-79,289]" -analrank | grep ^"Analytic Rank is 4"
"$out/bin/sympow" -curve "[0,1,1,-2,0]" -analrank | grep ^"Analytic Rank is 2"
''
+ lib.optionalString (!stdenv.isAarch64) ''
"$out/bin/sympow" -sp 2p16 -curve "[1,2,3,4,5]" | grep '8.3705'
'';
meta = {
description = "Compute special values of symmetric power elliptic curve L-functions";
@@ -73,6 +80,6 @@ stdenv.mkDerivation rec {
free = true;
};
maintainers = lib.teams.sage.members;
platforms = lib.platforms.linux;
platforms = lib.platforms.unix;
};
}
@@ -1,12 +0,0 @@
diff --git a/nyxt.asd b/nyxt.asd
index ea2630ce..fdf837e4 100644
--- a/nyxt.asd
+++ b/nyxt.asd
@@ -480,7 +480,6 @@ The renderer is configured from NYXT_RENDERER or `*nyxt-renderer*'."))
:defsystem-depends-on ("nasdf")
:class :nasdf-system
:depends-on (nyxt/gi-gtk)
- :build-operation "program-op"
:build-pathname "nyxt"
:entry-point "nyxt:entry-point")
@@ -1086,6 +1086,29 @@ buildLuarocksPackage {
};
}) {};
lsp-progress-nvim = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, luaOlder }:
buildLuarocksPackage {
pname = "lsp-progress.nvim";
version = "1.0.13-1";
knownRockspec = (fetchurl {
url = "mirror://luarocks/lsp-progress.nvim-1.0.13-1.rockspec";
sha256 = "13h0kyrri0bvhkzvyngamsacx62n2dhb2j2gs495z4ghyh1p345i";
}).outPath;
src = fetchzip {
url = "https://github.com/linrongbin16/lsp-progress.nvim/archive/d5f4d28efe75ce636bfbe271eb45f39689765aab.zip";
sha256 = "0h63z55gwv36rahhha8vkbxb9n4f8psa265khz719i97j17x39rr";
};
disabled = luaOlder "5.1";
meta = {
homepage = "https://linrongbin16.github.io/lsp-progress.nvim/";
description = "A performant lsp progress status for Neovim.";
maintainers = with lib.maintainers; [ gepbird ];
license.fullName = "MIT";
};
}) {};
lua-cjson = callPackage({ buildLuarocksPackage, fetchFromGitHub, fetchurl, luaOlder }:
buildLuarocksPackage {
pname = "lua-cjson";
+2 -2
View File
@@ -228,7 +228,7 @@ final: prev: {
version = esbuild-version;
src = fetchurl {
url = "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-${esbuild-version}.tgz";
sha512 = "sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==";
sha512 = "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==";
};
};
esbuild-darwin-arm64 = {
@@ -237,7 +237,7 @@ final: prev: {
version = esbuild-version;
src = fetchurl {
url = "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-${esbuild-version}.tgz";
sha512 = "sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==";
sha512 = "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==";
};
};
in{
@@ -12,14 +12,14 @@
buildPythonPackage rec {
pname = "django-otp";
version = "1.5.1";
version = "1.5.2";
pyproject = true;
src = fetchFromGitHub {
owner = "django-otp";
repo = "django-otp";
rev = "v${version}";
hash = "sha256-1tatp4CQowaHZ5w9IPiKZ3rT5jREXZnwK9iSAYaUhis=";
hash = "sha256-fn3MptdlnqY0rOLwcPhKiLfrhYvov4YVLZ58Jp/j6zc=";
};
build-system = [ hatchling ];
@@ -14,7 +14,7 @@
buildPythonPackage rec {
pname = "holidays";
version = "0.55";
version = "0.56";
pyproject = true;
disabled = pythonOlder "3.8";
@@ -23,7 +23,7 @@ buildPythonPackage rec {
owner = "vacanza";
repo = "python-holidays";
rev = "refs/tags/v${version}";
hash = "sha256-4TJgXY0n7UMr5dGuhfE7WqPCgEBfvb0QUxJNYdaAOLE=";
hash = "sha256-oNqgkDIMWfu48vVt1382IWdwHhhvpoR2U60l9jSF6Qo=";
};
build-system = [
@@ -8,7 +8,7 @@
buildPythonPackage rec {
pname = "hstspreload";
version = "2024.8.1";
version = "2024.9.1";
pyproject = true;
disabled = pythonOlder "3.6";
@@ -17,7 +17,7 @@ buildPythonPackage rec {
owner = "sethmlarson";
repo = "hstspreload";
rev = "refs/tags/${version}";
hash = "sha256-zVBwV+pCmZAnTJi8oyTCs9FxUktDFOxctGeB8fZcsfw=";
hash = "sha256-mpHJG2TqhlTNZ9fbyOZsoKusAvx8EiiP7dATCZh19dQ=";
};
build-system = [ setuptools ];
@@ -2,14 +2,13 @@
buildPythonPackage,
fetchPypi,
setuptools,
wheel,
comm,
ipykernel,
ipython,
jsonschema,
jupyterlab-widgets,
lib,
pytest7CheckHook,
pytestCheckHook,
pytz,
traitlets,
widgetsnbextension,
@@ -17,20 +16,17 @@
buildPythonPackage rec {
pname = "ipywidgets";
version = "8.1.3";
version = "8.1.5";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-9fnuquCCsYI86erCV1JylS9A10iJOXKVbcCXAKY5LZw=";
hash = "sha256-hw5DsaNWVqgMGMlQO78tFoAtsctIfuxvqyfWgzgd3hc=";
};
nativeBuildInputs = [
setuptools
wheel
];
build-system = [ setuptools ];
propagatedBuildInputs = [
dependencies = [
comm
ipython
jupyterlab-widgets
@@ -41,7 +37,7 @@ buildPythonPackage rec {
nativeCheckInputs = [
ipykernel
jsonschema
pytest7CheckHook
pytestCheckHook
pytz
];
@@ -2,41 +2,45 @@
lib,
buildPythonPackage,
fetchPypi,
notebook,
qtconsole,
jupyter-console,
nbconvert,
setuptools,
ipykernel,
ipywidgets,
jupyter-console,
jupyterlab,
nbconvert,
notebook,
}:
buildPythonPackage rec {
version = "1.0.0";
format = "setuptools";
pname = "jupyter";
version = "1.1.1";
pyproject = true;
src = fetchPypi {
inherit pname version;
sha256 = "d9dc4b3318f310e34c82951ea5d6683f67bed7def4b259fafbfe4f1beb1d8e5f";
hash = "sha256-1VRnvOq96knX42JK9+M9WcN//1PtOjUOGslXvtcx3no=";
};
propagatedBuildInputs = [
notebook
qtconsole
jupyter-console
nbconvert
build-system = [ setuptools ];
dependencies = [
ipykernel
ipywidgets
jupyter-console
jupyterlab
nbconvert
notebook
];
# Meta-package, no tests
doCheck = false;
dontUsePythonImportsCheck = true;
meta = with lib; {
description = "Installs all the Jupyter components in one go";
homepage = "https://jupyter.org/";
license = licenses.bsd3;
platforms = platforms.all;
priority = 100; # This is a metapackage which is unimportant
};
}
@@ -7,13 +7,13 @@
buildPythonPackage rec {
pname = "jupyterlab-widgets";
version = "3.0.11";
version = "3.0.13";
pyproject = true;
src = fetchPypi {
pname = "jupyterlab_widgets";
inherit version;
hash = "sha256-3VrGeVk8lprynJvtBUwk8mhCuqUTUhFHNnVrwDXe7ic=";
hash = "sha256-opZtOFMowZQraDqM2WuJuN2CyLj4HdqQK7K8BtRvW+0=";
};
# jupyterlab is required to build from source but we use the pre-build package
@@ -21,14 +21,14 @@
buildPythonPackage rec {
pname = "jupyterlab";
version = "4.2.4";
version = "4.2.5";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchPypi {
inherit pname version;
hash = "sha256-NDqXn7lYL9CMhRGCPjIHAygc0HKgBJvNr9x6/tp/JTc=";
hash = "sha256-rn86G4y4i09VAJznn6fAb5nXDNY2Ae5KqRgV0FT0b3U=";
};
build-system = [
@@ -24,14 +24,14 @@
buildPythonPackage rec {
pname = "marimo";
version = "0.8.3";
version = "0.8.7";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchPypi {
inherit pname version;
hash = "sha256-t7VYKInsZ0hYW+svD0vnsMyGcMtIeuWaor8nijyDhn8=";
hash = "sha256-gxfb5MYPbl8KnvIL+93CyYLOaJ6UflqaikXLAWCS55g=";
};
build-system = [ setuptools ];
@@ -14,14 +14,14 @@
buildPythonPackage rec {
pname = "nbsphinx";
version = "0.9.4";
version = "0.9.5";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-BCpggG/CPVGbxb71nZVXBxORP+RC/adZ1T46r2IQR5Q=";
hash = "sha256-c2kW57Daso/JBPSprjtTqaUMKfzMYynAUvzHSFq88rc=";
};
build-system = [ setuptools ];
@@ -1,360 +0,0 @@
Based on upstream 66b7fb630903fdcf3e83b6b6d56d82e904264a20, adjusted to
apply to 1.15.0 & avoid implicit inclusion of changes from other
intermediate commits
diff --git a/onnx/checker.cc b/onnx/checker.cc
index fac56f56..c9fda9b2 100644
--- a/onnx/checker.cc
+++ b/onnx/checker.cc
@@ -13,7 +13,6 @@
#include <vector>
#include "onnx/common/file_utils.h"
-#include "onnx/common/path.h"
#include "onnx/defs/schema.h"
#include "onnx/defs/tensor_proto_util.h"
#include "onnx/proto_utils.h"
@@ -135,85 +134,7 @@ void check_tensor(const TensorProto& tensor, const CheckerContext& ctx) {
for (const StringStringEntryProto& entry : tensor.external_data()) {
if (entry.has_key() && entry.has_value() && entry.key() == "location") {
has_location = true;
-#ifdef _WIN32
- auto file_path = std::filesystem::path(utf8str_to_wstring(entry.value()));
- if (file_path.is_absolute()) {
- fail_check(
- "Location of external TensorProto ( tensor name: ",
- tensor.name(),
- ") should be a relative path, but it is an absolute path: ",
- entry.value());
- }
- auto relative_path = file_path.lexically_normal().make_preferred().wstring();
- // Check that normalized relative path contains ".." on Windows.
- if (relative_path.find(L"..", 0) != std::string::npos) {
- fail_check(
- "Data of TensorProto ( tensor name: ",
- tensor.name(),
- ") should be file inside the ",
- ctx.get_model_dir(),
- ", but the '",
- entry.value(),
- "' points outside the directory");
- }
- std::wstring data_path = path_join(utf8str_to_wstring(ctx.get_model_dir()), relative_path);
- struct _stat64 buff;
- if (_wstat64(data_path.c_str(), &buff) != 0) {
- fail_check(
- "Data of TensorProto ( tensor name: ",
- tensor.name(),
- ") should be stored in ",
- entry.value(),
- ", but it doesn't exist or is not accessible.");
- }
-#else // POSIX
- if (entry.value().empty()) {
- fail_check("Location of external TensorProto ( tensor name: ", tensor.name(), ") should not be empty.");
- } else if (entry.value()[0] == '/') {
- fail_check(
- "Location of external TensorProto ( tensor name: ",
- tensor.name(),
- ") should be a relative path, but it is an absolute path: ",
- entry.value());
- }
- std::string relative_path = clean_relative_path(entry.value());
- // Check that normalized relative path contains ".." on POSIX
- if (relative_path.find("..", 0) != std::string::npos) {
- fail_check(
- "Data of TensorProto ( tensor name: ",
- tensor.name(),
- ") should be file inside the ",
- ctx.get_model_dir(),
- ", but the '",
- entry.value(),
- "' points outside the directory");
- }
- std::string data_path = path_join(ctx.get_model_dir(), relative_path);
- // use stat64 to check whether the file exists
-#if defined(__APPLE__) || defined(__wasm__) || !defined(__GLIBC__)
- struct stat buffer; // APPLE, wasm and non-glic stdlibs do not have stat64
- if (stat((data_path).c_str(), &buffer) != 0) {
-#else
- struct stat64 buffer; // All POSIX under glibc except APPLE and wasm have stat64
- if (stat64((data_path).c_str(), &buffer) != 0) {
-#endif
- fail_check(
- "Data of TensorProto ( tensor name: ",
- tensor.name(),
- ") should be stored in ",
- data_path,
- ", but it doesn't exist or is not accessible.");
- }
- // Do not allow symlinks or directories.
- if (!S_ISREG(buffer.st_mode)) {
- fail_check(
- "Data of TensorProto ( tensor name: ",
- tensor.name(),
- ") should be stored in ",
- data_path,
- ", but it is not regular file.");
- }
-#endif
+ resolve_external_data_location(ctx.get_model_dir(), entry.value(), tensor.name());
}
}
if (!has_location) {
@@ -1054,6 +975,93 @@ void check_model(const ModelProto& model, bool full_check, bool skip_opset_compa
}
}
+std::string resolve_external_data_location(
+ const std::string& base_dir,
+ const std::string& location,
+ const std::string& tensor_name) {
+#ifdef _WIN32
+ auto file_path = std::filesystem::path(utf8str_to_wstring(location));
+ if (file_path.is_absolute()) {
+ fail_check(
+ "Location of external TensorProto ( tensor name: ",
+ tensor_name,
+ ") should be a relative path, but it is an absolute path: ",
+ location);
+ }
+ auto relative_path = file_path.lexically_normal().make_preferred().wstring();
+ // Check that normalized relative path contains ".." on Windows.
+ if (relative_path.find(L"..", 0) != std::string::npos) {
+ fail_check(
+ "Data of TensorProto ( tensor name: ",
+ tensor_name,
+ ") should be file inside the ",
+ base_dir,
+ ", but the '",
+ location,
+ "' points outside the directory");
+ }
+ std::wstring data_path = path_join(utf8str_to_wstring(base_dir), relative_path);
+ struct _stat64 buff;
+ if (_wstat64(data_path.c_str(), &buff) != 0) {
+ fail_check(
+ "Data of TensorProto ( tensor name: ",
+ tensor_name,
+ ") should be stored in ",
+ location,
+ ", but it doesn't exist or is not accessible.");
+ }
+ return wstring_to_utf8str(data_path);
+#else // POSIX
+ if (location.empty()) {
+ fail_check("Location of external TensorProto ( tensor name: ", tensor_name, ") should not be empty.");
+ } else if (location[0] == '/') {
+ fail_check(
+ "Location of external TensorProto ( tensor name: ",
+ tensor_name,
+ ") should be a relative path, but it is an absolute path: ",
+ location);
+ }
+ std::string relative_path = clean_relative_path(location);
+ // Check that normalized relative path contains ".." on POSIX
+ if (relative_path.find("..", 0) != std::string::npos) {
+ fail_check(
+ "Data of TensorProto ( tensor name: ",
+ tensor_name,
+ ") should be file inside the ",
+ base_dir,
+ ", but the '",
+ location,
+ "' points outside the directory");
+ }
+ std::string data_path = path_join(base_dir, relative_path);
+ // use stat64 to check whether the file exists
+#if defined(__APPLE__) || defined(__wasm__) || !defined(__GLIBC__)
+ struct stat buffer; // APPLE, wasm and non-glic stdlibs do not have stat64
+ if (stat((data_path).c_str(), &buffer) != 0) {
+#else
+ struct stat64 buffer; // All POSIX under glibc except APPLE and wasm have stat64
+ if (stat64((data_path).c_str(), &buffer) != 0) {
+#endif
+ fail_check(
+ "Data of TensorProto ( tensor name: ",
+ tensor_name,
+ ") should be stored in ",
+ data_path,
+ ", but it doesn't exist or is not accessible.");
+ }
+ // Do not allow symlinks or directories.
+ if (!S_ISREG(buffer.st_mode)) {
+ fail_check(
+ "Data of TensorProto ( tensor name: ",
+ tensor_name,
+ ") should be stored in ",
+ data_path,
+ ", but it is not regular file.");
+ }
+ return data_path;
+#endif
+}
+
std::set<std::string> experimental_ops = {
"ATen",
"Affine",
diff --git a/onnx/checker.h b/onnx/checker.h
index 6796acab..83012213 100644
--- a/onnx/checker.h
+++ b/onnx/checker.h
@@ -160,7 +160,10 @@ void check_model_local_functions(
void check_model(const ModelProto& model, bool full_check = false, bool skip_opset_compatibility_check = false);
void check_model(const std::string& model_path, bool full_check = false, bool skip_opset_compatibility_check = false);
-
+std::string resolve_external_data_location(
+ const std::string& base_dir,
+ const std::string& location,
+ const std::string& tensor_name);
bool check_is_experimental_op(const NodeProto& node);
} // namespace checker
diff --git a/onnx/common/path.h b/onnx/common/path.h
index 6eaf5e67..09212747 100644
--- a/onnx/common/path.h
+++ b/onnx/common/path.h
@@ -31,11 +31,22 @@ inline std::wstring utf8str_to_wstring(const std::string& utf8str) {
if (utf8str.size() > INT_MAX) {
fail_check("utf8str_to_wstring: string is too long for converting to wstring.");
}
- int size_required = MultiByteToWideChar(CP_UTF8, 0, utf8str.c_str(), (int)utf8str.size(), NULL, 0);
+ int size_required = MultiByteToWideChar(CP_UTF8, 0, utf8str.c_str(), static_cast<int>(utf8str.size()), NULL, 0);
std::wstring ws_str(size_required, 0);
- MultiByteToWideChar(CP_UTF8, 0, utf8str.c_str(), (int)utf8str.size(), &ws_str[0], size_required);
+ MultiByteToWideChar(CP_UTF8, 0, utf8str.c_str(), static_cast<int>(utf8str.size()), &ws_str[0], size_required);
return ws_str;
}
+inline std::string wstring_to_utf8str(const std::wstring& ws_str) {
+ if (ws_str.size() > INT_MAX) {
+ fail_check("wstring_to_utf8str: string is too long for converting to UTF-8.");
+ }
+ int size_required =
+ WideCharToMultiByte(CP_UTF8, 0, ws_str.c_str(), static_cast<int>(ws_str.size()), NULL, 0, NULL, NULL);
+ std::string utf8str(size_required, 0);
+ WideCharToMultiByte(
+ CP_UTF8, 0, ws_str.c_str(), static_cast<int>(ws_str.size()), &utf8str[0], size_required, NULL, NULL);
+ return utf8str;
+}
#else
std::string path_join(const std::string& origin, const std::string& append);
diff --git a/onnx/cpp2py_export.cc b/onnx/cpp2py_export.cc
index bc2594db..83cea68f 100644
--- a/onnx/cpp2py_export.cc
+++ b/onnx/cpp2py_export.cc
@@ -545,6 +545,8 @@ PYBIND11_MODULE(onnx_cpp2py_export, onnx_cpp2py_export) {
"full_check"_a = false,
"skip_opset_compatibility_check"_a = false);
+ checker.def("_resolve_external_data_location", &checker::resolve_external_data_location);
+
// Submodule `version_converter`
auto version_converter = onnx_cpp2py_export.def_submodule("version_converter");
version_converter.doc() = "VersionConverter submodule";
diff --git a/onnx/external_data_helper.py b/onnx/external_data_helper.py
index bbc2717f..05c486c6 100644
--- a/onnx/external_data_helper.py
+++ b/onnx/external_data_helper.py
@@ -8,6 +8,7 @@ import uuid
from itertools import chain
from typing import Callable, Iterable, Optional
+import onnx.onnx_cpp2py_export.checker as c_checker
from onnx.onnx_pb import AttributeProto, GraphProto, ModelProto, TensorProto
@@ -39,9 +40,9 @@ def load_external_data_for_tensor(tensor: TensorProto, base_dir: str) -> None:
base_dir: directory that contains the external data.
"""
info = ExternalDataInfo(tensor)
- file_location = _sanitize_path(info.location)
- external_data_file_path = os.path.join(base_dir, file_location)
-
+ external_data_file_path = c_checker._resolve_external_data_location( # type: ignore[attr-defined]
+ base_dir, info.location, tensor.name
+ )
with open(external_data_file_path, "rb") as data_file:
if info.offset:
data_file.seek(info.offset)
@@ -259,14 +260,6 @@ def _get_attribute_tensors(onnx_model_proto: ModelProto) -> Iterable[TensorProto
yield from _get_attribute_tensors_from_graph(onnx_model_proto.graph)
-def _sanitize_path(path: str) -> str:
- """Remove path components which would allow traversing up a directory tree from a base path.
-
- Note: This method is currently very basic and should be expanded.
- """
- return path.lstrip("/.")
-
-
def _is_valid_filename(filename: str) -> bool:
"""Utility to check whether the provided filename is valid."""
exp = re.compile('^[^<>:;,?"*|/]+$')
diff --git a/onnx/test/test_external_data.py b/onnx/test/test_external_data.py
index 63f6b4ef..bb14d279 100644
--- a/onnx/test/test_external_data.py
+++ b/onnx/test/test_external_data.py
@@ -3,6 +3,7 @@
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations
+import itertools
import os
import pathlib
import tempfile
@@ -204,6 +205,52 @@ class TestLoadExternalDataSingleFile(TestLoadExternalDataBase):
attribute_tensor = new_model.graph.node[0].attribute[0].t
np.testing.assert_allclose(to_array(attribute_tensor), self.attribute_value)
+ @parameterized.parameterized.expand(itertools.product((True, False), (True, False)))
+ def test_save_external_invalid_single_file_data_and_check(
+ self, use_absolute_path: bool, use_model_path: bool
+ ) -> None:
+ model = onnx.load_model(self.model_filename, self.serialization_format)
+
+ model_dir = os.path.join(self.temp_dir, "save_copy")
+ os.mkdir(model_dir)
+
+ traversal_external_data_dir = os.path.join(
+ self.temp_dir, "invlid_external_data"
+ )
+ os.mkdir(traversal_external_data_dir)
+
+ if use_absolute_path:
+ traversal_external_data_location = os.path.join(
+ traversal_external_data_dir, "tensors.bin"
+ )
+ else:
+ traversal_external_data_location = "../invlid_external_data/tensors.bin"
+
+ external_data_dir = os.path.join(self.temp_dir, "external_data")
+ os.mkdir(external_data_dir)
+ new_model_filepath = os.path.join(model_dir, "model.onnx")
+
+ def convert_model_to_external_data_no_check(model: ModelProto, location: str):
+ for tensor in model.graph.initializer:
+ if tensor.HasField("raw_data"):
+ set_external_data(tensor, location)
+
+ convert_model_to_external_data_no_check(
+ model,
+ location=traversal_external_data_location,
+ )
+
+ onnx.save_model(model, new_model_filepath, self.serialization_format)
+ if use_model_path:
+ with self.assertRaises(onnx.checker.ValidationError):
+ _ = onnx.load_model(new_model_filepath, self.serialization_format)
+ else:
+ onnx_model = onnx.load_model(
+ new_model_filepath, self.serialization_format, load_external_data=False
+ )
+ with self.assertRaises(onnx.checker.ValidationError):
+ load_external_data_for_model(onnx_model, external_data_dir)
+
@parameterized.parameterized_class(
[

Some files were not shown because too many files have changed in this diff Show More