diff --git a/flake.nix b/flake.nix index acc08ad048d..7cdf3332830 100644 --- a/flake.nix +++ b/flake.nix @@ -405,6 +405,10 @@ final.buildPackages.nix ]; + mesonFlags = [ + "-Dnix_binary=${final.lib.getBin final.nix}/bin/nix" + ]; + strictDeps = true; buildInputs = [ @@ -419,6 +423,16 @@ installCheckPhase = '' export TEST_ROOT=$(mktemp -d) export NIX_STATE_DIR=$TEST_ROOT/var/nix + export NIX_STORE_DIR=$TEST_ROOT/store + export NIX_LOCALSTATE_DIR=$TEST_ROOT/var + export NIX_LOG_DIR=$TEST_ROOT/var/log/nix + + export NIX_CONF_DIR=$TEST_ROOT/etc + mkdir "$NIX_CONF_DIR" + cat > "$NIX_CONF_DIR"/nix.conf < $out" ]; + builder = "/bin/sh"; + system = builtins.currentSystem; + }) + """ + self.assertEqual(nix.eval(expression, vars=dict()), "test") + if __name__ == '__main__': unittest.main()