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
orivej has joined #nixos-dev
<pbogdan> darwin stdenv seems to be broken on staging
mbrgm has quit [Ping timeout: 240 seconds]
mbrgm has joined #nixos-dev
tv has quit [Ping timeout: 245 seconds]
tv has joined #nixos-dev
primeos has quit [Ping timeout: 268 seconds]
primeos has joined #nixos-dev
jtojnar_ has joined #nixos-dev
jtojnar has quit [Ping timeout: 260 seconds]
jtojnar_ is now known as jtojnar
jtojnar_ has joined #nixos-dev
jtojnar has quit [Ping timeout: 260 seconds]
jtojnar_ is now known as jtojnar
pie_ has quit [Ping timeout: 245 seconds]
ma27 has joined #nixos-dev
ma27 has quit [Ping timeout: 265 seconds]
__Sander__ has joined #nixos-dev
MichaelRaskin has quit [Quit: MichaelRaskin]
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #nixos-dev
JosW has joined #nixos-dev
<LnL> oh?
pie_ has joined #nixos-dev
<__Sander__> sigh
<__Sander__> fixing stenv-native is harder than I thought
<__Sander__> this whole $bintools thing must be somehow avoided
pie_ has quit [Ping timeout: 268 seconds]
goibhniu has joined #nixos-dev
jtojnar has quit [Remote host closed the connection]
goibhniu has quit [Ping timeout: 240 seconds]
zybell_ has quit [Ping timeout: 268 seconds]
zybell_ has joined #nixos-dev
<flokli> grahamc: something with ofborg and running test seems to be broken: https://logs.nix.ci/?key=nixos/nixpkgs.33679&attempt_id=53bc2f47-d89e-49d4-87f5-b87471d10ab9
<gchristensen> yikes
<gchristensen> ok, gleber_ -- I'm going to stop your builder for now
<shlevy> peti: If I want to make an overlay that is against a specific stackage nightly resolver instead of the latest LTS, what's the recommended way to do that?
<pbogdan> gchristensen: that reminds me - that builder seemed to be running without build timeouts (not sure if that's intended)
<shlevy> I assume some modification of configuration-hackage2nix.yaml?
<gchristensen> pbogdan: maybe they set their builder very long
<peti> shlevy: Yes. Checkout the "update-stackage.sh" script in the cabal2nix repo. If you hard-code a particular LTS version in there (it uses the latest version by default), then it will generate a configuration-hackage2nix.yaml file for you.
<shlevy> peti: Great, thanks!
<peti> shlevy: Then you can run hackage2nix using that file to generate an appropriate hackage-packages.nix file.
<shlevy> Awesome
<shlevy> peti: Do you know how hard it'd be to make that IFD safe? I guess once you have all-cabal-hashes and configuration-hackage2nix.yaml it's pure?
<peti> shlevy: Yes. The outcome from hackage2nix is determined completely by the state of the <nixpkgs>, all-cabal-hashes, and configuration-hackage2nix.yaml.
<peti> No other variabled.
<peti> *variables.
<shlevy> Awesome. Thank you!
<peti> So that output could be a fixed output derivation.
<peti> Or is it called "fixed hash derivation"?
<peti> Hmm.
<peti> Anyhow, you know what I mean. :-)
ma27 has joined #nixos-dev
<shlevy> :) yeah
JosW has quit [Quit: Konversation terminated!]
olto has joined #nixos-dev
ma27 has quit [Quit: WeeChat 2.0]
ma27 has joined #nixos-dev
pie_ has joined #nixos-dev
ma27 has quit [Ping timeout: 240 seconds]
pie__ has joined #nixos-dev
pie_ has quit [Read error: Connection reset by peer]
kmicklas has joined #nixos-dev
<domenkozar> hmm, did authentication change for postgresql in 18.03?
<clever> domenkozar: the role that has root access was changed, and nixos needs the stateVersion key to know the right one
<domenkozar> yeah but I can't ident anymore with my $USER
<clever> if the root role is wrong, the systemd postStart hook cant even confirm the service is up, and systemd will timeout and kill it
<domenkozar> postgresql is definately running
<domenkozar> I created a new role
<clever> does systemd say its running or starting?
<domenkozar> SessionError (ResultError (ServerError \"42601\" \"syntax error at or near \\\"user\\\"\" Nothing Nothing))"
<domenkozar> this used to work with postgresql:///db
<clever> ah, no clue about that error
<domenkozar> hmmz, I was so close to test all of my changes :D
<domenkozar> I thought
__Sander__ has quit [Ping timeout: 260 seconds]
<domenkozar> thoughtpolice: did you stubmle upon this? Or do you use password auth?
<domenkozar> oh that's actually an error in SQL
<domenkozar> d'oh
<domenkozar> wish that hasql would use HasCallStack or something.
<Profpatsch> gchristensen: shlevy Are you okay with merging the lib/debug overhaul PR? https://github.com/NixOS/nixpkgs/pull/38368
<Profpatsch> Would be nice to have one final thumbs up. :)
<shlevy> Profpatsch: no opinion :) If you can't get one from someone else ping me again and I'll review
<Profpatsch> Argh, of course the manual part has conflicts because it’s appened-based.
xeji has joined #nixos-dev
catern has quit [Quit: catern]
<Profpatsch> > when you realize you can call nix pretty well inside of builders, as long as you don’t need any fixed-output derivations
<Profpatsch> e.g. to construct shell scripts from json files.
zybell_ has quit [Ping timeout: 264 seconds]
xeji has quit [Quit: WeeChat 2.0]
<shlevy> domenkozar: Jesus christ literally the first three python projects I tried to build with the new infra have dumb problems
zybell_ has joined #nixos-dev
<domenkozar> shlevy: well it's very unused code
catern has joined #nixos-dev
<shlevy> Yeah
<Profpatsch> What happened to build-use-substitutes?
<Profpatsch> I can’t find any reference to the nix option anywhere.
<Profpatsch> But it seems to work just fine?
<Profpatsch> Also it’s referenced nowhere in the nix manual, not even any changelogs.
<shlevy> Profpatsch: you can do --substituters ''
<gchristensen> Profpatsch: see c2154d4c8422ddc1c201d503bb52edff854af2ad
<Profpatsch> Hm, the rename should really have been mentioned in the manual.
<Profpatsch> gchristensen: You had no further problems with https://github.com/NixOS/nixpkgs/pull/38368 right?
<gchristensen> in a meeting, sorry
<Profpatsch> Ah, okay.
<Profpatsch> please continue then. :)
<gchristensen> (so is shlevy fwiw :))
<domenkozar> :D
<Profpatsch> Meetings, meetings everywhere
<copumpkin> niksnut: arrrgh!
<copumpkin> niksnut: did your official Nix 2.0 builds go against an old version of aws-sdk-cpp that doesn't have a patched S3 internal error retry? :P
<copumpkin> evidence points to yes
<copumpkin> I'm guessing you built against release-17.09, which I'm guessing didn't get a backport of aws-sdk-cpp to include that fix? anyway, I'm just seeuing some brand new Nix 2.0 instances barfing on internal errors and wondered if you knew
zybell_ has quit [Quit: Leaving]
zybell_ has joined #nixos-dev
<niksnut> copumpkin: yes, probably
<copumpkin> if I backported it, would you be okay with a minor release to add it?
<niksnut> well, it now builds against 18.03 iirc
<copumpkin> ah okay
<copumpkin> but the official release in the AMIs and website is built against 17.09? or 18.03?
<copumpkin> yeah, so I changed the aws-sdk-cpp in nixpkgs to be the older version because it broke stuff
<copumpkin> and instead added an override in the nix expression
<copumpkin> but presumably you came at it from the other side in the nix repo
<copumpkin> which doesn't have my override
<Profpatsch> What’s the simplest builder that can write a nix string into a file without depending on stdenv?
<Profpatsch> As in derivation { name = ; builder = ???; system = ;}
<Profpatsch> Is there anything simpler than sh?
<Profpatsch> Or writing a C program?
<gchristensen> "Updating to nixos 18.03 has been just horrible so far. Everything broke." :/
<gchristensen> "New commands are broken and undocumented. Old commands don't work either. KDE doesn't start anymore." yikes.
jtojnar has joined #nixos-dev
<LnL> nix-repl is easy to fix
<LnL> and nix eval is strict, unlike nix-instantiate --eval
<copumpkin> Profpatsch: like builtins.toFile?
<copumpkin> gchristensen: damn
<Profpatsch> copumpkin: ouch, thanks.
<Profpatsch> copumpkin: This also works :D http://lpaste.net/364769
<Profpatsch> don’t @ me!
<copumpkin> Profpatsch: possible downside is that it’s not a derivation
<shlevy> It's kind of unfair to say "old commands don't work" with reference to nix-repl
phreedom has quit [Remote host closed the connection]
phreedom has joined #nixos-dev
<Profpatsch> copumpkin: Hm, do you know of a way to make nix-instantiate output something which is not a quoted string?
<Profpatsch> Essentially I’m searching for the simplest way to eval to a plain string (just use nix’ interpolation qualities)
<copumpkin> can't think of a simple way, nope :/
<Profpatsch> Or the simplest way to get an output file which contains only that string.
<Profpatsch> So that means the simplest derivation that puts a string into $out
<Profpatsch> (a nix string)
<copumpkin> ah, so toFile would work there?
<copumpkin> cat $(nix-instantiate --eval -E "builtins.toFile blahbalh")
<copumpkin> kinda hacky :)
<copumpkin> you could also just strip the quotes and skip the file altogether
<Profpatsch> "/nix/store/vxjiwkjkn7x4079qvh1jkl5pn05j2aw0-foo"
<copumpkin> | sed -e 's/^"//' -e 's/"$//' :P
<Profpatsch> Yeah, probably.
<Profpatsch> Ugh, why does toFile not produce a derivation again?
<Profpatsch> There is really no reason.
<copumpkin> wtf, I expected it to produce a path
<copumpkin> not a derivation is understandable
<copumpkin> not a path seems weird
<Profpatsch> everything is horrirby broken
<Profpatsch> It does.
<copumpkin> niksnut, shlevy: there's no reason for toFile to return a string instead of a path, right?
<Profpatsch> But --eval outputs it inside ""
<copumpkin>
<copumpkin> nix-repl> builtins.typeOf (builtins.toFile "zomg" "hahaha")
<copumpkin> "string"
<Profpatsch> > nix-instantiate --eval -E 'builtins.toPath (builtins.toFile "foo" "bar")'
<Profpatsch> "/nix/store/vxjiwkjkn7x4079qvh1jkl5pn05j2aw0-foo"
<Profpatsch> Hm
<shlevy> copumpkin: it needs to be a string
<shlevy> copumpkin: because it needs the context
<copumpkin> normal paths don't get output with quotes
<copumpkin> *grumpyface*
<shlevy> the path /nix/store/hash-foo gets copied
<shlevy> you'd need to do builtins.storePath /nix/store/hash-foo... which is a string :D
<copumpkin> Profpatsch: just use sed :P
<Profpatsch> Then it’s kind of scary how badly UNIX composes.
* copumpkin pouts
<Profpatsch> The essentially smallest builder that copies from one env variable to another is
<Profpatsch> #!${stdenv.shell}
<Profpatsch> ${pkgs.coreutils}/bin/install $filePath $out
<Profpatsch> You can’t even achieve the copy within the shell alone!
<shlevy> Profpatsch: try placeholders :)
<Profpatsch> Placeholders?
<shlevy> derivation { builder = "${pkgs.coreutils}/bin/install"; arguments = [ filePath (placeholder "out") ]; }
<shlevy> erm it's args not arguments I think
<shlevy> And you need name and system set
<shlevy> but yeah
<Profpatsch> Oh what, nix 2.0
<Mic92> When people talk about unix I always have to think about these propritary enterprise operating systems that where horrible incompatible with each other.
<Profpatsch> But did they compose?
<Mic92> I am glad those no longer exists
<Profpatsch> Lisp Machines to the end. :P
<Profpatsch> (not really tho)
<Profpatsch> shlevy: Hm, I’d still need to resolve the $filePath env variable
<LnL> copumpkin: there's nix eval --raw now
<copumpkin> whoa
<Profpatsch> LnL: AWESOME
<Profpatsch> But not backported to nix-instantiate?
<LnL> but, that only takes installables not expressions AFAIK
<LnL> oh no it works if you add parens
<LnL> nix eval --raw '(with import <nixpkgs> {}; "${hello}")'
<Profpatsch> Nice!
<Profpatsch> Then my jq replacement is complete. d)
<Profpatsch> And I don’t even need to run a build to output a string. :P
<LnL> yeah, nix-instantiate --eval ... | jq -r . looks kind of silly :p
<Profpatsch> LnL: Well, I went into this wanting to avoid jq from the get-go.
<Profpatsch> Basically have a script now that takes a nix file (Json -> Json) and a json value.
<Profpatsch> And the nix file has all of lib in scope.
<Profpatsch> Because even something like an object from key to lambda (Val -> String) seems impossible with jq
ckauhaus has joined #nixos-dev
<Profpatsch> Wait, where did --show-trace go with nix eval?
<Profpatsch> --debug does something different.
<LnL> hmm? it still works
<Profpatsch> Ah, okay. Tried with an error that didn’t trigger any stack traces.
<Profpatsch> It’s not documented, though.
MichaelRaskin has joined #nixos-dev
<zybell_> Profpatch:shell alone:`while read a;do;echo "$a";done>"$file"<<EOF`
<zybell_> Profpatsch:the s didn't connect ^ sorry
<Profpatsch> zybell_: Hm, right.
<Profpatsch> Good to know
pie__ has quit [Remote host closed the connection]
pie__ has joined #nixos-dev
<thoughtpolice> domenkozar: Hah, good thing you figured that one out, phew. Yeah I use local unix user auth, not PW auth, which has worked fine for me.
ckauhaus has quit []
ckauhaus has joined #nixos-dev
<dtz> you can enable "show-trace" in nix.conf now, which I did after being unclear how to enable w/some command--or maybe just convenience? anyway it's useful :)
ckauhaus has quit [Remote host closed the connection]
<domenkozar> thoughtpolice: sorry for the ping :) fixed my logging so it's more clear next time.
kmicklas has quit [Ping timeout: 256 seconds]
phreedom has quit [Remote host closed the connection]
phreedom has joined #nixos-dev
olto has quit [Ping timeout: 264 seconds]
Sonarpulse has quit [Ping timeout: 240 seconds]