mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 16:33:15 +00:00
Allow to keep visudo. Useful for checking sudoers syntax
This commit is contained in:
parent
74bc6252a3
commit
4b144de367
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, coreutils, pam, groff }:
|
||||
{ stdenv, fetchurl, coreutils, pam, groff, keepVisudo ? false }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "sudo-1.8.9p4";
|
||||
@ -32,8 +32,10 @@ stdenv.mkDerivation rec {
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postInstall = ''
|
||||
# ‘visudo’ does not make sense on NixOS.
|
||||
rm $out/sbin/visudo $out/share/man/man8/visudo.8
|
||||
# ‘visudo’ does not make sense on NixOS - except for checking sudoers
|
||||
# file syntax
|
||||
rm ${if keepVisudo then "" else "$out/sbin/visudo"} \
|
||||
$out/share/man/man8/visudo.8
|
||||
|
||||
rm $out/share/doc/sudo/ChangeLog
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user