Browse Source

* Build the Subversion test in Hydra (as a regression test for NixOS).

* Pass the location to the services tree around instead of requiring
  it to be in ../services.

svn path=/nixos/trunk/; revision=16901
nsd-state-dir
Eelco Dolstra 13 years ago
parent
commit
9359bf11d5
  1. 8
      lib/build-vms.nix
  2. 4
      lib/eval-config.nix
  3. 4
      modules/services/web-servers/apache-httpd/default.nix
  4. 12
      modules/services/web-servers/apache-httpd/subversion.nix
  5. 2
      modules/services/web-servers/apache-httpd/tomcat-connector.nix
  6. 2
      modules/services/web-servers/apache-httpd/trac.nix
  7. 2
      modules/services/web-servers/apache-httpd/twiki.nix
  8. 2
      modules/services/web-servers/apache-httpd/zabbix.nix
  9. 8
      release.nix
  10. 7
      tests/subversion.nix

8
lib/build-vms.nix

@ -1,5 +1,6 @@
{ nixos ? /etc/nixos/nixos
{ nixos ? ./..
, nixpkgs ? /etc/nixos/nixpkgs
, services ? /etc/nixos/services
}:
let pkgs = import nixpkgs { config = {}; }; in
@ -54,7 +55,7 @@ rec {
nodes: configuration:
import "${nixos}/lib/eval-config.nix" {
inherit nixpkgs;
inherit nixpkgs services;
modules = [ configuration ];
extraArgs = { inherit nodes; };
/* !!! bug in the module/option handling: this ignores the
@ -175,6 +176,9 @@ rec {
echo "making report..."
ensureDir $out/coverage
${pkgs.lcov}/bin/genhtml --show-details $TMPDIR/out.info -o $out/coverage
ensureDir $out/nix-support
echo "report coverage $out/coverage" >> $out/nix-support/hydra-build-products
''; # */
}

4
lib/eval-config.nix

@ -4,6 +4,7 @@
{ system ? builtins.currentSystem
, nixpkgs ? import ./from-env.nix "NIXPKGS" /etc/nixos/nixpkgs
, services ? /etc/nixos/services
, pkgs ? null
, baseModules ? import ../modules/module-list.nix
, extraArgs ? {}
@ -28,6 +29,7 @@ rec {
extraArgs = extraArgs_ // {
inherit pkgs optionDeclarations;
modulesPath = ../modules;
servicesPath = services;
};
# Import Nixpkgs, allowing the NixOS option nixpkgs.config to
@ -46,7 +48,7 @@ rec {
inherit system;
config =
(import ./eval-config.nix {
inherit system nixpkgs extraArgs modules;
inherit system nixpkgs services extraArgs modules;
# For efficiency, leave out most NixOS modules; they don't
# define nixpkgs.config, so it's pointless to evaluate them.
baseModules = [ ../modules/misc/nixpkgs.nix ];

4
modules/services/web-servers/apache-httpd/default.nix

@ -1,4 +1,4 @@
{pkgs, config, ...}:
{ config, pkgs, servicesPath, ... }:
with pkgs.lib;
@ -70,7 +70,7 @@ let
startupScript = "";
options = {};
};
res = defaults // svcFunction {inherit config pkgs serverInfo;};
res = defaults // svcFunction {inherit config pkgs serverInfo servicesPath;};
in res;
in map f defs;

12
modules/services/web-servers/apache-httpd/subversion.nix

@ -1,4 +1,4 @@
{config, pkgs, serverInfo}:
{ config, pkgs, serverInfo, servicesPath, ... }:
let
@ -31,7 +31,7 @@ let
# Build the maintenance scripts and commit hooks.
scripts = substituteInAll {
name = "svn-server-scripts";
src = pkgs.lib.cleanSource ../../../../services/subversion/src/scripts;
src = pkgs.lib.cleanSource "${servicesPath}/subversion/src/scripts";
# The variables to substitute:
@ -75,7 +75,7 @@ let
# Build our custom authentication modules.
authModules = import ../../../../services/subversion/src/auth {
authModules = import "${servicesPath}/subversion/src/auth" {
inherit (pkgs) stdenv apacheHttpd;
};
@ -115,7 +115,7 @@ let
# Build ViewVC.
viewvc = import ../../../../services/subversion/src/viewvc {
viewvc = import "${servicesPath}/subversion/src/viewvc" {
inherit (pkgs) fetchurl stdenv python enscript;
inherit urlPrefix reposDir adminAddr subversion;
};
@ -149,7 +149,7 @@ let
# Build WebSVN.
websvn = import ../../../../services/subversion/src/websvn {
websvn = import "${servicesPath}/subversion/src/websvn" {
inherit (pkgs) fetchurl stdenv writeText enscript gnused diffutils;
inherit urlPrefix reposDir subversion;
cacheDir = tmpDir;
@ -232,7 +232,7 @@ let
staticFiles = substituteInSome {
name = "svn-static-files";
src = pkgs.lib.cleanSource ../../../../services/subversion/root;
src = pkgs.lib.cleanSource "${servicesPath}/subversion/root";
files = ["xsl/svnindex.xsl"];
inherit urlPrefix;
};

2
modules/services/web-servers/apache-httpd/tomcat-connector.nix

@ -1,4 +1,4 @@
{config, pkgs, serverInfo}:
{ config, pkgs, serverInfo, ... }:
let
workersProperties = pkgs.writeText "workers.properties" ''

2
modules/services/web-servers/apache-httpd/trac.nix

@ -1,4 +1,4 @@
{config, pkgs, serverInfo}:
{ config, pkgs, serverInfo, ... }:
let
inherit (pkgs.lib) mkOption;

2
modules/services/web-servers/apache-httpd/twiki.nix

@ -1,4 +1,4 @@
{config, pkgs, serverInfo}:
{ config, pkgs, serverInfo, ... }:
let

2
modules/services/web-servers/apache-httpd/zabbix.nix

@ -1,4 +1,4 @@
{config, pkgs, serverInfo}:
{ config, pkgs, serverInfo, ... }:
let

8
release.nix

@ -96,6 +96,14 @@ let
module = ./modules/installer/cd-dvd/installation-cd-graphical.nix;
description = "graphical";
};
tests.subversion =
{ services ? ../services }:
(import ./tests/subversion.nix {
inherit nixpkgs services;
}).report;
};

7
tests/subversion.nix

@ -1,4 +1,9 @@
with import ../lib/build-vms.nix {};
{ nixos ? ./..
, nixpkgs ? /etc/nixos/nixpkgs
, services ? /etc/nixos/services
}:
with import ../lib/build-vms.nix { inherit nixos nixpkgs services; };
let

Loading…
Cancel
Save