Fix build

This commit is contained in:
Eelco Dolstra 2017-04-25 16:55:03 +02:00
parent 0e49f94120
commit 2dff9556a4
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
2 changed files with 7 additions and 5 deletions

View file

@ -4,13 +4,13 @@ with import nixpkgs { inherit system; };
let nix = nixUnstable; in let nix = nixUnstable; in
runCommand "nix-repl" runCommandCC "nix-repl"
{ buildInputs = [ readline nix boehmgc ]; } { buildInputs = [ pkgconfig readline nix boehmgc ]; }
'' ''
mkdir -p $out/bin mkdir -p $out/bin
g++ -O3 -Wall -std=c++0x \ g++ -O3 -Wall -std=c++14 \
-o $out/bin/nix-repl ${./nix-repl.cc} \ -o $out/bin/nix-repl ${./nix-repl.cc} \
-I${nix}/include/nix \ $(pkg-config --cflags nix-main) \
-lnixformat -lnixutil -lnixstore -lnixexpr -lnixmain -lreadline -lgc \ -lnixformat -lnixutil -lnixstore -lnixexpr -lnixmain -lreadline -lgc \
-DNIX_VERSION=\"${(builtins.parseDrvName nix.name).version}\" -DNIX_VERSION=\"${(builtins.parseDrvName nix.name).version}\"
'' ''

View file

@ -1,3 +1,5 @@
#include <nix/config.h>
#include <iostream> #include <iostream>
#include <cstdlib> #include <cstdlib>
@ -291,7 +293,7 @@ static int runProgram(const string & program, const Strings & args)
_exit(1); _exit(1);
} }
return pid.wait(true); return pid.wait();
} }