lol

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.

+3 -9
+3 -9
lib/tests/modules/import-from-store.nix
··· 1 1 { lib, ... }: 2 - let 3 - drv = derivation { 4 - name = "derivation"; 5 - system = builtins.currentSystem; 6 - builder = "/bin/sh"; 7 - args = [ "-c" "echo {} > $out" ]; 8 - }; 9 - in { 2 + { 10 3 11 4 imports = [ 12 - "${drv}" 5 + "${builtins.toFile "drv" "{}"}" 13 6 ./declare-enable.nix 14 7 ./define-enable.nix 15 8 ]; 16 9 17 10 } 11 +