worldofpeace changed the topic of #nixos-dev to: NixOS Development (#nixos for questions) | NixOS 20.09 Nightingale ✨ https://discourse.nixos.org/t/nixos-20-09-release/9668 | https://hydra.nixos.org/jobset/nixos/trunk-combined https://channels.nix.gsc.io/graph.html | https://r13y.com | 20.09 RMs: worldofpeace, jonringer | https://logs.nix.samueldr.com/nixos-dev
bennofs__ has joined #nixos-dev
supersandro2000 has quit [Disconnected by services]
supersandro20002 has joined #nixos-dev
rajivr has joined #nixos-dev
bennofs_ has quit [Ping timeout: 276 seconds]
LnL- has joined #nixos-dev
LnL- has quit [Changing host]
LnL- has joined #nixos-dev
LnL has quit [Ping timeout: 260 seconds]
evils has quit [Remote host closed the connection]
evils has joined #nixos-dev
Emantor has quit [Quit: ZNC - http://znc.in]
Emantor has joined #nixos-dev
jonringer has quit [Remote host closed the connection]
cole-h has joined #nixos-dev
orivej has quit [Ping timeout: 276 seconds]
jonringer has joined #nixos-dev
<bpye> I see we have a way to generate a squashFs in nixpkgs/nixos - do we have a way to generate a 'pre-activated' squashfs? Ie. I'm happy to have the nix store included in the image however it would useful to have all the symlinks generated already, so we could avoid loading the nix store on boot... Thinking of embedded applications here
jonringer has quit [Ping timeout: 264 seconds]
Gaelan_ is now known as Gaelan
cole-h has quit [Ping timeout: 264 seconds]
janneke has quit [Quit: janneke quits Mes'sing]
janneke has joined #nixos-dev
justanotheruser has quit [Ping timeout: 272 seconds]
<supersandro20002> Can someone do something against the troll?
supersandro20002 is now known as supersandro2000
bk1603[m] has quit [Quit: Idle for 30+ days]
<etu> I'm fairly certain that UnaDuda and Joaquinito2051 is the same person
<etu> Yes it is
<etu> Based on the maintainer entry here: https://github.com/NixOS/nixpkgs/pull/114116/files
tom39291 has quit [Ping timeout: 260 seconds]
tom39291 has joined #nixos-dev
ScottHDev5 has quit [Quit: The Lounge - https://thelounge.chat]
<siraben> What's the standard way to query Nixpkgs programmatically within Nix? Say I wanted to find the packages with the most number of maintainers
<siraben> I'm currently hacking something up like I did in https://github.com/NixOS/nixpkgs/pull/97835#issuecomment-706655359
<sterni> siraben: don't do it _in_ nix, but have a wrapper calling nix with certain inputs, builtins.tryEval is relatively limited and doesn't save you from all eval errors which means you'll eventually run into a wall with nixpkgs
<sterni> siraben: have a look at what ofborg and hydra-eval are doing that is the way™ to go pretty much
<siraben> Why not do it in Nix itself? We have a repl!
<sterni> siraben: as said as soon as there is an evaluation error that is not caused by throw, or assert your evaluation will halt
<siraben> I see.
__monty__ has joined #nixos-dev
<sterni> siraben: although you can test interactively as the repl keeps going evaluating an attrset if an eval error occurs iirc
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack has joined #nixos-dev
<lukegb> sterni: that just sounds like it needs more expect(1)
<lukegb> although I guess at that point you're just writing tcl
<sterni> oh no oh no
<sterni> just use a small perl script :p
<sterni> the best solution is of course to override nix with a patch that makes builtins.tryEval catch all exceptions — problem solved
<sterni> you can probably also use nix-env -qaP to do it in pure nix like ofborg does
<regnat[m]1> sterni: the best solution is of course to override nix with a patch that makes builtins.tryEval catch all exceptions <- It doesn't seem fundamentally absurd to add a flag to Nix to do that
<gchristensen> ofborg requires no exceptions during evaluation already
evils has quit [Ping timeout: 265 seconds]
<sterni> gchristensen: nix-env also stops evaluation when a primop type error or a parse error is generated then?
<sterni> probably tryEval is actually enough for nixpkgs as long as you respect recurseIntoAttrs
<gchristensen> I think the only thing nx-env doesn't stop on is a builtins.throw, which is how unfree license checks are made
<sterni> gchristensen: it also skips asserts, so same behavior as tryEval then
<gchristensen> gotcha
<gchristensen> I'm going to trust you on this one :P
<sterni> well nix-env -qaP ocaml-ng.ocamlPackages_4_02 works, so it has to as that set happens to have quite a few asserts
<gchristensen> maybe nix-env doesn't ignore throws then, and just ignores assertsL
<gchristensen> ?
<sterni> recurseIntoAttrs is a double edged sword I found a few attributes that can be evaluated, but ofborg and hydra where oblivious to them which wouldn't even parse
<sterni> i. e. magnetophonDSP.* pretty much (#114290)
<{^_^}> https://github.com/NixOS/nixpkgs/pull/114290 (by sternenseemann, 2 days ago, open): treewide: add missing lib inputs
<gchristensen> yeah, attribute sets like that should probably be marked as recurseIntoAttrs :)
<sterni> gchristensen: indeed
<sterni> gchristensen: it also ignores throws and even hides the throw error message which is why it's more desrieable to use builtins.throw instead of assert lib.assertMsg …
<sterni> unfortunately because sometimes an assert is nice to write than an if … then throw "…" else, but asserts don't have nice error messages
<gchristensen> as you can see my brain has been not close to this part of the problem in a minut enow
orivej has joined #nixos-dev
<hexa-> can someone on build this package on darwin? https://github.com/NixOS/nixpkgs/pull/114556
<{^_^}> #114556 (by mweinelt, 1 hour ago, open): python3Packages.aiohttp: 3.7.3 -> 3.7.4
<sterni> siraben: turns out you could do it in pure nix if you don't need to fetch / build anything by using hnix
<sterni> siraben: hnix has an incompatible implementation for tryEval which catches _all errors_
<regnat[m]1> gchristensen sterni IIRC `throw` is internally a special type of assertion error, and both are caught by `tryEval` and `nix-env`
supersandro2000 has quit [Read error: Connection reset by peer]
supersandro2000 has joined #nixos-dev
<sterni> the beautiful dot graph
<regnat[m]1> Thanks, I never remember where to find it :p
<sterni> for hnix it seems that all eval errors are red and caught by tryEval
<sterni> the other exceptions don't really have a parallel in hnix I guess
<sterni> which is funny because hnix otherwise seems to try to be bug compatible even
supersandro2000 has quit [Quit: The Lounge - https://thelounge.chat]
supersandro2000 has joined #nixos-dev
justanotheruser has joined #nixos-dev
ekleog_ has quit [Quit: WeeChat 2.9]
ekleog has joined #nixos-dev
thibm_ is now known as thibm
orivej has quit [Ping timeout: 240 seconds]
sterni has quit [Ping timeout: 240 seconds]
sterni has joined #nixos-dev
cole-h has joined #nixos-dev
supersandro2000 has quit [Disconnected by services]
supersandro20000 has joined #nixos-dev
orivej has joined #nixos-dev
<rmcgibbo[m]> does anyone have such a patch for nix to make tryEval catch more stuff, like type errors?
<rmcgibbo[m]> maybe it's fairly obvious.
<rmcgibbo[m]> siraben: we have some code in rust based on the rnix parser that parses mkDerivation calls and can look for certain syntactic stuff -- it's in nixpkgs-hammering -- i bet it would be easy to adapt for your maintainer searches.
<sterni> although I don't honestly think it's the best way of doing this
tokudan has quit [Quit: Dunno.]
<rmcgibbo[m]> sterni: I was actually thinking about a different use case. I wanted to see what techniques I could use to do lookups from filename -> nixpkgs attr name fairly quickly without too much RASM, because I was thinking about the github actions + nixpkgs-hammering stuff.
tokudan has joined #nixos-dev
<sterni> how would you do this with tryEval o_O
<rmcgibbo[m]> Well, I wanted to start with something like `builtins.toJSON (pkgs.lib.mapAttrs (name: value: value.meta.position or null) pkgs.python3Packages)`, but you very quickly run into evaluation errors.
<rmcgibbo[m]> It seems like a new builtins.trySuperDuperEval primop that caught more errors might be sufficient?
<rmcgibbo[m]> And actually doesn't require patching `nix`. Just a few lines of plugin code... https://github.com/rmcgibbo/nix-traceFd/
<sterni> ah yeah, right forgot about meta.position
<sterni> builtins.trySuperDuperEval is probably not a popular addition to nix
<sterni> which is fair enough probably
<rmcgibbo[m]> Right -- I'd just do it for myself in my plugin.
<rmcgibbo[m]> The pretty-obscure plugin interface is actually nice like that.
jonringer has joined #nixos-dev
lassulus has quit [Ping timeout: 260 seconds]
supersandro20000 has quit [Read error: Connection reset by peer]
supersandro2000 has joined #nixos-dev
supersandro2000 has quit [Disconnected by services]
supersandro20000 has joined #nixos-dev
supersandro20000 has quit [Read error: Connection reset by peer]
supersandro2000 has joined #nixos-dev
sterni has quit [Ping timeout: 272 seconds]
sterni has joined #nixos-dev
s1341_ has joined #nixos-dev
s1341_ has quit [Changing host]
s1341_ has joined #nixos-dev
s1341_ has quit [Changing host]
<worldofpeace> Any plasma users interesting in testing the wayland session?
<worldofpeace> lol WORLDofPEACE maybe link the PR #100057
<{^_^}> https://github.com/NixOS/nixpkgs/pull/100057 (by pasqui23, 20 weeks ago, open): nixos/plasma: use upstream xsession/wayland files
<siraben> anyone want to merge https://github.com/NixOS/nixpkgs/pull/113982 ?
<{^_^}> #113982 (by siraben, 5 days ago, open): lib/systems/parse: adjust isCompatible description
sterni has quit [Ping timeout: 256 seconds]
sterni has joined #nixos-dev
supersandro2000 has quit [Ping timeout: 265 seconds]
ScottHDev5 has joined #nixos-dev
rajivr has quit [Quit: Connection closed for inactivity]
justanotheruser has quit [Ping timeout: 272 seconds]
supersandro2000 has joined #nixos-dev
lassulus has joined #nixos-dev
jonringer has quit [Remote host closed the connection]
jonringer has joined #nixos-dev
orivej has quit [Ping timeout: 240 seconds]
BaughnLogBot has quit [Ping timeout: 265 seconds]
BaughnLogBot has joined #nixos-dev
justanotheruser has joined #nixos-dev
lopsided98 has quit [Quit: Disconnected]
lopsided98 has joined #nixos-dev
lopsided98 has quit [Client Quit]
lopsided98 has joined #nixos-dev
lopsided98 has quit [Quit: Disconnected]
supersandro2000 has quit [Quit: The Lounge - https://thelounge.chat]
supersandro2000 has joined #nixos-dev
supersandro2000 has quit [Client Quit]
supersandro2000 has joined #nixos-dev
supersandro2000 has quit [Client Quit]
orivej has joined #nixos-dev
BaughnLogBot has quit [Ping timeout: 264 seconds]
BaughnLogBot has joined #nixos-dev
<samueldr> I *think* the /bin/sh in the sandbox is causing issues with using the wrong bash in e.g. writeShellScriptBin used during a build (among possible other places)
<samueldr> because I was using the wrong shell, by using writeShellScriptBin instead of buildPackages.writeShellScriptBin, and things continued on
<samueldr> I only noticed because of a combination where a cross-compiled shell was being built and failing to do so
<samueldr> note: I'm not using any binfmt nonsense that automatically makes binaries from another arch usable
supersandro2000 has joined #nixos-dev
evils has joined #nixos-dev
lopsided98 has joined #nixos-dev
__monty__ has quit [Quit: leaving]
lopsided98 has quit [Quit: Disconnected]
lopsided98 has joined #nixos-dev
supersandro2000 has quit [Quit: The Lounge - https://thelounge.chat]
pmy_ has quit [Ping timeout: 272 seconds]
supersandro2000 has joined #nixos-dev
pmy_ has joined #nixos-dev
supersandro2000 has quit [Client Quit]
supersandro2000 has joined #nixos-dev
supersandro2000 has quit [Quit: The Lounge - https://thelounge.chat]
jonringer has quit [Remote host closed the connection]
supersandro2000 has joined #nixos-dev
<cole-h> PSA: ofborg will undergo the process of being redeployed shortly, to enact https://github.com/NixOS/ofborg/commit/bc00b523ea68d5bf8f33fd8cf604a4eb03a54af7
<cole-h> Redeploy starts... now!
<gchristensen> woohoo!