<johnw> hmm.. this is bizarre
<johnw> after updating my environment, I can't compile basic c++ anymore
<johnw> I get errors like: error: unknown type name 'size_t'
<johnw> yay rollbacks
<johnw> now
<johnw> how do I coordinate this so that I'm rolling back nix-darwin, home-manager and my environments all to compatible generations
<LnL> hmm, the clang-5 update?
<johnw> did that _just_ happen?
<LnL> not sure when staging was merged, but I think it was the previous one
<LnL> I support darwin-rebuild switch --switch-generation
<johnw> i've rolled back a generation to last night
<johnw> let's see
<LnL> not sure about home-manager
<johnw> darwin-rebuild --rollback worked
<johnw> as did nix-env
<johnw> for home-manager I have to use "switch"
<LnL> yeah rollback does the same just n-1
<LnL> I also improved that when working on the installer so that it uses the previous version of nix to rollback
<johnw> weird, home-manager generations shows you the current generations, but not which one you're on
<LnL> that way there's a better chance it will succeed if something gets messed uup
<LnL> I don't use the user profile
<LnL> darwin-rebuild --list-generations
<johnw> i should keep git-notes that associate my nix-darwin generations with nixpkgs commits
<johnw> would make it easier to bisect long after fact
<johnw> since i can see nixpkgs commit hashes for each generation
<johnw> nope, clang is still super borked
<johnw> crap
<johnw> this is not what I wanted to be doing right now
<johnw> this was working last night, so I don't know why rolling back wouldn't have fixed it
<LnL> hmm good point
<LnL> I think I only have /nix/var/nix/profiles/system-237-link/darwin-version, and that's the nixpkgs revision
<LnL> try building a new generation with an older nixpkgs
<LnL> that should definitively work
<LnL> also didn't you use 17.09 for the nix-darwin part or am I misremembering that
<johnw> i use inxpkgs-unsable
<LnL> in that case the clang timing will be different
<LnL> update
<LnL> I only keep an eye on the channels and take a look what to fix if stuff gets out of sync, I don't really use them myself
<johnw> this appears to eb a bad interaction between cabal and c++
<johnw> clang++ on its own works fine
<LnL> let me know if you figure out what's going on, sounds like something we might want to fix for 18.03
<johnw> ok, now this is trange
<johnw> if I do cabal -v build and copy and paste the command that's failing, it works
<johnw> aha
<johnw> cabal build works
<johnw> nix-shell --command "cabal build" doesn't
<johnw> ugh, builds are failing on my iMac again with SIGSEGV, but the Apple Hardware Test turned up nothing. I'll have to run a more intensive memtest86 test tonight.
johnw has quit [Quit: ZNC - http://znc.in]
jtojnar_ has joined #nix-darwin
jtojnar has quit [Ping timeout: 264 seconds]
jtojnar_ is now known as jtojnar
<nostate> LnL: Still around?
nostate has quit [Quit: leaving]
qmm has quit [Ping timeout: 240 seconds]
qmm has joined #nix-darwin
qmm has quit [Ping timeout: 264 seconds]
qmm has joined #nix-darwin
johnw has joined #nix-darwin
jtojnar has quit [Ping timeout: 256 seconds]
qmm has quit [Ping timeout: 256 seconds]
qmm has joined #nix-darwin
dustinm has quit [Quit: Leaving]
dustinm has joined #nix-darwin
jtojnar has joined #nix-darwin
<johnw> well, memtest is finding errors, that's a good thing I guess
prooftechnique_ has quit [*.net *.split]
Lisanna has quit [*.net *.split]
the-kenny has quit [*.net *.split]
cstrahan has quit [*.net *.split]
dredozubov has quit [*.net *.split]
adelbertc has quit [*.net *.split]
LnL has quit [Ping timeout: 260 seconds]
LnL has joined #nix-darwin
<johnw> looks like it's my mainboard :(
<LnL> johnw: have you tried rm -rf ~/.cabal ~/.ghc
<johnw> to do what?
<dtz> that command will cause a NixOS disco-logo to lower from the ceiling and complete with strobe lights and music
Lisanna has joined #nix-darwin
the-kenny has joined #nix-darwin
dredozubov has joined #nix-darwin
adelbertc has joined #nix-darwin
cstrahan has joined #nix-darwin
<johnw> it turns out that every memory module I have starts generating failures at 83% of the way into the test, which is a bad sign
<johnw> and the machine is out of warranty :(
prooftechnique_ has joined #nix-darwin
<LnL> oh, I missed the hardware part
<LnL> not really awake yet :)
<johnw> I wonder how much Apple will want to fix this
<johnw> which is too bad, because the other aspects of the machine work great
seafjord[m] has quit [Ping timeout: 240 seconds]
puffnfresh has quit [Ping timeout: 240 seconds]
dtz has quit [Ping timeout: 240 seconds]
copumpkin has quit [Ping timeout: 255 seconds]
acowley has quit [Ping timeout: 260 seconds]
acowley has joined #nix-darwin
prooftechnique_ has quit [*.net *.split]
Lisanna has quit [*.net *.split]
cstrahan has quit [*.net *.split]
the-kenny has quit [*.net *.split]
dredozubov has quit [*.net *.split]
adelbertc has quit [*.net *.split]
Lisanna has joined #nix-darwin
dredozubov has joined #nix-darwin
the-kenny has joined #nix-darwin
cstrahan has joined #nix-darwin
adelbertc has joined #nix-darwin
prooftechnique has joined #nix-darwin
<_rvl> Hi, I'm new to MacOSX. I'm having trouble with git clone and "error setting certificate verify locations". Anyone seen this error before?
<_rvl> nix-shell --pure -p git --run "git clone https://github.com/LnL7/nix-darwin"
<_rvl> fatal: unable to access 'https://github.com/LnL7/nix-darwin/': error setting certificate verify locations: CAfile: /etc/ssl/cert.pem CApath: none
<Lisanna> ugh
<Lisanna> I spent a good hour a few days ago fighting with CApath stuff with nix and macos
<_rvl> did you win????
<Lisanna> yeah
<Lisanna> but, my issue was that I needed a custom certificate trust chain to work with nix's curl
<Lisanna> and macos doesn't use PEM files when you "trust" a certificate
<Lisanna> it stores them in keychain access
<_rvl> i can get curl to work like this: nix-shell --pure -p curl --run "SSL_CERT_FILE=$NIX_SSL_CERT_FILE curl -I https://nixos.org"
<_rvl> Lisanna: do you have details of that written down somewhere? It might be interesting for me
<Lisanna> I had to concatenate the trustchain into a single PEM file and make sure NIX_SSL_CERT_FILE was always set to point to its location
<Lisanna> but I didn't like that, so I concatenated it with the default pem file
<Lisanna> `/etc/ssl/cert.pem`
<Lisanna> so, if you need to add a trusted cert, append it to that file
<LnL> _rvl: aaah! I don’t understand
<Lisanna> also... SSL_CERT_FILE=$NIX_SSL_CERT_FILE makes no sense
<Lisanna> or, actually, no, that's fine
<Lisanna> you don't need to set SSL_CERT_FILE when using curl through a nix command tho
<Lisanna> if NIX_SSL_CERT_FILE is set
<LnL> for some mysterious reason some people have problems with that
<_rvl> LnL: I know! I thought Macs were supposed to be easy!!
<_rvl> if I don't provide SSL_CERT_FILE to curl, it doesn't work
<LnL> I’ve had a debugging session with at least 3 people and still have no clue what’s going on
<Lisanna> run curl with -vvvvvvvvvvvvv to get it to show what it's doing with certificate finding
<_rvl> and we have other macs which seem quite simmilar, where it works fine with exactly the same curl
<Lisanna> ...huh
<LnL> yeah, I’ve not been able to reproduce it myself that would really help
<_rvl> LnL: oh :-) simple solution
<_rvl> mkdir -p /etc/ssl && ln -sf /nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt /etc/ssl/cert.pem
<LnL> aah no, that's a workaround not a solution :p
<Lisanna> curious, how is nix curl *supposed* to be finding /nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt?
copumpkin has joined #nix-darwin
<LnL> the environment variable
<LnL> and the nix openssl should even look there as the default
<_rvl> if I run "strings `type -p curl` | grep SSL_CERT, can't find any reference to nix
<LnL> strings $(nix-build '<nixpkgs>/lib/libcrypto.dylib | grep SSL_CERT
<LnL> strings $(nix-build '<nixpkgs>' -A openssl.out)/lib/libcrypto.dylib | grep SSL_CERT_FILE
<LnL> it's not curl specific
<LnL> everything that links against openssl gets that behaviour
<LnL> and because this clashes with the native stuff like /usr/bin/curl we have a small patch that adds a NIX_* variant
<LnL> also strings result/lib/libcrypto.dylib | grep /nix/var/nix/profiles
<LnL> _rvl: can you run otool -L on curl/libcurl
<LnL> maybe it's somehow linking against system stuff in an impure way
<_rvl> aha got it, of course
<_rvl> ok, result/lib/libcrypto.dylib has NIX_SSL_CERT_FILE and /nix/var/nix/profiles/../ca-bundle.crt inside
<LnL> well if that wasn't the case it would be _very_ weird
<_rvl> otool -L `type -p curl` reports all dylibs in /nix/store, libcrypto is the same as the result link i just built
<LnL> no @rpath references?
<LnL> hold on
<LnL> this might help DYLD_PRINT_LIBRARIES=1 curl ...
<_rvl> ok i'll put this in a gist
<LnL> and maybe DYLD_PRINT_RPATHS=1
puffnfresh has joined #nix-darwin
dtz has joined #nix-darwin
seafjord[m] has joined #nix-darwin
<_rvl> ok, the results of that are here: https://gist.github.com/rvl/33396f0c4416f66425dc0b4549ea1b58
<_rvl> i wonder if the problem is that i haven't agreed to the command line developer tools license yet?
<LnL> I don't even have the developer tools installed
<LnL> basically looks the same as on my machine
<_rvl> hmm! i wouldn't know where to begin debugging this
<_rvl> would you consider putting the workaround as part of the nix install script? or does it conflict with other things?
<_rvl> also, would ssh access to this mac help?
<LnL> no, we should fix whatever is causing that
<LnL> and yes possibly, but I can't really do any debugging right now
<_rvl> sure, i will do workaround, then maybe i will bump into the reason why it doesn't work for this mac
<LnL> I have time after work, if you're still around then
<_rvl> yeah ok, thanks, i'll be around, not 100% sure on the ssh access yet, will discuss today
philr has quit [Quit: WeeChat 2.0.1]
<LnL> a dtruss of a curl call might be enough to figure out what’s going on
<_rvl> ok i'll try running though dtruss
jtojnar has quit [Ping timeout: 255 seconds]
Lisanna has quit [Quit: Lisanna]
nostate has joined #nix-darwin
<nostate> LnL: I've got nix-darwin going and it's looking really nice. However, your example lnl.nix file doesn't have examples of all the options I want to change. Can you help me learn how to help myself in this area? What do I need to do to add new supported options from System Preferences to nix-darwin?
jtojnar has joined #nix-darwin
<nostate> johnw: How do you decide what stuff to put in home-manager and what stuff to put in nix-darwin?
<LnL> you mean like the defaults write stuff?
<nostate> LnL: Let's say, for instance, that I want to change the Date & Time preferences to show the date in addition to day of the week. How would I figure out what to contribute to nix-darwin to make that possible?
<LnL> yeah, that's a bit tricky apple has no documentation about that
<nostate> How did you figure out the options that you have?
<LnL> by stealing from other people :p
<nostate> What gets changed for, say, system.defaults.dock.autohide?
<LnL> but you can figure some stuff out by running things like opensnoop while changing settings with the ui
<nostate> Aha!
<LnL> but I'd just start with google :)
<LnL> otherwise nix would make nested attributes
<LnL> { foo.bar.baz = 42; } == { foo = { bar = { baz = 42; }; }; }
<nostate> So I use that same syntax in my darwin-configuration.nix?
<nostate> i.e. system.defaults.NSGlobalDomain."com.apple.mouse.tapBehavior" = 1
<nostate> (sorry for the stupid questions, I'm pretty new to nix)
<LnL> you can use darwin-option to navigate most of the options
<LnL> darwin-option system.defaults
<LnL> but yes, there's no indirection yet with more logical names
nostate has quit [Quit: leaving]
jtojnar_ has joined #nix-darwin
jtojnar has quit [Read error: Connection reset by peer]
jtojnar_ is now known as jtojnar
jtojnar_ has joined #nix-darwin
jtojnar has quit [Ping timeout: 248 seconds]
jtojnar_ is now known as jtojnar
<johnw> nostate: if it's only relevant to ~, I try to put it in home-manager
<johnw> nostate: for changing date/time in the menu bar, that I consider a system thing, so it would go in nix-darwin
<johnw> also, most of what's in home-manager is not darwin specific, and would be just as approriate on NixOS
pikajude has quit [Ping timeout: 240 seconds]
<johnw> LnL: opensnoop is awesome!
<johnw> can't believe I never heard of it before
scode_ has joined #nix-darwin
<mitchty> johnw: here's a few more to whet the appetite http://dtrace.org/blogs/brendan/2011/10/10/top-10-dtrace-scripts-for-mac-os-x/
LangeO_ortjes has joined #nix-darwin
prooftechnique_ has joined #nix-darwin
elasticdog has quit [*.net *.split]
prooftechnique has quit [*.net *.split]
LangeOortjes has quit [*.net *.split]
scode has quit [*.net *.split]
scode_ is now known as scode
<mitchty> i use 4 of those almost daily to figure out what new fun tool it is running that slows my work mac down
elasticdog has joined #nix-darwin
pikajude has joined #nix-darwin
<johnw> mitchty: nice! thank you
<_rvl> LnL: i'll set up the buildkite-agent test on Monday
<_rvl> LnL: results of struss on curl are here: https://gist.github.com/rvl/33396f0c4416f66425dc0b4549ea1b58
<_rvl> i couldn't find any smoking gun there, but it might be interesting to compare with struss output on a system where it works
<_rvl> s/struss/dtruss/g
<LnL> thanks! maybe staring at that a bunch will give me an idea :D
<_rvl> maybe -- the open syscalls don't seem to tell me much
<_rvl> anyway cheers, nix-darwin is cool. it works very well
<_rvl> good night
<LnL> well this is interesting, it's also looking at /etc/ssl/cert.pem on my machine
Lisanna has joined #nix-darwin
jtojnar has quit [Quit: jtojnar]
jtojnar has joined #nix-darwin