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 | |
parent | ddc83e68ccf088a99d1ac4f07feee6fdcd593418 (diff) | |
download | nixpkgs-092107cdc11f83ab7f2cd2e7302142f661cea2d4.tar nixpkgs-092107cdc11f83ab7f2cd2e7302142f661cea2d4.tar.gz nixpkgs-092107cdc11f83ab7f2cd2e7302142f661cea2d4.tar.bz2 nixpkgs-092107cdc11f83ab7f2cd2e7302142f661cea2d4.tar.lz nixpkgs-092107cdc11f83ab7f2cd2e7302142f661cea2d4.tar.xz nixpkgs-092107cdc11f83ab7f2cd2e7302142f661cea2d4.tar.zst nixpkgs-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.
-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 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 ]; } + |