aboutsummaryrefslogtreecommitdiff
path: root/tests/plugins/plugintest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/plugins/plugintest.cc')
-rw-r--r--tests/plugins/plugintest.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/plugins/plugintest.cc b/tests/plugins/plugintest.cc
new file mode 100644
index 000000000..f788c4814
--- /dev/null
+++ b/tests/plugins/plugintest.cc
@@ -0,0 +1,10 @@
+#include "primops.hh"
+
+using namespace nix;
+
+static void prim_constNull (EvalState & state, const Pos & pos, Value ** args, Value & v)
+{
+ mkNull(v);
+}
+
+static RegisterPrimOp r("constNull", 1, prim_constNull);