From d2dbbefc3f6ebedc9d21d421458c46fce6863542 Mon Sep 17 00:00:00 2001 From: Paul Meyer Date: Wed, 4 Jun 2025 11:00:30 +0200 Subject: [PATCH 01/11] waybar: remove dependency on hyperland/sway Both inputs aren't used anywhere in the output. I used diffoscope to check and the only difference before after this patch is the outpath. Requirement on sway was removed in 2020 afaict: https://github.com/Alexays/Waybar/commit/732ce7a27cbeb47fb3566768789c14d3123bb06c Signed-off-by: Paul Meyer --- pkgs/by-name/wa/waybar/package.nix | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pkgs/by-name/wa/waybar/package.nix b/pkgs/by-name/wa/waybar/package.nix index d2b27b317029..53a6abb425b3 100644 --- a/pkgs/by-name/wa/waybar/package.nix +++ b/pkgs/by-name/wa/waybar/package.nix @@ -12,7 +12,6 @@ gtk-layer-shell, gtkmm3, howard-hinnant-date, - hyprland, iniparser, jsoncpp, libcava, @@ -38,7 +37,6 @@ sndio, spdlog, systemdMinimal, - sway, udev, upower, versionCheckHook, @@ -51,7 +49,6 @@ enableManpages ? stdenv.buildPlatform.canExecute stdenv.hostPlatform, evdevSupport ? true, experimentalPatches ? true, - hyprlandSupport ? true, inputSupport ? true, jackSupport ? true, mpdSupport ? true, @@ -64,7 +61,6 @@ runTests ? stdenv.buildPlatform.canExecute stdenv.hostPlatform, sndioSupport ? true, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemdMinimal, - swaySupport ? true, traySupport ? true, udevSupport ? true, upowerSupport ? true, @@ -128,7 +124,6 @@ stdenv.mkDerivation (finalAttrs: { portaudio ] ++ lib.optional evdevSupport libevdev - ++ lib.optional hyprlandSupport hyprland ++ lib.optional inputSupport libinput ++ lib.optional jackSupport libjack2 ++ lib.optional mpdSupport libmpdclient @@ -136,7 +131,6 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optional nlSupport libnl ++ lib.optional pulseSupport libpulseaudio ++ lib.optional sndioSupport sndio - ++ lib.optional swaySupport sway ++ lib.optional systemdSupport systemdMinimal ++ lib.optional traySupport libdbusmenu-gtk3 ++ lib.optional udevSupport udev From 2b6a57710bc97721f8d70d09788038033f9bc1e5 Mon Sep 17 00:00:00 2001 From: tuxy Date: Mon, 9 Jun 2025 17:22:26 +0700 Subject: [PATCH 02/11] maintainers: add tuxy --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 58cf591b197f..5ec7309025c3 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -25572,6 +25572,12 @@ name = "Denny Schäfer"; keys = [ { fingerprint = "C752 0E49 4D92 1740 D263 C467 B057 455D 1E56 7270"; } ]; }; + tuxy = { + email = "lastpass7565@gmail.com"; + github = "tuxy"; + githubId = 57819359; + name = "Binh Nguyen"; + }; tv = { email = "tv@krebsco.de"; github = "4z3"; From 069c640f76eeb983ab07cc6d45b40f172c653769 Mon Sep 17 00:00:00 2001 From: Moraxyc Date: Thu, 5 Jun 2025 01:15:48 +0800 Subject: [PATCH 03/11] nixos/getaddrinfo: init This commit introduces a new NixOS module `networking.getaddrinfo` to allow declarative configuration of `/etc/gai.conf`, which controls address selection behavior for `getaddrinfo(3)` as defined in RFC 3484 and RFC 6724. --- nixos/modules/config/getaddrinfo.nix | 120 +++++++++++++++++++++++++++ nixos/modules/module-list.nix | 1 + 2 files changed, 121 insertions(+) create mode 100644 nixos/modules/config/getaddrinfo.nix diff --git a/nixos/modules/config/getaddrinfo.nix b/nixos/modules/config/getaddrinfo.nix new file mode 100644 index 000000000000..f18651a9e031 --- /dev/null +++ b/nixos/modules/config/getaddrinfo.nix @@ -0,0 +1,120 @@ +{ + pkgs, + lib, + config, + ... +}: +let + cfg = config.networking.getaddrinfo; + + formatTableEntries = + tableName: table: + if table == null then + [ ] + else + lib.mapAttrsToList (cidr: val: "${tableName} ${cidr} ${toString val}") table; + + gaiConfText = lib.concatStringsSep "\n" ( + [ + "# Generated by NixOS module networking.getaddrinfo" + "# Do not edit manually!" + "reload ${if cfg.reload then "yes" else "no"}" + ] + ++ formatTableEntries "label" cfg.label + ++ formatTableEntries "precedence" cfg.precedence + ++ formatTableEntries "scopev4" cfg.scopev4 + ); +in +{ + options.networking.getaddrinfo = { + enable = lib.mkOption { + type = lib.types.bool; + default = pkgs.stdenv.hostPlatform.libc == "glibc"; + defaultText = lib.literalExpression '' + pkgs.stdenv.hostPlatform.libc == "glibc" + ''; + description = '' + Enables custom address sorting configuration for {manpage}`getaddrinfo(3)` according to RFC 3484. + + This option generates a {file}`/etc/gai.conf` file to override the default address sorting tables, + as described in {manpage}`gai.conf(5)`. + + This setting is only applicable when using the GNU C Library (glibc). + It has no effect with other libc implementations. + ''; + }; + + reload = lib.mkOption { + type = lib.types.bool; + default = false; + description = '' + Determines whether a process should detect changes to the configuration file since it was last read. + + If enabled, the file is re-read automatically. This may cause issues in multithreaded applications + and is generally discouraged. + ''; + }; + + label = lib.mkOption { + type = lib.types.nullOr (lib.types.attrsOf lib.types.int); + default = null; + description = '' + Adds entries to the label table, as described in section 2.1 of RFC 3484. + + If any label entries are provided, the glibc’s default label table is ignored. + ''; + example = { + "::/0" = 1; + "2002::/16" = 2; + "::/96" = 3; + "::ffff:0:0/96" = 4; + "fec0::/10" = 5; + "fc00::/7" = 6; + "2001:0::/32" = 7; + }; + }; + + precedence = lib.mkOption { + type = lib.types.nullOr (lib.types.attrsOf lib.types.int); + default = null; + description = '' + Similar to {option}`networking.getaddrinfo.label`, but this option + defines entries for the precedence table instead. + + See sections 2.1 and 10.3 of RFC 3484 for details. + + Providing any value will disable the glibc's default precedence table. + ''; + example = { + "::1/128" = 50; + "::/0" = 40; + "2002::/16" = 30; + "::/96" = 20; + "::ffff:0:0/96" = 10; + }; + }; + + scopev4 = lib.mkOption { + type = lib.types.nullOr (lib.types.attrsOf lib.types.int); + default = null; + description = '' + Adds custom rules to the IPv4 scope table. + + By default, the scope IDs described in section 3.2 of RFC 6724 are used. + + Modifying these values is rarely necessary. + ''; + example = { + "::ffff:169.254.0.0/112" = 2; + "::ffff:127.0.0.0/104" = 2; + "::ffff:0.0.0.0/96" = 14; + }; + }; + }; + + config = lib.mkIf cfg.enable { + environment.etc."gai.conf".text = gaiConfText; + }; + + meta.maintainers = with lib.maintainers; [ moraxyc ]; +} diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 955bd480d6c7..cb41e5b4df00 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -8,6 +8,7 @@ ./config/fonts/fontdir.nix ./config/fonts/ghostscript.nix ./config/fonts/packages.nix + ./config/getaddrinfo.nix ./config/gtk/gtk-icon-cache.nix ./config/i18n.nix ./config/iproute2.nix From 5010739f7705c7a383a776467340c33395c5c8ab Mon Sep 17 00:00:00 2001 From: Moraxyc Date: Thu, 5 Jun 2025 03:03:52 +0800 Subject: [PATCH 04/11] nixosTests.getaddrinfo: init --- nixos/tests/all-tests.nix | 1 + nixos/tests/getaddrinfo.nix | 68 +++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 nixos/tests/getaddrinfo.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index b03125926e88..c43bce1442d8 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -534,6 +534,7 @@ in gancio = runTest ./gancio.nix; garage = handleTest ./garage { }; gatus = runTest ./gatus.nix; + getaddrinfo = runTest ./getaddrinfo.nix; gemstash = handleTest ./gemstash.nix { }; geoclue2 = runTest ./geoclue2.nix; geoserver = runTest ./geoserver.nix; diff --git a/nixos/tests/getaddrinfo.nix b/nixos/tests/getaddrinfo.nix new file mode 100644 index 000000000000..0e686255fff9 --- /dev/null +++ b/nixos/tests/getaddrinfo.nix @@ -0,0 +1,68 @@ +{ lib, ... }: +let + ip4 = "192.0.2.1"; + ip6 = "2001:db8::1"; + + precedence = { + "::1/128" = 50; + "::/0" = 40; + "2002::/16" = 30; + "::/96" = 20; + "::ffff:0:0/96" = 100; + }; +in +{ + name = "getaddrinfo"; + meta.maintainers = with lib.maintainers; [ moraxyc ]; + + nodes.server = _: { + networking.firewall.enable = false; + networking.useDHCP = false; + + services.dnsmasq = { + enable = true; + settings = { + address = [ + "/nixos.test/${ip4}" + "/nixos.test/${ip6}" + ]; + }; + }; + }; + + nodes.client = + { pkgs, nodes, ... }: + { + networking.nameservers = [ + (lib.head nodes.server.networking.interfaces.eth1.ipv4.addresses).address + ]; + networking.getaddrinfo = { + reload = true; + inherit precedence; + }; + networking.useDHCP = false; + environment.systemPackages = [ + (pkgs.writers.writePython3Bin "request-addr" { } '' + import socket + + results = socket.getaddrinfo("nixos.test", None) + print(results[0][4][0]) + '') + ]; + }; + + testScript = + { ... }: + '' + server.wait_for_unit("dnsmasq.service") + client.wait_for_unit("network.target") + + assert "${ip4}" in client.succeed("request-addr") + + client.succeed(""" + sed 's/100/10/' /etc/gai.conf > /etc/gai.conf.new && \ + mv /etc/gai.conf.new /etc/gai.conf + """) + assert "${ip6}" in client.succeed("request-addr") + ''; +} From f1eed27d396a01bf363907e2b54fcb3adf961472 Mon Sep 17 00:00:00 2001 From: Moraxyc Date: Tue, 10 Jun 2025 20:28:06 +0800 Subject: [PATCH 05/11] release-notes: mention new module networking.getaddrinfo --- nixos/doc/manual/release-notes/rl-2511.section.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/doc/manual/release-notes/rl-2511.section.md b/nixos/doc/manual/release-notes/rl-2511.section.md index ce146d0cdedf..270090ad277c 100644 --- a/nixos/doc/manual/release-notes/rl-2511.section.md +++ b/nixos/doc/manual/release-notes/rl-2511.section.md @@ -17,6 +17,8 @@ - [FileBrowser](https://filebrowser.org/), a web application for managing and sharing files. Available as [services.filebrowser](#opt-services.filebrowser.enable). +- Options under [networking.getaddrinfo](#opt-networking.getaddrinfo.enable) are now allowed to declaratively configure address selection and sorting behavior of `getaddrinfo` in dual-stack networks. + - [LACT](https://github.com/ilya-zlobintsev/LACT), a GPU monitoring and configuration tool, can now be enabled through [services.lact.enable](#opt-services.lact.enable). Note that for LACT to work properly on AMD GPU systems, you need to enable [hardware.amdgpu.overdrive.enable](#opt-hardware.amdgpu.overdrive.enable). From 938a6b2212dd7e471c1ffe1304093837d1a2fc4d Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 10 Jun 2025 19:56:12 +0000 Subject: [PATCH 06/11] firewalld: 2.3.0 -> 2.3.1 --- pkgs/by-name/fi/firewalld/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/fi/firewalld/package.nix b/pkgs/by-name/fi/firewalld/package.nix index 7772c2c0fa71..51ee769c84ac 100644 --- a/pkgs/by-name/fi/firewalld/package.nix +++ b/pkgs/by-name/fi/firewalld/package.nix @@ -44,13 +44,13 @@ let in stdenv.mkDerivation rec { pname = "firewalld"; - version = "2.3.0"; + version = "2.3.1"; src = fetchFromGitHub { owner = "firewalld"; repo = "firewalld"; rev = "v${version}"; - sha256 = "sha256-ubE1zMIOcdg2+mgXsk6brCZxS1XkvJYwVY3E+UXIIiU="; + sha256 = "sha256-ONpyJJjIn5kEnkudZe4Nf67wdQgWa+2qEkT1nxRBDpI="; }; patches = [ From d93fade0fdb1f2baabbfbcffddb3adeec3488824 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 11 Jun 2025 02:28:49 +0000 Subject: [PATCH 07/11] karmor: 1.4.1 -> 1.4.2 --- pkgs/by-name/ka/karmor/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/ka/karmor/package.nix b/pkgs/by-name/ka/karmor/package.nix index 351e8acdb350..55504af7d0c2 100644 --- a/pkgs/by-name/ka/karmor/package.nix +++ b/pkgs/by-name/ka/karmor/package.nix @@ -9,13 +9,13 @@ buildGoModule rec { pname = "karmor"; - version = "1.4.1"; + version = "1.4.2"; src = fetchFromGitHub { owner = "kubearmor"; repo = "kubearmor-client"; rev = "v${version}"; - hash = "sha256-gFcv2VxKTozEAJvcncOc6X1Pn7HWomHgemCfyddZSJs="; + hash = "sha256-+Zk1tPZAk3rQ1ZfdNAPEvtjm0mdsWRELbRctlulvFnE="; }; vendorHash = "sha256-4F/q6vYOGtLef+rrJXKhLwjM71NMNI4es4dKe1pohZU="; From 480fd6336395c787737195590ea3aacb89996c9a Mon Sep 17 00:00:00 2001 From: Summer Tea Date: Tue, 10 Jun 2025 23:14:03 -0400 Subject: [PATCH 08/11] pineflash: Use `finalAttrs` pattern Now that 7609cbad7cfb (buildRustPackage: restructure with lib.extendMkDerivation, 2025-02-16) has been merged (in gh-382550), migrate to `finalAttrs` pattern. Related-to: https://nixos.org/manual/nixpkgs/unstable/#mkderivation-recursive-attributes --- pkgs/by-name/pi/pineflash/package.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/pi/pineflash/package.nix b/pkgs/by-name/pi/pineflash/package.nix index b68594035764..a3571a9319cc 100644 --- a/pkgs/by-name/pi/pineflash/package.nix +++ b/pkgs/by-name/pi/pineflash/package.nix @@ -17,14 +17,14 @@ nix-update-script, wayland, }: -rustPlatform.buildRustPackage rec { +rustPlatform.buildRustPackage (finalAttrs: { pname = "pineflash"; version = "0.5.5"; src = fetchFromGitHub { owner = "Spagett1"; repo = "pineflash"; - tag = version; + tag = finalAttrs.version; hash = "sha256-4tcwEok36vuXbtlZNUkLNw1kHFQPBEJM/gWRhRWNLPg="; }; @@ -81,11 +81,11 @@ rustPlatform.buildRustPackage rec { meta = { description = "GUI tool to flash IronOS to the Pinecil V1 and V2"; homepage = "https://github.com/Spagett1/pineflash"; - changelog = "https://github.com/Spagett1/pineflash/releases/tag/${version}"; + changelog = "https://github.com/Spagett1/pineflash/releases/tag/${finalAttrs.version}"; license = lib.licenses.gpl2Only; maintainers = with lib.maintainers; [ acuteaangle ]; mainProgram = "pineflash"; }; -} +}) From 60a9e7cc580666542f005396b5e2ab310f32339f Mon Sep 17 00:00:00 2001 From: Mutsuha Asada Date: Mon, 9 Jun 2025 08:28:01 +0900 Subject: [PATCH 09/11] ocamlPackages.{landmarks, landmarks-ppx}: 1.4 -> 1.5 Changelog: https://github.com/LexiFi/landmarks/releases/tag/v1.5 Diff: https://github.com/LexiFi/landmarks/compare/v1.4...v1.5 --- pkgs/development/ocaml-modules/landmarks/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/ocaml-modules/landmarks/default.nix b/pkgs/development/ocaml-modules/landmarks/default.nix index 3a39592a9ecf..b1b8e2911e71 100644 --- a/pkgs/development/ocaml-modules/landmarks/default.nix +++ b/pkgs/development/ocaml-modules/landmarks/default.nix @@ -5,16 +5,16 @@ ocaml, }: -buildDunePackage { +buildDunePackage rec { pname = "landmarks"; - version = "1.4"; + version = "1.5"; minimalOCamlVersion = "4.08"; src = fetchFromGitHub { owner = "LexiFi"; repo = "landmarks"; - rev = "b0c753cd2a4c4aa00dffdd3be187d8ed592fabf7"; - hash = "sha256-Wpr76JURUFrj7v39rdM/2Lr7boa7nL/bnPEz1vMrmQo"; + tag = "v${version}"; + hash = "sha256-eIq02D19OzDOrMDHE1Ecrgk+T6s9vj2X6B2HY+z+K8Q="; }; doCheck = lib.versionAtLeast ocaml.version "4.08" && lib.versionOlder ocaml.version "5.0"; From 95612d14de84651a677ebde0708f92550e68557e Mon Sep 17 00:00:00 2001 From: Mutsuha Asada Date: Mon, 9 Jun 2025 08:34:39 +0900 Subject: [PATCH 10/11] ocamlPackages.{landmarks, landmarks-ppx}: modernized derivation - Removed with lib; - Added meta.homepage, meta.longDescription, and meta.changelog --- .../ocaml-modules/landmarks-ppx/default.nix | 4 ++++ .../ocaml-modules/landmarks/default.nix | 14 +++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/pkgs/development/ocaml-modules/landmarks-ppx/default.nix b/pkgs/development/ocaml-modules/landmarks-ppx/default.nix index 8025fb90303c..f6676696bb9a 100644 --- a/pkgs/development/ocaml-modules/landmarks-ppx/default.nix +++ b/pkgs/development/ocaml-modules/landmarks-ppx/default.nix @@ -19,5 +19,9 @@ buildDunePackage { meta = landmarks.meta // { description = "Preprocessor instrumenting code using the landmarks library"; + longDescription = '' + Automatically or semi-automatically instrument your code using + landmarks library. + ''; }; } diff --git a/pkgs/development/ocaml-modules/landmarks/default.nix b/pkgs/development/ocaml-modules/landmarks/default.nix index b1b8e2911e71..40375794fd0c 100644 --- a/pkgs/development/ocaml-modules/landmarks/default.nix +++ b/pkgs/development/ocaml-modules/landmarks/default.nix @@ -19,9 +19,17 @@ buildDunePackage rec { doCheck = lib.versionAtLeast ocaml.version "4.08" && lib.versionOlder ocaml.version "5.0"; - meta = with lib; { + meta = { + inherit (src.meta) homepage; description = "Simple Profiling Library for OCaml"; - maintainers = [ maintainers.kenran ]; - license = licenses.mit; + longDescription = '' + Landmarks is a simple profiling library for OCaml. It provides + primitives to measure time spent in portion of instrumented code. The + instrumentation of the code may either done by hand, automatically or + semi-automatically using the ppx pepreprocessor (see landmarks-ppx package). + ''; + changelog = "https://raw.githubusercontent.com/LexiFi/landmarks/refs/tags/v${version}/CHANGES.md"; + maintainers = with lib.maintainers; [ kenran ]; + license = lib.licenses.mit; }; } From 5616ef6f54ea500dbc1ca9e89d265bae4f5cee69 Mon Sep 17 00:00:00 2001 From: Binh Nguyen Date: Mon, 9 Jun 2025 15:28:20 +1000 Subject: [PATCH 11/11] xenia-canary: init at 0-unstable-2025-06-07 --- pkgs/by-name/xe/xenia-canary/package.nix | 102 +++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 pkgs/by-name/xe/xenia-canary/package.nix diff --git a/pkgs/by-name/xe/xenia-canary/package.nix b/pkgs/by-name/xe/xenia-canary/package.nix new file mode 100644 index 000000000000..d76e2a4eef9a --- /dev/null +++ b/pkgs/by-name/xe/xenia-canary/package.nix @@ -0,0 +1,102 @@ +{ + lib, + python3, + gtk3, + lz4, + SDL2, + pkg-config, + vulkan-loader, + ninja, + cmake, + libuuid, + wrapGAppsHook3, + makeDesktopItem, + copyDesktopItems, + llvmPackages_18, + autoPatchelfHook, + unstableGitUpdater, + fetchFromGitHub, +}: +llvmPackages_18.stdenv.mkDerivation { + pname = "xenia-canary"; + version = "0-unstable-2025-06-07"; + + src = fetchFromGitHub { + owner = "xenia-canary"; + repo = "xenia-canary"; + fetchSubmodules = true; + rev = "422517c673bba086c2b857946ae5a37ee35b8e50"; + hash = "sha256-88GHKXURfN8vaVNN7wKn562b6FvsIm/sTcUgtuhvVxM="; + }; + + dontConfigure = true; + + nativeBuildInputs = [ + python3 + pkg-config + ninja + cmake + wrapGAppsHook3 + copyDesktopItems + autoPatchelfHook + libuuid + ]; + + NIX_CFLAGS_COMPILE = [ + "-Wno-error=unused-result" + ]; + + buildInputs = [ + gtk3 + lz4 + SDL2 + ]; + + buildPhase = '' + runHook preBuild + python3 xenia-build setup + python3 xenia-build build --config=release -j $NIX_BUILD_CORES + runHook postBuild + ''; + + runtimeDependencies = [ + vulkan-loader + ]; + + desktopItems = [ + (makeDesktopItem { + name = "xenia_canary"; + desktopName = "Xenia Canary"; + genericName = "Xbox 360 Emulator"; + exec = "xenia_canary"; + comment = "Xbox 360 Emulator Research Project"; + icon = "xenia-canary"; + startupWMClass = "Xenia_canary"; + categories = [ + "Game" + "Emulator" + ]; + keywords = [ "xbox" ]; + }) + ]; + + installPhase = '' + runHook preInstall + find ./build/bin -mindepth 3 -maxdepth 3 -type f -executable -exec install -Dm755 {} -t $out/bin \; + for width in 16 32 48 64 128 256; do + install -Dm644 assets/icon/$width.png $out/share/icons/hicolor/''${width}x''${width}/apps/xenia-canary.png + done + runHook postInstall + ''; + + passthru.updateScript = unstableGitUpdater { }; + + meta = { + description = "Xbox 360 Emulator Research Project"; + homepage = "https://github.com/xenia-canary/xenia-canary"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ tuxy ]; + mainProgram = "xenia_canary"; + platforms = [ "x86_64-linux" ]; + }; +}