diff --git a/default.nix b/default.nix index 89d773a..3dc3816 100644 --- a/default.nix +++ b/default.nix @@ -4,8 +4,7 @@ with pkgs; let - # FIXME - nix = builtins.storePath /nix/store/cvrdgdx0gzdi0yf2831f4j98d518m3ln-nix-1.12pre1234_abcdef; + nix = nixUnstable; #lib.overrideDerivation nixUnstable (orig: { # src = /home/eelco/Dev/nix; #}); @@ -16,13 +15,17 @@ stdenv.mkDerivation { name = "nixos-channel-scripts"; buildInputs = with perlPackages; - [ nix sqlite makeWrapper perl FileSlurp LWP LWPProtocolHttps ListMoreUtils DBDSQLite NetAmazonS3 boehmgc nlohmann_json ]; + [ pkgconfig nix sqlite makeWrapper perl FileSlurp LWP LWPProtocolHttps ListMoreUtils DBDSQLite NetAmazonS3 boehmgc nlohmann_json ]; buildCommand = '' mkdir -p $out/bin - g++ -g ${./generate-programs-index.cc} -Wall -std=c++11 -o $out/bin/generate-programs-index \ - -I ${nix}/include/nix -lnixmain -lnixexpr -lnixformat -lsqlite3 -lgc -I . + g++ -g ${./generate-programs-index.cc} -Wall -std=c++14 -o $out/bin/generate-programs-index \ + $(pkg-config --cflags nix-main) \ + $(pkg-config --libs nix-main) \ + $(pkg-config --libs nix-expr) \ + $(pkg-config --libs nix-store) \ + -lsqlite3 -lgc cp ${./mirror-nixos-branch.pl} $out/bin/mirror-nixos-branch wrapProgram $out/bin/mirror-nixos-branch --set PERL5LIB $PERL5LIB --prefix PATH : ${wget}/bin:${git}/bin:${nix}/bin:${gnutar}/bin:${xz}/bin:$out/bin diff --git a/generate-programs-index.cc b/generate-programs-index.cc index 7544f18..c155490 100644 --- a/generate-programs-index.cc +++ b/generate-programs-index.cc @@ -1,3 +1,5 @@ +#include + #include #include