Add optional Monotone support for ikiwiki; made git support optional.

svn path=/nixpkgs/trunk/; revision=17842
This commit is contained in:
Michael Raskin 2009-10-16 06:39:29 +00:00
parent 22644a3fb6
commit 206a941597
2 changed files with 21 additions and 9 deletions

View File

@ -1,7 +1,9 @@
{stdenv, fetchurl, perl, gettext, makeWrapper,
TextMarkdown, URI, HTMLParser, HTMLScrubber, HTMLTemplate, TimeDate,
CGISession, CGIFormBuilder, DBFile,
git}:
{stdenv, fetchurl, perl, gettext, makeWrapper, lib,
TextMarkdown, URI, HTMLParser, HTMLScrubber, HTMLTemplate, TimeDate,
CGISession, CGIFormBuilder, DBFile
, git ? null
, monotone ? null
}:
stdenv.mkDerivation {
name = "ikiwiki_3.20091009";
@ -12,7 +14,10 @@ stdenv.mkDerivation {
};
buildInputs = [ perl TextMarkdown URI HTMLParser HTMLScrubber HTMLTemplate
TimeDate gettext makeWrapper DBFile CGISession CGIFormBuilder ];
TimeDate gettext makeWrapper DBFile CGISession CGIFormBuilder ]
++
(lib.optional (monotone != null) monotone)
;
patchPhase = ''
sed -i s@/usr/bin/perl@${perl}/bin/perl@ pm_filter mdwn2man
@ -27,7 +32,12 @@ stdenv.mkDerivation {
postInstall = ''
for a in $out/bin/*; do
wrapProgram $a --suffix PERL5LIB : $PERL5LIB --prefix PATH : ${perl}/bin:$out/bin:${git}/bin
wrapProgram $a --suffix PERL5LIB : $PERL5LIB --prefix PATH : ${perl}/bin:$out/bin \
${lib.optionalString (git != null)
''--prefix PATH : ${git}/bin \''}
${lib.optionalString (monotone != null)
''--prefix PATH : ${monotone}/bin \''}
done
'';

View File

@ -7128,10 +7128,12 @@ let
inherit (xlibs) libX11 libXft libXext libXinerama libXrandr;
};
ikiwiki = import ../applications/misc/ikiwiki {
inherit fetchurl stdenv perl gettext makeWrapper;
inherit (perlPackages) TextMarkdown URI HTMLParser HTMLScrubber HTMLTemplate TimeDate CGISession DBFile CGIFormBuilder;
ikiwiki = makeOverridable (import ../applications/misc/ikiwiki) {
inherit fetchurl stdenv perl gettext makeWrapper lib;
inherit (perlPackages) TextMarkdown URI HTMLParser HTMLScrubber
HTMLTemplate TimeDate CGISession DBFile CGIFormBuilder;
inherit git; # The RCS should be optional
monotone = null;
};
imagemagick = import ../applications/graphics/ImageMagick {