mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
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 {
|
setuidWrapper = pkgs.stdenv.mkDerivation {
|
||||||
name = "setuid-wrapper";
|
name = "setuid-wrapper";
|
||||||
buildCommand = ''
|
unpackPhase = "true";
|
||||||
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
cp ${./setuid-wrapper.c} setuid-wrapper.c
|
cp ${./setuid-wrapper.c} setuid-wrapper.c
|
||||||
gcc -Wall -O2 -DWRAPPER_DIR=\"${wrapperDir}\" \
|
gcc -Wall -O2 -DWRAPPER_DIR=\"${wrapperDir}\" \
|
||||||
setuid-wrapper.c -o $out/bin/setuid-wrapper
|
setuid-wrapper.c -o $out/bin/setuid-wrapper
|
||||||
strip -S $out/bin/setuid-wrapper
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue