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:
Tuomas Tynkkynen 2015-08-23 13:36:47 +03:00 committed by Vladimír Čunát
parent cd3088455d
commit 1ac0e05f69

View file

@ -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
'';
};