1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
{ stdenv, libyaml }: stdenv.mkDerivation { name = "print-reexports"; src = stdenv.lib.sourceFilesBySuffices ./. [".c"]; buildInputs = [ libyaml ]; buildPhase = '' $CC -lyaml -o $name main.c ''; installPhase = '' mkdir -p $out/bin mv $name $out/bin ''; }