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
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]
Can someone do something against the troll?
supersandro20002 is now known as supersandro2000
bk1603[m] has quit [Quit: Idle for 30+ days]
I'm fairly certain that UnaDuda and Joaquinito2051 is the same person
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
siraben: have a look at what ofborg and hydra-eval are doing that is the way™ to go pretty much
Why not do it in Nix itself? We have a repl!
siraben: as said as soon as there is an evaluation error that is not caused by throw, or assert your evaluation will halt
__monty__ has joined #nixos-dev
siraben: although you can test interactively as the repl keeps going evaluating an attrset if an eval error occurs iirc
sterni: that just sounds like it needs more expect(1)
although I guess at that point you're just writing tcl
oh no oh no
just use a small perl script :p
the best solution is of course to override nix with a patch that makes builtins.tryEval catch all exceptions — problem solved
you can probably also use nix-env -qaP to do it in pure nix like ofborg does
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
ofborg requires no exceptions during evaluation already
evils has quit [Ping timeout: 265 seconds]
gchristensen: nix-env also stops evaluation when a primop type error or a parse error is generated then?
probably tryEval is actually enough for nixpkgs as long as you respect recurseIntoAttrs
I think the only thing nx-env doesn't stop on is a builtins.throw, which is how unfree license checks are made
gchristensen: it also skips asserts, so same behavior as tryEval then
I'm going to trust you on this one :P
well nix-env -qaP ocaml-ng.ocamlPackages_4_02 works, so it has to as that set happens to have quite a few asserts
maybe nix-env doesn't ignore throws then, and just ignores assertsL
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
i. e. magnetophonDSP.* pretty much (#114290)
supersandro2000 has quit [Disconnected by services]
supersandro20000 has joined #nixos-dev
orivej has joined #nixos-dev
does anyone have such a patch for nix to make tryEval catch more stuff, like type errors?
maybe it's fairly obvious.
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.
although I don't honestly think it's the best way of doing this
tokudan has quit [Quit: Dunno.]
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
how would you do this with tryEval o_O
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.
It seems like a new builtins.trySuperDuperEval primop that caught more errors might be sufficient?