Git Product home page Git Product logo

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 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 

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.

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.

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

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?

Build failures with nix 2.24

Context: NixOS/nixpkgs#335342

Running phase: unpackPhase
@nix {"action":"setPhase","phase":"unpackPhase"}
unpacking source archive /nix/store/c0fayg4kjfk4b56dxkbqyjycv6bavnvl-source
source root is source
Running phase: patchPhase
@nix {"action":"setPhase","phase":"patchPhase"}
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix {"action":"setPhase","phase":"updateAutotoolsGnuConfigScriptsPhase"}
Running phase: configurePhase
@nix {"action":"setPhase","phase":"configurePhase"}
fixing cmake files...
cmake flags: -DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DCMAKE_INSTALL_LOCALEDIR=/nix/store/qfmbdhmnhcwax6zpbf3gx2k394kac6ci-nix-plugins-14.0.0/share/locale -DCMAKE_INSTALL_LIBEXECDIR=/nix/store/qfmbdhmnhcwax6zpbf3gx2k394kac6ci-nix-plugins-14.0.0/libexec -DCMAKE_INSTALL_LIBDIR=/nix/store/qfmbdhmnhcwax6zpbf3gx2k394kac6ci-nix-plugins-14.0.0/lib -DCMAKE_INSTALL_DOCDIR=/nix/store/qfmbdhmnhcwax6zpbf3gx2k394kac6ci-nix-plugins-14.0.0/share/doc/nix-plugins -DCMAKE_INSTALL_INFODIR=/nix/store/qfmbdhmnhcwax6zpbf3gx2k394kac6ci-nix-plugins-14.0.0/share/info -DCMAKE_INSTALL_MANDIR=/nix/store/qfmbdhmnhcwax6zpbf3gx2k394kac6ci-nix-plugins-14.0.0/share/man -DCMAKE_INSTALL_OLDINCLUDEDIR=/nix/store/qfmbdhmnhcwax6zpbf3gx2k394kac6ci-nix-plugins-14.0.0/include -DCMAKE_INSTALL_INCLUDEDIR=/nix/store/qfmbdhmnhcwax6zpbf3gx2k394kac6ci-nix-plugins-14.0.0/include -DCMAKE_INSTALL_SBINDIR=/nix/store/qfmbdhmnhcwax6zpbf3gx2k394kac6ci-nix-plugins-14.0.0/sbin -DCMAKE_INSTALL_BINDIR=/nix/store/qfmbdhmnhcwax6zpbf3gx2k394kac6ci-nix-plugins-14.0.0/bin -DCMAKE_INSTALL_NAME_DIR=/nix/store/qfmbdhmnhcwax6zpbf3gx2k394kac6ci-nix-plugins-14.0.0/lib -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_OSX_SYSROOT= -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_STRIP=/nix/store/lbk30k56awz9vz9qpid93fkjns0xwlhd-gcc-wrapper-13.3.0/bin/strip -DCMAKE_RANLIB=/nix/store/lbk30k56awz9vz9qpid93fkjns0xwlhd-gcc-wrapper-13.3.0/bin/ranlib -DCMAKE_AR=/nix/store/lbk30k56awz9vz9qpid93fkjns0xwlhd-gcc-wrapper-13.3.0/bin/ar -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=/nix/store/qfmbdhmnhcwax6zpbf3gx2k394kac6ci-nix-plugins-14.0.0  
-- The C compiler identification is GNU 13.3.0
-- The CXX compiler identification is GNU 13.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /nix/store/lbk30k56awz9vz9qpid93fkjns0xwlhd-gcc-wrapper-13.3.0/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /nix/store/lbk30k56awz9vz9qpid93fkjns0xwlhd-gcc-wrapper-13.3.0/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /nix/store/blb1ci2nwrmgzb3g1xl4mvqpwkhm3s3b-pkg-config-wrapper-0.29.2/bin/pkg-config (found version "0.29.2")
-- Checking for modules 'nix-expr>=2.18;nix-main>=2.18;nix-store>=2.18'
--   Found nix-expr, version 2.24.2
--   Found nix-main, version 2.24.2
--   Found nix-store, version 2.24.2
-- Configuring done (0.7s)
-- Generating done (0.0s)
�[33mCMake Warning:
  Manually-specified variables were not used by the project:

    BUILD_TESTING
    CMAKE_EXPORT_NO_PACKAGE_REGISTRY
    CMAKE_INSTALL_BINDIR
    CMAKE_INSTALL_DOCDIR
    CMAKE_INSTALL_INCLUDEDIR
    CMAKE_INSTALL_INFODIR
    CMAKE_INSTALL_LIBDIR
    CMAKE_INSTALL_LIBEXECDIR
    CMAKE_INSTALL_LOCALEDIR
    CMAKE_INSTALL_MANDIR
    CMAKE_INSTALL_OLDINCLUDEDIR
    CMAKE_INSTALL_SBINDIR
    CMAKE_POLICY_DEFAULT_CMP0025

-- Build files have been written to: /build/source/build
cmake: enabled parallel building
cmake: enabled parallel installing
Running phase: buildPhase
@nix {"action":"setPhase","phase":"buildPhase"}
build flags: -j128 SHELL=/nix/store/4bj2kxdm1462fzcc2i2s4dn33g2angcc-bash-5.2p32/bin/bash
[ 50%] Building CXX object CMakeFiles/nix-extra-builtins.dir/extra-builtins.cc.o
/build/source/extra-builtins.cc:29:8: error: 'GlobalConfig' does not name a type
   29 | static GlobalConfig::Register rp(&extraBuiltinsSettings);
      |        ^~~~~~~~~~~~
/build/source/extra-builtins.cc: In function 'void extraBuiltins(nix::EvalState&, nix::PosIdx, nix::Value**, nix::Value&)':
/build/source/extra-builtins.cc:35:15: error: 'class nix::EvalState' has no member named 'allowedPaths'; did you mean 'allowPath'?
   35 |     if (state.allowedPaths)
      |               ^~~~~~~~~~~~
      |               allowPath
/build/source/extra-builtins.cc:36:15: error: 'class nix::EvalState' has no member named 'allowedPaths'; did you mean 'allowPath'?
   36 |         state.allowedPaths->insert(extraBuiltinsFile.path.abs());
      |               ^~~~~~~~~~~~
      |               allowPath
/build/source/extra-builtins.cc:42:13: error: 'evalSettings' was not declared in this scope
   42 |         if (evalSettings.enableNativeCode) {
      |             ^~~~~~~~~~~~
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

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

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.