about summary refs log tree commit diff
path: root/third_party/nix/tests
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/tests')
-rw-r--r--third_party/nix/tests/plugins.sh7
-rw-r--r--third_party/nix/tests/plugins/plugintest.cc23
2 files changed, 0 insertions, 30 deletions
diff --git a/third_party/nix/tests/plugins.sh b/third_party/nix/tests/plugins.sh
deleted file mode 100644
index 4b1baeddce32..000000000000
--- a/third_party/nix/tests/plugins.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-source common.sh
-
-set -o pipefail
-
-res=$(nix eval '(builtins.anotherNull)' --option setting-set true --option plugin-files $PWD/plugins/libplugintest*)
-
-[ "$res"x = "nullx" ]
diff --git a/third_party/nix/tests/plugins/plugintest.cc b/third_party/nix/tests/plugins/plugintest.cc
deleted file mode 100644
index 353166cffe3b..000000000000
--- a/third_party/nix/tests/plugins/plugintest.cc
+++ /dev/null
@@ -1,23 +0,0 @@
-#include "libutil/config.hh"
-#include "primops.hh"
-
-using namespace nix;
-
-struct MySettings : Config {
-  Setting<bool> settingSet{this, false, "setting-set",
-                           "Whether the plugin-defined setting was set"};
-};
-
-MySettings mySettings;
-
-static GlobalConfig::Register rs(&mySettings);
-
-static void prim_anotherNull(EvalState& state, const Pos& pos, Value** args,
-                             Value& v) {
-  if (mySettings.settingSet)
-    mkNull(v);
-  else
-    mkBool(v, false);
-}
-
-static RegisterPrimOp rp("anotherNull", 0, prim_anotherNull);