summaryrefslogtreecommitdiffstats
path: root/lib/tests
diff options
context:
space:
mode:
authorSilvan Mosberger <contact@infinisil.com>2020-01-10 16:02:36 +0100
committerSilvan Mosberger <contact@infinisil.com>2020-01-10 16:02:36 +0100
commit092107cdc11f83ab7f2cd2e7302142f661cea2d4 (patch)
tree35b8683027b4c8489ec5c3edaf7ee30d0cbcbdea /lib/tests
parentddc83e68ccf088a99d1ac4f07feee6fdcd593418 (diff)
lib/tests: Fix module tests
Fix the broken test in https://github.com/NixOS/nixpkgs/pull/77416 Apparently hydra uses `nix-build lib/tests/release.nix` to run all tests, where IFD isn't allowed. Fortunately we can get around this with builtins.toFile, which doesn't require IFD, but still can test the properties we want.
Diffstat (limited to 'lib/tests')
-rw-r--r--lib/tests/modules/import-from-store.nix12
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/tests/modules/import-from-store.nix b/lib/tests/modules/import-from-store.nix
index 64e7ec2e388c..f5af22432ce1 100644
--- a/lib/tests/modules/import-from-store.nix
+++ b/lib/tests/modules/import-from-store.nix
@@ -1,17 +1,11 @@
{ lib, ... }:
-let
- drv = derivation {
- name = "derivation";
- system = builtins.currentSystem;
- builder = "/bin/sh";
- args = [ "-c" "echo {} > $out" ];
- };
-in {
+{
imports = [
- "${drv}"
+ "${builtins.toFile "drv" "{}"}"
./declare-enable.nix
./define-enable.nix
];
}
+