Author: sandervanderburg
Date: Thu Dec 23 17:35:15 2010
New Revision: 25263
URL: https://svn.nixos.org/websvn/nix/?rev=25263&sc=1

Log:
Updated service models using a pkgs parameter

Modified:
   
disnix/examples/HelloWorldExample/trunk/deployment/DistributedDeployment/services-composition.nix
   
disnix/examples/HelloWorldExample/trunk/deployment/DistributedDeployment/services-loadbalancing.nix
   
disnix/examples/HelloWorldExample/trunk/deployment/DistributedDeployment/services-lookup.nix
   
disnix/examples/HelloWorldExample/trunk/deployment/DistributedDeployment/services-simple.nix
   disnix/examples/HelloWorldExample/trunk/deployment/top-level/all-packages.nix

Modified: 
disnix/examples/HelloWorldExample/trunk/deployment/DistributedDeployment/services-composition.nix
==============================================================================
--- 
disnix/examples/HelloWorldExample/trunk/deployment/DistributedDeployment/services-composition.nix
   Thu Dec 23 17:35:09 2010        (r25262)
+++ 
disnix/examples/HelloWorldExample/trunk/deployment/DistributedDeployment/services-composition.nix
   Thu Dec 23 17:35:15 2010        (r25263)
@@ -6,17 +6,17 @@
  * which is used to decide how to activate and deactive services. 
  */
  
-{distribution, system}:
+{distribution, system, pkgs}:
 
 # Import the packages model of the Hello World example, which captures the 
intra-dependencies
-let pkgs = import ../top-level/all-packages.nix { 
-  inherit system;
+let customPkgs = import ../top-level/all-packages.nix { 
+  inherit system pkgs;
 };
 in
 rec {
   HelloWorldService = {
     name = "HelloWorldService";
-    pkg = pkgs.HelloWorldService;
+    pkg = customPkgs.HelloWorldService;
     dependsOn = {
       HelloService = HelloDBService; # Use database backend
     };
@@ -25,7 +25,7 @@
   
   HelloWorld = {
     name = "HelloWorld";
-    pkg = pkgs.HelloWorld;
+    pkg = customPkgs.HelloWorld;
     dependsOn = {
       inherit HelloWorldService;
     };
@@ -34,14 +34,14 @@
   
   HelloMySQLDB = {
     name = "HelloMySQLDB";
-    pkg = pkgs.HelloMySQLDB;
+    pkg = customPkgs.HelloMySQLDB;
     dependsOn = {};
     type = "mysql-database";
   };
 
   HelloDBService = {
     name = "HelloDBService";
-    pkg = pkgs.HelloDBServiceWrapper;
+    pkg = customPkgs.HelloDBServiceWrapper;
     dependsOn = {
       inherit HelloMySQLDB;
     };

Modified: 
disnix/examples/HelloWorldExample/trunk/deployment/DistributedDeployment/services-loadbalancing.nix
==============================================================================
--- 
disnix/examples/HelloWorldExample/trunk/deployment/DistributedDeployment/services-loadbalancing.nix
 Thu Dec 23 17:35:09 2010        (r25262)
+++ 
disnix/examples/HelloWorldExample/trunk/deployment/DistributedDeployment/services-loadbalancing.nix
 Thu Dec 23 17:35:15 2010        (r25263)
@@ -6,27 +6,27 @@
  * which is used to decide how to activate and deactive services. 
  */
  
-{distribution, system}:
+{distribution, system, pkgs}:
 
 # Import the packages model of the Hello World example, which captures the 
intra-dependencies
 let
-  pkgs = import ../top-level/all-packages.nix { 
+  customPkgs = import ../top-level/all-packages.nix { 
     inherit distribution; # Pass distribution model to the packages model, so 
that the lookup services can use them
     inherit services; # Pass services model to the packages model, so that the 
lookup services can use them
-    inherit system;
+    inherit system pkgs;
   };
   
   services = rec {
     HelloService = {
       name = "HelloService";
-      pkg = pkgs.HelloService;
+      pkg = customPkgs.HelloService;
       dependsOn = {};
       type = "tomcat-webapplication";
     };
     
     HelloWorldService2 = {
       name = "HelloWorldService2";
-      pkg = pkgs.HelloWorldService2;
+      pkg = customPkgs.HelloWorldService2;
       dependsOn = {
         LookupService = LookupService2; # Use the advanced load balancing 
lookup service
         inherit HelloService;
@@ -36,14 +36,14 @@
     
     LookupService2 = {
       name = "LookupService2";
-      pkg = pkgs.LookupService2;
+      pkg = customPkgs.LookupService2;
       dependsOn = {};
       type = "tomcat-webapplication";
     };
     
     HelloWorld2 = {
       name = "HelloWorld2";
-      pkg = pkgs.HelloWorld2;
+      pkg = customPkgs.HelloWorld2;
       dependsOn = {
         HelloWorldService = HelloWorldService2;
         LookupService = LookupService2; # Use the advanced load balancing 
lookup service

Modified: 
disnix/examples/HelloWorldExample/trunk/deployment/DistributedDeployment/services-lookup.nix
==============================================================================
--- 
disnix/examples/HelloWorldExample/trunk/deployment/DistributedDeployment/services-lookup.nix
        Thu Dec 23 17:35:09 2010        (r25262)
+++ 
disnix/examples/HelloWorldExample/trunk/deployment/DistributedDeployment/services-lookup.nix
        Thu Dec 23 17:35:15 2010        (r25263)
@@ -6,34 +6,34 @@
  * which is used to decide how to activate and deactive services. 
  */
  
-{distribution, system}:
+{distribution, system, pkgs}:
 
 # Import the packages model of the Hello World example, which captures the 
intra-dependencies
 let
-  pkgs = import ../top-level/all-packages.nix { 
+  customPkgs = import ../top-level/all-packages.nix { 
     inherit distribution; # Pass distribution model to the packages model, so 
that the lookup services can use them
     inherit services; # Pass services model to the packages model, so that the 
lookup services can use them
-    inherit system;
+    inherit system pkgs;
   };
   
   services = rec {
     HelloService = {
       name = "HelloService";
-      pkg = pkgs.HelloService;
+      pkg = customPkgs.HelloService;
       dependsOn = {};
       type = "tomcat-webapplication";
     };
   
     LookupService = {
       name = "LookupService";
-      pkg = pkgs.LookupService;
+      pkg = customPkgs.LookupService;
       dependsOn = {};
       type = "tomcat-webapplication";
     };
   
     HelloWorldService2 = {
       name = "HelloWorldService2";
-      pkg = pkgs.HelloWorldService2;
+      pkg = customPkgs.HelloWorldService2;
       dependsOn = {
         inherit LookupService;
         inherit HelloService;
@@ -43,7 +43,7 @@
   
     HelloWorld2 = {
       name = "HelloWorld2";
-      pkg = pkgs.HelloWorld2;
+      pkg = customPkgs.HelloWorld2;
       dependsOn = {
         HelloWorldService = HelloWorldService2;
         inherit LookupService;

Modified: 
disnix/examples/HelloWorldExample/trunk/deployment/DistributedDeployment/services-simple.nix
==============================================================================
--- 
disnix/examples/HelloWorldExample/trunk/deployment/DistributedDeployment/services-simple.nix
        Thu Dec 23 17:35:09 2010        (r25262)
+++ 
disnix/examples/HelloWorldExample/trunk/deployment/DistributedDeployment/services-simple.nix
        Thu Dec 23 17:35:15 2010        (r25263)
@@ -6,24 +6,24 @@
  * which is used to decide how to activate and deactive services. 
  */
  
-{distribution, system}:
+{distribution, system, pkgs}:
 
 # Import the packages model of the Hello World example, which captures the 
intra-dependencies
-let pkgs = import ../top-level/all-packages.nix { 
-  inherit system;
+let customPkgs = import ../top-level/all-packages.nix { 
+  inherit system pkgs;
 };
 in
 rec {
   HelloService = {
     name = "HelloService";
-    pkg = pkgs.HelloService;
+    pkg = customPkgs.HelloService;
     dependsOn = {};
     type = "tomcat-webapplication";
   };
   
   HelloWorldService = {
     name = "HelloWorldService";
-    pkg = pkgs.HelloWorldService;
+    pkg = customPkgs.HelloWorldService;
     dependsOn = {
       inherit HelloService;
     };
@@ -32,7 +32,7 @@
   
   HelloWorld = {
     name = "HelloWorld";
-    pkg = pkgs.HelloWorld;
+    pkg = customPkgs.HelloWorld;
     dependsOn = {
       inherit HelloWorldService;
     };

Modified: 
disnix/examples/HelloWorldExample/trunk/deployment/top-level/all-packages.nix
==============================================================================
--- 
disnix/examples/HelloWorldExample/trunk/deployment/top-level/all-packages.nix   
    Thu Dec 23 17:35:09 2010        (r25262)
+++ 
disnix/examples/HelloWorldExample/trunk/deployment/top-level/all-packages.nix   
    Thu Dec 23 17:35:15 2010        (r25263)
@@ -6,11 +6,9 @@
 { distribution ? null # Take distribution model as optional input argument, 
which is needed by the lookup services
 , services ? null # Take services model as optional input argument, which is 
needed by the lookup services
 , system ? builtins.currentSystem
+, pkgs
 }:
 
-# Imports the top-level expression from Nixpkgs
-let pkgs = import (builtins.getEnv "NIXPKGS_ALL") { inherit system; };
-in
 with pkgs;
 
 rec {
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to