From 752a5ad36daeb57582ead737cd5267416bddabdd Mon Sep 17 00:00:00 2001 From: Zhong Jianxin Date: Sat, 13 Dec 2025 00:32:52 +0800 Subject: [PATCH] treewide: libressl.nc -> netcat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Quote from NixOS 25.11 release notes: > `meta.mainProgram` is now used to determine the `NIX_MAIN_PROGRAM` environment variable. This means that changing it can now lead to a package rebuild. And `netcat` is: ``` netcat = libressl.nc.overrideAttrs (old: { meta = old.meta // { description = "Utility which reads and writes data across network connections — LibreSSL implementation"; mainProgram = "nc"; }; }); ``` `netcat` and `libressl.nc` are 2 different derivations now, use just one of them in nixpkgs for consistency. This also fixes lots of warnings if `virtualisation.libvirtd.enable = true`: ``` pkgs.buildEnv warning: colliding subpath (ignored): `/nix/store/1mcayh9rmxmjcbmm6swkkyr59rjl66vc-libressl-4.2.1-nc/bin/nc' and `/nix/store/x1vmfpisbd494yykmvjkhvh3dplsnjhg-libressl-4.2.1-nc/bin/nc' ... ``` --- nixos/modules/virtualisation/libvirtd.nix | 2 +- nixos/tests/ceph-multi-node.nix | 2 +- nixos/tests/fail2ban.nix | 2 +- nixos/tests/jool.nix | 2 +- nixos/tests/samba-wsdd.nix | 2 +- pkgs/by-name/hy/hydra/package.nix | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/nixos/modules/virtualisation/libvirtd.nix b/nixos/modules/virtualisation/libvirtd.nix index dc1ec27c967f..9029a0e8e0cb 100644 --- a/nixos/modules/virtualisation/libvirtd.nix +++ b/nixos/modules/virtualisation/libvirtd.nix @@ -421,7 +421,7 @@ in # this file is expected in /etc/qemu and not sysconfdir (/var/lib) etc."qemu/bridge.conf".text = lib.concatMapStringsSep "\n" (e: "allow ${e}") cfg.allowedBridges; systemPackages = with pkgs; [ - libressl.nc + netcat config.networking.firewall.package cfg.package cfg.qemu.package diff --git a/nixos/tests/ceph-multi-node.nix b/nixos/tests/ceph-multi-node.nix index 1c1077595d2a..7aaf31c14d3e 100644 --- a/nixos/tests/ceph-multi-node.nix +++ b/nixos/tests/ceph-multi-node.nix @@ -53,7 +53,7 @@ let sudo ceph xfsprogs - libressl.nc + netcat ]; boot.kernelModules = [ "xfs" ]; diff --git a/nixos/tests/fail2ban.nix b/nixos/tests/fail2ban.nix index 43acfa54cf7a..97e5b4edaeab 100644 --- a/nixos/tests/fail2ban.nix +++ b/nixos/tests/fail2ban.nix @@ -14,7 +14,7 @@ nodes.client = _: { environment.systemPackages = [ pkgs.sshpass - pkgs.libressl.nc + pkgs.netcat ]; }; diff --git a/nixos/tests/jool.nix b/nixos/tests/jool.nix index 3bbfc9469011..76076cba6a63 100644 --- a/nixos/tests/jool.nix +++ b/nixos/tests/jool.nix @@ -24,7 +24,7 @@ let printf 'HTTP/1.0 200 OK\n' printf 'Content-Length: ${toString (1 + builtins.stringLength msg)}\n' printf '\n${msg}\n\n' - } | ${pkgs.libressl.nc}/bin/nc -${toString ip}nvl 80 + } | ${pkgs.netcat}/bin/nc -${toString ip}nvl 80 done ''; }; diff --git a/nixos/tests/samba-wsdd.nix b/nixos/tests/samba-wsdd.nix index 07ad7d68f664..3277a8b0e6c8 100644 --- a/nixos/tests/samba-wsdd.nix +++ b/nixos/tests/samba-wsdd.nix @@ -40,7 +40,7 @@ server_wsdd.wait_for_unit("samba-wsdd") client_wsdd.wait_until_succeeds( - "echo list | ${pkgs.libressl.nc}/bin/nc -N -U /run/wsdd/wsdd.sock | grep -i SERVER-WSDD" + "echo list | ${pkgs.netcat}/bin/nc -N -U /run/wsdd/wsdd.sock | grep -i SERVER-WSDD" ) ''; } diff --git a/pkgs/by-name/hy/hydra/package.nix b/pkgs/by-name/hy/hydra/package.nix index cb9513095d83..cbeb09787e27 100644 --- a/pkgs/by-name/hy/hydra/package.nix +++ b/pkgs/by-name/hy/hydra/package.nix @@ -38,7 +38,7 @@ mdbook, foreman, python3, - libressl, + netcat, cacert, glibcLocales, meson, @@ -208,7 +208,7 @@ stdenv.mkDerivation (finalAttrs: { foreman glibcLocales python3 - libressl.nc + netcat nix-eval-jobs openldap postgresql