Skip to content

Commit

Permalink
doas: drop patch, use dontAddStaticConfigureFlags instead
Browse files Browse the repository at this point in the history
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
b0b5ef7) to prevent nixpkgs addingn
`--disable-shared` to doas' configureFlags.
  • Loading branch information
Adam Joseph authored and cole-h committed Jun 6, 2023
1 parent 92777e6 commit e2c5557
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
8 changes: 3 additions & 5 deletions pkgs/tools/security/doas/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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) ''
Expand Down
13 changes: 0 additions & 13 deletions pkgs/tools/security/doas/disable-shared.patch

This file was deleted.

0 comments on commit e2c5557

Please sign in to comment.