Git Product home page Git Product logo

nix-plugins's Introduction

nix-plugins

A collection of useful Nix native plugins.

extra-builtins

This plugin adds a setting extra-builtins-file and two builtins:

  • builtins.extraBuiltins: If the extra-builtins-file exists, it is imported and passed a set containing at least the importNative and exec primops, even if allow-unsafe-native-code-during-evaluation is false, and the result is available as extraBuiltins. If the file does not exist, extraBuiltins will be null.
  • builtins.nix-cflags: A set of required flags needed to build a native plugin against the same version of Nix this plugin is compiled against. See nix-plugins-config.h.in for the list of attributes in the set.

This allows users to specify a fixed set of safe extra builtins without enabling arbitrary Nix expressions to run arbitrary native code. The expectation is that extra-builtins-file defines a set of builtins, but ultimately that's up to the end user.

Install

To enable these plugins system-wide on NixOS, add the following to your configuration:

nix.extraOptions = ''
  plugin-files = ${pkgs.nix-plugins}/lib/nix/plugins
'';

nix-plugins's People

Contributors

adisbladis avatar chayleaf avatar erikarvstedt avatar graham-at-target avatar shlevy avatar thinkchaos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

nix-plugins's Issues

Doesn't compile with nix 2.6 (nixos-unstable)

[ 50%] Building CXX object CMakeFiles/nix-extra-builtins.dir/extra-builtins.cc.o
/build/source/extra-builtins.cc: In function 'void extraBuiltins(nix::EvalState&, const nix::Pos&, nix::Value**, nix::Value&)':
/build/source/extra-builtins.cc:45:19: error: 'class nix::EvalState' has no member named 'mkAttrs'
   45 |             state.mkAttrs(*arg, 2);
      |                   ^~~~~~~
/build/source/extra-builtins.cc:57:9: error: 'mkApp' was not declared in this scope
   57 |         mkApp(v, *fun, *arg);
      |         ^~~~~
/build/source/extra-builtins.cc:62:9: error: 'mkNull' was not declared in this scope
   62 |         mkNull(v);
      |         ^~~~~~
/build/source/extra-builtins.cc: In function 'void cflags(nix::EvalState&, const nix::Pos&, nix::Value**, nix::Value&)':
/build/source/extra-builtins.cc:72:11: error: 'class nix::EvalState' has no member named 'mkAttrs'
   72 |     state.mkAttrs(v, 3);
      |           ^~~~~~~
make[2]: *** [CMakeFiles/nix-extra-builtins.dir/build.make:76: CMakeFiles/nix-extra-builtins.dir/extra-builtins.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/nix-extra-builtins.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

E.g. https://hydra.nixos.org/build/166328127

EvalState::mkAttr was removed in NixOS/nix@2b4c944

I think the mkApp and mkNull functions were removed in NixOS/nix@263a8d2

Both removals were part of NixOS/nix#5864

Link error

Hi, this is similar to #5.
When doing nixos-rebuild switch I get

building Nix...
error: could not dynamically open plugin file '/nix/store/f43lkga9iq33w6vqpx55sksb40bdi815-nix-plugins-6.0.0/lib/nix/plugins/libnix-extra-builtins.so': /nix/store/f43lkga9iq33w6vqpx55sksb40bdi815-nix-plugins-6.0.0/lib/nix/plugins/libnix-extra-builtins.so: undefined symbol: _ZN3nix11BaseSettingINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3setERKS6_
building the system configuration...
error: could not dynamically open plugin file '/nix/store/f43lkga9iq33w6vqpx55sksb40bdi815-nix-plugins-6.0.0/lib/nix/plugins/libnix-extra-builtins.so': /nix/store/f43lkga9iq33w6vqpx55sksb40bdi815-nix-plugins-6.0.0/lib/nix/plugins/libnix-extra-builtins.so: undefined symbol: _ZN3nix11BaseSettingINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3setERKS6_

I'm on nixos-unstable. uname:

Linux obsidian 5.10.77 #1-NixOS SMP Tue Nov 2 18:48:25 UTC 2021 x86_64 GNU/Linux

Could it be as simple as a version bump for nixpkgs? From what I can tell, it is still pulling 6.0.0 which is a bit outdated.

Nix 2.4 support?

I would like to use nix-plugins with nix 2.4. I used an override to link again 2.4:

final: prev: {
  nix-plugins = prev.nix-plugins.override { nix = final.nixUnstable; };
}

However I get this error when I build my system:

error: builder for '/nix/store/srbraac9nwjsarvsk8h8bjqfzj2dwnhj-nix-plugins-6.0.0.drv' failed with exit code 2;
       last 10 log lines:
       > In file included from /nix/store/afsif7lfwq9sp2pxclhbx34c287f6730-nix-2.4pre20210908_3c56f62-dev/include/nix/eval.hh:7,
       >                  from /nix/store/afsif7lfwq9sp2pxclhbx34c287f6730-nix-2.4pre20210908_3c56f62-dev/include/nix/primops.hh:3,
       >                  from /build/source/extra-builtins.cc:2:
       > /nix/store/afsif7lfwq9sp2pxclhbx34c287f6730-nix-2.4pre20210908_3c56f62-dev/include/nix/config.hh:7:10: fatal error: nlohmann/json_fwd.hpp: No such file or directory
       >     7 | #include <nlohmann/json_fwd.hpp>
       >       |          ^~~~~~~~~~~~~~~~~~~~~~~
       > compilation terminated.
       > make[2]: *** [CMakeFiles/nix-extra-builtins.dir/build.make:82: CMakeFiles/nix-extra-builtins.dir/extra-builtins.cc.o] Error 1
       > make[1]: *** [CMakeFiles/Makefile2:95: CMakeFiles/nix-extra-builtins.dir/all] Error 2
       > make: *** [Makefile:149: all] Error 2

Is there any plan to support nix 2.4 in the near future?

Link error for nix-plugins

$ nix run -f . hello --option plugin-files /nix/store/3s0msjb7l1m0xff6j0lvg6ycwvy43b5g-nix-plugins-5.0.0/lib/nix/plugins/libnix-extra-builtins.so 
error: could not dynamically open plugin file '/nix/store/3s0msjb7l1m0xff6j0lvg6ycwvy43b5g-nix-plugins-5.0.0/lib/nix/plugins/libnix-extra-builtins.so': /nix/store/3s0msjb7l1m0xff6j0lvg6ycwvy43b5g-nix-plugins-5.0.0/lib/nix/plugins/libnix-extra-builtins.so: undefined symbol: _Z18GC_throw_bad_allocv

System + nixpkgs commit:

$ uname -a 
Linux nixos 4.18.9 #1-NixOS SMP Wed Sep 19 20:41:37 UTC 2018 x86_64 GNU/Linux
$ git show
commit af35bf90edcad7eb29eec3bd1bb4a9c64e527cf2 

extraBuiltins isn't defined

extraBuiltins isn't defined, but __extraBuiltins is.

Additionally, it'd be nice to be able to feature-detect on this, so moving it to builtins.extra would allow detection based on (builtins.extra or {}).my-cool-builtin or uhoh.

Build for Nix 2.8.1 fails

Fails with:

[ 50%] Building CXX object CMakeFiles/nix-extra-builtins.dir/extra-builtins.cc.o
/build/source/extra-builtins.cc: In function 'void extraBuiltins(nix::EvalState&, const nix::Pos&, nix::Value**, nix::Value&)':
/build/source/extra-builtins.cc:45:19: error: 'class nix::EvalState' has no member named 'mkAttrs'
   45 |             state.mkAttrs(*arg, 2);
      |                   ^~~~~~~
/build/source/extra-builtins.cc:57:9: error: 'mkApp' was not declared in this scope
   57 |         mkApp(v, *fun, *arg);
      |         ^~~~~
/build/source/extra-builtins.cc:58:25: error: no matching function for call to 'nix::EvalState::forceValue(nix::Value&)'
   58 |         state.forceValue(v);
      |         ~~~~~~~~~~~~~~~~^~~
In file included from /nix/store/a9cdlvzqv9z8abnb5ywy12lp81cavh90-nix-2.8.1-dev/include/nix/primops.hh:3,
                 from /build/source/extra-builtins.cc:2:
/nix/store/a9cdlvzqv9z8abnb5ywy12lp81cavh90-nix-2.8.1-dev/include/nix/eval.hh:230:17: note: candidate: 'template<class Callable> void nix::EvalSta>
  230 |     inline void forceValue(Value & v, Callable getPos);
      |                 ^~~~~~~~~~
/nix/store/a9cdlvzqv9z8abnb5ywy12lp81cavh90-nix-2.8.1-dev/include/nix/eval.hh:230:17: note:   template argument deduction/substitution failed:
/build/source/extra-builtins.cc:58:25: note:   candidate expects 2 arguments, 1 provided
   58 |         state.forceValue(v);
      |         ~~~~~~~~~~~~~~~~^~~
In file included from /nix/store/a9cdlvzqv9z8abnb5ywy12lp81cavh90-nix-2.8.1-dev/include/nix/eval.hh:512,
                 from /nix/store/a9cdlvzqv9z8abnb5ywy12lp81cavh90-nix-2.8.1-dev/include/nix/primops.hh:3,
                 from /build/source/extra-builtins.cc:2:
/nix/store/a9cdlvzqv9z8abnb5ywy12lp81cavh90-nix-2.8.1-dev/include/nix/eval-inline.hh:102:6: note: candidate: 'void nix::EvalState::forceValue(nix:>
  102 | void EvalState::forceValue(Value & v, const Pos & pos)
      |      ^~~~~~~~~
/nix/store/a9cdlvzqv9z8abnb5ywy12lp81cavh90-nix-2.8.1-dev/include/nix/eval-inline.hh:102:6: note:   candidate expects 2 arguments, 1 provided
/build/source/extra-builtins.cc:62:9: error: 'mkNull' was not declared in this scope
   62 |         mkNull(v);
      |         ^~~~~~
/build/source/extra-builtins.cc: In function 'void cflags(nix::EvalState&, const nix::Pos&, nix::Value**, nix::Value&)':
/build/source/extra-builtins.cc:72:11: error: 'class nix::EvalState' has no member named 'mkAttrs'
   72 |     state.mkAttrs(v, 3);
      |           ^~~~~~~
make[2]: *** [CMakeFiles/nix-extra-builtins.dir/build.make:76: CMakeFiles/nix-extra-builtins.dir/extra-builtins.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/nix-extra-builtins.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Doesn't compile with nix 2.7 (on `nixos-unstable`)

I don't think this is a duplicate? ๐Ÿค”

[nixos@rpinix:~]$ nixos-rebuild build
building the system configuration...
error: builder for '/nix/store/l7w6l39x2ichb3sgpx1l99nyg4v8lv54-nix.conf.drv' failed with exit code 1;
       last 2 log lines:
       > Validating generated nix.conf
       > error: could not dynamically open plugin file '/nix/store/dn9jdxf2xia67shk5y2dw7pycnj78ppb-nix-plugins-8.0.0/lib/nix/plugins/libnix-extra-builtins.so': /nix/store/dn9jdxf2xia67shk5y2dw7pycnj78ppb-nix-plugins-8.0.0/lib/nix/plugins/libnix-extra-builtins.so: undefined symbol: _ZN3nix9EvalState7mkAttrsERNS_5ValueEm
       For full logs, run 'nix log /nix/store/l7w6l39x2ichb3sgpx1l99nyg4v8lv54-nix.conf.drv'.
error: 1 dependencies of derivation '/nix/store/zb28xka7v9nr7w1jkmyqm5c6s7aiqhcl-etc.drv' failed to build
error: 1 dependencies of derivation '/nix/store/5d9rbvnn2j2s5l1byp8bhzbwhdpwm407-nixos-system-rpinix-22.05.20220327.ce8cbe3.drv' failed to build

Won't build on Darwin

Looks like it's just a matter of using the correct compiler flags. 2.0.7 built fine if I'm not mistaken and looks like this regression came with the switch to CMake. Unfortunately I know absolutely zilch about CMake so I haven't been able to wrap my head around it.

Please help I really need this :)

$ nix-build '<nixpkgs>' -A nix-plugins                                                                                                                               
these derivations will be built:
  /nix/store/kslw4pr9kjd2p208bmpapwn7yv180v13-nix-plugins-3.0.1.drv
building '/nix/store/kslw4pr9kjd2p208bmpapwn7yv180v13-nix-plugins-3.0.1.drv'...
unpacking sources
unpacking source archive /nix/store/rzl0q93pcv7asj9nd7q985cmijbpj5dq-source
source root is source
patching sources
configuring
fixing cmake files...
cmake flags: -DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_BUILD_RPATH=ON -DCMAKE_INSTALL_INCLUDEDIR=/nix/store/grpp6a4n3z6wl2kgn2z3yjhj8v7x193n-nix-plugins-3.0.1/include -DCMAKE_INSTALL_LIBDIR=/nix/store/grpp6a4n3z6wl2kgn2z3yjhj8v7x193n-nix-plugins-3.0.1/lib -DCMAKE_INSTALL_NAME_DIR=/nix/store/grpp6a4n3z6wl2kgn2z3yjhj8v7x193n-nix-plugins-3.0.1/lib -DCMAKE_INSTALL_PREFIX=/nix/store/grpp6a4n3z6wl2kgn2z3yjhj8v7x193n-nix-plugins-3.0.1
-- The C compiler identification is Clang 5.0.1
-- The CXX compiler identification is Clang 5.0.1
-- Check for working C compiler: /nix/store/53h1zds6q5k4ab4l7430fbddn0l0iq1c-clang-wrapper-5.0.1/bin/clang
-- Check for working C compiler: /nix/store/53h1zds6q5k4ab4l7430fbddn0l0iq1c-clang-wrapper-5.0.1/bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /nix/store/53h1zds6q5k4ab4l7430fbddn0l0iq1c-clang-wrapper-5.0.1/bin/clang++
-- Check for working CXX compiler: /nix/store/53h1zds6q5k4ab4l7430fbddn0l0iq1c-clang-wrapper-5.0.1/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /nix/store/j2zsla2jd1kmh67n95di6v8769jynwp8-pkg-config-0.29.2/bin/pkg-config (found version "0.29.2")
-- Checking for modules 'nix-expr>=2.0;nix-main>=2.0;nix-store>=2.0'
--   Found nix-expr, version 2.0
--   Found nix-main, version 2.0
--   Found nix-store, version 2.0
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_INSTALL_INCLUDEDIR
    CMAKE_INSTALL_LIBDIR


-- Build files have been written to: /tmp/nix-build-nix-plugins-3.0.1.drv-0/source/build
cmake: enabled parallel building
building
build flags: -j8 -l8 SHELL=/nix/store/pkjmwq7sqrvjg7cjiph6hq0khsmfl6p8-bash-4.4-p12/bin/bash
Scanning dependencies of target nix-extra-builtins
[ 50%] Building CXX object CMakeFiles/nix-extra-builtins.dir/extra-builtins.cc.o
In file included from /tmp/nix-build-nix-plugins-3.0.1.drv-0/source/extra-builtins.cc:2:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/primops.hh:1:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/eval.hh:3:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/attr-set.hh:3:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/nixexpr.hh:3:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/value.hh:3:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/symbol-table.hh:6:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/types.hh:4:
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/ref.hh:78:35: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
    template<typename T2, typename... Args>
                                  ^
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/ref.hh:80:18: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
    make_ref(Args&&... args);
                 ^
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/ref.hh:84:30: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template<typename T, typename... Args>
                             ^
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/ref.hh:86:14: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
make_ref(Args&&... args)
             ^
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/ref.hh:88:5: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
    auto p = std::make_shared<T>(std::forward<Args>(args)...);
    ^
In file included from /tmp/nix-build-nix-plugins-3.0.1.drv-0/source/extra-builtins.cc:2:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/primops.hh:1:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/eval.hh:3:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/attr-set.hh:3:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/nixexpr.hh:3:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/value.hh:3:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/symbol-table.hh:6:
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/types.hh:37:31: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
struct nop { template<typename... T> nop(T...) {} };
                              ^
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/types.hh:69:18: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template<typename... Args>
                 ^
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/types.hh:74:8: error: expected unqualified-id
    nop{boost::io::detail::feed(f, args)...};
       ^
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/types.hh:87:25: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
    unsigned int status = 1; // exit status
                        ^
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/types.hh:89:22: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
    template<typename... Args>
                     ^
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/types.hh:96:22: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
    template<typename... Args>
                     ^
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/types.hh:121:18: error: using declaration cannot refer to a constructor
MakeError(Error, BaseError)
~~~~~~~~~~~~~~~~~^~~~~~~~~~
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/types.hh:118:27: note: expanded from macro 'MakeError'
        using superClass::superClass;                   \
              ~~~~~~~~~~~~^
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/types.hh:128:22: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
    template<typename... Args>
                     ^
In file included from /tmp/nix-build-nix-plugins-3.0.1.drv-0/source/extra-builtins.cc:2:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/primops.hh:1:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/eval.hh:3:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/attr-set.hh:3:
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/nixexpr.hh:12:22: error: using declaration cannot refer to a constructor
MakeError(EvalError, Error)
~~~~~~~~~~~~~~~~~~~~~^~~~~~
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/types.hh:118:27: note: expanded from macro 'MakeError'
        using superClass::superClass;                   \
              ~~~~~~~~~~~~^
In file included from /tmp/nix-build-nix-plugins-3.0.1.drv-0/source/extra-builtins.cc:2:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/primops.hh:1:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/eval.hh:3:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/attr-set.hh:3:
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/nixexpr.hh:13:23: error: using declaration cannot refer to a constructor
MakeError(ParseError, Error)
~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/types.hh:118:27: note: expanded from macro 'MakeError'
        using superClass::superClass;                   \
              ~~~~~~~~~~~~^
In file included from /tmp/nix-build-nix-plugins-3.0.1.drv-0/source/extra-builtins.cc:2:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/primops.hh:1:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/eval.hh:3:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/attr-set.hh:3:
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/nixexpr.hh:14:33: error: using declaration cannot refer to a constructor
MakeError(IncompleteParseError, ParseError)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/types.hh:118:27: note: expanded from macro 'MakeError'
        using superClass::superClass;                   \
              ~~~~~~~~~~~~^
In file included from /tmp/nix-build-nix-plugins-3.0.1.drv-0/source/extra-builtins.cc:2:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/primops.hh:1:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/eval.hh:3:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/attr-set.hh:3:
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/nixexpr.hh:15:27: error: using declaration cannot refer to a constructor
MakeError(AssertionError, EvalError)
~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/types.hh:118:27: note: expanded from macro 'MakeError'
        using superClass::superClass;                   \
              ~~~~~~~~~~~~^
In file included from /tmp/nix-build-nix-plugins-3.0.1.drv-0/source/extra-builtins.cc:2:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/primops.hh:1:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/eval.hh:3:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/attr-set.hh:3:
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/nixexpr.hh:16:24: error: using declaration cannot refer to a constructor
MakeError(ThrownError, AssertionError)
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/types.hh:118:27: note: expanded from macro 'MakeError'
        using superClass::superClass;                   \
              ~~~~~~~~~~~~^
In file included from /tmp/nix-build-nix-plugins-3.0.1.drv-0/source/extra-builtins.cc:2:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/primops.hh:1:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/eval.hh:3:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/attr-set.hh:3:
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/nixexpr.hh:17:18: error: using declaration cannot refer to a constructor
MakeError(Abort, EvalError)
~~~~~~~~~~~~~~~~~^~~~~~~~~~
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/types.hh:118:27: note: expanded from macro 'MakeError'
        using superClass::superClass;                   \
              ~~~~~~~~~~~~^
In file included from /tmp/nix-build-nix-plugins-3.0.1.drv-0/source/extra-builtins.cc:2:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/primops.hh:1:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/eval.hh:3:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/attr-set.hh:3:
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/nixexpr.hh:18:22: error: using declaration cannot refer to a constructor
MakeError(TypeError, EvalError)
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/types.hh:118:27: note: expanded from macro 'MakeError'
        using superClass::superClass;                   \
              ~~~~~~~~~~~~^
In file included from /tmp/nix-build-nix-plugins-3.0.1.drv-0/source/extra-builtins.cc:2:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/primops.hh:1:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/eval.hh:3:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/attr-set.hh:3:
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/nixexpr.hh:19:30: error: using declaration cannot refer to a constructor
MakeError(UndefinedVarError, Error)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/types.hh:118:27: note: expanded from macro 'MakeError'
        using superClass::superClass;                   \
              ~~~~~~~~~~~~^
In file included from /tmp/nix-build-nix-plugins-3.0.1.drv-0/source/extra-builtins.cc:2:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/primops.hh:1:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/eval.hh:3:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/attr-set.hh:3:
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/nixexpr.hh:20:32: error: using declaration cannot refer to a constructor
MakeError(RestrictedPathError, Error)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/types.hh:118:27: note: expanded from macro 'MakeError'
        using superClass::superClass;                   \
              ~~~~~~~~~~~~^
In file included from /tmp/nix-build-nix-plugins-3.0.1.drv-0/source/extra-builtins.cc:2:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/primops.hh:1:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/eval.hh:3:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/attr-set.hh:3:
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/nixexpr.hh:238:19: error: no matching conversion for functional-style cast from 'boost::basic_format' to 'nix::ParseError'
            throw ParseError(format("duplicate formal function argument '%1%' at %2%")
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/nixexpr.hh:13:11: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'boost::basic_format' to 'const nix::ParseError' for 1st argument
MakeError(ParseError, Error)
          ^
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/types.hh:115:11: note: expanded from macro 'MakeError'
    class newClass : public superClass                  \
          ^
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/nixexpr.hh:13:11: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 1 was provided
In file included from /tmp/nix-build-nix-plugins-3.0.1.drv-0/source/extra-builtins.cc:2:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/primops.hh:1:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/eval.hh:3:
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/attr-set.hh:43:43: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    Bindings(const Bindings & bindings) = delete;
                                          ^
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/attr-set.hh:84:17: error: no member named 'emplace_back' in 'std::__1::vector<const nix::Attr *, std::__1::allocator<const nix::Attr *> >'; did you mean '__emplace_back'?
            res.emplace_back(&attrs[n]);
                ^~~~~~~~~~~~
                __emplace_back
/nix/store/j6ifwrr83k1c5nmjfx1p63nydpqsbqd6-libc++-5.0.1/include/c++/v1/vector:679:10: note: '__emplace_back' declared here
    void __emplace_back(const value_type& __x) { push_back(__x); }
         ^
In file included from /tmp/nix-build-nix-plugins-3.0.1.drv-0/source/extra-builtins.cc:2:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/primops.hh:1:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/eval.hh:3:
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/attr-set.hh:85:43: error: expected expression
        std::sort(res.begin(), res.end(), [](const Attr * a, const Attr * b) {
                                          ^
In file included from /tmp/nix-build-nix-plugins-3.0.1.drv-0/source/extra-builtins.cc:2:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/primops.hh:1:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/eval.hh:7:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/hash.hh:4:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/serialise.hh:6:
In file included from /nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/util.hh:4:
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/logging.hh:52:20: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
        uint64_t i = 0;
                   ^
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/logging.hh:80:8: error: unknown type name 'thread_local'
extern thread_local ActivityId curActivity;
       ^
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/logging.hh:80:31: error: expected ';' after top level declarator
extern thread_local ActivityId curActivity;
                              ^
                              ;
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/logging.hh:95:38: warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]
    Activity(const Activity & act) = delete;
                                     ^
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/logging.hh:106:22: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
    template<typename... Args>
                     ^
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/logging.hh:89:41: error: expected expression
        const Logger::Fields & fields = {}, ActivityId parent = curActivity);
                                        ^
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/logging.hh:89:65: error: use of undeclared identifier 'curActivity'
        const Logger::Fields & fields = {}, ActivityId parent = curActivity);
                                                                ^
/nix/store/89mg1myg6krrn5c40jlx1jzyddcdj7hn-nix-2.0-dev/include/nix/logging.hh:92:41: error: expected expression
        const Logger::Fields & fields = {}, ActivityId parent = curActivity)
                                        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
15 warnings and 20 errors generated.
make[2]: *** [CMakeFiles/nix-extra-builtins.dir/build.make:63: CMakeFiles/nix-extra-builtins.dir/extra-builtins.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:68: CMakeFiles/nix-extra-builtins.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
builder for '/nix/store/kslw4pr9kjd2p208bmpapwn7yv180v13-nix-plugins-3.0.1.drv' failed with exit code 2
error: build of '/nix/store/kslw4pr9kjd2p208bmpapwn7yv180v13-nix-plugins-3.0.1.drv' failed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.