about summary refs log blame commit diff
path: root/default.nix
blob: 435c16c09157bc34045f2f9c9016a1d1757441b9 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                                                         
 
                                        

                     
                                             

                     

                                             


                                                                            
    
{ 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}
  ''