From 6c168ae5b5fbe319d189656681a65d0535208307 Mon Sep 17 00:00:00 2001 From: David Wronek Date: Sat, 21 Feb 2026 12:49:27 +0100 Subject: [PATCH 1/2] popt: hardcode sysconfdir to /etc While stracing a program that uses popt for parsing command line options, we can observe that it tries to look for the configuration file in /nix/store/../etc instead of /etc: openat(AT_FDCWD, "/nix/store/yywbzjm7yy89y5z23jazngbv4585rqbr-popt-1.19/etc/popt", O_RDONLY) = -1 ENOENT (No such file or directory) This is obviously wrong, as it would hinder a user from modifying the system-wide popt configuration (e.g. using environment.etc on a NixOS system). Let's fix this issue by explicitly setting --sysconfdir to /etc. Signed-off-by: David Wronek --- pkgs/by-name/po/popt/package.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/by-name/po/popt/package.nix b/pkgs/by-name/po/popt/package.nix index 4e795937e102..8647f1e2d94d 100644 --- a/pkgs/by-name/po/popt/package.nix +++ b/pkgs/by-name/po/popt/package.nix @@ -41,6 +41,11 @@ stdenv.mkDerivation (finalAttrs: { }) ]; + configureFlags = [ + # Otherwise, it configures sysconfdir as $out/etc. + "--sysconfdir=/etc" + ]; + doCheck = false; # fails meta = { From 48982549791e5e7fb31a32d0a39fbf3ed01f1a93 Mon Sep 17 00:00:00 2001 From: David Wronek Date: Sat, 21 Feb 2026 13:26:06 +0100 Subject: [PATCH 2/2] popt: split outputs Signed-off-by: David Wronek --- pkgs/by-name/po/popt/package.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/by-name/po/popt/package.nix b/pkgs/by-name/po/popt/package.nix index 8647f1e2d94d..b7e84260c1b2 100644 --- a/pkgs/by-name/po/popt/package.nix +++ b/pkgs/by-name/po/popt/package.nix @@ -41,6 +41,12 @@ stdenv.mkDerivation (finalAttrs: { }) ]; + outputs = [ + "out" + "dev" + "man" + ]; + configureFlags = [ # Otherwise, it configures sysconfdir as $out/etc. "--sysconfdir=/etc"