gchristensen changed the topic of #nixos-dev to: NixOS Development (#nixos for questions) | https://hydra.nixos.org/jobset/nixos/trunk-combined https://channels.nix.gsc.io/graph.html | 18.03 release managers: fpletz and vcunat | https://logs.nix.samueldr.com/nixos-dev
goibhniu has quit [Ping timeout: 260 seconds]
ma27 has quit [Quit: WeeChat 2.0]
pie__ has joined #nixos-dev
pie_ has quit [Ping timeout: 260 seconds]
pie___ has joined #nixos-dev
pie__ has quit [Ping timeout: 264 seconds]
phreedom has quit [Remote host closed the connection]
phreedom has joined #nixos-dev
lassulus_ has joined #nixos-dev
lassulus has quit [Ping timeout: 244 seconds]
lassulus_ is now known as lassulus
pie___ has quit [Ping timeout: 264 seconds]
lopsided98 has quit [Quit: Disconnected]
lopsided98 has joined #nixos-dev
Lisanna has quit [Quit: Lisanna]
v0latil3 has joined #nixos-dev
<v0latil3> Big Noob here, can anyone bother to help me with making a Pee H P package? I have a couple questions
<v0latil3> I don't know anything about php but it seems theres a getenv() function that can get stuff from a .env file. I would want the .env file to be made by a nix services.mypackage options but it is in the package root which is immutable
<v0latil3> Is this channel only for development of Nix itself? sorry if that's the case
__Sander__ has joined #nixos-dev
<steveeJ> v0latil3: you might have more luck in #nixos even if the answer to your last question was no. also your issue description seems a little confusing to me, maybe work that out and re-state? :D
<v0latil3> steveeJ, thanks, i'll post it there too. basically there is a config file with database connection, etc. that would end up in the nix store
<v0latil3> I think maybe I need to change the application itself a bit to package it the nix way
goibhniu has joined #nixos-dev
obadz has quit [Ping timeout: 248 seconds]
obadz has joined #nixos-dev
__Sander__ has quit [Ping timeout: 240 seconds]
ckauhaus has joined #nixos-dev
orivej has quit [Ping timeout: 260 seconds]
__Sander__ has joined #nixos-dev
v0latil3 has quit [Read error: Connection reset by peer]
phreedom has quit [Ping timeout: 250 seconds]
phreedom has joined #nixos-dev
pie___ has joined #nixos-dev
ma27 has joined #nixos-dev
<gchristensen> standard firefox on 18.03 can use u2f keys now, fyi
averell has quit [Quit: .]
averell has joined #nixos-dev
aminechikhaoui has quit [Killed (rajaniemi.freenode.net (Nickname regained by services))]
aminechikhaoui has joined #nixos-dev
aminechi1haoui has joined #nixos-dev
aminechi1haoui has quit [Ping timeout: 256 seconds]
averell has quit [Quit: .]
averell has joined #nixos-dev
orivej has joined #nixos-dev
averell has quit [Remote host closed the connection]
averell has joined #nixos-dev
<Enzime> LnL: are packages meant to build with nix.useSandbox on Darwin?
<Enzime> ld: warning: directory not found for option '-F/System/Library/PrivateFrameworks'
<Enzime> ld: warning: option -s is obsolete and being ignored
<Enzime> ld: file not found: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
<gchristensen> I think sandboxing is mostly broken on macOS?
<Enzime> getting that when I turn on sandbox
<LnL> yeah, sandboxing doesn't work with framework yet
<Enzime> LnL: also are we meant to be packaging stuff that comes only as .dmg w/o source code?
<LnL> I have an idea that might fix it, but I've not tested if it actually fixes the sandbox paths
<LnL> we generally avoid prepackaged things but there's not inherent problem with it, there's a bunch of unfree stuff in nixpkgs
<Enzime> LnL: just curious if there's any point
<Enzime> I guess it could be useful for people that specify packages across OSes and one more app that can be installed by Nix would be nice
jtojnar has joined #nixos-dev
aminechikhaoui has quit [Ping timeout: 240 seconds]
<LnL> main problems are 1. those often are not redistributable, so we can't cache/build on hydra 2. generally pretty hard to find a versioned source url
aminechikhaoui has joined #nixos-dev
aminechikhaoui has quit [Remote host closed the connection]
aminechikhaoui has joined #nixos-dev
aminechikhaoui has quit [Quit: Lost terminal]
aminechikhaoui has joined #nixos-dev
aminechikhaoui has quit [Remote host closed the connection]
aminechikhaoui has joined #nixos-dev
<domenkozar> t/buffer 41
<domenkozar> meh
Sonarpulse has joined #nixos-dev
ckauhaus has quit [Quit: Leaving.]
<gchristensen> niksnut: I'd like to compare how the Packet-T2-4 machine performs against how an AMD EPYC machine performs. what sorts of metrics do you think would be helpful for this? I'd be down to write some perl to add a metric exporter to Hydra, to support the research
<gchristensen> a sort of trivial one would be exposing "steps done" and "time per step" on the /machines endpoint via the JSON API (or even a prometheus-compatible output :))
<{^_^}> #975 (by cleverca22, open): fix deployment errors when deployment.route53.hostName contains uppercase letters
<niksnut> what does "metric exporter to Hydra" mean?
<gchristensen> an API endpoint which dumps metrics in a machine-parsable format
<simpson> +1 for Prometheus-compatible output.
<LnL> hydra exposes some statsd metrics
<gchristensen> so I can scrape it in to a metrics tool in order to write an article about T2-4 vs. the EYPC and how they compare in our use case
<niksnut> you can already export metrics, e.g. curl -H 'Accept: application/json' https://hydra.nixos.org/job/nixpkgs/trunk/metrics/metric/loc
<gchristensen> I don't want about Nixpkgs, but about Hydra and how its various machines perform and compare.
<gchristensen> I want to see if the AMD EPYC is better for our build farm than the other machine, and if so, write up something compelling with pretty graphs about exactly how much better
<niksnut> I would just run nix-build on each machine
<Dezgeg> kernel compile benchmarks!
<niksnut> I mean, we could query the average step runtime for each machine / machine type, but that wouldn't be very scientific
<gchristensen> those would be good benchmarks to do as part of the article, but these things aren't unique to us, I think it is important to have the data come from the context of Hydra specifically would be a nice level of detail to include
* gchristensen should do a read-through of his messages before sending :P
<gchristensen> can we also count the number of steps per machine over a time period niksnut?
<niksnut> sure, but what would that show?
<gchristensen> hopefully that it is doing more steps over the same time period
<gchristensen> I recognize that isn't very scientific
<niksnut> yes, because e.g. the hydra scheduler is biased
<niksnut> (iirc)
<clever> ive also noticed that while it is scanning the binary caches to generate a build vs download plan, it wont start things it already knows it has to build
<clever> so the binary cache scanning can become a bottleneck
<niksnut> I don't think that's the case
<niksnut> it's just that scanning the queue can take a long time
<niksnut> but runnable steps created during queue loading should start building right away
<niksnut> but often it has to load 50K darwin jobs first
<clever> yeah, thats a different issue, it refuses to start a linux job, because its busy loading all the darwin jobs
pie___ has quit [Ping timeout: 244 seconds]
erickomoto has joined #nixos-dev
obadz has quit [Ping timeout: 240 seconds]
__Sander__ has quit [Quit: Konversation terminated!]
phreedom has quit [Ping timeout: 250 seconds]
pie___ has joined #nixos-dev
<simpson> thoughtpolice: Sorry for the ping, but any progress on https://github.com/NixOS/nixpkgs/issues/42603 ? I've tried a few things but no luck.
<{^_^}> #42603 (by MostAwesomeDude, open): Z3 Python bindings should have a Python 3 variant
<thoughtpolice> simpson: Unfortunately not I'm afraid. I'll try to take a look today if I can.
<simpson> No worries. Seems like a tough nut to crack.
pie___ has quit [Ping timeout: 240 seconds]
<thoughtpolice> simpson: Yeah... it really just requires examining Z3's build system more than anything which is what's so tedious :|
<simpson> Oh, definitely.
<simpson> I'm pretty disappointed that there isn't a slow/stub/pure-Python Z3 module I could use instead. Why must Python packaging suck?
<thoughtpolice> To be fair, Z3 is complex and very performance sensitive (so a pure-Python version really isn't going to fly, reimplementing everything twice, very slow, etc), but yeah they could have made this easier.
<thoughtpolice> Looking at the build system, I think actually fixing it isn't too much work.
<thoughtpolice> But there's a catch: it does, in fact, have to choose either Python2 or Python3.
<thoughtpolice> So if we wanted both python3Packages and python2Packages to have z3, then we basically can't escape building it twice
<thoughtpolice> From what I can tell
<thoughtpolice> This really isn't too surprising, although it would have been sooo much nicer if they could have used cffi or something instead, perhaps...
<simpson> I am mildly okay with this. That only covers CPython, right? I'm trying to use https://github.com/CozySynthesizer/cozy which should be fine with CPython 3.
<thoughtpolice> (Then there would maybe be some hope of the code being 2/3 compatible with very simple FFI calls, rather than some big complex C-based binding...)
<simpson> Ha, yeah, it'd be nice if folks used cffi. Too bad the ecosystem doesn't use PyPy more.
<thoughtpolice> simpson: I don't use Python. Python 2 is, as well-discussed-elsewhere, on its EOL within 2 years. So I'd lean towards making it a Python 3 package only.
<thoughtpolice> Well, I don't use Python much. But my name *is* on a few packages in python-modules, admittedly...
<thoughtpolice> And if anyone wants a separate Python 2 binding, by all means. Though I may not do it myself.
<thoughtpolice> Like, it's not *that* bad to rebuild it multiple times but Z3 is actually kind of a hog to build...
<simpson> CPython 2 might be dying, but Python 2 will live on forever, because PyPy will not die. I expect that our Python 2 tree won't go away, just morph so that `python2Packages` gives a PyPy 2.7.
<thoughtpolice> I'd rather not make Hydra consciously worth by wasting ~10 extra minutes of build time if I can get away with it. Everything counts.
<simpson> Oh, definitely. If Z3 and Cozy were able to Just Work in a virtualenv, then that'd be great. But they don't.
<thoughtpolice> simpson: Maybe they'll push PyPy3 forward more before 2020. I'd like to see that myself since it seems pretty great.
<simpson> thoughtpolice: Nobody's paying for PyPy3, because people are selfish fools, so it might be discarded by then.
<thoughtpolice> Let's hope it doesn't come to that.
goibhniu has quit [Ping timeout: 264 seconds]
<thoughtpolice> simpson: I see. It actually is not Z3's problem at this point; in fact, Z3 *is* built against python, and does include the libraries. There's an output `$out/lib/python2.7/site-packages/z3` -- but, things like `python27.withPackages (_: [ z3 ])` do not include this in $PYTHONHOME
<thoughtpolice> simpson: So, something perhaps needs to be propagated correctly so the Python code picks this up.
<simpson> thoughtpolice: Okay, that's about what I noticed too. I couldn't find our PYTHONPATH patchups, so I don't know exactly how to make it work.
<thoughtpolice> (Where "Python code" = "Nix Python Infrastructure")
<thoughtpolice> Right
Sonarpulse has quit [Ping timeout: 276 seconds]
orivej has quit [Ping timeout: 260 seconds]
<thoughtpolice> simpson: Might have a fix incoming.
<simpson> thoughtpolice: Swag. Lemme make a PR for what I've got too, 'cause I did the rest of Cozy's deps.
orivej has joined #nixos-dev
<thoughtpolice> The Nixpkgs manual says that "multiple outputs... can often be achieved with a single line".
<thoughtpolice> I am pretty sure that in 100% of all cases where I have attempted to author multiple-out derivations, this has absolutely never, ever, ever been true.
<infinisil> thoughtpolice: A single line of Nix? Or what does that refer to?
<thoughtpolice> Yes, the `ouputs = [ ... ];` directive.
<samueldr> isn't it trying to the "the right thing" for some names, e.g. man, info, automatically?
Sonarpulse has joined #nixos-dev
<thoughtpolice> samueldr: It's a weird and hard problem, admittedly. But it makes some assumptions that don't hold a surprising amount of times. For example, if my build is just a Makefile, you can't often easily just set `outputs = [ ... ];` because it expects the build process to put the files there *for* you. That is because by default it will try to run the configurePhase with appropriate options, pointing to multiple-out dirs
<thoughtpolice> But it's often completely safe to just move them. If I have `foo-1.2.3/{bin,lib,include}` -- it's often safe to just split that into `foo-1.2.3-{bin,lib,include}`.
<samueldr> yeah, that's what I was half-expecting (I was also asking for learning purposes)
<thoughtpolice> This isn't always true but it means that "a single line" only ever works in the most extremely contrived of cases.
<thoughtpolice> Or, really, "if you are using autoconf". Which to be fair, Nix handles autoconf very well for the most part, so
<thoughtpolice> But everything else is annoying, basically.
aminechikhaoui has quit [Ping timeout: 240 seconds]
<thoughtpolice> Okay, I managed to reduce z3 from ~50mb to a ~25mb closure, at least.
aminechikhaoui has joined #nixos-dev
<dtz> \o/
<thoughtpolice> *Sigh* I'm afraid I don't understand the Python infrastructure at all.
<thoughtpolice> No amount of magic incantations will make Python figure it out. I guess I have to use a setup-hook....
<thoughtpolice> Everything has to always be such a chore...
ixxie has joined #nixos-dev
<thoughtpolice> From what I can tell, the existence of lib/${python.libPrefix} should be all that's needed for the wrapper but, ugh
<thoughtpolice> Also, the Z3 build system copies libz3.so into site-packages, bloating it by 20mb :|
<dtz> :(
ixxie has quit [Ping timeout: 240 seconds]
<thoughtpolice> dtz: Aside from slimming Z3, I did merge a Yices 2.6 PR yesterday, too, since I know you're using it :)
Lisanna has joined #nixos-dev
<dtz> awesome! And TYVM for mentioning, I'd missed that! :3
erickomoto has quit [Ping timeout: 252 seconds]
phreedom has joined #nixos-dev
* gchristensen nix-build -j 48's
Lisanna has quit [Quit: Lisanna]
phreedom has quit [Ping timeout: 250 seconds]
<gchristensen> kernels build in 8min (EPYC) vs 13min (the other one)
Lisanna has joined #nixos-dev
phreedom has joined #nixos-dev
<gchristensen> 10015.72user 1470.06system 8:55.30elapsed 2145%CPU (0avgtext+0avgdata 267200maxresident)k
<gchristensen> 10679.37user 1672.37system 13:43.77elapsed 1499%CPU (0avgtext+0avgdata 267140maxresident)k
jtojnar has quit [Read error: Connection reset by peer]