diff options
author | Silvan Mosberger <contact@infinisil.com> | 2020-01-10 16:02:36 +0100 |
---|---|---|
committer | Silvan Mosberger <contact@infinisil.com> | 2020-01-10 16:02:36 +0100 |
commit | 092107cdc11f83ab7f2cd2e7302142f661cea2d4 (patch) | |
tree | 35b8683027b4c8489ec5c3edaf7ee30d0cbcbdea /lib/tests/modules | |
parent | ddc83e68ccf088a99d1ac4f07feee6fdcd593418 (diff) | |
download | nixlib-092107cdc11f83ab7f2cd2e7302142f661cea2d4.tar nixlib-092107cdc11f83ab7f2cd2e7302142f661cea2d4.tar.gz nixlib-092107cdc11f83ab7f2cd2e7302142f661cea2d4.tar.bz2 nixlib-092107cdc11f83ab7f2cd2e7302142f661cea2d4.tar.lz nixlib-092107cdc11f83ab7f2cd2e7302142f661cea2d4.tar.xz nixlib-092107cdc11f83ab7f2cd2e7302142f661cea2d4.tar.zst nixlib-092107cdc11f83ab7f2cd2e7302142f661cea2d4.zip |
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/modules')
-rw-r--r-- | lib/tests/modules/import-from-store.nix | 12 |
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 ]; } + |