From 5c888119549f641974799e82ecfe2424ffa7271c Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 5 Aug 2003 14:32:49 +0000 Subject: [PATCH] * Make system.fix a function of the high-level variation points in the system. svn path=/nixpkgs/trunk/; revision=252 --- pkgs/system/populate-linkdirs.pl | 3 +- pkgs/system/system-template-everything.fix | 9 +++++ pkgs/system/system-template-server.fix | 9 +++++ pkgs/system/system.fix | 44 ++++++++++++---------- 4 files changed, 44 insertions(+), 21 deletions(-) create mode 100644 pkgs/system/system-template-everything.fix create mode 100644 pkgs/system/system-template-server.fix diff --git a/pkgs/system/populate-linkdirs.pl b/pkgs/system/populate-linkdirs.pl index 23dedfa92481..6462c543e07a 100755 --- a/pkgs/system/populate-linkdirs.pl +++ b/pkgs/system/populate-linkdirs.pl @@ -63,9 +63,10 @@ sub addPkg { foreach my $name (keys %ENV) { - next unless ($name =~ /^act.*$/); + next unless $name =~ /^act.*$/; my $pkgdir = $ENV{$name}; + next unless $pkgdir =~ /^\//; addPkg($pkgdir); } diff --git a/pkgs/system/system-template-everything.fix b/pkgs/system/system-template-everything.fix new file mode 100644 index 000000000000..8b983630c997 --- /dev/null +++ b/pkgs/system/system-template-everything.fix @@ -0,0 +1,9 @@ +Call(IncludeFix("system/system.fix"), + [ ("subversion", True) + , ("strategoxt", True) + , ("pan", True) + , ("mplayer", True) + , ("sylpheed", True) + , ("libxslt", True) + , ("docbook", True) + ]) diff --git a/pkgs/system/system-template-server.fix b/pkgs/system/system-template-server.fix new file mode 100644 index 000000000000..f96d5f6d73cf --- /dev/null +++ b/pkgs/system/system-template-server.fix @@ -0,0 +1,9 @@ +Call(IncludeFix("system/system.fix"), + [ ("subversion", True) + , ("strategoxt", False) + , ("pan", False) + , ("mplayer", False) + , ("sylpheed", False) + , ("libxslt", False) + , ("docbook", False) + ]) diff --git a/pkgs/system/system.fix b/pkgs/system/system.fix index 9376af786f56..4ad1d7b3f754 100644 --- a/pkgs/system/system.fix +++ b/pkgs/system/system.fix @@ -1,22 +1,26 @@ -Package( - [ ("name", "system") - , ("build", Relative("system/populate-linkdirs.pl")) +Function(["subversion", "strategoxt", "pan", "mplayer", "sylpheed", "libxslt", "docbook"], + Package( + [ ("name", "system") + , ("build", Relative("system/populate-linkdirs.pl")) - , ("actSubversion", - Call(IncludeFix("subversion/subversion.fix"), - [ ("localServer", True) - , ("httpsClient", True) - , ("httpServer", True) - , ("pythonBindings", True) - ])) + , ("actSubversion", + If(Var("subversion"), + Call(IncludeFix("subversion/subversion.fix"), + [ ("localServer", True) + , ("httpsClient", True) + , ("httpServer", True) + , ("pythonBindings", True) + ]), + "")) - , ("actStrategoXT", IncludeFix("strategoxt/strategoxt.fix")) - , ("actATerm", IncludeFix("aterm/aterm.fix")) - , ("actPan", IncludeFix("pan/pan.fix")) - , ("actMPlayer", IncludeFix("MPlayer/MPlayer.fix")) - , ("actSylpheed", IncludeFix("sylpheed/sylpheed.fix")) - , ("actXslt", IncludeFix("libxslt/libxslt.fix")) - , ("actDocbookXml", IncludeFix("docbook-xml/docbook-xml.fix")) - , ("actDocbookXsl", IncludeFix("docbook-xsl/docbook-xsl.fix")) - ] -) + , ("actStrategoXT", If(Var("strategoxt"), IncludeFix("strategoxt/strategoxt.fix"), "")) + , ("actATerm", If(Var("strategoxt"), IncludeFix("aterm/aterm.fix"), "")) + , ("actPan", If(Var("pan"), IncludeFix("pan/pan.fix"), "")) + , ("actMPlayer", If(Var("mplayer"), IncludeFix("MPlayer/MPlayer.fix"), "")) + , ("actSylpheed", If(Var("sylpheed"), IncludeFix("sylpheed/sylpheed.fix"), "")) + , ("actLibXslt", If(Var("libxslt"), IncludeFix("libxslt/libxslt.fix"), "")) + , ("actDocbookXml", If(Var("docbook"), IncludeFix("docbook-xml/docbook-xml.fix"), "")) + , ("actDocbookXsl", If(Var("docbook"), IncludeFix("docbook-xsl/docbook-xsl.fix"), "")) + ] + ) +) \ No newline at end of file