Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

port nix.sh to the fish shell #1087

Closed
wants to merge 1 commit into from
Closed

port nix.sh to the fish shell #1087

wants to merge 1 commit into from

Conversation

nhooyr
Copy link

@nhooyr nhooyr commented Oct 13, 2016

Builds off of #626

I haven't been able to test it because I cannot get nix to build on macOS Sierra. Using my system nix, I've installed the automake, autoconf and pkg-config packages already.

I get the error "configure.ac:78: error: possibly undefined macro: AC_DEFINE".

@nhooyr
Copy link
Author

nhooyr commented Oct 13, 2016

Why is ~/.nix-profile/sbin not created by default? It causes fish to throw an error that the path component is invalid because it does not exist. edit: seems to be working fine now.

(still couldn't get above to build, I converted the older version of the script on my system because my nix (latest installed) still uses the old profile script).

@nhooyr
Copy link
Author

nhooyr commented Nov 5, 2016

Ah, I was going about building it wrong. Now I did ./dev-shell and then configurePhase and then make but I got a bunch of errors:

src/libstore/build.cc:2558:29: error: invalid operands to binary expression ('const
      std::__1::basic_string<char>' and 'nix::DerivationGoal::ChrootPath')
                if (i.first != i.second)
                    ~~~~~~~ ^  ~~~~~~~~
In file included from src/libstore/build.cc:3:
In file included from src/libstore/references.hh:3:
In file included from src/libutil/types.hh:12:
In file included from src/boost/format.hpp:57:
src/boost/format/feed_args.hpp:97:8: error: invalid operands to binary expression ('std::ostream'
      (aka 'basic_ostream<char>') and 'nix::DerivationGoal::ChrootPath')
    os << x ;
    ~~ ^  ~

@nhooyr
Copy link
Author

nhooyr commented Dec 6, 2016

Hurray, I got it to build! Had to set $ACLOCAL_PATH to /Users/nhooyr/.nix-profile/share/aclocal. edit: jk

Will test later!

@rened
Copy link

rened commented Dec 14, 2016

@nhooyr I'd like to try this out - could you please post the build steps you used? When / where do you set the ACLOCAL_PATH? Thanks!

@nhooyr
Copy link
Author

nhooyr commented Dec 14, 2016

@rened I did

set -x ACLOCAL_PATH ~/.nix-profile/share/aclocal
./bootstrap.sh
./configure
make

I thought it would build when ./configure successfully finished but make gives me errors still :(

Same errors as using ./dev-shell like described above.

~/c/nix
❯ make
  CXX    src/libstore/build.o
src/libstore/build.cc:2558:29: error: invalid operands to binary expression ('const std::__1::basic_string<char>' and 'nix::DerivationGoal::ChrootPath')
                if (i.first != i.second)
                    ~~~~~~~ ^  ~~~~~~~~
In file included from src/libstore/build.cc:3:
In file included from src/libstore/references.hh:3:
In file included from src/libutil/types.hh:12:
In file included from src/boost/format.hpp:57:
src/boost/format/feed_args.hpp:97:8: error: invalid operands to binary expression ('std::ostream' (aka 'basic_ostream<char>') and 'nix::DerivationGoal::ChrootPath')
    os << x ;
    ~~ ^  ~
src/boost/format/feed_args.hpp:137:7: note: in instantiation of function template specialization 'boost::io::detail::(anonymous namespace)::put_last<nix::DerivationGoal::ChrootPath>' requested here
      put_last( oss_, x);
      ^
src/boost/format/feed_args.hpp:219:11: note: in instantiation of function template specialization 'boost::io::detail::(anonymous namespace)::put<nix::DerivationGoal::ChrootPath &>' requested here
          put<T> (x, self.items_[i], self.items_[i].res_, self.oss_ );
          ^
src/boost/format/feed_args.hpp:228:3: note: in instantiation of function template specialization 'boost::io::detail::distribute<nix::DerivationGoal::ChrootPath &>' requested here
  distribute<T> (self, x);
  ^
src/boost/format/format_class.hpp:64:24: note: in instantiation of function template specialization 'boost::io::detail::feed<nix::DerivationGoal::ChrootPath &>' requested here
    return io::detail::feed<T&>(*this,x);
                       ^
src/libstore/build.cc:2561:35: note: in instantiation of function template specialization 'boost::basic_format::operator%<nix::DerivationGoal::ChrootPath>' requested here
                        % i.first % i.second);
                                  ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:207:20: note: candidate function not viable: no known conversion from 'nix::DerivationGoal::ChrootPath' to 'const void *' for 1st argument; take the address of the argument with &
    basic_ostream& operator<<(const void* __p);
                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:191:20: note: candidate function not viable: no known conversion from 'nix::DerivationGoal::ChrootPath' to 'std::__1::basic_ostream<char> &(*)(std::__1::basic_ostream<char> &)' for 1st argument
    basic_ostream& operator<<(basic_ostream& (*__pf)(basic_ostream&));
                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:192:20: note: candidate function not viable: no known conversion from 'nix::DerivationGoal::ChrootPath' to 'basic_ios<char_type, traits_type> &(*)(basic_ios<char_type, traits_type> &)' (aka 'basic_ios<char, std::__1::char_traits<char> > &(*)(basic_ios<char, std::__1::char_traits<char> > &)') for 1st argument
    basic_ostream& operator<<(basic_ios<char_type, traits_type>&
                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:194:20: note: candidate function not viable: no known conversion from 'nix::DerivationGoal::ChrootPath' to 'std::__1::ios_base &(*)(std::__1::ios_base &)' for 1st argument
    basic_ostream& operator<<(ios_base& (*__pf)(ios_base&));
                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:195:20: note: candidate function not viable: no known conversion from 'nix::DerivationGoal::ChrootPath' to 'bool' for 1st argument
    basic_ostream& operator<<(bool __n);
                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:196:20: note: candidate function not viable: no known conversion from 'nix::DerivationGoal::ChrootPath' to 'short' for 1st argument
    basic_ostream& operator<<(short __n);
                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:197:20: note: candidate function not viable: no known conversion from 'nix::DerivationGoal::ChrootPath' to 'unsigned short' for 1st argument
    basic_ostream& operator<<(unsigned short __n);
                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:198:20: note: candidate function not viable: no known conversion from 'nix::DerivationGoal::ChrootPath' to 'int' for 1st argument
    basic_ostream& operator<<(int __n);
                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:199:20: note: candidate function not viable: no known conversion from 'nix::DerivationGoal::ChrootPath' to 'unsigned int' for 1st argument
    basic_ostream& operator<<(unsigned int __n);
                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:200:20: note: candidate function not viable: no known conversion from 'nix::DerivationGoal::ChrootPath' to 'long' for 1st argument
    basic_ostream& operator<<(long __n);
                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:201:20: note: candidate function not viable: no known conversion from 'nix::DerivationGoal::ChrootPath' to 'unsigned long' for 1st argument
    basic_ostream& operator<<(unsigned long __n);
                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:202:20: note: candidate function not viable: no known conversion from 'nix::DerivationGoal::ChrootPath' to 'long long' for 1st argument
    basic_ostream& operator<<(long long __n);
                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:203:20: note: candidate function not viable: no known conversion from 'nix::DerivationGoal::ChrootPath' to 'unsigned long long' for 1st argument
    basic_ostream& operator<<(unsigned long long __n);
                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:204:20: note: candidate function not viable: no known conversion from 'nix::DerivationGoal::ChrootPath' to 'float' for 1st argument
    basic_ostream& operator<<(float __f);
                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:205:20: note: candidate function not viable: no known conversion from 'nix::DerivationGoal::ChrootPath' to 'double' for 1st argument
    basic_ostream& operator<<(double __f);
                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:206:20: note: candidate function not viable: no known conversion from 'nix::DerivationGoal::ChrootPath' to 'long double' for 1st argument
    basic_ostream& operator<<(long double __f);
                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:208:20: note: candidate function not viable: no known conversion from 'nix::DerivationGoal::ChrootPath' to 'basic_streambuf<char_type, traits_type> *' (aka 'basic_streambuf<char, std::__1::char_traits<char> > *') for 1st argument
    basic_ostream& operator<<(basic_streambuf<char_type, traits_type>* __sb);
                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:785:1: note: candidate function [with _CharT = char, _Traits = std::__1::char_traits<char>] not viable: no known conversion from 'nix::DerivationGoal::ChrootPath' to 'char' for 2nd argument
operator<<(basic_ostream<_CharT, _Traits>& __os, char __cn)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:818:1: note: candidate function [with _Traits = std::__1::char_traits<char>] not viable: no known conversion from 'nix::DerivationGoal::ChrootPath' to 'char' for 2nd argument
operator<<(basic_ostream<char, _Traits>& __os, char __c)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:825:1: note: candidate function [with _Traits = std::__1::char_traits<char>] not viable: no known conversion from 'nix::DerivationGoal::ChrootPath' to 'signed char' for 2nd argument
operator<<(basic_ostream<char, _Traits>& __os, signed char __c)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:832:1: note: candidate function [with _Traits = std::__1::char_traits<char>] not viable: no known conversion from 'nix::DerivationGoal::ChrootPath' to 'unsigned char' for 2nd argument
operator<<(basic_ostream<char, _Traits>& __os, unsigned char __c)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:846:1: note: candidate function [with _CharT = char, _Traits = std::__1::char_traits<char>] not viable: no known conversion from 'nix::DerivationGoal::ChrootPath' to 'const char *' for 2nd argument
operator<<(basic_ostream<_CharT, _Traits>& __os, const char* __strn)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:892:1: note: candidate function [with _Traits = std::__1::char_traits<char>] not viable: no known conversion from 'nix::DerivationGoal::ChrootPath' to 'const char *' for 2nd argument
operator<<(basic_ostream<char, _Traits>& __os, const char* __str)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:899:1: note: candidate function [with _Traits = std::__1::char_traits<char>] not viable: no known conversion from 'nix::DerivationGoal::ChrootPath' to 'const signed char *' for 2nd argument
operator<<(basic_ostream<char, _Traits>& __os, const signed char* __str)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:907:1: note: candidate function [with _Traits = std::__1::char_traits<char>] not viable: no known conversion from 'nix::DerivationGoal::ChrootPath' to 'const unsigned char *' for 2nd argument
operator<<(basic_ostream<char, _Traits>& __os, const unsigned char* __str)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:1086:1: note: candidate function [with _CharT = char, _Traits = std::__1::char_traits<char>] not viable: no known conversion from 'nix::DerivationGoal::ChrootPath' to 'const std::__1::error_code' for 2nd argument
operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __ec)
^
src/libutil/serialise.hh:145:15: note: candidate function not viable: no known conversion from 'std::ostream' (aka 'basic_ostream<char>') to 'nix::Sink &' for 1st argument
inline Sink & operator << (Sink & sink, uint64_t n)
              ^
src/libutil/serialise.hh:160:8: note: candidate function not viable: no known conversion from 'std::ostream' (aka 'basic_ostream<char>') to 'nix::Sink &' for 1st argument
Sink & operator << (Sink & sink, const string & s);
       ^
src/libutil/serialise.hh:161:8: note: candidate function not viable: no known conversion from 'std::ostream' (aka 'basic_ostream<char>') to 'nix::Sink &' for 1st argument
Sink & operator << (Sink & sink, const Strings & s);
       ^
src/libutil/serialise.hh:162:8: note: candidate function not viable: no known conversion from 'std::ostream' (aka 'basic_ostream<char>') to 'nix::Sink &' for 1st argument
Sink & operator << (Sink & sink, const StringSet & s);
       ^
src/libstore/derivations.hh:118:8: note: candidate function not viable: no known conversion from 'std::ostream' (aka 'basic_ostream<char>') to 'nix::Sink &' for 1st argument
Sink & operator << (Sink & out, const BasicDerivation & drv);
       ^
src/boost/format/group.hpp:49:1: note: candidate template ignored: couldn't infer template argument 'Ch'
operator << ( BOOST_IO_STD ostream& os,
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:778:1: note: candidate template ignored: deduced conflicting types for parameter '_CharT' ('char' vs. 'nix::DerivationGoal::ChrootPath')
operator<<(basic_ostream<_CharT, _Traits>& __os, _CharT __c)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:839:1: note: candidate template ignored: could not match 'const _CharT *' against 'nix::DerivationGoal::ChrootPath'
operator<<(basic_ostream<_CharT, _Traits>& __os, const _CharT* __str)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:1077:1: note: candidate template ignored: could not match 'basic_string<type-parameter-0-0, type-parameter-0-1, type-parameter-0-2>' against 'nix::DerivationGoal::ChrootPath'
operator<<(basic_ostream<_CharT, _Traits>& __os,
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:1094:1: note: candidate template ignored: could not match 'shared_ptr<type-parameter-0-2>' against 'nix::DerivationGoal::ChrootPath'
operator<<(basic_ostream<_CharT, _Traits>& __os, shared_ptr<_Yp> const& __p)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:1101:1: note: candidate template ignored: could not match 'bitset<_Size>' against 'nix::DerivationGoal::ChrootPath'
operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Size>& __x)
^
src/boost/format/group.hpp:180:1: note: candidate template ignored: could not match 'group6<type-parameter-0-2, type-parameter-0-3, type-parameter-0-4, type-parameter-0-5, type-parameter-0-6, type-parameter-0-7>' against 'nix::DerivationGoal::ChrootPath'
operator << (BOOST_IO_STD ostream& os,
^
src/boost/format/group.hpp:205:1: note: candidate template ignored: could not match 'group7<type-parameter-0-2, type-parameter-0-3, type-parameter-0-4, type-parameter-0-5, type-parameter-0-6, type-parameter-0-7, type-parameter-0-8>' against 'nix::DerivationGoal::ChrootPath'
operator << (BOOST_IO_STD ostream& os,
^
src/boost/format/group.hpp:231:1: note: candidate template ignored: could not match 'group8<type-parameter-0-2, type-parameter-0-3, type-parameter-0-4, type-parameter-0-5, type-parameter-0-6, type-parameter-0-7, type-parameter-0-8, type-parameter-0-9>' against 'nix::DerivationGoal::ChrootPath'
operator << (BOOST_IO_STD ostream& os,
^
src/boost/format/group.hpp:258:1: note: candidate template ignored: could not match 'group9<type-parameter-0-2, type-parameter-0-3, type-parameter-0-4, type-parameter-0-5, type-parameter-0-6, type-parameter-0-7, type-parameter-0-8, type-parameter-0-9, type-parameter-0-10>' against 'nix::DerivationGoal::ChrootPath'
operator << (BOOST_IO_STD ostream& os,
^
src/boost/format/group.hpp:286:1: note: candidate template ignored: could not match 'group10<type-parameter-0-2, type-parameter-0-3, type-parameter-0-4, type-parameter-0-5, type-parameter-0-6, type-parameter-0-7, type-parameter-0-8, type-parameter-0-9, type-parameter-0-10, type-parameter-0-11>' against 'nix::DerivationGoal::ChrootPath'
operator << (BOOST_IO_STD ostream& os,
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:1063:5: note: candidate template ignored: disabled by 'enable_if' [with _Stream = std::__1::basic_ostream<char> &, _Tp = nix::DerivationGoal::ChrootPath]
    !is_lvalue_reference<_Stream>::value &&
    ^
src/boost/format/group.hpp:67:1: note: candidate template ignored: could not match 'group1<type-parameter-0-2>' against 'nix::DerivationGoal::ChrootPath'
operator << (BOOST_IO_STD ostream& os,
^
src/boost/format/group.hpp:90:1: note: candidate template ignored: could not match 'group2<type-parameter-0-2, type-parameter-0-3>' against 'nix::DerivationGoal::ChrootPath'
operator << (BOOST_IO_STD ostream& os,
^
src/boost/format/group.hpp:111:1: note: candidate template ignored: could not match 'group3<type-parameter-0-2, type-parameter-0-3, type-parameter-0-4>' against 'nix::DerivationGoal::ChrootPath'
operator << (BOOST_IO_STD ostream& os,
^
src/boost/format/group.hpp:133:1: note: candidate template ignored: could not match 'group4<type-parameter-0-2, type-parameter-0-3, type-parameter-0-4, type-parameter-0-5>' against 'nix::DerivationGoal::ChrootPath'
operator << (BOOST_IO_STD ostream& os,
^
src/boost/format/group.hpp:156:1: note: candidate template ignored: could not match 'group5<type-parameter-0-2, type-parameter-0-3, type-parameter-0-4, type-parameter-0-5, type-parameter-0-6>' against 'nix::DerivationGoal::ChrootPath'
operator << (BOOST_IO_STD ostream& os,
^
2 errors generated.
make: *** [src/libstore/build.o] Error 1

@nhooyr
Copy link
Author

nhooyr commented Feb 5, 2017

aha, GOT IT! https://nixos.org/wiki/Debugging_a_Nix_Package under Step Through Build Phases clarifies it all.

@nhooyr
Copy link
Author

nhooyr commented Feb 28, 2017

Closing in favour of #1090

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants