mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-12 02:40:31 +08:00
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.
This commit is contained in:
@@ -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
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user