mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-14 05:37:40 +03:00
su: Make the su package a provider of only the su binary
Additionally, provide su with the base system and remove su from the util-linux package as it is now provided by shadow.
This commit is contained in:
parent
4ab58240a9
commit
28ab3acb58
@ -46,6 +46,7 @@ let
|
|||||||
pkgs.rsync
|
pkgs.rsync
|
||||||
pkgs.strace
|
pkgs.strace
|
||||||
pkgs.sysvtools
|
pkgs.sysvtools
|
||||||
|
pkgs.su
|
||||||
pkgs.time
|
pkgs.time
|
||||||
pkgs.usbutils
|
pkgs.usbutils
|
||||||
pkgs.utillinux
|
pkgs.utillinux
|
||||||
|
@ -26,6 +26,8 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
patches = [ ./keep-path.patch dots_in_usernames ];
|
patches = [ ./keep-path.patch dots_in_usernames ];
|
||||||
|
|
||||||
|
outputs = [ "out" "su" ];
|
||||||
|
|
||||||
# Assume System V `setpgrp (void)', which is the default on GNU variants
|
# Assume System V `setpgrp (void)', which is the default on GNU variants
|
||||||
# (`AC_FUNC_SETPGRP' is not cross-compilation capable.)
|
# (`AC_FUNC_SETPGRP' is not cross-compilation capable.)
|
||||||
preConfigure = "export ac_cv_func_setpgrp_void=yes";
|
preConfigure = "export ac_cv_func_setpgrp_void=yes";
|
||||||
@ -35,10 +37,14 @@ stdenv.mkDerivation rec {
|
|||||||
substituteInPlace lib/nscd.c --replace /usr/sbin/nscd ${glibc}/sbin/nscd
|
substituteInPlace lib/nscd.c --replace /usr/sbin/nscd ${glibc}/sbin/nscd
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Don't install ‘groups’, since coreutils already provides it.
|
|
||||||
postInstall =
|
postInstall =
|
||||||
''
|
''
|
||||||
|
# Don't install ‘groups’, since coreutils already provides it.
|
||||||
rm $out/bin/groups $out/share/man/man1/groups.*
|
rm $out/bin/groups $out/share/man/man1/groups.*
|
||||||
|
|
||||||
|
# Move the su binary into the su package
|
||||||
|
mkdir -p $su/bin
|
||||||
|
mv $out/bin/su $su/bin
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -36,6 +36,10 @@ stdenv.mkDerivation rec {
|
|||||||
++ stdenv.lib.optional (ncurses != null) ncurses
|
++ stdenv.lib.optional (ncurses != null) ncurses
|
||||||
++ stdenv.lib.optional (perl != null) perl;
|
++ stdenv.lib.optional (perl != null) perl;
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
rm $out/bin/su # su should be supplied by the su package (shadow)
|
||||||
|
'';
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -1995,7 +1995,7 @@ let
|
|||||||
|
|
||||||
stunnel = callPackage ../tools/networking/stunnel { };
|
stunnel = callPackage ../tools/networking/stunnel { };
|
||||||
|
|
||||||
su = shadow;
|
su = shadow.su;
|
||||||
|
|
||||||
surfraw = callPackage ../tools/networking/surfraw { };
|
surfraw = callPackage ../tools/networking/surfraw { };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user