about summary refs log tree commit diff
path: root/default.nix
blob: 435c16c09157bc34045f2f9c9016a1d1757441b9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{ nixpkgs ? <nixpkgs>, system ? builtins.currentSystem }:

with import nixpkgs { inherit system; };

runCommand "nix-repl"
  { buildInputs = [ readline nix boehmgc ]; }
  ''
    mkdir -p $out/bin
    g++ -O3 -Wall -std=c++0x \
      -o $out/bin/nix-repl ${./nix-repl.cc} \
      -I${nix}/include/nix \
      -lnixformat -lnixutil -lnixstore -lnixexpr -lnixmain -lreadline -lgc \
      -DNIX_VERSION=${(builtins.parseDrvName nix.name).version}
  ''