_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
_xor has joined #freebsd-nix
kiwiirc has joined #freebsd-nix
<kiwiirc> more strictly reproducible fbsd configs could be cool. making base ro too
kiwiirc has left #freebsd-nix [#freebsd-nix]
<_0mp> I've just committed Nix to the FreeBSD ports; cheers! https://reviews.freebsd.org/rP550026 https://www.freshports.org/sysutils/nix/
<koobs> !
<Mic92> _0mp: cool. maybe you can announce this on discourse
<Mic92> discourse.nixos.org/
<_0mp> oh sure
<_0mp> in Announcments, Mic92?
<Mic92> yes
<qyliss> that's awesome _0mp
<_0mp> thanks :)
<pie_> wooooooo \o/
<pie_> so now we can make nixbsd and start a consulting company :P
<pie_> but first I may have to find my pants
<_0mp> pie_: haha :D
<abbe> w00t! :D
<abbe> just saw: [Warn 17:30:45] sysutils/nix: port version going backward (I will not merge this port)!
<abbe> thanks _0mp :D
<_0mp> abbe: cheers!
<_0mp> :D
<abbe> now the missing piece is stdenv for FreeBSD
<_0mp> have you got any docs about it?
<abbe> I started working on https://github.com/NixOS/nixpkgs/pull/81459 but it's not quite ready, and then someone else started on https://github.com/NixOS/nixpkgs/pull/82131 (for a more comprehensive support including NetBSD)
<drakonis> interesting.
<abbe> 82131 is fancier recompiles everything, whereas I was trying to reuse FreeBSD base binaries
<drakonis> but how to actually sell it to other freebsd users?
<abbe> drakonis: make it free ;-)
<abbe> everyone loves free stuff :P
<abbe> I think once we have stdenv ready, we can start working on porting other tools
<drakonis> trying to convince people on the main channel to check it out but ehh
<drakonis> they dont seem to be very excited about the whole thing
<abbe> well, it requires work, and not something they can immediately test out, so barrier to entry is high
<abbe> atm we mostly need someone who's more familiar with stdenv internals
<drakonis> resort to the main channel for that
<abbe> i emailed ericson2314 for help with my PR in understanding some internals, and instead he started his PR :p
<abbe> i was hoping it to be more like darwin based
<abbe> which seems to reuse existing macos libraries because they're closed source
<drakonis> i'd say that's not the optimal path for a situation like freebsd's, where you can compile everything
<abbe> and that seemed simpler to me, like derivation that just downloads freebsd version tarballs, and extracts and stores them in /nix store uses that as base system
<drakonis> it runs against the whole model anyways
<drakonis> just bootstrap the base system on the store instead of using binaries
<abbe> yeah, I agree it's not ideal, but it seemed easiest, as I don't have to recompile/patch everything, since FreeBSD base system likely has assumptions about where everything is supposed to live
<drakonis> it definitely does
<drakonis> it'll probably require a lot of effort to bring up a freebsd nixpkgs
<abbe> so we'll have to patch FreeBSD base
<abbe> also another problem is, FreeBSD has n ABI versions, unlike Linux kernel, where there is one kernel, and one libc
<abbe> so in a way you'll have freebsd11 stdenv, freebsd12stdenv, ...
<drakonis> oh, is that so?
<drakonis> you can have multiple libcs on linux
<abbe> that's true, but kernel/libc are usually integrated in FreeBSD. so to run your FreeBSD 11 executables on FreeBSD 12 you'll need freebsd 11.x compatibility libraries
<drakonis> that'd be largely an non issue with nix though
<drakonis> were nixos to have a freebsd version
<abbe> right, what I'm trying to say kernel + userspace are developed together
<drakonis> i know
<abbe> in same repository
<drakonis> provide builds for the active freebsd versions
<abbe> so in a way they're tied together
<drakonis> currently supported ones, that is.
<abbe> okay
<drakonis> i dont think there's any way around it right now
<abbe> yes
<abbe> I guess kernel + libc is going to be a same derivation OR
<abbe> FreeBSD kernel + glibc (like Debian GNU/kFreeBSD model)
<abbe> the latter combo resembles closely to nixOS
<abbe> We'll definitely need GNU userland though, as nixpkgs derivations expect GNU arguments
<drakonis> why not both?
<abbe> sure both sounds nice, if someone is willing to do the work! :)
<abbe> for now, i guess we can help out by testing https://github.com/NixOS/nixpkgs/pull/82131
<abbe> and submitting patches, so we don't rely on single person's time commitment
<drakonis> sure
<drakonis> oh, before i forget
<drakonis> the patches used in ports should be migrated to nixpkgs
<abbe> i think _0mp mentioned in his discord reply that he'll work on that
<drakonis> discourse
<abbe> lol, yes :(
<drakonis> but yeah
<_0mp> oh, wow
<_0mp> nix master has a lot of changes already
<_0mp> most patches dont apply anymore
<_0mp> also, there are a couple new dependencies
<Mic92> nix is moving fast
<_0mp> oh well
<_0mp> anyway, I've pushed some changes to start catching up https://github.com/0mp/freebsd-ports-nix
<_0mp> ;)