{ stdenv }: let source = "src/hello.c"; exec = "hello"; in stdenv.mkDerivation { pname = "hello"; version = "0.1"; src = ./.; buildPhase = '' runHook preBuild gcc ${source} -o ${exec}.bin runHook postBuild ''; installPhase = '' runHook preInstall mkdir -p $out/bin install ${exec}.bin $out/bin/${exec} runHook postInstall ''; }