Skip to content

Commit

Permalink
Merge staging-next into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
nixpkgs-ci[bot] authored Jan 18, 2025
2 parents ca7812d + 0cae908 commit 6d43eca
Show file tree
Hide file tree
Showing 119 changed files with 745 additions and 1,256 deletions.
2 changes: 1 addition & 1 deletion doc/stdenv/stdenv.chapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ The propagated equivalent of `depsBuildBuild`. This perhaps never ought to be us

##### `propagatedNativeBuildInputs` {#var-stdenv-propagatedNativeBuildInputs}

The propagated equivalent of `nativeBuildInputs`. This would be called `depsBuildHostPropagated` but for historical continuity. For example, if package `Y` has `propagatedNativeBuildInputs = [X]`, and package `Z` has `buildInputs = [Y]`, then package `Z` will be built as if it included package `X` in its `nativeBuildInputs`. If instead, package `Z` has `nativeBuildInputs = [Y]`, then `Z` will be built as if it included `X` in the `depsBuildBuild` of package `Z`, because of the sum of the two `-1` host offsets.
The propagated equivalent of `nativeBuildInputs`. This would be called `depsBuildHostPropagated` but for historical continuity. For example, if package `Y` has `propagatedNativeBuildInputs = [X]`, and package `Z` has `buildInputs = [Y]`, then package `Z` will be built as if it included package `X` in its `nativeBuildInputs`. Note that if instead, package `Z` has `nativeBuildInputs = [Y]`, then `X` will not be included at all.

##### `depsBuildTargetPropagated` {#var-stdenv-depsBuildTargetPropagated}

Expand Down
4 changes: 2 additions & 2 deletions nixos/doc/manual/release-notes/rl-2505.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
- `services.dex` now restarts upon changes to the `.environmentFile` or entries in `.settings.staticClients[].secretFile` when the entry is a `path` type.

- `nixos-rebuild-ng`, a full rewrite of `nixos-rebuild` in Python, is available for testing. You can enable it by setting [system.rebuild.enableNg](options.html#opt-system.rebuild.enableNg) in your configuration (this will replace the old `nixos-rebuild`), or by adding `nixos-rebuild-ng` to your `environment.systemPackages` (in this case, it will live side-by-side with `nixos-rebuild` as `nixos-rebuild-ng`). It is expected that the next major version of NixOS (25.11) will enable `system.rebuild.enableNg` by default.

- A `nixos-rebuild build-image` sub-command has been added.
It allows users to build platform-specific (disk) images from their NixOS configurations. `nixos-rebuild build-image` works similar to the popular [nix-community/nixos-generators](https://github.com/nix-community/nixos-generators) project. See new [section on image building in the nixpkgs manual](https://nixos.org/manual/nixpkgs/unstable/#sec-image-nixos-rebuild-build-image). It is also available for `nixos-rebuild-ng`.

- `nixos-option` has been rewritten to a Nix expression called by a simple bash script. This lowers our maintenance threshold, makes eval errors less verbose, adds support for flake-based configurations, descending into `attrsOf` and `listOf` submodule options, and `--show-trace`.

It allows users to build platform-specific (disk) images from their NixOS configurations. `nixos-rebuild build-image` works similar to the popular [nix-community/nixos-generators](https://github.com/nix-community/nixos-generators) project. See new [section on image building in the nixpkgs manual](https://nixos.org/manual/nixpkgs/unstable/#sec-image-nixos-rebuild-build-image).

<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->

## New Modules {#sec-release-25.05-new-modules}
Expand Down
141 changes: 137 additions & 4 deletions nixos/modules/programs/pay-respects.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,72 @@
let
inherit (lib)
getExe
isBool
literalExpression
maintainers
mkEnableOption
mkIf
mkMerge
mkOption
mkPackageOption
optionalString
replaceChars
substring
toLower
types
;
inherit (types) str;
inherit (types)
bool
either
listOf
str
submodule
;

cfg = config.programs.pay-respects;

settingsFormat = pkgs.formats.toml { };
inherit (settingsFormat) generate type;

finalPackage =
if cfg.aiIntegration != true then
(pkgs.runCommand "pay-respects-wrapper"
{
nativeBuildInputs = [ pkgs.makeBinaryWrapper ];
inherit (cfg.package) meta;
}
''
mkdir -p $out/bin
makeWrapper ${getExe cfg.package} $out/bin/${cfg.package.meta.mainProgram} \
${optionalString (cfg.aiIntegration == false) "--set _PR_AI_DISABLE true"}
${optionalString (cfg.aiIntegration != false) ''
--set _PR_AI_URL ${cfg.aiIntegration.url} \
--set _PR_AI_MODEL ${cfg.aiIntegration.model} \
--set _PR_AI_LOCALE ${cfg.aiIntegration.locale}
''}
''
)
else
cfg.package;

initScript =
shell:
if (shell != "fish") then
''
eval $(${getExe pkgs.pay-respects} ${shell} --alias ${cfg.alias})
eval $(${getExe finalPackage} ${shell} --alias ${cfg.alias})
''
else
''
${getExe pkgs.pay-respects} ${shell} --alias ${cfg.alias} | source
${getExe finalPackage} ${shell} --alias ${cfg.alias} | source
'';
in
{
options = {
programs.pay-respects = {
enable = mkEnableOption "pay-respects, an app which corrects your previous console command";

package = mkPackageOption pkgs "pay-respects" { };

alias = mkOption {
default = "f";
type = str;
Expand All @@ -41,11 +81,104 @@ in
The default value is `f`, but you can use anything else as well.
'';
};
runtimeRules = mkOption {
type = listOf type;
default = [ ];
example = literalExpression ''
[
{
command = "xl";
match_err = [
{
pattern = [
"Permission denied"
];
suggest = [
'''
#[executable(sudo), !cmd_contains(sudo), err_contains(libxl: error:)]
sudo {{command}}
'''
];
}
];
}
];
'';
description = ''
List of rules to be added to `/etc/xdg/pay-respects/rules`.
`pay-respects` will read the contents of these generated rules to recommend command corrections.
Each rule module should start with the `command` attribute that specifies the command name. See the [upstream documentation](https://codeberg.org/iff/pay-respects/src/branch/main/rules.md) for more information.
'';
};
aiIntegration = mkOption {
default = false;
example = {
url = "http://127.0.0.1:11434/v1/chat/completions";
model = "llama3";
locale = "nl-be";
};
description = ''
Whether to enable `pay-respects`' LLM integration. When there is no rule for a given error, `pay-respects` can query an OpenAI-compatible API endpoint for command corrections.
- If this is set to `false`, all LLM-related features are disabled.
- If this is set to `true`, the default OpenAI endpoint will be used, using upstream's API key. This default API key may be rate-limited.
- You can also set a custom API endpoint, large language model and locale for command corrections. Simply access the `aiIntegration.url`, `aiIntegration.model` and `aiIntegration.locale` options, as described in the example.
- Take a look at the [services.ollama](#opt-services.ollama.enable) NixOS module if you wish to host a local large language model for `pay-respects`.
For all of these methods, you can set a custom secret API key by using the `_PR_AI_API_KEY` environment variable.
'';
type = either bool (submodule {
options = {
url = mkOption {
default = "";
example = "https://api.openai.com/v1/chat/completions";
type = str;
description = "The OpenAI-compatible API endpoint that `pay-respects` will query for command corrections.";
};
model = mkOption {
default = "";
example = "llama3";
type = str;
description = "The model used by `pay-respects` to generate command corrections.";
};
locale = mkOption {
default = toLower (replaceChars [ "_" ] [ "-" ] (substring 0 5 config.i18n.defaultLocale));
example = "nl-be";
type = str;
description = ''
The locale to be used for LLM responses.
The accepted format is a lowercase [`ISO 639-1` language code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes), followed by a dash '-', followed by a lowercase [`ISO 3166-1 alpha-2` country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
'';
};
};
});
};
};
};

config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.pay-respects ];
assertions =
map
(attr: {
assertion = (!isBool cfg.aiIntegration) -> (cfg.aiIntegration.${attr} != "");
message = ''
programs.pay-respects.aiIntegration is configured as a submodule, but you have not configured a value for programs.pay-respects.aiIntegration.${attr}!
'';
})
[
"url"
"model"
];
environment = mkMerge (
[
{
systemPackages = [ finalPackage ];
}
]
++ map (rule: {
etc."xdg/pay-respects/rules/${rule.command}.toml".source = generate "${rule.command}.toml" rule;
}) cfg.runtimeRules
);

programs = {
bash.interactiveShellInit = initScript "bash";
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/backup/borgbackup.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ A complete list of options for the Borgbase module may be found
A very basic configuration for backing up to a locally accessible directory is:
```nix
{
opt.services.borgbackup.jobs = {
services.borgbackup.jobs = {
rootBackup = {
paths = "/";
exclude = [ "/nix" "/path/to/local/repo" ];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ let
cfg = config.services.wyoming.faster-whisper;

inherit (lib)
escapeShellArgs
mkOption
mkEnableOption
mkPackageOption
Expand Down Expand Up @@ -240,7 +239,6 @@ in
description = ''
Extra arguments to pass to the server commandline.
'';
apply = escapeShellArgs;
};
};
}
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/web-apps/engelsystem.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ in
default = true;
description = ''
Whether to create a local database automatically.
This will override every database setting in {option}`services.engelsystem.config`.
This will override every database setting in {option}`services.engelsystem.settings`.
'';
};

Expand Down
2 changes: 1 addition & 1 deletion nixos/tests/davis.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import ./make-test-python.nix (
"curl -c /tmp/cookies -sSfL --resolve davis.example.com:80:127.0.0.1 http://davis.example.com/login | grep '_csrf_token' | sed -E 's,.*value=\"(.*)\".*,\\1,g'"
)
r = machine.succeed(
f"curl -b /tmp/cookies --resolve davis.example.com:80:127.0.0.1 http://davis.example.com/login -X POST -F username=admin -F password=nixos -F _csrf_token={csrf_token.strip()} -D headers"
f"curl -b /tmp/cookies --resolve davis.example.com:80:127.0.0.1 http://davis.example.com/login -X POST -F _username=admin -F _password=nixos -F _csrf_token={csrf_token.strip()} -D headers"
)
print(r)
machine.succeed(
Expand Down
12 changes: 12 additions & 0 deletions pkgs/applications/editors/vim/plugins/generated.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10771,6 +10771,18 @@ final: prev:
meta.homepage = "https://github.com/olivercederborg/poimandres.nvim/";
};

pomo-nvim = buildVimPlugin {
pname = "pomo.nvim";
version = "2024-07-30";
src = fetchFromGitHub {
owner = "epwalsh";
repo = "pomo.nvim";
rev = "aa8decc421d89be0f10b1fc6a602cdd269f350ff";
sha256 = "1drld6dmibkg4b35n181v98gwfi8yhshx1gfkg82k72a5apr77dl";
};
meta.homepage = "https://github.com/epwalsh/pomo.nvim/";
};

pony-vim-syntax = buildVimPlugin {
pname = "pony-vim-syntax";
version = "2017-09-26";
Expand Down
1 change: 1 addition & 0 deletions pkgs/applications/editors/vim/plugins/vim-plugin-names
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,7 @@ https://github.com/aklt/plantuml-syntax/,,
https://github.com/nvim-treesitter/playground/,,
https://github.com/nvim-lua/plenary.nvim/,,
https://github.com/olivercederborg/poimandres.nvim/,HEAD,
https://github.com/epwalsh/pomo.nvim/,HEAD,
https://github.com/dleonard0/pony-vim-syntax/,,
https://github.com/RishabhRD/popfix/,,
https://github.com/nvim-lua/popup.nvim/,,
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/misc/xygrib/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
qtbase,
qttools,
libnova,
proj_7,
proj,
libpng,
openjpeg,
}:
Expand All @@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
bzip2
qtbase
libnova
proj_7
proj
openjpeg
libpng
];
Expand Down
6 changes: 3 additions & 3 deletions pkgs/applications/networking/cluster/helmfile/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@

buildGoModule rec {
pname = "helmfile";
version = "0.169.2";
version = "0.170.0";

src = fetchFromGitHub {
owner = "helmfile";
repo = "helmfile";
rev = "v${version}";
hash = "sha256-OoCLFhGeciCUC7Tb6+Md8tmamc/j0AeSlu5Krmkhxyc=";
hash = "sha256-HlSpY7+Qct2vxtAejrwmmWhnWq+jVycjuxQ42KScpSs=";
};

vendorHash = "sha256-VBgWnDi0jaZ+91kkYeX9QyNBrP9W+mSMjexwzZiKZWs=";
vendorHash = "sha256-BmEtzUUORY/ck158+1ItVeiG9mzXdikjjUX7XwQ7xoo=";

proxyVendor = true; # darwin/linux hash mismatch

Expand Down
5 changes: 3 additions & 2 deletions pkgs/applications/radio/uhd/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
cmake,
pkg-config,
# See https://files.ettus.com/manual_archive/v3.15.0.0/html/page_build_guide.html for dependencies explanations
boost,
# Pin Boost 1.86 due to use of boost::asio::io_service.
boost186,
ncurses,
enableCApi ? true,
enablePythonApi ? true,
Expand Down Expand Up @@ -164,7 +165,7 @@ stdenv.mkDerivation (finalAttrs: {
buildInputs =
finalAttrs.pythonPath
++ [
boost
boost186
libusb1
]
++ optionals (enableExamples) [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
buildKodiBinaryAddon rec {
pname = "visualization-projectm";
namespace = "visualization.projectm";
version = "21.0.1";
version = "21.0.2";

src = fetchFromGitHub {
owner = "xbmc";
repo = namespace;
rev = "${version}-${rel}";
hash = "sha256-wjSQmOtQb4KjY3iH3Xh7AdQwE6ked+cpW6/gdNYS+NA=";
hash = "sha256-M+sHws9wp0sp1PnYXCLMZ9w48tJkG159XkyNvzHJNYo=";
};

extraBuildInputs = [ pkg-config libGL projectm ];
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/video/mpv/scripts/modernz.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
}:
buildLua (finalAttrs: {
pname = "modernx";
version = "0.2.3";
version = "0.2.4";

scriptPath = "modernz.lua";
src = fetchFromGitHub {
owner = "Samillion";
repo = "ModernZ";
rev = "v${finalAttrs.version}";
hash = "sha256-yjxMBGXpu7Uyt0S9AW8ewGRNzbdu2S8N0st7VSKlqcc=";
hash = "sha256-njFVAxrO5mGaf5zSA4EZN31SakWcroBZuGXYvTnqi68=";
};

postInstall = ''
Expand Down
Loading

0 comments on commit 6d43eca

Please sign in to comment.