Merge master into staging-next

This commit is contained in:
nixpkgs-ci[bot] 2026-07-03 12:39:18 +00:00 committed by GitHub
commit be92e0575f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
72 changed files with 902 additions and 538 deletions

View file

@ -36,7 +36,7 @@ If the build succeeds, the manual will be in `./result/share/doc/nixpkgs/manual.
### Development environment
In order to reduce repetition, consider using tools from the provided development environment:
To reduce repetition, consider using tools from the provided development environment:
Load it from the Nixpkgs documentation directory with

View file

@ -73,6 +73,7 @@ stdenvNoCC.mkDerivation (
../anchor.min.js
../manpage-urls.json
../redirects.json
../nav.json
]
);
};
@ -116,8 +117,8 @@ stdenvNoCC.mkDerivation (
--script ./highlightjs/loader.js \
--script ./anchor.min.js \
--script ./anchor-use.js \
--toc-depth 1 \
--section-toc-depth 1 \
--sidebar-depth 3 \
--nav ./nav.json \
manual.md \
out/index.html

View file

@ -125,7 +125,7 @@ There are 2 ways to package backend dependencies: either per-dependency mix2nix
When writing an elixir project targeting `mixRelease`, you can also consider using [deps_nix](https://github.com/code-supply/deps_nix) with `mixNixDeps`. `deps_nix` supports git dependencies, but is intended to be added to the project's `mix.exs` directly.
###### mix2nix {#mix2nix}
##### mix2nix {#mix2nix}
`mix2nix` is a cli tool available in Nixpkgs. It will generate a Nix expression from a `mix.lock` file. It is quite standard in the 2nix tool series.
@ -175,7 +175,7 @@ If there are git dependencies.
You will need to run the build process once to fix the hash to correspond to your new git src.
###### FOD {#fixed-output-derivation}
##### FOD {#fixed-output-derivation}
A fixed output derivation will download mix dependencies from the internet. To ensure reproducibility, a hash will be supplied. Note that mix is relatively reproducible. An FOD generating a different hash on each run hasn't been observed (as opposed to npm where the chances are relatively high). See [akkoma](https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/ak/akkoma/package.nix) for a usage example of FOD.
@ -255,7 +255,7 @@ Setup will require the following steps:
#### Example of creating a service for an Elixir - Phoenix project {#example-of-creating-a-service-for-an-elixir---phoenix-project}
In order to create a service with your release, you could add a `service.nix`
To create a service with your release, you could add a `service.nix`
in your project with the following
```nix

View file

@ -679,7 +679,7 @@ Defaults to `false`.
`genericBuilderArgsModifier`
: This argument accepts a function allowing you to modify the arguments passed
to `mkDerivation` in order to create the development environment. For example,
to `mkDerivation` to create the development environment. For example,
`args: { doCheck = false; }` would cause the environment to not include any test
dependencies. Defaults to `lib.id`.

View file

@ -341,7 +341,7 @@ The double invocation is a _simple_ way to get around the problem that `nix-buil
It treats the entire Maven repository as a single source to be downloaded, relying on Maven's dependency resolution to satisfy the output hash. This is similar to fetchers like `fetchgit`, except it has to run a Maven build to determine what to download.
The first step will be to build the Maven project as a fixed-output derivation in order to collect the Maven repository -- below is an [example](https://github.com/fzakaria/nixos-maven-example/blob/main/double-invocation-repository.nix).
The first step will be to build the Maven project as a fixed-output derivation to collect the Maven repository -- below is an [example](https://github.com/fzakaria/nixos-maven-example/blob/main/double-invocation-repository.nix).
::: {.note}
Traditionally the Maven repository is at `~/.m2/repository`. We will override this to be the `$out` directory.
@ -469,7 +469,7 @@ The previous example builds a `jar` file but that's not a file one can run.
You need to use it with `java -jar $out/share/java/output.jar` and make sure to provide the required dependencies on the classpath.
The following explains how to use `makeWrapper` in order to make the derivation produce an executable that will run the JAR file you created.
The following explains how to use `makeWrapper` to make the derivation produce an executable that will run the JAR file you created.
We will use the same repository we built above (either _double invocation_ or _buildMaven_) to setup a CLASSPATH for our JAR.

View file

@ -152,7 +152,7 @@ For example, if upstream documents that a plugin uses the Vim license but GitHub
## LuaRocks based plugins {#neovim-luarocks-based-plugins}
In order to automatically handle plugin dependencies, several Neovim plugins
To automatically handle plugin dependencies, several Neovim plugins
upload their package to [LuaRocks](https://www.luarocks.org). This means less work for nixpkgs maintainers in the long term as dependencies get updated automatically.
This means several Neovim plugins are first packaged as nixpkgs [lua
packages](#packaging-a-library-on-luarocks), and converted via `buildNeovimPlugin` in

View file

@ -1614,7 +1614,7 @@ looked at how you can create environments in which specified packages are
available.
At some point you'll likely have multiple packages which you would
like to be able to use in different projects. In order to minimise unnecessary
like to be able to use in different projects. To minimise unnecessary
duplication we now look at how you can maintain a repository with your
own packages. The important functions here are `import` and `callPackage`.
@ -1861,7 +1861,7 @@ pkgs.mkShell rec {
pythonPackages.numpy
pythonPackages.requests
# In this particular example, in order to compile any binary extensions they may
# In this particular example, to compile any binary extensions they may
# require, the Python modules listed in the hypothetical requirements.txt need
# the following packages to be installed locally:
taglib
@ -2092,7 +2092,7 @@ See also [contributing section](#contributing).
### Are Python interpreters built deterministically? {#deterministic-builds}
The Python interpreters are now built deterministically. Minor modifications had
to be made to the interpreters in order to generate deterministic bytecode. This
to be made to the interpreters to generate deterministic bytecode. This
has security implications and is relevant for those using Python in a
`nix-shell`.

View file

@ -51,7 +51,7 @@ The recommended way of defining a derivation for a Rocq library, is to use the `
* if it is a string of the form `owner:branch` then it tries to download the `branch` of owner `owner` for a project of the same name using the same vcs, and the `version` attribute of the resulting derivation is set to `"dev"`, additionally if the owner is not provided (i.e. if the `owner:` prefix is missing), it defaults to the original owner of the package (see below),
* if it is a string of the form `"#N"`, and the domain is github, then it tries to download the current head of the pull request `#N` from github,
* `defaultVersion` (optional). Rocq libraries may be compatible with some specific versions of Rocq only. The `defaultVersion` attribute is used when no `version` is provided (or if `version = null`) to select the version of the library to use by default, depending on the context. This selection will mainly depend on a `rocq-core` version number but also possibly on other packages versions (e.g. `mathcomp`). If its value ends up to be `null`, the package is marked for removal in end-user `rocqPackages` attribute set.
* `release` (optional, defaults to `{}`), lists all the known releases of the library and for each of them provides an attribute set with at least a `hash` attribute (you may put the empty string `""` in order to automatically insert a fake hash, this will trigger an error which will allow you to find the correct hash), each attribute set of the list of releases also takes optional overloading arguments for the fetcher as below (i.e.`domain`, `owner`, `repo`, `rev`, `artifact` assuming the default fetcher is used) and optional overrides for the result of the fetcher (i.e. `version` and `src`).
* `release` (optional, defaults to `{}`), lists all the known releases of the library and for each of them provides an attribute set with at least a `hash` attribute (you may put the empty string `""` to automatically insert a fake hash, this will trigger an error which will allow you to find the correct hash), each attribute set of the list of releases also takes optional overloading arguments for the fetcher as below (i.e.`domain`, `owner`, `repo`, `rev`, `artifact` assuming the default fetcher is used) and optional overrides for the result of the fetcher (i.e. `version` and `src`).
* `fetcher` (optional, defaults to a generic fetching mechanism supporting github or gitlab based infrastructures), is a function that takes at least an `owner`, a `repo`, a `rev`, and a `hash` and returns an attribute set with a `version` and `src`.
* `repo` (optional, defaults to the value of `pname`),
* `owner` (optional, defaults to `"rocq-community"`).
@ -153,7 +153,7 @@ For example, assuming you have a special `mathcomp` dependency you want to use,
multinomials.override { mathcomp = my-special-mathcomp; }
```
In Nixpkgs, all Rocq derivations take a `version` argument. This can be overridden in order to easily use a different version:
In Nixpkgs, all Rocq derivations take a `version` argument. This can be overridden to easily use a different version:
```nix
rocqPackages.multinomials.override { version = "1.5.1"; }

View file

@ -125,7 +125,7 @@ With this file in your directory, you can run `nix-shell` to build and use the g
The `bundlerEnv` is a wrapper over all the gems in your gemset. This means that all the `/lib` and `/bin` directories will be available, and the executables of all gems (even of indirect dependencies) will end up in your `$PATH`. The `wrappedRuby` provides you with all executables that come with Ruby itself, but wrapped so they can easily find the gems in your gemset.
One common issue that you might have is that you have Ruby, but also `bundler` in your gemset. That leads to a conflict for `/bin/bundle` and `/bin/bundler`. You can resolve this by wrapping either your Ruby or your gems in a `lowPrio` call. So in order to give the `bundler` from your gemset priority, it would be used like this:
One common issue that you might have is that you have Ruby, but also `bundler` in your gemset. That leads to a conflict for `/bin/bundle` and `/bin/bundler`. You can resolve this by wrapping either your Ruby or your gems in a `lowPrio` call. So to give the `bundler` from your gemset priority, it would be used like this:
```nix
# ...
@ -265,7 +265,7 @@ Now that you know how to get a working Ruby environment with Nix, it's time to g
All gems in the standard set are automatically generated from a single `Gemfile`. The dependency resolution is done with `bundler` and makes it more likely that all gems are compatible with each other.
In order to add a new gem to nixpkgs, you can put it into the `/pkgs/development/ruby-modules/with-packages/Gemfile` and run `./maintainers/scripts/update-ruby-packages`.
To add a new gem to nixpkgs, you can put it into the `/pkgs/development/ruby-modules/with-packages/Gemfile` and run `./maintainers/scripts/update-ruby-packages`.
To test that it works, you can then try using the gem with:

View file

@ -160,7 +160,7 @@ This essentially runs: `swift test -c release`
In some cases, it may be necessary to patch a SwiftPM dependency. SwiftPM
dependencies are located in `.build/checkouts`, but the `swiftpm2nix` helper
provides these as symlinks to read-only `/nix/store` paths. In order to patch
provides these as symlinks to read-only `/nix/store` paths. To patch
them, we need to make them writable.
A special function `swiftpmMakeMutable` is available to replace the symlink

View file

@ -153,7 +153,7 @@ Nix expressions for Vim plugins are stored in [pkgs/applications/editors/vim/plu
When the vim updater detects an nvim-treesitter update, it also runs [`nvim-treesitter/update.py $(nix-build -A vimPlugins.nvim-treesitter)`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/utils/update.py) to update the tree sitter grammars for `nvim-treesitter`.
Some plugins require overrides in order to function properly. Overrides are placed in [overrides.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/overrides.nix). Overrides are most often required when a plugin requires some dependencies, or extra steps are required during the build process. For example `deoplete-fish` requires both `deoplete-nvim` and `vim-fish`, and so the following override was added:
Some plugins require overrides to function properly. Overrides are placed in [overrides.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/overrides.nix). Overrides are most often required when a plugin requires some dependencies, or extra steps are required during the build process. For example `deoplete-fish` requires both `deoplete-nvim` and `vim-fish`, and so the following override was added:
```nix
{

3
doc/nav.json Normal file
View file

@ -0,0 +1,3 @@
{
"open": []
}

View file

@ -10,7 +10,7 @@ The tarball archive needs to be downloaded manually, as the license agreements o
The [self-service](https://support.citrix.com/article/CTX200337) is an application for managing Citrix desktops and applications. Please note that this feature only works with at least `citrix_workspace_20_06_0` and later versions.
In order to set this up, you first have to [download the `.cr` file from the Netscaler Gateway](https://its.uiowa.edu/support/article/102186). After that, you can configure the `selfservice` like this:
To set this up, you first have to [download the `.cr` file from the Netscaler Gateway](https://its.uiowa.edu/support/article/102186). After that, you can configure the `selfservice` like this:
```ShellSession
$ storebrowse -C ~/Downloads/receiverconfig.cr
@ -19,7 +19,7 @@ $ selfservice
## Custom certificates {#sec-citrix-custom-certs}
The `Citrix Workspace App` in `nixpkgs` trusts several certificates [from the Mozilla database](https://curl.haxx.se/docs/caextract.html) by default. However, several companies using Citrix might require their own corporate certificate. On distros with imperative packaging, these certs can be stored easily in [`$ICAROOT`](https://citrix.github.io/receiver-for-linux-command-reference/), however, this directory is a store path in `nixpkgs`. In order to work around this issue, the package provides a simple mechanism to add custom certificates without rebuilding the entire package using `symlinkJoin`:
The `Citrix Workspace App` in `nixpkgs` trusts several certificates [from the Mozilla database](https://curl.haxx.se/docs/caextract.html) by default. However, several companies using Citrix might require their own corporate certificate. On distros with imperative packaging, these certs can be stored easily in [`$ICAROOT`](https://citrix.github.io/receiver-for-linux-command-reference/), however, this directory is a store path in `nixpkgs`. To work around this issue, the package provides a simple mechanism to add custom certificates without rebuilding the entire package using `symlinkJoin`:
```nix
with import <nixpkgs> { config.allowUnfree = true; };

View file

@ -22,7 +22,7 @@ rxvt-unicode.override {
If the `configure` function returns an attrset without the `plugins` attribute, `availablePlugins` will be used automatically.
In order to add plugins but also keep all default plugins installed, it is possible to use the following method:
To add plugins but also keep all default plugins installed, it is possible to use the following method:
```nix
rxvt-unicode.override {

View file

@ -39,7 +39,7 @@ weechat.override {
}
```
In order to also keep all default plugins installed, it is possible to use the following method:
To also keep all default plugins installed, it is possible to use the following method:
```nix
weechat.override {

View file

@ -776,7 +776,7 @@ By default, the flag `--disable-dependency-tracking` is added to the configure f
##### `dontFixLibtool` {#var-stdenv-dontFixLibtool}
By default, the configure phase applies some special hackery to all files called `ltmain.sh` before running the configure script in order to improve the purity of Libtool-based packages [^footnote-stdenv-sys-lib-search-path] . If this is undesirable, set this variable to true.
By default, the configure phase applies some special hackery to all files called `ltmain.sh` before running the configure script to improve the purity of Libtool-based packages [^footnote-stdenv-sys-lib-search-path] . If this is undesirable, set this variable to true.
##### `dontDisableStatic` {#var-stdenv-dontDisableStatic}
@ -939,7 +939,7 @@ The fixup phase performs (Nix-specific) post-processing actions on the files ins
- It moves the `man/`, `doc/` and `info/` subdirectories of `$out` to `share/`.
- It strips libraries and executables of debug information.
- On Linux, it applies the `patchelf` command to ELF executables and libraries to remove unused directories from the `RPATH` in order to prevent unnecessary runtime dependencies.
- On Linux, it applies the `patchelf` command to ELF executables and libraries to remove unused directories from the `RPATH` to prevent unnecessary runtime dependencies.
- It rewrites the interpreter paths of shell scripts to paths found in `PATH`. E.g., `/usr/bin/perl` will be rewritten to `/nix/store/some-perl/bin/perl` found in `PATH`. See [](#patch-shebangs.sh) for details.
#### Variables controlling the fixup phase {#variables-controlling-the-fixup-phase}
@ -1345,7 +1345,7 @@ $ echo $configureFlags
Nix itself considers a build-time dependency as merely something that should previously be built and accessible at build time—packages themselves are on their own to perform any additional setup. In most cases, that is fine, and the downstream derivation can deal with its own dependencies. But for a few common tasks, that would result in almost every package doing the same sort of setup work—depending not on the package itself, but entirely on which dependencies were used.
In order to alleviate this burden, the setup hook mechanism was written, where any package can include a shell script that \[by convention rather than enforcement by Nix\], any downstream reverse-dependency will source as part of its build process. That allows the downstream dependency to merely specify its dependencies, and lets those dependencies effectively initialize themselves. No boilerplate mirroring the list of dependencies is needed.
To alleviate this burden, the setup hook mechanism was written, where any package can include a shell script that \[by convention rather than enforcement by Nix\], any downstream reverse-dependency will source as part of its build process. That allows the downstream dependency to merely specify its dependencies, and lets those dependencies effectively initialize themselves. No boilerplate mirroring the list of dependencies is needed.
The setup hook mechanism is a bit of a sledgehammer though: a powerful feature with a broad and indiscriminate area of effect. The combination of its power and implicit use may be expedient, but isnt without costs. Nix itself is unchanged, but the spirit of added dependencies being effect-free is violated even if the latter isnt. For example, if a derivation path is mentioned more than once, Nix itself doesnt care and makes sure the dependency derivation is already built just the same—depending is just needing something to exist, and needing is idempotent. However, a dependency specified twice will have its setup hook run twice, and that could easily change the build environment (though a well-written setup hook will therefore strive to be idempotent so this is in fact not observable). More broadly, setup hooks are anti-modular in that multiple dependencies, whether the same or different, should not interfere and yet their setup hooks may well do so.

View file

@ -131,6 +131,32 @@ body {
padding-left: 1rem;
padding-right: 1rem;
}
/*
See: https://developer.mozilla.org/en-US/docs/Web/API/Popover_API
- :popover-open pseudo-class matches a popover element when it is in the showing state
- ::backdrop full-screen element placed directly behind popover
*/
nav.toc-sidebar:popover-open {
position: fixed;
inset: 0 auto 0 0;
width: min(20rem, 85vw);
height: 100dvh;
max-height: none;
margin: 0;
padding: 1rem;
overflow-y: auto;
overscroll-behavior: contain;
background: var(--background);
border: 0;
border-right: 0.0625rem solid #d8d8d8;
box-shadow: 0 0 1.5rem rgb(0 0 0 / 0.35);
}
nav.toc-sidebar::backdrop {
background: rgb(0 0 0 / 0.5);
}
}
a {
@ -387,15 +413,6 @@ div.appendix dt {
margin-top: 1em;
}
div.book .toc dt,
div.appendix .toc dt {
margin-top: 0;
}
.list-of-examples dt {
margin-top: 0;
}
div.book code,
div.appendix code {
padding: 0;
@ -408,17 +425,6 @@ div.appendix code {
hyphens: none;
}
div.book div.toc,
div.appendix div.toc {
margin-bottom: 3em;
border-bottom: 0.0625rem solid #d8d8d8;
}
div.book div.toc dd,
div.appendix div.toc dd {
margin-left: 2em;
}
div.book span.command,
div.appendix span.command {
font-family: monospace;
@ -506,21 +512,48 @@ div.appendix .variablelist .term {
nav.toc-sidebar {
height: 100%;
overflow-y: none;
padding: 0 1rem 2rem;
border-bottom: 0.0625rem solid #d8d8d8;
}
/* menu button, shown on mobile, hidden on desktop */
.toc-toggle {
display: inline-flex;
align-items: center;
margin: 0.75rem 0 0;
padding: 0.4rem 0.8rem;
border: 0.0625rem solid #d8d8d8;
border-radius: 0.25rem;
background: var(--background);
color: var(--main-text-color);
font: inherit;
cursor: pointer;
position: fixed;
top: 0.5rem;
left: 0.8rem;
z-index: 2;
}
nav.toc-sidebar .toc {
margin-bottom: 0;
}
nav.toc-sidebar .toc dl {
nav.toc-sidebar ol.toc,
nav.toc-sidebar ol.toc ol {
list-style: none;
margin: 0;
padding-left: 0;
}
nav.toc-sidebar ol.toc ol {
padding-left: 1em;
}
nav.toc-sidebar li {
margin: 0;
}
nav.toc-sidebar .toc dd {
margin-left: 1em;
nav.toc-sidebar summary {
cursor: pointer;
}
@media screen and (min-width: 768px) {
@ -542,14 +575,25 @@ nav.toc-sidebar .toc dd {
}
nav.toc-sidebar {
/* un-pop the drawer */
display: block;
position: static;
inset: auto;
/* */
margin: 0;
grid-column: 1;
grid-row: 2;
max-height: none;
overflow-y: auto;
border-bottom: none;
border: none;
border-right: 0.0625rem solid #d8d8d8;
}
/* Hide the toggle button on desktop */
.toc-toggle {
display: none;
}
main.content {
grid-column: 1 / -1;
grid-row: 2;

View file

@ -19998,6 +19998,11 @@
name = "Jakub Kądziołka";
keys = [ { fingerprint = "E576 BFB2 CF6E B13D F571 33B9 E315 A758 4613 1564"; } ];
};
nielmin = {
name = "Daniel Hwang";
github = "nielmin";
githubId = 81798555;
};
nielsegberts = {
email = "nix@nielsegberts.nl";
github = "nielsegberts";

View file

@ -201,8 +201,7 @@ rec {
--script ./highlightjs/loader.js \
--script ./anchor.min.js \
--script ./anchor-use.js \
--toc-depth 1 \
--chunk-toc-depth 1 \
--sidebar-depth 2 \
./manual.md \
$dst/${common.indexPath}

View file

@ -31,17 +31,25 @@
populateFirmwareCommands =
let
configTxt = pkgs.writeText "config.txt" ''
[pi3]
kernel=u-boot-rpi3.bin
kernel=u-boot.bin
# Boot in 64-bit mode.
arm_64bit=1
# U-Boot needs this to work, regardless of whether UART is actually used or not.
# Look in arch/arm/mach-bcm283x/Kconfig in the U-Boot tree to see if this is still
# a requirement in the future.
enable_uart=1
# Prevent the firmware from smashing the framebuffer setup done by the mainline kernel
# when attempting to show low-voltage or overtemperature warnings.
avoid_warnings=1
[pi3]
# Otherwise the serial output will be garbled.
core_freq=250
[pi02]
kernel=u-boot-rpi3.bin
[pi4]
kernel=u-boot-rpi4.bin
enable_gic=1
armstub=armstub8-gic.bin
@ -58,28 +66,24 @@
# (e.g. for USB device mode) or if USB support is not required.
otg_mode=1
[all]
# Boot in 64-bit mode.
arm_64bit=1
[cm5]
dtoverlay=dwc2,dr_mode=host
# U-Boot needs this to work, regardless of whether UART is actually used or not.
# Look in arch/arm/mach-bcm283x/Kconfig in the U-Boot tree to see if this is still
# a requirement in the future.
enable_uart=1
# Prevent the firmware from smashing the framebuffer setup done by the mainline kernel
# when attempting to show low-voltage or overtemperature warnings.
avoid_warnings=1
[pi5]
# On some revisions of the RPi5, U-Boot interprets picks up
# ghost inputs from the uart, interrupting the boot process.
# https://bugzilla.opensuse.org/show_bug.cgi?id=1251192
enable_uart=0
'';
in
''
(cd ${pkgs.raspberrypifw}/share/raspberrypi/boot && cp bootcode.bin fixup*.dat start*.elf $NIX_BUILD_TOP/firmware/)
cp ${pkgs.ubootRaspberryPiAarch64}/u-boot.bin firmware/u-boot.bin
# Add the config
cp ${configTxt} firmware/config.txt
# Add pi3 specific files
cp ${pkgs.ubootRaspberryPi3_64bit}/u-boot.bin firmware/u-boot-rpi3.bin
cp ${pkgs.raspberrypifw}/share/raspberrypi/boot/bcm2710-rpi-2-b.dtb firmware/
cp ${pkgs.raspberrypifw}/share/raspberrypi/boot/bcm2710-rpi-3-b.dtb firmware/
cp ${pkgs.raspberrypifw}/share/raspberrypi/boot/bcm2710-rpi-3-b-plus.dtb firmware/
@ -88,12 +92,20 @@
cp ${pkgs.raspberrypifw}/share/raspberrypi/boot/bcm2710-rpi-zero-2-w.dtb firmware/
# Add pi4 specific files
cp ${pkgs.ubootRaspberryPi4_64bit}/u-boot.bin firmware/u-boot-rpi4.bin
cp ${pkgs.raspberrypi-armstubs}/armstub8-gic.bin firmware/armstub8-gic.bin
cp ${pkgs.raspberrypifw}/share/raspberrypi/boot/bcm2711-rpi-4-b.dtb firmware/
cp ${pkgs.raspberrypifw}/share/raspberrypi/boot/bcm2711-rpi-400.dtb firmware/
cp ${pkgs.raspberrypifw}/share/raspberrypi/boot/bcm2711-rpi-cm4.dtb firmware/
cp ${pkgs.raspberrypifw}/share/raspberrypi/boot/bcm2711-rpi-cm4s.dtb firmware/
# Add pi5 specific files
cp ${pkgs.raspberrypifw}/share/raspberrypi/boot/bcm2712-d-rpi-5-b.dtb firmware/
cp ${pkgs.raspberrypifw}/share/raspberrypi/boot/bcm2712-rpi-5-b.dtb firmware/
cp ${pkgs.raspberrypifw}/share/raspberrypi/boot/bcm2712-rpi-500.dtb firmware/
cp ${pkgs.raspberrypifw}/share/raspberrypi/boot/bcm2712-rpi-cm5-cm4io.dtb firmware/
cp ${pkgs.raspberrypifw}/share/raspberrypi/boot/bcm2712-rpi-cm5-cm5io.dtb firmware/
cp ${pkgs.raspberrypifw}/share/raspberrypi/boot/bcm2712-rpi-cm5l-cm4io.dtb firmware/
cp ${pkgs.raspberrypifw}/share/raspberrypi/boot/bcm2712-rpi-cm5l-cm5io.dtb firmware/
'';
populateRootCommands = ''
mkdir -p ./files/boot

View file

@ -37,6 +37,18 @@ in
"ollama"
"acceleration"
] "Set `services.ollama.package` to one of `pkgs.ollama[,-vulkan,-rocm,-cuda,-cpu]` instead.")
(lib.mkRenamedOptionModule
[
"services"
"ollama"
"models"
]
[
"services"
"ollama"
"modelsDir"
]
)
];
options = {
@ -91,7 +103,7 @@ in
The home directory that the ollama service is started in.
'';
};
models = lib.mkOption {
modelsDir = lib.mkOption {
type = types.str;
default = "${cfg.home}/models";
defaultText = "\${config.services.ollama.home}/models";
@ -207,7 +219,7 @@ in
cfg.environmentVariables
// {
HOME = cfg.home;
OLLAMA_MODELS = cfg.models;
OLLAMA_MODELS = cfg.modelsDir;
OLLAMA_HOST = "${cfg.host}:${toString cfg.port}";
}
// lib.optionalAttrs (cfg.rocmOverrideGfx != null) {
@ -226,7 +238,7 @@ in
StateDirectory = [ "ollama" ];
ReadWritePaths = [
cfg.home
cfg.models
cfg.modelsDir
];
CapabilityBoundingSet = [ "" ];

View file

@ -66,12 +66,7 @@ import ../make-test-python.nix (
# Upgrade to the latest Mattermost.
specialisation.latest.configuration = {
services.mattermost.package = lib.mkForce (
pkgs.mattermostLatest.override {
removeFreeBadge = true;
removeUserLimit = true;
}
);
services.mattermost.package = lib.mkForce pkgs.mattermostLatest;
system.stateVersion = lib.mkVMOverride (lib.versions.majorMinor lib.version);
};
}

View file

@ -1,74 +0,0 @@
diff --git a/src/api/video/nv12_buffer.cc b/src/api/video/nv12_buffer.cc
index ca9dcd867..89d28f23c 100644
--- a/src/api/video/nv12_buffer.cc
+++ b/src/api/video/nv12_buffer.cc
@@ -16,6 +16,8 @@
#include "third_party/libyuv/include/libyuv/convert.h"
#include "third_party/libyuv/include/libyuv/scale.h"
+#include <cstring>
+
namespace webrtc {
namespace {
diff --git a/src/audio/utility/channel_mixer.cc b/src/audio/utility/channel_mixer.cc
index 0f1e66387..33b771b0c 100644
--- a/src/audio/utility/channel_mixer.cc
+++ b/src/audio/utility/channel_mixer.cc
@@ -15,6 +15,8 @@
#include "rtc_base/logging.h"
#include "rtc_base/numerics/safe_conversions.h"
+#include <cstring>
+
namespace webrtc {
ChannelMixer::ChannelMixer(ChannelLayout input_layout,
diff --git a/src/modules/audio_processing/aec3/alignment_mixer.cc b/src/modules/audio_processing/aec3/alignment_mixer.cc
index 7f076dea8..ffd7242b5 100644
--- a/src/modules/audio_processing/aec3/alignment_mixer.cc
+++ b/src/modules/audio_processing/aec3/alignment_mixer.cc
@@ -10,6 +10,7 @@
#include "modules/audio_processing/aec3/alignment_mixer.h"
#include <algorithm>
+#include <cstring>
#include "rtc_base/checks.h"
diff --git a/src/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc b/src/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc
index 7ef1a030e..5b9ab7137 100644
--- a/src/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc
+++ b/src/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc
@@ -18,6 +18,7 @@
#include <spa/param/video/format-utils.h>
#include <sys/mman.h>
+#include <cstring>
#include <vector>
#include "absl/memory/memory.h"
diff --git a/src/modules/video_coding/utility/ivf_file_reader.cc b/src/modules/video_coding/utility/ivf_file_reader.cc
index 4c08ca613..f82f2bfcb 100644
--- a/src/modules/video_coding/utility/ivf_file_reader.cc
+++ b/src/modules/video_coding/utility/ivf_file_reader.cc
@@ -10,6 +10,7 @@
#include "modules/video_coding/utility/ivf_file_reader.h"
+#include <cstring>
#include <string>
#include <vector>
diff --git a/src/net/dcsctp/packet/bounded_byte_writer.h b/src/net/dcsctp/packet/bounded_byte_writer.h
index d754549e4..bf5e3ed42 100644
--- a/src/net/dcsctp/packet/bounded_byte_writer.h
+++ b/src/net/dcsctp/packet/bounded_byte_writer.h
@@ -12,6 +12,7 @@
#define NET_DCSCTP_PACKET_BOUNDED_BYTE_WRITER_H_
#include <algorithm>
+#include <cstring>
#include "api/array_view.h"

View file

@ -1,97 +1,28 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
libsForQt5,
yasm,
alsa-lib,
jemalloc,
libopus,
libpulseaudio,
telegram-desktop,
withWebkit ? true,
}:
let
telegram-desktop = libsForQt5.callPackage ../telegram-desktop {
inherit stdenv;
# N/A on Qt5
kimageformats = null;
unwrapped = libsForQt5.callPackage ../telegram-desktop/unwrapped.nix {
inherit stdenv;
kcoreaddons = null;
qtshadertools = null;
};
};
version = "1.4.9";
tg_owt = telegram-desktop.tg_owt.overrideAttrs (oldAttrs: {
version = "0-unstable-2024-06-15";
src = fetchFromGitHub {
owner = "desktop-app";
repo = "tg_owt";
rev = "c9cc4390ab951f2cbc103ff783a11f398b27660b";
hash = "sha256-FfWmSYaeryTDbsGJT3R7YK1oiyJcrR7YKKBOF+9PmpY=";
fetchSubmodules = true;
};
patches = [
# fix build with latest glibc
# upstream PR: https://github.com/desktop-app/tg_owt/pull/172
./cstring-includes.patch
(fetchpatch {
url = "https://webrtc.googlesource.com/src/+/e7d10047096880feb5e9846375f2da54aef91202%5E%21/?format=TEXT";
decode = "base64 -d";
stripLen = 1;
extraPrefix = "src/";
hash = "sha256-goxnuRRbwcdfIk1jFaKGiKCTCYn2saEj7En1Iyglzko=";
})
];
nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [ yasm ];
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-c++11-narrowing";
});
in
telegram-desktop.override {
pname = "kotatogram-desktop";
inherit withWebkit;
unwrapped = (telegram-desktop.unwrapped.override { inherit tg_owt; }).overrideAttrs (old: {
unwrapped = telegram-desktop.unwrapped.overrideAttrs (old: {
pname = "kotatogram-desktop-unwrapped";
version = "${version}-unstable-2024-09-27";
version = "${version}-unstable-2026-07-03";
src = fetchFromGitHub {
owner = "kotatogram";
repo = "kotatogram-desktop";
rev = "0581eb6219343b3cfcbb81124b372df1039b7568";
hash = "sha256-rvn8GZmHdMkVutLUe/LmUNIawlb9VgU3sYhPwZ2MWsI=";
rev = "7263a1b53c9e6b45a416532644fff7a4c7f90d54";
hash = "sha256-xOfHZ7oUJKk65j7o/AgxtFfc5NqsAoA9E+8U6rHlSmc=";
fetchSubmodules = true;
};
patches = [
./macos-qt5.patch
./glib-2.86.patch
(fetchpatch {
url = "https://gitlab.com/mnauw/cppgir/-/commit/c8bb1c6017a6f7f2e47bd10543aea6b3ec69a966.patch";
stripLen = 1;
extraPrefix = "cmake/external/glib/cppgir/";
hash = "sha256-8B4h3BTG8dIlt3+uVgBI569E9eCebcor9uohtsrZpnI=";
})
];
buildInputs =
(old.buildInputs or [ ])
++ [
libopus
]
++ lib.optionals stdenv.hostPlatform.isLinux [
alsa-lib
jemalloc
libpulseaudio
];
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-missing-template-arg-list-after-template-kw";
meta = {
description = "Kotatogram experimental Telegram Desktop fork";
longDescription = ''
@ -104,7 +35,7 @@ telegram-desktop.override {
homepage = "https://kotatogram.github.io";
changelog = "https://github.com/kotatogram/kotatogram-desktop/releases/tag/k${version}";
maintainers = with lib.maintainers; [ ilya-fedin ];
mainProgram = if stdenv.hostPlatform.isLinux then "kotatogram-desktop" else "Kotatogram";
mainProgram = "Kotatogram";
};
});
}

View file

@ -1,37 +0,0 @@
Submodule Telegram/lib_base contains modified content
diff --git a/Telegram/lib_base/base/platform/linux/base_url_scheme_linux.cpp b/Telegram/lib_base/base/platform/linux/base_url_scheme_linux.cpp
index 4197367..f79d2fa 100644
--- a/Telegram/lib_base/base/platform/linux/base_url_scheme_linux.cpp
+++ b/Telegram/lib_base/base/platform/linux/base_url_scheme_linux.cpp
@@ -15,7 +15,7 @@
#include <kshell.h>
#include <ksandbox.h>
-#include <gio/gio.hpp>
+#include <giounix/giounix.hpp>
#include <snapcraft/snapcraft.hpp>
namespace base::Platform {
@@ -125,7 +125,7 @@ void RegisterUrlScheme(const UrlSchemeDescriptor &descriptor) {
const auto appId = QGuiApplication::desktopFileName().toStdString();
if (!appId.empty()) {
- Gio::AppInfo appInfo = Gio::DesktopAppInfo::new_(appId + ".desktop");
+ Gio::AppInfo appInfo = GioUnix::DesktopAppInfo::new_(appId + ".desktop");
if (appInfo) {
if (appInfo.get_commandline() == commandlineForCreator + " %u") {
appInfo.set_as_default_for_type(handlerType);
Submodule cmake contains modified content
diff --git a/cmake/external/glib/CMakeLists.txt b/cmake/external/glib/CMakeLists.txt
index 3c6fe4b..6f73dc5 100644
--- a/cmake/external/glib/CMakeLists.txt
+++ b/cmake/external/glib/CMakeLists.txt
@@ -16,7 +16,7 @@ endfunction()
add_cppgir()
include(generate_cppgir.cmake)
-generate_cppgir(external_glib Gio-2.0)
+generate_cppgir(external_glib GioUnix-2.0)
find_package(PkgConfig REQUIRED)
pkg_check_modules(GLIB2 REQUIRED IMPORTED_TARGET glib-2.0 gobject-2.0 gio-2.0 gio-unix-2.0)

View file

@ -1,75 +0,0 @@
diff --git a/Telegram/SourceFiles/platform/mac/main_window_mac.h b/Telegram/SourceFiles/platform/mac/main_window_mac.h
index 2a3a59b9cf..16b7b6cdde 100644
--- a/Telegram/SourceFiles/platform/mac/main_window_mac.h
+++ b/Telegram/SourceFiles/platform/mac/main_window_mac.h
@@ -10,6 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "platform/platform_main_window.h"
#include "platform/mac/specific_mac_p.h"
#include "base/timer.h"
+#include "base/qt/qt_common_adapters.h"
#include <QtWidgets/QMenuBar>
#include <QtCore/QTimer>
@@ -52,7 +53,7 @@ private:
bool nativeEvent(
const QByteArray &eventType,
void *message,
- qintptr *result) override;
+ base::NativeEventResult *result) override;
void hideAndDeactivate();
void updateDockCounter();
diff --git a/Telegram/SourceFiles/platform/mac/main_window_mac.mm b/Telegram/SourceFiles/platform/mac/main_window_mac.mm
index e95ef79f16..c3381926a9 100644
--- a/Telegram/SourceFiles/platform/mac/main_window_mac.mm
+++ b/Telegram/SourceFiles/platform/mac/main_window_mac.mm
@@ -305,7 +305,7 @@ void MainWindow::updateWindowIcon() {
bool MainWindow::nativeEvent(
const QByteArray &eventType,
void *message,
- qintptr *result) {
+ base::NativeEventResult *result) {
if (message && eventType == "NSEvent") {
const auto event = static_cast<NSEvent*>(message);
if (PossiblyTextTypingEvent(event)) {
diff --git a/Telegram/SourceFiles/platform/mac/notifications_manager_mac.mm b/Telegram/SourceFiles/platform/mac/notifications_manager_mac.mm
index de28809077..2521428567 100644
--- a/Telegram/SourceFiles/platform/mac/notifications_manager_mac.mm
+++ b/Telegram/SourceFiles/platform/mac/notifications_manager_mac.mm
@@ -502,11 +502,11 @@ void Manager::Private::invokeIfNotFocused(Fn<void()> callback) {
} else {
if (!_processesInited) {
_processesInited = true;
- QObject::connect(&_dnd, &QProcess::finished, [=] {
+ QObject::connect(&_dnd, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), [=] {
_waitingDnd = false;
checkFocusState();
});
- QObject::connect(&_focus, &QProcess::finished, [=] {
+ QObject::connect(&_focus, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), [=] {
_waitingFocus = false;
checkFocusState();
});
@@ -536,7 +536,7 @@ void Manager::Private::checkFocusState() {
}
const auto istrue = [](QProcess &process) {
const auto output = process.readAllStandardOutput();
- DEBUG_LOG(("Focus Check: %1").arg(output));
+ DEBUG_LOG(("Focus Check: %1").arg(QString::fromUtf8(output)));
const auto result = (output.trimmed() == u"true"_q);
return result;
};
Submodule Telegram/lib_ui contains modified content
diff --git a/Telegram/lib_ui/ui/rp_widget.cpp b/Telegram/lib_ui/ui/rp_widget.cpp
index 0b57704..0d2ca01 100644
--- a/Telegram/lib_ui/ui/rp_widget.cpp
+++ b/Telegram/lib_ui/ui/rp_widget.cpp
@@ -62,7 +62,7 @@ TWidget::TWidget(QWidget *parent)
auto format = QSurfaceFormat::defaultFormat();
format.setSwapInterval(0);
#ifdef Q_OS_MAC
- format.setColorSpace(QColorSpace::SRgb);
+ format.setColorSpace(QSurfaceFormat::sRGBColorSpace);
#endif // Q_OS_MAC
QSurfaceFormat::setDefaultFormat(format);
return true;

View file

@ -6,9 +6,9 @@
# overridable. This is useful when the upstream archive was replaced
# and nixpkgs is not in sync yet.
officeVersion ? {
version = "1220";
version = "1234";
edition = "2024";
hash = "sha256-F1Srm3/4UPifYls21MhjbpxSyLaT0gEVzEMQF0gIzi0=";
hash = "sha256-q5QUevkSxdh622ZMhwbO44HLJowpg0vwv9de7hdOUQQ=";
},
...

View file

@ -9,12 +9,12 @@
stdenv.mkDerivation (finalAttrs: {
pname = "checkpolicy";
version = "3.10";
version = "3.11";
inherit (libsepol) se_url;
src = fetchurl {
url = "${finalAttrs.se_url}/${finalAttrs.version}/checkpolicy-${finalAttrs.version}.tar.gz";
hash = "sha256-LZKVHfywkNYXnnojhWYi4Py8Mr4Dvx5grOncnL2hHlk=";
hash = "sha256-m4G/zu9/qdAvmHLlanhvND3FjvS1cT3ODVxBbluEzvo=";
};
nativeBuildInputs = [

View file

@ -6,18 +6,18 @@
buildGoModule (finalAttrs: {
pname = "cnspec";
version = "13.27.0";
version = "13.27.4";
src = fetchFromGitHub {
owner = "mondoohq";
repo = "cnspec";
tag = "v${finalAttrs.version}";
hash = "sha256-t/ugT15QxiwMJybX2mIwgx0wGQETLFJWplxNEosTq4A=";
hash = "sha256-HcDGHcKxbXYTF+PdrjcOcCH/0Hnz++qIGdbDYtCRpDM=";
};
proxyVendor = true;
vendorHash = "sha256-M2f2HApngE8GJRXy53u7bif1puNTE6BV6oxmnvSSS6Y=";
vendorHash = "sha256-suSEjRh6vSSI2jRyz12nLD/G1gvQiWC4aGx2J2drSIo=";
subPackages = [ "apps/cnspec" ];

View file

@ -0,0 +1,178 @@
{
lib,
bun,
fetchFromGitHub,
installShellFiles,
makeBinaryWrapper,
models-dev,
nix-update-script,
nodejs,
ripgrep,
stdenvNoCC,
sysctl,
versionCheckHook,
writableTmpDirAsHomeHook,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "cyberstrike";
version = "1.1.14";
__structuredAttrs = true;
strictDeps = true;
src = fetchFromGitHub {
owner = "CyberStrikeus";
repo = "CyberStrike";
tag = "v${finalAttrs.version}";
hash = "sha256-MlFEGP/MiuDtLl7Ms6j11u1MdLV6w8T/7TYo7eeE/rc=";
};
node_modules = stdenvNoCC.mkDerivation {
pname = "${finalAttrs.pname}-node_modules";
inherit (finalAttrs) version src;
impureEnvVars = lib.fetchers.proxyImpureEnvVars ++ [
"GIT_PROXY_COMMAND"
"SOCKS_SERVER"
];
nativeBuildInputs = [
bun
writableTmpDirAsHomeHook
];
dontConfigure = true;
buildPhase = ''
runHook preBuild
export BUN_INSTALL_CACHE_DIR=$(mktemp -d)
bun install \
--cpu="${if stdenvNoCC.hostPlatform.isAarch64 then "arm64" else "x64"}" \
--os="${if stdenvNoCC.hostPlatform.isLinux then "linux" else "darwin"}" \
--filter '!./' \
--filter './packages/cyberstrike' \
--frozen-lockfile \
--ignore-scripts \
--no-progress
bun --bun ./nix/scripts/canonicalize-node-modules.ts
bun --bun ./nix/scripts/normalize-bun-binaries.ts
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out
find . -type d -name node_modules -exec cp -R --parents {} $out \;
runHook postInstall
'';
# Required so fixed-output derivation does not retain store references
dontFixup = true;
outputHash = "sha256-IxIdzd9MJJRpc0nB5eEASSW0LIckU+SvcUgkKoL+mog=";
outputHashAlgo = "sha256";
outputHashMode = "recursive";
};
nativeBuildInputs = [
bun
installShellFiles
makeBinaryWrapper
writableTmpDirAsHomeHook
];
configurePhase = ''
runHook preConfigure
cp -R ${finalAttrs.node_modules}/. .
patchShebangs node_modules
patchShebangs packages/*/node_modules
runHook postConfigure
'';
env = {
MODELS_DEV_API_JSON = "${models-dev}/dist/_api.json";
CYBERSTRIKE_DISABLE_MODELS_FETCH = true;
CYBERSTRIKE_VERSION = finalAttrs.version;
CYBERSTRIKE_CHANNEL = "local";
};
buildPhase = ''
runHook preBuild
cd ./packages/cyberstrike
bun --bun ./script/build.ts --single --skip-install
bun --bun ./script/schema.ts schema.json
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -Dm755 dist/cyberstrike-*/bin/cyberstrike $out/bin/cyberstrike
install -Dm644 schema.json $out/share/cyberstrike/schema.json
wrapProgram $out/bin/cyberstrike \
--prefix PATH : ${
lib.makeBinPath (
[
ripgrep
nodejs
]
++ lib.optional stdenvNoCC.hostPlatform.isDarwin sysctl
)
}
runHook postInstall
'';
postInstall = lib.optionalString (stdenvNoCC.buildPlatform.canExecute stdenvNoCC.hostPlatform) ''
installShellCompletion --cmd cyberstrike \
--bash <($out/bin/cyberstrike completion) \
--zsh <(SHELL=/bin/zsh $out/bin/cyberstrike completion)
'';
nativeInstallCheckInputs = [
versionCheckHook
writableTmpDirAsHomeHook
];
doInstallCheck = true;
versionCheckKeepEnvironment = [
"HOME"
"CYBERSTRIKE_DISABLE_MODELS_FETCH"
];
versionCheckProgramArg = "--version";
passthru = {
jsonschema = {
config = "${placeholder "out"}/share/cyberstrike/schema.json";
tui = "${placeholder "out"}/share/cyberstrike/tui.json";
};
updateScript = nix-update-script {
extraArgs = [
"--subpackage"
"node_modules"
];
};
};
meta = {
description = "AI-powered offensive security agent";
homepage = "https://github.com/CyberStrikeus/CyberStrike";
changelog = "https://github.com/CyberStrikeus/CyberStrike/blob/${finalAttrs.src.rev}/CHANGELOG.md";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [ fab ];
mainProgram = "cyberstrike";
};
})

View file

@ -9,13 +9,13 @@
buildGoModule (finalAttrs: {
pname = "delve";
version = "1.26.3";
version = "1.27.0";
src = fetchFromGitHub {
owner = "go-delve";
repo = "delve";
tag = "v${finalAttrs.version}";
hash = "sha256-R7rxWJZ1AfwH/ytgQnq21D5d4YRm3fzYSIG0eugww1U=";
hash = "sha256-g7Lyi+lZZ818p4yINoJ12bdCY8sTwxaU/eRkuofnqnU=";
};
patches = [

View file

@ -11,16 +11,16 @@
buildGoModule (finalAttrs: {
pname = "entire";
version = "0.6.3";
version = "0.7.8";
src = fetchFromGitHub {
owner = "entireio";
repo = "cli";
tag = "v${finalAttrs.version}";
hash = "sha256-yGutKLwdTuGamZMdkqHlhBypZFuY9jM0w/1VW6ACppg=";
hash = "sha256-SqJnrvRwjuPMCEkd4d+ULIUOfDW6mPs6VeW84Tc5vN0=";
};
vendorHash = "sha256-pIIrrbp3x15iiY3CuA+wU7315bHUSjvJWBa4Q58OorU=";
vendorHash = "sha256-foQkuVJtyWJrGSPV8kxMcAWdjCw4TOgMV/KUa92FL/Y=";
subPackages = [ "cmd/entire" ];

View file

@ -38,13 +38,13 @@ assert withRest -> withJson;
stdenv.mkDerivation rec {
pname = "freeradius";
version = "3.2.8";
version = "3.2.10";
src = fetchFromGitHub {
owner = "FreeRADIUS";
repo = "freeradius-server";
tag = "release_${lib.replaceStrings [ "." ] [ "_" ] version}";
hash = "sha256-NvcXTT0jp3WR/w+JWcNESg6iNYqIV8QAlM8MxpYkpjs=";
hash = "sha256-+pFV6dDnL7T5G309cLACa+/0vGppCEdk3ghOQhgSjTs=";
};
nativeBuildInputs = [ autoreconfHook ];

View file

@ -0,0 +1,52 @@
{
lib,
buildGoModule,
fetchFromGitHub,
gitUpdater,
versionCheckHook,
}:
buildGoModule (finalAttrs: {
pname = "gopodder";
version = "1.2.1";
__structuredAttrs = true;
src = fetchFromGitHub {
owner = "cbrgm";
repo = "gopodder";
tag = "v${finalAttrs.version}";
hash = "sha256-o/iQnr8WLArecRyMttCluuEYwKirKsOJyj5a7tdulVo=";
};
vendorHash = "sha256-iG2IUfBVLQ7P0W4HOiGShVyD4mGUQ0dfGjG4XIYVtWU=";
ldflags = [
"-s"
"-X main.Version=${finalAttrs.version}"
"-X main.Revision=${finalAttrs.src.tag}"
"-X main.BuildDate=1970-01-01"
];
env.CGO_ENABLED = 0;
nativeInstallCheckInputs = [
versionCheckHook
];
doInstallCheck = true;
__darwinAllowLocalNetworking = true;
passthru.updateScript = gitUpdater {
rev-prefix = "v";
};
meta = {
description = "Self-hostable podcast synchronization server compatible with the gPodder API";
homepage = "https://github.com/cbrgm/gopodder";
changelog = "https://github.com/cbrgm/gopodder/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ nielmin ];
mainProgram = "gopodder";
};
})

View file

@ -19,7 +19,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "libgedit-gtksourceview";
version = "299.7.0";
version = "299.7.1";
outputs = [
"out"
@ -34,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: {
repo = "libgedit-gtksourceview";
tag = finalAttrs.version;
forceFetchGit = true; # To avoid occasional 501 failures.
hash = "sha256-CU9EO0oHfkdWPyicmIG6eaN+wUvvkUhrb6wgNosnm2Q=";
hash = "sha256-i+6Rfqm/KPJrLSvhvTVY53Q6O+LJEU9WjLJ/L3hMSUA=";
};
patches = [

View file

@ -16,12 +16,12 @@
stdenv.mkDerivation (finalAttrs: {
pname = "libsemanage";
version = "3.10";
version = "3.11";
inherit (libsepol) se_url;
src = fetchurl {
url = "${finalAttrs.se_url}/${finalAttrs.version}/libsemanage-${finalAttrs.version}.tar.gz";
hash = "sha256-GXiJTEFHaa13Q40miG6q4/t7t0V47ypa0xMMictcsf4=";
hash = "sha256-52FgKGu/sIIWAsbAwyIOvPNmrTJG07nQoPvvzTXoYEM=";
};
outputs = [

View file

@ -17,7 +17,7 @@ stdenv.mkDerivation {
offlineCache = fetchYarnDeps {
yarnLock = "${src}/frontend/email-builder/yarn.lock";
hash = "sha256-sFRmnMPStNp45hxcF+Iq1WhH6LtVFtgq2regq6MPzcc=";
hash = "sha256-ANPLOL9j0gljtNtbfb+ZifVRN9vLexPddAevpeFwX4o=";
};
nativeBuildInputs = [

View file

@ -17,7 +17,7 @@ stdenv.mkDerivation (finalAttrs: {
offlineCache = fetchYarnDeps {
yarnLock = "${src}/frontend/yarn.lock";
hash = "sha256-VCaEMftA7AzW/6jyceVO596iby0wC3LW9YDG66kLJmw=";
hash = "sha256-R2xHcHksTtFfFh41FLeBhpuz84ceixGt6oz6SQWWyMQ=";
};
nativeBuildInputs = [

View file

@ -11,16 +11,16 @@
buildGoModule (finalAttrs: {
pname = "listmonk";
version = "6.1.0";
version = "6.2.0";
src = fetchFromGitHub {
owner = "knadh";
repo = "listmonk";
rev = "v${finalAttrs.version}";
hash = "sha256-SG9PhQOu3QB0LA9dNLnNzwwtfaib7MCfvOcBMkWMRPw=";
hash = "sha256-eora/+zJf60trmANEqAhYAQXfEMifyw5gLPKcqBW46w=";
};
vendorHash = "sha256-0KrjaExgT9tN4M99CfyQpqpGYnXOpzsPRk/Ih4qXsuE=";
vendorHash = "sha256-t4l8872bniTmNIW4ias1gImURJgrR6htXkncqfrJ+AU=";
nativeBuildInputs = [
stuffbin

View file

@ -35,6 +35,11 @@
...
}:
assert lib.warnIf (latestVersionInfo != null && (removeUserLimit || removeFreeBadge)) ''
The user limit and free badge patches are not tested with this Mattermost version
(${latestVersionInfo.version}).
'' true;
let
/*
Helper function that sets the `withTests` and `withoutTests` passthru correctly,

View file

@ -15,10 +15,10 @@ mattermost.override (
# and make sure the version regex is up to date here.
# Ensure you also check ../mattermost/package.nix for ESR releases.
regex = "^v(11\\.[0-9]+\\.[0-9]+)$";
version = "11.8.1";
srcHash = "sha256-9EIbTwnEeZQKg5uixkMp3sp/n+9I2N9W7hxsW5juF3M=";
version = "11.8.2";
srcHash = "sha256-XZ4yr7nbGum6UQaBjze50L8Yc/MLjo4NQBh263CNRtI=";
vendorHash = "sha256-F2QMrLbio7812ZTGQZZPTqHWtIXbwbDmjUhtvv0DJ9s=";
npmDepsHash = "sha256-9GRM0VXrh1eR16ocSGEV/F2eflOflzkhrhRRnm9uB6s=";
npmDepsHash = "sha256-WIPLpi6lQvq9wieqvOACiRh7v1znxzcf+jyKXSjWzNc=";
autoUpdate = ./package.nix;
};
}

View file

@ -18,13 +18,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "neowall";
version = "0.5.0";
version = "0.5.1";
src = fetchFromGitHub {
owner = "1ay1";
repo = "neowall";
tag = "v${finalAttrs.version}";
hash = "sha256-hmfHcKXDmMHlFlaODo+BrbHUyx9BHn9BiCbPDp5CMG0=";
hash = "sha256-NntwAm4LmGEcAJEp9W+y0mosn+jZXwatTp4ftMqcpSo=";
};
nativeBuildInputs = [

View file

@ -6,13 +6,13 @@
buildGoModule (finalAttrs: {
pname = "nerva";
version = "1.36.0";
version = "1.37.0";
src = fetchFromGitHub {
owner = "praetorian-inc";
repo = "nerva";
tag = "v${finalAttrs.version}";
hash = "sha256-akGiZ5KolHOzZddgAYA3zWcFG0VSqHe6cFiB6AvRyhg=";
hash = "sha256-8naI5r/nmzQKHfub0Yv3uhx1MAh4VCSnsTY/n4BOX5U=";
};
vendorHash = "sha256-Z0MSD+1/1VzrJ+pz5x0JvxrCxtJe59ckaTqHK/+TVN8=";

View file

@ -1,12 +1,13 @@
from collections.abc import Mapping, Sequence
from typing import cast, Optional, NamedTuple
from html import escape
from typing import NamedTuple, Optional, cast
from markdown_it.token import Token
from .manual_structure import XrefTarget
from .md import Renderer
class UnresolvedXrefError(Exception):
pass
@ -17,9 +18,6 @@ class Heading(NamedTuple):
# special handling for part content: whether partinfo div was already closed from
# elsewhere or still needs closing.
partintro_closed: bool
# tocs are generated when the heading opens, but have to be emitted into the file
# after the heading titlepage (and maybe partinfo) has been closed.
toc_fragment: str
_bullet_list_styles = [ 'disc', 'circle', 'square' ]
_ordered_list_styles = [ '1', 'a', 'i', 'A', 'I' ]
@ -29,7 +27,6 @@ class HTMLRenderer(Renderer):
_headings: list[Heading]
_attrspans: list[str]
_hlevel_offset: int = 0
_bullet_list_nesting: int = 0
_ordered_list_nesting: int = 0
@ -185,8 +182,7 @@ class HTMLRenderer(Renderer):
anchor = f'id="{escape(anchor, True)}"'
result = self._close_headings(hlevel)
tag = self._heading_tag(token, tokens, i)
toc_fragment = self._build_toc(tokens, i)
self._headings.append(Heading(tag, hlevel, htag, tag != 'part', toc_fragment))
self._headings.append(Heading(tag, hlevel, htag, tag != 'part'))
return (
f'{result}'
f'<div class="{tag}">'
@ -205,8 +201,6 @@ class HTMLRenderer(Renderer):
)
if heading.container_tag == 'part':
result += '<div class="partintro">'
else:
result += heading.toc_fragment
return result
def ordered_list_open(self, token: Token, tokens: Sequence[Token], i: int) -> str:
extra = 'compact' if token.meta.get('compact', False) else ''
@ -329,14 +323,14 @@ class HTMLRenderer(Renderer):
)
def _make_hN(self, level: int) -> tuple[str, str]:
return f"h{min(6, max(1, level + self._hlevel_offset))}", ""
return f"h{min(6, max(1, level))}", ""
def _maybe_close_partintro(self) -> str:
if self._headings:
heading = self._headings[-1]
if heading.container_tag == 'part' and not heading.partintro_closed:
self._headings[-1] = heading._replace(partintro_closed=True)
return heading.toc_fragment + "</div>"
return "</div>"
return ""
def _close_headings(self, level: Optional[int]) -> str:
@ -349,5 +343,3 @@ class HTMLRenderer(Renderer):
def _heading_tag(self, token: Token, tokens: Sequence[Token], i: int) -> str:
return "section"
def _build_toc(self, tokens: Sequence[Token], i: int) -> str:
return ""

View file

@ -4,21 +4,29 @@ import html
import json
import re
import xml.sax.saxutils as xml
from abc import abstractmethod
from collections.abc import Mapping, Sequence
from pathlib import Path
from typing import Any, Callable, cast, ClassVar, Generic, get_args, NamedTuple
from typing import Any, Callable, ClassVar, Generic, NamedTuple, cast, get_args
from markdown_it.token import Token
from . import md, options
from .html import HTMLRenderer, UnresolvedXrefError
from .manual_structure import check_structure, FragmentType, is_include, make_xml_id, TocEntry, TocEntryType, XrefTarget
from .manual_structure import (
FragmentType,
TocEntry,
TocEntryType,
XrefTarget,
check_structure,
is_include,
make_xml_id,
)
from .md import Converter, Renderer
from .redirects import Redirects
from .src_error import SrcError
class BaseConverter(Converter[md.TR], Generic[md.TR]):
# per-converter configuration for ns:arg=value arguments to include blocks, following
# the include type. html converters need something like this to support chunking, or
@ -253,13 +261,10 @@ class HTMLParameters(NamedTuple):
generator: str
stylesheets: Sequence[str]
scripts: Sequence[str]
# number of levels in the rendered table of contents. tables are prepended to
# the content they apply to (entire document / document chunk / top-level section
# of a chapter), setting a depth of 0 omits the respective table.
toc_depth: int
chunk_toc_depth: int
section_toc_depth: int
# structural depth of the navigation sidebar tree
sidebar_depth: int
media_dir: Path
sidebar_open: frozenset[str] = frozenset()
class ManualHTMLRenderer(RendererMixin, HTMLRenderer):
_base_path: Path
@ -289,14 +294,13 @@ class ManualHTMLRenderer(RendererMixin, HTMLRenderer):
target_path.write_bytes(content)
return f"./{self._html_params.media_dir}/{target_name}"
def _push(self, tag: str, hlevel_offset: int) -> Any:
result = (self._toplevel_tag, self._headings, self._attrspans, self._hlevel_offset, self._in_dir)
self._hlevel_offset += hlevel_offset
def _push(self, tag: str) -> Any:
result = (self._toplevel_tag, self._headings, self._attrspans, self._in_dir)
self._toplevel_tag, self._headings, self._attrspans = tag, [], []
return result
def _pop(self, state: Any) -> None:
(self._toplevel_tag, self._headings, self._attrspans, self._hlevel_offset, self._in_dir) = state
(self._toplevel_tag, self._headings, self._attrspans, self._in_dir) = state
def _render_book(self, tokens: Sequence[Token]) -> str:
assert tokens[4].children
@ -307,7 +311,7 @@ class ManualHTMLRenderer(RendererMixin, HTMLRenderer):
toc = TocEntry.of(tokens[0])
return "\n".join([
self._file_header(toc, sidebar=self._build_toc(tokens, 0)),
self._file_header(toc, sidebar=self._build_sidebar(toc)),
' <div class="book">',
' <div class="titlepage">',
' <div>',
@ -364,6 +368,20 @@ class ManualHTMLRenderer(RendererMixin, HTMLRenderer):
file.write(self._redirects.get_redirect_script(toc.target.path))
scripts.append(f'./{redirects_name}')
# Register a close handler
# Without this the popover can still be closed by clicking outside of it
# It handles auto-closing when the user clicks a href.
close_menu_js = """
document.addEventListener("DOMContentLoaded", () => {
const nav = document.getElementById("manual-toc");
nav?.addEventListener("click", (e) => {
if (e.target.closest("a[href]") && nav.matches(":popover-open")) {
nav.hidePopover();
}
});
});
"""
return "\n".join([
'<?xml version="1.0" encoding="utf-8" standalone="no"?>',
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"',
@ -377,13 +395,19 @@ class ManualHTMLRenderer(RendererMixin, HTMLRenderer):
for style in self._html_params.stylesheets)),
"".join((f'<script src="{html.escape(script, True)}" type="text/javascript"></script>'
for script in scripts)),
f"<script>{close_menu_js}</script>",
f' <meta name="generator" content="{html.escape(self._html_params.generator, True)}" />',
f' <link rel="home" href="{home.target.href()}" title="{home.target.title}" />' if home.target.href() else "",
f' {up_link}{prev_link}{next_link}',
' </head>',
' <body>',
# See: https://developer.mozilla.org/en-US/docs/Web/API/Popover_API
# Supported by most browsers since 2023, full support since Jan 2025
(' <button type="button" class="toc-toggle" popovertarget="manual-toc"'
' popovertargetaction="toggle" aria-label="Toggle table of contents">'
'☰</button>') if sidebar else "",
nav_html,
f' <nav class="toc-sidebar">{sidebar}</nav>' if sidebar else "",
f' <nav id="manual-toc" class="toc-sidebar" popover="auto">{sidebar}</nav>' if sidebar else "",
' <main class="content">',
])
@ -434,103 +458,61 @@ class ManualHTMLRenderer(RendererMixin, HTMLRenderer):
if token.tag == 'h1':
return self._toplevel_tag
return super()._heading_tag(token, tokens, i)
def _build_toc(self, tokens: Sequence[Token], i: int) -> str:
toc = TocEntry.of(tokens[i])
if toc.kind == 'section' and self._html_params.section_toc_depth < 1:
return ""
def walk_and_emit(toc: TocEntry, depth: int) -> list[str]:
if depth <= 0:
return []
result = []
for child in toc.children:
result.append(
f'<dt>'
f' <span class="{html.escape(child.kind, True)}">'
f' <a href="{child.target.href()}">{child.target.toc_html}</a>'
f' </span>'
f'</dt>'
)
# we want to look straight through parts because docbook-xsl did too, but it
# also makes for more uesful top-level tocs.
next_level = walk_and_emit(child, depth - (0 if child.kind == 'part' else 1))
if next_level:
result.append(f'<dd><dl>{"".join(next_level)}</dl></dd>')
return result
def _build_sidebar(self, toc: TocEntry) -> str:
root = toc.root
def render_entries(entries: Sequence[TocEntry], budget: int) -> str:
items: list[str] = []
for e in entries:
# 'part' are structural containers we look straight through, so
# they do not consume a depth level
child_budget = budget if e.kind == 'part' else budget - 1
children = (render_entries(e.children, child_budget)
if e.children and child_budget > 0 else "")
link = f'<a href="{e.target.href()}">{e.target.toc_html}</a>'
cls = html.escape(e.kind, True)
if children:
open_attr = " open" if e.target.id in self._html_params.sidebar_open else ""
items.append(
f'<li class="{cls}">'
f'<details{open_attr}><summary>{link}</summary>{children}</details>'
'</li>'
)
else:
items.append(f'<li class="{cls}">{link}</li>')
return f'<ol class="toc">{"".join(items)}</ol>' if items else ""
def build_list(kind: str, id: str, lst: Sequence[TocEntry]) -> str:
if not lst:
return ""
entries = [
f'<dt>{i}. <a href="{e.target.href()}">{e.target.toc_html}</a></dt>'
for i, e in enumerate(lst, start=1)
]
entries = "".join(
f'<li><a href="{e.target.href()}">{e.target.toc_html}</a></li>'
for e in lst
)
return (
f'<div class="{id}">'
f'<p><strong>List of {kind}</strong></p>'
f'<dl>{"".join(entries)}</dl>'
f'<ol class="toc">{entries}</ol>'
'</div>'
)
# we don't want to generate the "Title of Contents" header for sections,
# docbook didn't and it's only distracting clutter unless it's the main table.
# we also want to generate tocs only for a top-level section (ie, one that is
# not itself contained in another section)
print_title = toc.kind != 'section'
if toc.kind == 'section':
if toc.parent and toc.parent.kind == 'section':
toc_depth = 0
else:
toc_depth = self._html_params.section_toc_depth
elif toc.starts_new_chunk and toc.kind != 'book':
toc_depth = self._html_params.chunk_toc_depth
else:
toc_depth = self._html_params.toc_depth
if not (items := walk_and_emit(toc, toc_depth)):
return ""
figures = build_list("Figures", "list-of-figures", toc.figures)
examples = build_list("Examples", "list-of-examples", toc.examples)
return "".join([
f'<div class="toc">',
' <p><strong>Table of Contents</strong></p>' if print_title else "",
f' <dl class="toc">'
f' {"".join(items)}'
f' </dl>'
f'</div>'
f'{figures}'
f'{examples}'
])
nav = render_entries(root.children, self._html_params.sidebar_depth)
figures = build_list("Figures", "list-of-figures", root.figures)
examples = build_list("Examples", "list-of-examples", root.examples)
return f'{nav}{figures}{examples}'
def _make_hN(self, level: int) -> tuple[str, str]:
# for some reason chapters didn't increase the hN nesting count in docbook xslts.
# originally this was duplicated here for consistency with docbook rendering, but
# it could be reevaluated and changed now that docbook is gone.
if self._toplevel_tag == 'chapter':
level -= 1
# this style setting is also for docbook compatibility only and could well go away.
style = ""
if level + self._hlevel_offset < 3 \
and (self._toplevel_tag == 'section' or (self._toplevel_tag == 'chapter' and level > 0)):
style = "clear: both"
tag, hstyle = super()._make_hN(max(1, level))
return tag, style
# book heading := h1
# Everything else is h2 ... h6
return super()._make_hN(level + 1)
def _included_thing(self, tag: str, token: Token, tokens: Sequence[Token], i: int) -> str:
outer, inner = [], []
# since books have no non-include content the toplevel book wrapper will not count
# towards nesting depth. other types will have at least a title+id heading which
# *does* count towards the nesting depth. chapters give a -1 to included sections
# mirroring the special handing in _make_hN. sigh.
hoffset = (
0 if not self._headings
else self._headings[-1].level - 1 if self._toplevel_tag == 'chapter'
else self._headings[-1].level
)
outer.append(self._maybe_close_partintro())
into = token.meta['include-args'].get('into-file')
fragments = token.meta['included']
state = self._push(tag, hoffset)
state = self._push(tag)
if into:
toc = TocEntry.of(fragments[0][0][0])
inner.append(self._file_header(toc))
# we do not set _hlevel_offset=0 because docbook didn't either.
# chunk pages carry the same whole-book sidebar as the main page.
inner.append(self._file_header(toc, sidebar=self._build_sidebar(toc)))
else:
inner = outer
in_dir = self._in_dir
@ -755,21 +737,36 @@ class HTMLConverter(BaseConverter[ManualHTMLRenderer]):
server_redirects_file.write("\n".join(formatted_server_redirects))
class _DeprecatedDepthFlag(argparse.Action):
def __call__(self, parser: argparse.ArgumentParser, namespace: argparse.Namespace,
values: Any, option_string: str | None = None) -> None:
parser.error(f"{option_string} has been removed, use --sidebar-depth instead")
def _build_cli_html(p: argparse.ArgumentParser) -> None:
p.add_argument('--manpage-urls', required=True)
p.add_argument('--revision', required=True)
p.add_argument('--generator', default='nixos-render-docs')
p.add_argument('--stylesheet', default=[], action='append')
p.add_argument('--script', default=[], action='append')
p.add_argument('--toc-depth', default=1, type=int)
p.add_argument('--chunk-toc-depth', default=1, type=int)
p.add_argument('--section-toc-depth', default=0, type=int)
p.add_argument('--media-dir', default="media", type=Path)
p.add_argument('--redirects', type=Path)
p.add_argument('--sidebar-depth', default=2, type=int)
# nav metadata (JSON): {"open": ["anchor-id", ...]} selects which sidebar
# entries render expanded; omitted or absent means everything is collapsed.
p.add_argument('--nav', type=Path)
# Deprecated flags,
p.add_argument('--toc-depth', nargs='?', action=_DeprecatedDepthFlag, default=None)
p.add_argument('--chunk-toc-depth', nargs='?', action=_DeprecatedDepthFlag, default=None)
p.add_argument('--section-toc-depth', nargs='?', action=_DeprecatedDepthFlag, default=None)
# Positional
p.add_argument('infile', type=Path)
p.add_argument('outfile', type=Path)
def _run_cli_html(args: argparse.Namespace) -> None:
sidebar_open: frozenset[str] = frozenset()
if args.nav:
with open(args.nav) as nav_file:
sidebar_open = frozenset(json.load(nav_file).get("open", []))
with open(args.manpage_urls) as manpage_urls, open(Path(__file__).parent / "redirects.js") as redirects_script:
redirects = None
if args.redirects:
@ -778,8 +775,8 @@ def _run_cli_html(args: argparse.Namespace) -> None:
md = HTMLConverter(
args.revision,
HTMLParameters(args.generator, args.stylesheet, args.script, args.toc_depth,
args.chunk_toc_depth, args.section_toc_depth, args.media_dir),
HTMLParameters(args.generator, args.stylesheet, args.script,
args.sidebar_depth, args.media_dir, sidebar_open),
json.load(manpage_urls), redirects)
md.convert(args.infile, args.outfile)

View file

@ -10,7 +10,7 @@ def set_prefix(token: Token, ident: str) -> None:
def test_auto_id_prefix_simple() -> None:
md = HTMLConverter("1.0.0", HTMLParameters("", [], [], 2, 2, 2, Path("")), {})
md = HTMLConverter("1.0.0", HTMLParameters("", [], [], 2, Path("")), {})
src = f"""
# title
@ -31,7 +31,7 @@ def test_auto_id_prefix_simple() -> None:
def test_auto_id_prefix_repeated() -> None:
md = HTMLConverter("1.0.0", HTMLParameters("", [], [], 2, 2, 2, Path("")), {})
md = HTMLConverter("1.0.0", HTMLParameters("", [], [], 2, Path("")), {})
src = f"""
# title
@ -57,7 +57,7 @@ def test_auto_id_prefix_repeated() -> None:
]
def test_auto_id_prefix_maximum_nested() -> None:
md = HTMLConverter("1.0.0", HTMLParameters("", [], [], 2, 2, 2, Path("")), {})
md = HTMLConverter("1.0.0", HTMLParameters("", [], [], 2, Path("")), {})
src = f"""
# h1

View file

@ -0,0 +1,124 @@
from pathlib import Path
from nixos_render_docs.manual import HTMLConverter, HTMLParameters
def _build(tmp_path: Path, sidebar_depth: int = 2, sidebar_open: frozenset[str] = frozenset()) -> str:
(tmp_path / "part.md").write_text(
"# Build helpers {#part-builders}\n\n" # -> h2
"```{=include=} chapters\nchapter.md\n```\n"
)
(tmp_path / "chapter.md").write_text(
"# Fixed-point arguments {#chap-fpa}\n\n" # -> h2
"Intro.\n\n"
"## First section {#sec-first}\n\n" # -> h3
"Body.\n\n"
"### A subsection {#sub-a}\n\n"
"Deep.\n\n"
"#### Deeper {#d4}\n\n"
"More.\n\n"
"##### Deepest {#d5}\n\n"
"Most.\n"
)
(tmp_path / "index.md").write_text(
"# Test manual {#book-test}\n\n" # -> h1 (book title)
"## Version 1\n\n" # -> h2
"```{=include=} parts\npart.md\n```\n"
)
out = tmp_path / "out"
out.mkdir(exist_ok=True)
conv = HTMLConverter(
"1.0.0",
HTMLParameters("test-gen", [], [], sidebar_depth, Path("media"), sidebar_open),
{},
)
conv.convert(tmp_path / "index.md", out / "index.html")
return (out / "index.html").read_text()
def test_single_h1_and_flat_heading_levels(tmp_path: Path) -> None:
html = _build(tmp_path)
# There should be only one h1 on an html for acessibility and semantic reasons
assert html.count("<h1") == 1
assert '<h1 class="title">' in html
assert '<h2 id="part-builders" class="title"' in html
assert '<h2 id="chap-fpa" class="title"' in html
assert '<h3 id="sec-first" class="title"' in html
assert '<h4 id="sub-a" class="title"' in html
assert '<h5 id="d4" class="title"' in html
assert '<h6 id="d5" class="title"' in html
# nothing overflows the h6 ceiling.
assert "<h7" not in html
def test_sidebar_is_collapsible_tree(tmp_path: Path) -> None:
html = _build(tmp_path)
assert '<nav id="manual-toc" class="toc-sidebar" popover="auto">' in html
assert 'popovertarget="manual-toc"' in html # the toggle button
assert '<ol class="toc">' in html
# Entries with children collapse into <details>; closed by default.
assert "<details><summary>" in html
assert "<details open>" not in html # nothing opens without nav metadata
# No more inline TOCs, this makes the output visually hard to parse
assert "Table of Contents" not in html
# Sidebar links to structural entries
assert 'href="#part-builders"' in html
assert 'href="#chap-fpa"' in html
assert 'href="#sec-first"' in html
def test_nav_metadata_opens_selected_entries(tmp_path: Path) -> None:
# ids listed in the nav "open" set render as <details open>
html = _build(tmp_path, sidebar_depth=3, sidebar_open=frozenset({"chap-fpa"}))
assert '<details open><summary><a href="#chap-fpa"' in html
assert '<details><summary><a href="#part-builders"' in html
def test_sidebar_depth_caps_the_tree(tmp_path: Path) -> None:
# sub-a is h3 in a .chapter.md
# with depth=3, it gets listed
deep = _build(tmp_path, sidebar_depth=3)
assert 'href="#sub-a"' in deep
# with depth=2, its not listed
shallow = _build(tmp_path, sidebar_depth=2)
assert 'href="#sub-a"' not in shallow
def test_chunked_pages_carry_the_sidebar(tmp_path: Path) -> None:
# the user may need to navigate
# between different chunks
# every chunk page carries the same sidebar entries
# So navigation between chunks is possible
(tmp_path / "chapter.md").write_text(
"# Fixed-point arguments {#chap-fpa}\n\n"
"Intro.\n\n"
"## First section {#sec-first}\n\n"
"Body.\n\n"
"### A subsection {#sub-a}\n\n"
"Deep.\n"
)
(tmp_path / "index.md").write_text(
"# Test manual {#book-test}\n\n"
"## Version 1\n\n"
"```{=include=} chapters html:into-file=//chapter.html\nchapter.md\n```\n"
)
out = tmp_path / "out"
out.mkdir(exist_ok=True)
conv = HTMLConverter(
"1.0.0",
HTMLParameters("test-gen", [], [], 3, Path("media")),
{},
)
conv.convert(tmp_path / "index.md", out / "index.html")
chunk = (out / "chapter.html").read_text()
assert '<nav id="manual-toc" class="toc-sidebar" popover="auto">' in chunk
assert '<ol class="toc">' in chunk
assert 'href="chapter.html#sec-first"' in chunk
# All headings visible in the chunk sidebar
assert '<h2 id="chap-fpa" class="title"' in chunk
assert '<h3 id="sec-first" class="title"' in chunk
assert '<h4 id="sub-a" class="title"' in chunk
assert chunk.count("<h1") <= 1
assert "Table of Contents" not in chunk

View file

@ -20,7 +20,7 @@ class TestRedirects(unittest.TestCase):
infile.write(content)
redirects = Redirects({"redirects-test-suite": ["index.html#redirects-test-suite"]} | raw_redirects, '')
return HTMLConverter("1.0.0", HTMLParameters("", [], [], 2, 2, 2, Path("")), {}, redirects)
return HTMLConverter("1.0.0", HTMLParameters("", [], [], 2, Path("")), {}, redirects)
def run_test(self, md: HTMLConverter):
md.convert(Path(__file__).parent / 'index.md', Path(__file__).parent / 'index.html')

View file

@ -6,13 +6,13 @@
buildGoModule (finalAttrs: {
pname = "nvidia-mig-parted";
version = "0.14.2";
version = "0.14.3";
src = fetchFromGitHub {
owner = "NVIDIA";
repo = "mig-parted";
tag = "v${finalAttrs.version}";
hash = "sha256-M6XgYh3qrNcSc0WF9uDFk+MOfaTxkoyUK0SJTQAEiVY=";
hash = "sha256-ZguFYrq8bIjDxNas+4ynmWw37bLVJe2BYObRRbtSnHY=";
};
vendorHash = null;

View file

@ -95,7 +95,7 @@ let
cudaToolkit = buildEnv {
# ollama hardcodes the major version in the Makefile to support different variants.
# - https://github.com/ollama/ollama/blob/v0.21.1/CMakePresets.json#L21-L47
# - https://github.com/ollama/ollama/blob/v0.31.1/CMakePresets.json#L21-L47
name = "cuda-merged-${cudaMajorVersion}";
paths = map lib.getLib cudaLibs ++ [
(lib.getOutput "static" cudaPackages.cuda_cudart)
@ -115,8 +115,8 @@ let
llamaCppSrc = fetchFromGitHub {
owner = "ggml-org";
repo = "llama.cpp";
tag = "b9509";
hash = "sha256-bO1ucb/+vidj/EYzNCssotjte9NlVLdjC794jToNNeM=";
tag = "b9840";
hash = "sha256-SlcBqlUSeXgGltk7fz1blp4DobypzkT8cw8a7dkVGiU=";
};
wrapperOptions = [
@ -152,13 +152,13 @@ let
in
goBuild (finalAttrs: {
pname = "ollama";
version = "0.30.7";
version = "0.31.1";
src = fetchFromGitHub {
owner = "ollama";
repo = "ollama";
tag = "v${finalAttrs.version}";
hash = "sha256-pS6Wd//g+Q1Oqw32+mr2h5ag7C2HNwf/8ZVrTKOvdWE=";
hash = "sha256-p4saQimdOVRWcJyrYcCuex7NViKC/u0tHUnLRZh6hwg=";
};
vendorHash = "sha256-lZdGzGb9xRjTm1Rm7/wHjqM490gLznLEndmb4mNbCX0=";
@ -322,7 +322,7 @@ goBuild (finalAttrs: {
'';
# ollama looks for acceleration libs in ../lib/ollama/ (now also for CPU-only with arch specific optimizations)
# https://github.com/ollama/ollama/blob/v0.21.1/docs/development.md#library-detection
# https://github.com/ollama/ollama/blob/v0.31.1/docs/development.md#library-detection
postInstall = ''
mkdir -p $out/lib
cp -r build/lib/ollama $out/lib/

View file

@ -12,7 +12,7 @@
optipng,
x265,
libde265,
icu,
icu78,
jdk,
lib,
nodejs_22,
@ -30,6 +30,9 @@
}:
let
# default at the time of writing is still 76,
# but libv8 from nodejs_22 needs 78
icu = icu78;
openssl' = openssl.override {
enableMD2 = true;
static = true;
@ -41,8 +44,11 @@ let
$BUILDRT/Common/3dParty/icu/icu.pri \
--replace-fail "ICU_MAJOR_VER = 74" "ICU_MAJOR_VER = ${lib.versions.major icu.version}"
mkdir $BUILDRT/Common/3dParty/icu/linux_64
ln -s ${icu}/lib $BUILDRT/Common/3dParty/icu/linux_64/build
mkdir -p $BUILDRT/Common/3dParty/icu/linux_64/build
ln -s ${icu.dev}/include $BUILDRT/Common/3dParty/icu/linux_64/build/include
for i in ${icu}/lib/* ; do
ln -s $i $BUILDRT/Common/3dParty/icu/linux_64/build/$(basename $i)
done
'';
icuQmakeFlags = [
"QMAKE_LFLAGS+=-Wl,--no-undefined"

View file

@ -14,16 +14,16 @@ let
in
rustPlatform.buildRustPackage.override { inherit stdenv; } (finalAttrs: {
pname = "pgdog";
version = "0.1.46";
version = "0.1.47";
src = fetchFromGitHub {
owner = "pgdogdev";
repo = "pgdog";
tag = "v${finalAttrs.version}";
hash = "sha256-9NW/LL6GaiYF2p/4MoGXGRS2jv9bLi+dmRDPPNPhnVw=";
hash = "sha256-+YHn3gkKqrZuOZreItSXBjbn4A78wmf8r+dSRUD2at8=";
};
cargoHash = "sha256-qt7CD4rTDt5DrQSSYvmheD+ib+JgM1IjbkKFKm6wXBE=";
cargoHash = "sha256-W4XbcsFUk8g86zpPgYb/WztVoeCklIQmEhylQSE2a8E=";
# Hardcoded paths for C compiler and linker
postPatch = ''

View file

@ -17,7 +17,7 @@
buildNpmPackage (finalAttrs: {
pname = "sandbox-runtime";
version = "0.0.59";
version = "0.0.63";
__structuredAttrs = true;
@ -25,7 +25,7 @@ buildNpmPackage (finalAttrs: {
owner = "anthropic-experimental";
repo = "sandbox-runtime";
tag = "v${finalAttrs.version}";
hash = "sha256-aHjjIn1niFAEst6T35o4jGbCF1U/W12yh3BjO/lRTFM=";
hash = "sha256-Y01JUdTmmAqs++3LpLIXZyBsq4jKvIxUeOI6zLfcI2g=";
};
postPatch =
@ -37,7 +37,7 @@ buildNpmPackage (finalAttrs: {
strictDeps = true;
npmDepsHash = "sha256-k0tkb2GSuy6ZP94JGLmr2qQH1zAHZ5tLaRH3f3Mf/3E=";
npmDepsHash = "sha256-fwk2A1oBv+/YrV+zjzSYlKhIB6oiAZO/88fE2UHWWbA=";
postFixup =
let

View file

@ -21,12 +21,12 @@
stdenv.mkDerivation (finalAttrs: {
pname = "selinux-sandbox";
version = "3.10";
version = "3.11";
inherit (policycoreutils) se_url;
src = fetchurl {
url = "${finalAttrs.se_url}/${finalAttrs.version}/selinux-sandbox-${finalAttrs.version}.tar.gz";
hash = "sha256-4r0T4YT3IYFVoz6pQygdAvRBwpcQQBW+69/G2Npv9cM=";
hash = "sha256-MnxiXev62tCi1Ek6PP7ZhS9GA5AhQrLLWHV1Z/LeOt8=";
};
nativeBuildInputs = [

View file

@ -7,13 +7,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "semodule-utils";
version = "3.10";
version = "3.11";
inherit (libsepol) se_url;
src = fetchurl {
url = "${finalAttrs.se_url}/${finalAttrs.version}/semodule-utils-${finalAttrs.version}.tar.gz";
hash = "sha256-HC8UzAmMu011kS0THF90fnAkbhBC5y8qtA4o9Tz0XBA=";
hash = "sha256-DFdOFUE/9+1mDEXgEb7+JIu4nqonPbb1brKX1h3rLtY=";
};
buildInputs = [ libsepol ];

View file

@ -7,13 +7,13 @@
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "slint-tr-extractor";
version = "1.16.1";
version = "1.17.0";
src = fetchCrate {
inherit (finalAttrs) pname version;
hash = "sha256-y3hsZ4a3tf2CDa6pkO928xZxeWAwsxK+H2LTa7MhcFs=";
hash = "sha256-sFqSO+sg9meKynCKx1hWHB691cEqF7ifUd/Q4q37vIA=";
};
cargoHash = "sha256-qmLELQ/PNMUW+XMsJGPK2CnqnLAhc3W4KqtizdxFGMM=";
cargoHash = "sha256-+eGziYcF8+wlIw3N4n55GZ5UcI+EyqOuJ9kyz+C7nkw=";
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];

View file

@ -6,13 +6,13 @@
stdenvNoCC.mkDerivation rec {
pname = "spaceship-prompt";
version = "4.22.4";
version = "4.22.5";
src = fetchFromGitHub {
owner = "denysdovhan";
repo = "spaceship-prompt";
rev = "v${version}";
sha256 = "sha256-BqdD6WwFW8Dtyyh81bQ66jZsJwq7Ck9kCwJpU9+xHtw=";
sha256 = "sha256-GRFgCvOSwRYHgs7SbXJwyqpwPjD7xS4eZss3sVkBiYE=";
};
strictDeps = true;

View file

@ -65,13 +65,13 @@ let
in
stdenv.mkDerivation (finalAttrs: {
pname = "sssd";
version = "2.13.0";
version = "2.13.1";
src = fetchFromGitHub {
owner = "SSSD";
repo = "sssd";
tag = finalAttrs.version;
hash = "sha256-/zMF7+rpQpWNq7srK2/gP99tgq8s6uFAYb/ORoPO/9w=";
hash = "sha256-f4abHqZ8ojNU4dVw1hkfEJC4asE/NamhYmOQyy368eI=";
};
patches = [

View file

@ -7,16 +7,16 @@
}:
buildNpmPackage rec {
pname = "todoist-cli";
version = "1.75.2";
version = "1.75.3";
src = fetchFromGitHub {
owner = "Doist";
repo = "todoist-cli";
rev = "v${version}";
sha256 = "sha256-f0mIBrX5+uGA77LR5G6JJaO3bhKGdPxHhakdcq2OfSw=";
sha256 = "sha256-OqpwGMMEVpCLogSarf+RJBHXxvSf9EulwYO5hsuDXPY=";
};
npmDepsHash = "sha256-Zv3emGjA58gtWtFFa4fwGQ/Z1QVNSWtcL4gfeqUnbpw=";
npmDepsHash = "sha256-Wz7UxeZwC0boDBb9hGomELJ37mK+3aL8szpYDYDtjUg=";
doCheck = true;

View file

@ -8,16 +8,16 @@
rustPlatform.buildRustPackage (finalAttrs: {
pname = "usbvfiod";
version = "0.1.0";
version = "0.2.0";
src = fetchFromGitHub {
owner = "cyberus-technology";
repo = "usbvfiod";
rev = "v${finalAttrs.version}";
hash = "sha256-SG5S0wRue/G31XuR2D8xFrbAIhWG3rl+aNjEnhZ7dmI=";
hash = "sha256-gus0Bdsd0zUuhsAQ4I1Z/BphKOjAlmbpqND6W+6cNbg=";
};
cargoHash = "sha256-nTNUC7Tiib2wWYC1g7S1W7wgIkqZLTN8aKUKjpgZlqo=";
cargoHash = "sha256-7RTaWi93WJV2HEVyljSzRVG+eCwo6+Ywq4Y+ng1UMww=";
nativeInstallCheckInputs = [
versionCheckHook

View file

@ -0,0 +1,49 @@
{
lib,
fetchFromGitHub,
nix-update-script,
python3Packages,
versionCheckHook,
}:
python3Packages.buildPythonApplication (finalAttrs: {
pname = "user-scanner";
version = "1.4.1";
pyproject = true;
__structuredAttrs = true;
src = fetchFromGitHub {
owner = "kaifcodec";
repo = "user-scanner";
tag = "v${finalAttrs.version}";
hash = "sha256-SDi13KGqWXgNXdgF5KOpqEcjwbuNv4PU5ahB5UdsbWQ=";
};
build-system = with python3Packages; [ flit-core ];
dependencies = with python3Packages; [
colorama
httpx
socksio
];
nativeCheckInputs = with python3Packages; [ pytestCheckHook ];
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
pythonImportsCheck = [ "user_scanner" ];
passthru.updateScript = nix-update-script { };
meta = {
description = "Email & Username OSINT suite";
homepage = "https://github.com/kaifcodec/user-scanner";
changelog = "https://github.com/kaifcodec/user-scanner/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
mainProgram = "user-scanner";
};
})

View file

@ -29,13 +29,13 @@ let
in
stdenv.mkDerivation (finalAttrs: {
pname = "uwsm";
version = "0.26.5";
version = "0.26.6";
src = fetchFromGitHub {
owner = "Vladimir-csp";
repo = "uwsm";
tag = "v${finalAttrs.version}";
hash = "sha256-kk01gxwVJXZ6iBqJYjpaPxk+IlL3UUN5ffHOh3qp7QU=";
hash = "sha256-5wfQ2Iv4j2Gd/CV1BQ7mdkIXG7sA90iMiBAefmM3BvY=";
};
nativeBuildInputs = [

View file

@ -16,13 +16,13 @@
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "zsh-forgit";
version = "26.05.0";
version = "26.07.0";
src = fetchFromGitHub {
owner = "wfxr";
repo = "forgit";
tag = finalAttrs.version;
hash = "sha256-EFbzrVgLfVO+dEEQ1vZUcZkIszZFCktYjQjwkBVrHQI=";
hash = "sha256-Ks/kUuQLtzKLjwIDpfkh6pL90aII8Rfh8ijxDmlFvmg=";
};
strictDeps = true;

View file

@ -15,14 +15,14 @@
buildPythonPackage (finalAttrs: {
pname = "awkward-cpp";
version = "53";
version = "54";
pyproject = true;
__structuredAttrs = true;
src = fetchPypi {
pname = "awkward_cpp";
inherit (finalAttrs) version;
hash = "sha256-pHjSt943VGdClGF+Er1tsQ/OaR6Y9d8kjWZdoJPNT/o=";
hash = "sha256-yVeygEvmp7oouZbEywC3RGJNS3jehGHvd4j4+OUCgo4=";
};
build-system = [

View file

@ -24,7 +24,7 @@
buildPythonPackage (finalAttrs: {
pname = "awkward";
version = "2.9.1";
version = "2.10.0";
pyproject = true;
__structuredAttrs = true;
@ -32,7 +32,7 @@ buildPythonPackage (finalAttrs: {
owner = "scikit-hep";
repo = "awkward";
tag = "v${finalAttrs.version}";
hash = "sha256-TNXsYZFL60jELed40b1hB8Rk43gcLbCwzzXc3fABu5k=";
hash = "sha256-yurwjlChMMLoGGMvoDA8O63jpnQepIi8KdG6U78+2y0=";
};
build-system = [

View file

@ -0,0 +1,37 @@
{
lib,
buildPythonPackage,
fetchPypi,
hatchling,
nix-update-script,
}:
buildPythonPackage (finalAttrs: {
pname = "caido-schema-proxy";
version = "0.57.0";
pyproject = true;
__structuredAttrs = true;
src = fetchPypi {
pname = "caido_schema_proxy";
inherit (finalAttrs) version;
hash = "sha256-5hholzMKrNuJZUZIvg+phProD8OZ/YB0ZSGReGa2IqU=";
};
build-system = [ hatchling ];
pythonImportsCheck = [ "caido_schema_proxy" ];
# Module has no tests
doCheck = false;
passthru.updateScript = nix-update-script { };
meta = {
description = "Caido Proxy API schemas (GraphQL and OpenAPI)";
homepage = "https://pypi.org/project/caido-schema-proxy";
license = lib.licenses.cc-by-40;
maintainers = with lib.maintainers; [ fab ];
};
})

View file

@ -0,0 +1,53 @@
{
lib,
buildPythonPackage,
caido-server-auth,
fetchPypi,
gql,
nix-update-script,
pydantic,
uv-build,
}:
buildPythonPackage (finalAttrs: {
pname = "caido-sdk-client";
version = "0.2.0";
pyproject = true;
__structuredAttrs = true;
src = fetchPypi {
pname = "caido_sdk_client";
inherit (finalAttrs) version;
hash = "sha256-OZiP4Hs/qcaa29SWYttmDXcH1g2SRRCbFiPe+Xs5usg=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "uv_build>=0.9.8,<0.10.0" "uv_build"
'';
build-system = [ uv-build ];
dependencies = [
caido-server-auth
gql
pydantic
]
++ gql.optional-dependencies.aiohttp
++ gql.optional-dependencies.websockets;
pythonImportsCheck = [ "caido_sdk_client" ];
# Module has no tests
doCheck = false;
passthru.updateScript = nix-update-script { };
meta = {
description = "Client SDK for interacting with a Caido instance";
homepage = "https://pypi.org/project/caido-sdk-client";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
})

View file

@ -0,0 +1,49 @@
{
lib,
buildPythonPackage,
fetchPypi,
gql,
nix-update-script,
uv-build,
}:
buildPythonPackage (finalAttrs: {
pname = "caido-server-auth";
version = "0.1.2";
pyproject = true;
__structuredAttrs = true;
src = fetchPypi {
pname = "caido_server_auth";
inherit (finalAttrs) version;
hash = "sha256-6ywl6d4VBidgtoES9djprWPusTIlGLkMGgEZppp1JKQ=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "uv_build>=0.9.8,<0.10.0" "uv_build"
'';
build-system = [ uv-build ];
dependencies = [
gql
]
++ gql.optional-dependencies.aiohttp
++ gql.optional-dependencies.websockets;
pythonImportsCheck = [ "caido_server_auth" ];
# Module has no tests
doCheck = false;
passthru.updateScript = nix-update-script { };
meta = {
description = "Authenticate with a Caido instance";
homepage = "https://github.com/caido-community/sdk-py/tree/main/packages/caido-server-auth";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
})

View file

@ -11,12 +11,12 @@
buildPythonPackage (finalAttrs: {
pname = "publicsuffixlist";
version = "1.0.2.20260625";
version = "1.0.2.20260702";
pyproject = true;
src = fetchPypi {
inherit (finalAttrs) pname version;
hash = "sha256-TLRRZvyzKKKJTf7ZSVNOaY86APJ/CKjQg/9+Bea68RA=";
hash = "sha256-DqicazZHXh8ZzxIpYC8NuvsuGIp4xfrsxk0/AbBLgNA=";
};
postPatch = ''

View file

@ -47,7 +47,7 @@
buildPythonPackage (finalAttrs: {
pname = "sigima";
version = "1.1.4";
version = "1.1.5";
pyproject = true;
__structuredAttrs = true;
@ -55,7 +55,7 @@ buildPythonPackage (finalAttrs: {
owner = "DataLab-Platform";
repo = "Sigima";
tag = "v${finalAttrs.version}";
hash = "sha256-AQrUn/WgWZ5W9Lrg4TJjerEZvGDH1wKL2WbeP3sGjrE=";
hash = "sha256-WRuTncx6iKQVdKjDaSwg/hVcBM4WxLGq1pcMEMXMVQI=";
};
build-system = [

View file

@ -37,7 +37,7 @@
buildPythonPackage (finalAttrs: {
pname = "textual";
version = "8.2.7";
version = "8.2.8";
pyproject = true;
__structuredAttrs = true;
@ -45,7 +45,7 @@ buildPythonPackage (finalAttrs: {
owner = "Textualize";
repo = "textual";
tag = "v${finalAttrs.version}";
hash = "sha256-jRTdxVpeRk8gAur5+VpLVVghBdYenXysoEFRBfczkR4=";
hash = "sha256-4T+/eD0adPugDP7TCDoDaOe0OrEFskCUadLVEixmTwo=";
};
build-system = [ poetry-core ];

View file

@ -2540,6 +2540,12 @@ self: super: with self; {
}
);
caido-schema-proxy = callPackage ../development/python-modules/caido-schema-proxy { };
caido-sdk-client = callPackage ../development/python-modules/caido-sdk-client { };
caido-server-auth = callPackage ../development/python-modules/caido-server-auth { };
caio = callPackage ../development/python-modules/caio { };
cairocffi = callPackage ../development/python-modules/cairocffi { };