_0mp changed the topic of #freebsd-nix to: Adding Nix to FreeBSD ports | https://github.com/0mp/freebsd-ports-nix | https://logs.nix.samueldr.com/freebsd-nix
orion has joined #freebsd-nix
<orion> For those wishing to experiment with Nix 2.4 on FreeBSD, I've created this branch: https://github.com/centromere/freebsd-ports-nix/tree/unstable
<orion> With both 2.3.10 and 2.4, I see the following error when trying to import nixpkgs on the repl: https://gist.github.com/centromere/afbbe12c6c7466b4db7bcb9a3459d752
<orion> The output is suspicious. Could there be some type of bug in nix which causes it to repeatedly print the letter "A"?
<qyliss> that's intentional, and happens on all platforms
<qyliss> the repeated AAAAAA is to make sure it comes first, because Nix will evaluate attrsets in lexicographic order
<qyliss> if you do (import <nixpkgs> {}).hello you'll get something sensible
<qyliss> or nix repl '<nixpkgs>', and then type "hello"
<orion> I see.
<orion> When I do: "(import <nixpkgs> {}).zcash" I receive the same error.
<qyliss> hmm, you should'nt
<qyliss> *shouldn't
<qyliss> the null to string error, or the "Please be informed" error?
<orion> The former.
<qyliss> can you paste a repl session demonstrating that?
<qyliss> oh, sorry, I misread which error you said
<qyliss> that one is an issue I'm aware of
<qyliss> and is FreeBSD-specific
<qyliss> FreeBSD support in Nixpkgs is not in a very good place at the moment
<qyliss> We're probably going to end up coming at it from a different direction than we've tried previously, by first getting cross-compilation to FreeBSD going, then native compilation on FreeBSD
<qyliss> https://github.com/NixOS/nixpkgs/pull/82131 is the current work towards that
<qyliss> we're also trying the same thing for NetBSD, and that's quite a bit further along at the moment
<orion> Is that particular error caused by "nixpkgs.stdenv.cc.libc" evaluating to null?
<qyliss> IIRC yes
<qyliss> which happens because it uses the native libc, not one build with nix
<qyliss> (our current approach of cross first, which we could use to build bootstrap binaries for native, would solve this problem by having native use a non-null libc)
<orion> If I understand correctly, nix wants to build FreeBSD's libc?
<qyliss> no, it wants to use your system's libc
<qyliss> but most Nix packages don't understand that, because it doesn't do that on Linux or macOS
<orion> Sorry, I meant to ask if that's what the ultimate goal is.
<orion> (As opposed to what is currently happening)
<qyliss> oh, yes
<orion> I am fairly new to Nix, but not to functional programming. Is there anything I can do to help?
<qyliss> Ericson2314 might have some ideas
<qyliss> it's mostly the two of us pushing BSD support right now, but I'm focusing on NetBSD atm
<Ericson2314> orion: you can always try just picking up that WIP PR and hammering on it, but it will be hard
<Ericson2314> i you could take the netbsd stuff and make a functional qemu image that would also be super useful
<Ericson2314> ultimately I hope we can have non-linux NixOS
<Ericson2314> I opened this issue https://github.com/cleverca22/not-os/issues/16 as a stepping stone
<orion> I am on FreeBSD 13.0. I see in the PR you reference "https://svn.freebsd.org/base/releng/...". Starting in 13.0, all development has moved to git.
<Ericson2314> https://github.com/NixOS/nixpkgs/issues/26850 this is the non-linux issue
lukegb has quit [Quit: ~~lukegb out~~]
<Ericson2314> orion: yeah I heard, and then I don't have to bother chaining the SVN fetcher which is nice
<Ericson2314> i'd so try bumping the version in the PR, but the PR is so incomplete right now that's not necessarily easier
lukegb has joined #freebsd-nix
<orion> Understood.
<orion> I appreciate your efforts.
<orion> qyliss: What was tried previously, and why did it fail?
<Ericson2314> with the impure native build?
<orion> Sure.
<Ericson2314> i don't know what the problem is currently
<Ericson2314> but it's hard to maintain them
<Ericson2314> impurities, moving target, etc.
<orion> I see. :(
<qyliss> c++ doesn't work with the native build atm
sss has quit [Ping timeout: 260 seconds]
sss has joined #freebsd-nix
sss has quit [Read error: Connection reset by peer]
sss has joined #freebsd-nix
infowicz has joined #freebsd-nix
infowicz has quit [Ping timeout: 276 seconds]
angerman has quit [*.net *.split]
sss has quit [*.net *.split]
_xor has quit [*.net *.split]
pie_ has quit [*.net *.split]
lukegb has quit [*.net *.split]
_0mp has quit [*.net *.split]
thefloweringash has quit [*.net *.split]
ThaEwat has quit [*.net *.split]
Ericson2314 has quit [*.net *.split]
sterni has quit [*.net *.split]
infowicz has quit [*.net *.split]
Lense has quit [*.net *.split]
simpson has quit [*.net *.split]
Mic92 has quit [*.net *.split]
crees[m] has quit [*.net *.split]
abbe has quit [*.net *.split]
unrelentingtech has quit [*.net *.split]
qyliss has quit [*.net *.split]
orion has quit [*.net *.split]
adisbladis has quit [*.net *.split]
jrm has quit [*.net *.split]
bapt has quit [*.net *.split]
samueldr has quit [*.net *.split]
infowicz has joined #freebsd-nix
pie_ has joined #freebsd-nix
lukegb has joined #freebsd-nix
sss has joined #freebsd-nix
qyliss has joined #freebsd-nix
<sterni> last time I debugged this with someone, cmake didn't evaluate because it doesn't like the native libc
<sterni> and without cmake a lot of stuff just doesn't build
unrelentingtech has joined #freebsd-nix
unrelentingtech has quit [Max SendQ exceeded]
unrelentingtech has joined #freebsd-nix
angerman has joined #freebsd-nix