nixos/setuid-wrappers: Build with normal mkDerivation phases
This way the binary gets stripped & rpath-shrinked etc. as usual. We'd seem to get a runtime reference to gcc otherwise.
This commit is contained in:
parent
cd3088455d
commit
1ac0e05f69
1 changed files with 2 additions and 2 deletions
|
@ -8,12 +8,12 @@ let
|
|||
|
||||
setuidWrapper = pkgs.stdenv.mkDerivation {
|
||||
name = "setuid-wrapper";
|
||||
buildCommand = ''
|
||||
unpackPhase = "true";
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp ${./setuid-wrapper.c} setuid-wrapper.c
|
||||
gcc -Wall -O2 -DWRAPPER_DIR=\"${wrapperDir}\" \
|
||||
setuid-wrapper.c -o $out/bin/setuid-wrapper
|
||||
strip -S $out/bin/setuid-wrapper
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue