[Nix-dev] nixos/tests

Marc Weber marco-oweber at gmx.de
Wed Nov 4 01:48:20 CET 2009


Hi,

I'm about playing with those automatic tests.

However I dislike the default repository locations /etc/nixos/*.
I'd prefer using relative paths because they will still work when
running tests from /etc/nixos/nixos but they do work as well when
putting the nix* repositories into a directory being different from
/etc/nixos.

How do you think about this?

I think it's nicer if things just work without having to pass different
paths.

Will I cause any breakage when committing this patch?

Marc Weber

== PATCH =========


diff --git a/lib/build-vms.nix b/lib/build-vms.nix
index e8b21fb..2989708 100644
--- a/lib/build-vms.nix
+++ b/lib/build-vms.nix
@@ -1,6 +1,6 @@
 { nixos ? ./..
-, nixpkgs ? /etc/nixos/nixpkgs
-, services ? /etc/nixos/services
+, nixpkgs ? ../../nixpkgs
+, services ? ../../nixos/services
 , system ? builtins.currentSystem
 }:
 
diff --git a/lib/eval-config.nix b/lib/eval-config.nix
index 10efb8a..f1ff50b 100644
--- a/lib/eval-config.nix
+++ b/lib/eval-config.nix
@@ -4,7 +4,7 @@
 
 { system ? builtins.currentSystem
 , nixpkgs ? import ./from-env.nix "NIXPKGS" /etc/nixos/nixpkgs
-, services ? /etc/nixos/services
+, services ? ../../services
 , pkgs ? null
 , baseModules ? import ../modules/module-list.nix
 , extraArgs ? {}
diff --git a/tests/kde4.nix b/tests/kde4.nix
index 0cff2d4..3dc5e35 100644
--- a/tests/kde4.nix
+++ b/tests/kde4.nix
@@ -1,6 +1,6 @@
 { nixos ? ./..
-, nixpkgs ? /etc/nixos/nixpkgs
-, services ? /etc/nixos/services
+, nixpkgs ? ../../nixpkgs
+, services ? ../../nixos/services
 , system ? builtins.currentSystem
 }:
 



More information about the nix-dev mailing list