···1+# autoPatchcilHook {#setup-hook-autopatchcilhook}
2+3+This is a special setup hook which helps in packaging .NET assemblies/programs in that it automatically tries to find missing shared library dependencies of .NET assemblies based on the given `buildInputs` and `nativeBuildInputs`.
4+5+As the hook needs information for the host where the package will be run on, there's a required environment variable called `autoPatchcilRuntimeId` which should be filled in with the RID (Runtime Identifier) of the machine where the output will be run on. If you're using `buildDotnetModule`, it will fall back to `dotnetRuntimeIds` (which is set to `lib.singleton (if runtimeId != null then runtimeId else systemToDotnetRid stdenvNoCC.hostPlatform.system)`) for you if not provided.
6+7+In certain situations you may want to run the main command (`autoPatchcil`) of the setup hook on a file or a set of directories instead of unconditionally patching all outputs. This can be done by setting the `dontAutoPatchcil` environment variable to a non-empty value.
8+9+By default, `autoPatchcil` will fail as soon as any .NET assembly requires a dependency which cannot be resolved via the given build inputs. In some situations you might prefer to just leave missing dependencies unpatched and continue to patch the rest. This can be achieved by setting the `autoPatchcilIgnoreMissingDeps` environment variable to a non-empty value. `autoPatchcilIgnoreMissingDeps` can be set to a list like `autoPatchcilIgnoreMissingDeps = [ "libcuda.so.1" "libcudart.so.1" ];` or to `[ "*" ]` to ignore all missing dependencies.
10+11+The `autoPatchcil` command requires the `--rid` command line flag, informing the RID (Runtime Identifier) it should assume the assemblies will be executed on, and also recognizes a `--no-recurse` command line flag, which prevents it from recursing into subdirectories.
12+13+::: {.note}
14+Since, unlike most native binaries, .NET assemblies are compiled once to run on any platform, many assemblies may have PInvoke stubs for libraries that might not be available on the platform that the package will effectively run on. A few examples are assemblies that call native Windows APIs through PInvoke targeting `kernel32`, `gdi32`, `user32`, `shell32` or `ntdll`.
15+16+`autoPatchcil` does its best to ignore dependencies from other platforms by checking the requested file extensions, however not all PInvoke stubs provide an extension so in those cases it will be necessary to list those in `autoPatchcilIgnoreMissingDeps` manually.
17+:::
···68- [testers.shellcheck](https://nixos.org/manual/nixpkgs/unstable/#tester-shellcheck) now warns when `name` is not provided.
69 The `name` argument will become mandatory in a future release.
700071- `grafana-agent` and `services.grafana-agent` have been removed in favor of
72 Grafana Alloy (`grafana-alloy` and `services.alloy`), as they depend on an EOL compiler version
73 and will become EOL during the 25.05 lifecycle.
···68- [testers.shellcheck](https://nixos.org/manual/nixpkgs/unstable/#tester-shellcheck) now warns when `name` is not provided.
69 The `name` argument will become mandatory in a future release.
7071+- [GIMP 3.0](https://www.gimp.org/news/2025/03/16/gimp-3-0-released/) available as `gimp3`.
72+73- `grafana-agent` and `services.grafana-agent` have been removed in favor of
74 Grafana Alloy (`grafana-alloy` and `services.alloy`), as they depend on an EOL compiler version
75 and will become EOL during the 25.05 lifecycle.
···416417- `programs.clash-verge.tunMode` was deprecated and removed because now service mode is necessary to start program. Without `programs.clash-verge.enable`, clash-verge-rev will refuse to start.
41800419- `services.netbird.tunnels` was renamed to [`services.netbird.clients`](#opt-services.netbird.clients),
420 hardened (using dedicated less-privileged users) and significantly extended.
421
···416417- `programs.clash-verge.tunMode` was deprecated and removed because now service mode is necessary to start program. Without `programs.clash-verge.enable`, clash-verge-rev will refuse to start.
418419+- `services.homepage-dashboard` now requires the `allowedHosts` option to be set in accordance with the [documentation](https://gethomepage.dev/installation/#homepage_allowed_hosts).
420+421- `services.netbird.tunnels` was renamed to [`services.netbird.clients`](#opt-services.netbird.clients),
422 hardened (using dedicated less-privileged users) and significantly extended.
423
···4 lib,
5 ...
6}:
7-8let
9 cfg = config.services.homepage-dashboard;
10 # Define the settings format used for this program
···27 type = lib.types.int;
28 default = 8082;
29 description = "Port for Homepage to bind to.";
000000000000030 };
3132 environmentFile = lib.mkOption {
···215 NIXPKGS_HOMEPAGE_CACHE_DIR = "/var/cache/homepage-dashboard";
216 PORT = toString cfg.listenPort;
217 LOG_TARGETS = "stdout";
0218 };
219220 serviceConfig = {
···4 lib,
5 ...
6}:
07let
8 cfg = config.services.homepage-dashboard;
9 # Define the settings format used for this program
···26 type = lib.types.int;
27 default = 8082;
28 description = "Port for Homepage to bind to.";
29+ };
30+31+ allowedHosts = lib.mkOption {
32+ type = lib.types.str;
33+ default = "localhost:8082,127.0.0.1:8082";
34+ example = "example.com";
35+ description = ''
36+ Hosts that homepage-dashboard will be running under.
37+ You will want to change this in order to acess homepage from anything other than localhost.
38+ see the upsream documentation:
39+40+ <https://gethomepage.dev/installation/#homepage_allowed_hosts>
41+ '';
42 };
4344 environmentFile = lib.mkOption {
···227 NIXPKGS_HOMEPAGE_CACHE_DIR = "/var/cache/homepage-dashboard";
228 PORT = toString cfg.listenPort;
229 LOG_TARGETS = "stdout";
230+ HOMEPAGE_ALLOWED_HOSTS = cfg.allowedHosts;
231 };
232233 serviceConfig = {
···30 url = "https://github.com/pyodide/pyodide/releases/download/${pyodideVersion}/pyodide-${pyodideVersion}.tar.bz2";
31 };
3233- npmDepsHash = "sha256-C7YuXxCrnJ+8L7JNh6TA8xi0G3y1FwFb9DQwhS+igME=";
3435 # Disabling `pyodide:fetch` as it downloads packages during `buildPhase`
36 # Until this is solved, running python packages from the browser will not work.
···30 url = "https://github.com/pyodide/pyodide/releases/download/${pyodideVersion}/pyodide-${pyodideVersion}.tar.bz2";
31 };
3233+ npmDepsHash = "sha256-MIjQ5Lbtv6kFHUyuc12JTItUPxIHoo65iUlSjBxw9Z8=";
3435 # Disabling `pyodide:fetch` as it downloads packages during `buildPhase`
36 # Until this is solved, running python packages from the browser will not work.
···7 wayland-scanner,
8 pkg-config,
9 libdrm,
010}:
1112qtModule {
13 pname = "qtwayland";
000000000014 # wayland-scanner needs to be propagated as both build
15 # (for the wayland-scanner binary) and host (for the
16 # actual wayland.xml protocol definition)
···7 wayland-scanner,
8 pkg-config,
9 libdrm,
10+ fetchpatch,
11}:
1213qtModule {
14 pname = "qtwayland";
15+16+ # Backport fix for popups not rendering properly
17+ # FIXME: remove in 6.9.1
18+ patches = [
19+ (fetchpatch {
20+ url = "https://invent.kde.org/qt/qt/qtwayland/-/commit/e4556c59f0c8250da7c16759432b2ac0a5ac9d9f.patch";
21+ hash = "sha256-wRNXBwecuULn5MD87HP20uSuxHiuQslKp20DIuCGheM=";
22+ })
23+ ];
24+25 # wayland-scanner needs to be propagated as both build
26 # (for the wayland-scanner binary) and host (for the
27 # actual wayland.xml protocol definition)
···946 libquotient = libsForQt5.libquotient; # Added 2023-11-11
947 librarian-puppet-go = throw "'librarian-puppet-go' has been removed, as it's upstream is unmaintained"; # Added 2024-06-10
948 librdf = throw "'librdf' has been renamed to/replaced by 'lrdf'"; # Converted to throw 2024-10-17
0949 LibreArp = librearp; # Added 2024-06-12
950 LibreArp-lv2 = librearp-lv2; # Added 2024-06-12
951 libreddit = throw "'libreddit' has been removed because it is unmaintained upstream. Consider using 'redlib', a maintained fork"; # Added 2024-07-17
···946 libquotient = libsForQt5.libquotient; # Added 2023-11-11
947 librarian-puppet-go = throw "'librarian-puppet-go' has been removed, as it's upstream is unmaintained"; # Added 2024-06-10
948 librdf = throw "'librdf' has been renamed to/replaced by 'lrdf'"; # Converted to throw 2024-10-17
949+ librdf_raptor = throw "librdf_raptor has been remove due to failing to build and being unmaintained"; # Added 2025-04-14
950 LibreArp = librearp; # Added 2024-06-12
951 LibreArp-lv2 = librearp-lv2; # Added 2024-06-12
952 libreddit = throw "'libreddit' has been removed because it is unmaintained upstream. Consider using 'redlib', a maintained fork"; # Added 2024-07-17