diff --git a/pkgs/tools/security/doas/default.nix b/pkgs/tools/security/doas/default.nix index ce360d8234559..ad08cd8056bed 100644 --- a/pkgs/tools/security/doas/default.nix +++ b/pkgs/tools/security/doas/default.nix @@ -32,13 +32,11 @@ stdenv.mkDerivation rec { # Allow doas to discover binaries in /run/current-system/sw/{s,}bin and # /run/wrappers/bin ./0001-add-NixOS-specific-dirs-to-safe-PATH.patch - - # Standard environment supports "dontDisableStatic" knob, but has no - # equivalent for "--disable-shared", so I have to patch "configure" - # script instead. - ./disable-shared.patch ]; + # ./configure script does not understand `--disable-shared` + dontAddStaticConfigureFlags = true; + postPatch = '' sed -i '/\(chown\|chmod\)/d' GNUmakefile '' + lib.optionalString (withPAM && stdenv.hostPlatform.isStatic) '' diff --git a/pkgs/tools/security/doas/disable-shared.patch b/pkgs/tools/security/doas/disable-shared.patch deleted file mode 100644 index 2f8869ee69884..0000000000000 --- a/pkgs/tools/security/doas/disable-shared.patch +++ /dev/null @@ -1,13 +0,0 @@ -Accept and ignore "--disable-shared" option passed by pkgsStatic.stdenv. -Without this patch, configure phase fails with "unknown option". - ---- a/configure 1970-01-01 00:00:00.000000000 -0500 -+++ b/configure 1970-01-01 00:00:00.000000000 -0500 -@@ -46,6 +46,7 @@ - opt=${x%%=*} - var=${x#*=} - case "$opt" in -+ --disable-shared) : ;; - --prefix) PREFIX=$var ;; - --exec-prefix) EPREFIX=$var ;; - --bindir) BINDIR=$var ;;