* makeWrapper: option --run <CMD> to run a command from the wrapper.

This is so that the Unison wrapper can be generated with
  makeWrapper.
* Use makeWrapper as a buildInput everywhere.
* Updated BitTorrent, cvs2svn.

svn path=/nixpkgs/trunk/; revision=10213
This commit is contained in:
Eelco Dolstra
2008-01-18 11:28:41 +00:00
parent b59d32be03
commit a5e0e39cdb
15 changed files with 71 additions and 88 deletions
@@ -7,21 +7,15 @@ stdenv.mkDerivation {
sha256 = "808400a933aeb67654edc770822cd186d1b2adc92e7cb5836996c71c69ffe656";
};
buildInputs = [ocaml];
buildInputs = [ocaml makeWrapper];
addInputsHook = "source $makeWrapper";
preBuild = "sed -i \"s|\\(OCAMLOPT=.*\\)$|\\1 -I $lablgtk/lib/ocaml/lablgtk2|\" Makefile.OCaml";
preBuild = "sed -i \"s|\\(OCAMLOPT=.*\\)$|\\1 -I ${lablgtk}/lib/ocaml/lablgtk2|\" Makefile.OCaml";
makeFlags = "UISTYLE=gtk2 INSTALLDIR=$(out)/bin/";
preInstall = "ensureDir $out/bin";
postInstall = [
"for i in $(cd $out/bin && ls); do"
" mv $out/bin/$i $out/bin/.orig-$i;"
" echo \"#! $SHELL\" > $out/bin/$i;"
" echo \"$xset/bin/xset q | grep -q \\\"$fontschumachermisc\\\" || $xset/bin/xset +fp \\\"$fontschumachermisc/lib/X11/fonts/misc\\\"\" >> $out/bin/$i;"
" echo \"exec \\\"$out/bin/.orig-$i\\\" \\\"\\\$@\\\"\" >> $out/bin/$i;"
" chmod +x $out/bin/$i;"
"done"
];
inherit lablgtk fontschumachermisc xset makeWrapper;
postInstall = ''
for i in $(cd $out/bin && ls); do
wrapProgram $out/bin/$i \
--run "${xset}/bin/xset q | grep -q \"${fontschumachermisc}\" || ${xset}/bin/xset +fp \"${fontschumachermisc}/lib/X11/fonts/misc\""
done
'';
}