about summary refs log tree commit diff
path: root/default.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-09-02T13·18+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-09-02T13·18+0200
commite90569905ecdfe3225314f0e5f122263aa68efb2 (patch)
tree5c00fa4ae75870f8bab1b1815dfc7ee335ef6212 /default.nix
Initial version of nix-repl
This program interactively reads a Nix expression from the user,
evaluates it, and prints the result.
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/default.nix b/default.nix
new file mode 100644
index 000000000000..55c9ed9e3aff
--- /dev/null
+++ b/default.nix
@@ -0,0 +1,10 @@
+with import <nixpkgs> { };
+
+runCommand "nix-repl"
+  { buildInputs = [ readline nixUnstable boehmgc ]; }
+  ''
+    mkdir -p $out/bin
+    g++ -O3 -Wall -o $out/bin/nix-repl ${./nix-repl.cc} \
+      -I${nixUnstable}/include/nix -L${nixUnstable}/lib/nix \
+      -lexpr -lmain -lreadline
+  ''