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

with import nixpkgs { inherit system; };

let nix = nixUnstable; in

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}\"
  ''