source $stdenv/setup preBuild() { cd src } preInstall() { mkdir -p $out/bin } postInstall() { # Install the "prefabs". mkdir -p $out/share/ploticus/prefabs && \ cd .. && \ cp -rv prefabs/* $out/share/ploticus/prefabs # Create a wrapper that knows where to find them. Debian's package # does something similar by patching directly the C file that looks # for `$PLOTICUS_PREFABS'. cat > $out/bin/ploticus <