carlosdagos has joined #nix-darwin
jtojnar has quit [Remote host closed the connection]
jtojnar has joined #nix-darwin
alexteves has quit [Remote host closed the connection]
Ericson2314 has quit [Ping timeout: 276 seconds]
disasm has joined #nix-darwin
Lisanna_ has quit [Quit: Lisanna_]
gleber__ has joined #nix-darwin
gleber_ has quit [*.net *.split]
hsribei has quit [*.net *.split]
gleber__ is now known as gleber_
thefloweringash has joined #nix-darwin
trcc has joined #nix-darwin
trcc has quit [Remote host closed the connection]
trcc has joined #nix-darwin
hamishmack has joined #nix-darwin
periklis has joined #nix-darwin
peel has joined #nix-darwin
alexteves has joined #nix-darwin
trcc has quit [Remote host closed the connection]
trcc has joined #nix-darwin
peel has quit [Quit: Connection closed for inactivity]
trcc has quit [Ping timeout: 272 seconds]
trcc has joined #nix-darwin
hamishmack has quit [Ping timeout: 268 seconds]
hamishmack has joined #nix-darwin
philr has joined #nix-darwin
philr has quit [Client Quit]
periklis has quit [Ping timeout: 252 seconds]
<disasm> this doesn't work on darwin :( `exec {fd}<&2; time ( $@ 2>&$fd; ) 2>> ~/metrics; exec {fd}<&-`
<disasm> anyone have suggestions on how to alter that command to work on darwin? I think it's the way darwin handles the fd descriptors that's breaking it.
<disasm> I'm trying to add optional phase metrics in stdenv that logs each phase system/real/user time. It's working great on linux, and then I saw all my darwin builds failed.
<gchristensen> owww
<disasm> this is the whole function if it helps: https://gist.github.com/225e64839c5b27ac258537a6494e1d96
pikajude has quit [Quit: ZNC 1.7.1 - https://znc.in]
pikajude has joined #nix-darwin
Lisanna_ has joined #nix-darwin
trcc has quit [Remote host closed the connection]
trcc has joined #nix-darwin
<thefloweringash> (I messed up the quoting, but the redirection and time commands still seemed to work)
trcc has quit [Ping timeout: 256 seconds]
{`-`}_ has joined #nix-darwin
{`-`} has joined #nix-darwin
<disasm> thanks thefloweringash!
Lisanna_ has quit [Quit: Lisanna_]
<disasm> I don't see a difference there. Is running it as a runCommand just ensuring a different shell is used than stdenv/generic/setup.sh?
<thefloweringash> Sorry, should have been more clear. My result was "cannot reproduce"
<disasm> huh, yeah, that's interesting...
<disasm> your runCommand thing works fine here
<disasm> https://gist.github.com/3b2bd33d894fd3a656323b2f8e33b3dd is the output I get if I do it not in a runCommand though.
<thefloweringash> I think that's expected. the named fds feature came in in bash 4.mumble (can't find where I just read that)
<thefloweringash> 4.1 according to https://gist.github.com/gin1314/3697341
<disasm> oh, so stdenv wouldn't be using the nix version of bash?
<thefloweringash> system bash is 3.2.57 (as of current macOS), the bash nix uses should be from nix, at least my `nix-shell --pure -A hello` says "version 4.4.23(1)-release"
<disasm> oh wait, it's a different error when ran in stdenv
<qyliss^work> system bash is stuck on 3.2 forever because Apple hates the GPL
<disasm> I tried reproducing the error manually, and got that other error
<disasm> going to realise that version of stdenv on a mac and poke around line 1264
<disasm> it doesn't like `duration=$((end - start))` on OSX :)
<disasm> well, that's where the error is, works running manually
<disasm> aha! variable is overwritten!!!
<disasm> start="$(pwd)"
<disasm> that's in the OSX SDK
<disasm> I'll just rename start/end to phase_start_time
<disasm> sadly, that means I get to rebuild stdenv all over again, lol
<LnL> disasm: what's the shebang?
<disasm> LnL: in setup.sh?
clever has quit [Disconnected by services]
clever has joined #nix-darwin
<disasm> there is no #! at the top of setup.sh
<clever> disasm: this prepends some things to setup.sh, but not a #!, https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/builder.sh#L9-L14
<clever> and it doesnt use a #! because the path to bash is in the args of builtins.derivation
<disasm> clever: I was responding to LnL question before you joined :) disasm: what's the shebang?
<clever> i saw it
<clever> 2018-08-23 13:14:12 < LnL> disasm: what's the shebang?
<clever> 2018-08-23 14:19:54 -!- clever [~clever@unaffiliated/clever] has joined #nix-darwin
<disasm> ah :)
<clever> setup.sh gets transformed into $stdenv/setup, and then it gets sourced by the default builder, and there is no #! at any point
<LnL> ah, stdenv or bootstrap stdenv?
<disasm> `pkgs/stdenv/generic/setup.sh`
<LnL> well yes, but what variant, since you where talking about rebuilds...
<disasm> I think it affects both. plan is to try to get this upstreamed in the near future, but you can view the diff here: https://github.com/input-output-hk/nixpkgs/pull/1/files
<disasm> my first time ever touching stdenv :)
<LnL> oh hmm, we have our version in the tarball
<LnL> why do we need the ncurses impurity then?
<LnL> ah right... /bin/sh :(
trcc has joined #nix-darwin
<gchristensen> LnL: http://ix.io/1l2V
trcc has quit [Remote host closed the connection]
<LnL> not sure how to read that, is that good or bad? :p
<gchristensen> it just is
<gchristensen> the login-interactive tests pass on Darwin, we can choose to make them better if we want but probably shouldn't make them worse
<LnL> ah ok, I see now
<gchristensen> I look at these tests as descriptive, not prescriptive
<LnL> did you use a library for the tests or just something custom?
<gchristensen> the target systems have almost nothing, and no Nix
<gchristensen> LnL: if you fetch it and nix-build, it'll show you pretty clearly how it works
<LnL> did I mention bats before?
<LnL> I should update that tho...
<LnL> it handles stuff like optional parsable test results and hiding output of successful tests for you
<gchristensen> bats looks really cool
<pikajude> bats is the bash one right
<gchristensen> yea
<LnL> yeah, it doesn't actually do that much but what it does you don't really want to handle yourself :)
<LnL> wow, sticker mule is fast
<gchristensen> already got them? :o
<LnL> I would have, but couldn't receive them today
<LnL> they where supposed to arrive somewhere next week
trcc has joined #nix-darwin
trcc has quit [Remote host closed the connection]
trcc has joined #nix-darwin
trcc has quit [Ping timeout: 252 seconds]
hamishmack has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alexteves has quit [Remote host closed the connection]
<pikajude> ooh, i ordered from sticker mule too
<pikajude> i can't wait