diff options
author | Adam Joseph <adam@westernsemico.com> | 2023-06-05 18:42:31 -0700 |
---|---|---|
committer | Cole Helbling <cole.e.helbling@outlook.com> | 2023-06-06 12:24:14 -0700 |
commit | e2c555799cc9c6037af7d29ee083dda3560c268d (patch) | |
tree | 8733157c949dcca06b245952c2d850188c1e566c /pkgs/tools/security/doas | |
parent | 92777e645e18834a538c89b9acecc5db4d7a92e5 (diff) |
doas: drop patch, use dontAddStaticConfigureFlags instead
The configure script that comes with doas does not understand `--disable-shared`, which nixpkgs sometimes adds to `configureFlags`. Previously, doas included a patch that would cause its configure script to ignore this flag instead of rejecting it. This commit drops that patch and instead uses `dontAddStaticConfigureFlags=false` (introduced in b0b5ef7286dca098f40f5075175105c3c0dfbe05) to prevent nixpkgs addingn `--disable-shared` to doas' configureFlags.
Diffstat (limited to 'pkgs/tools/security/doas')
-rw-r--r-- | pkgs/tools/security/doas/default.nix | 8 | ||||
-rw-r--r-- | pkgs/tools/security/doas/disable-shared.patch | 13 |
2 files changed, 3 insertions, 18 deletions
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 ;; |