From 092107cdc11f83ab7f2cd2e7302142f661cea2d4 Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Fri, 10 Jan 2020 16:02:36 +0100 Subject: 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. --- lib/tests/modules/import-from-store.nix | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/lib/tests/modules/import-from-store.nix b/lib/tests/modules/import-from-store.nix index 64e7ec2e388..f5af22432ce 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 ]; } + -- cgit 1.4.1