nixpkgs/helpers/setuid/default.nix

11 lines
259 B
Nix
Raw Normal View History

{stdenv, wrapperDir}:
stdenv.mkDerivation {
name = "setuid-wrapper";
buildCommand = ''
ensureDir $out/bin
gcc -Wall -O2 -DWRAPPER_DIR=\"${wrapperDir}\" ${./setuid-wrapper.c} -o $out/bin/setuid-wrapper
strip -s $out/bin/setuid-wrapper
'';
}