<ekleog>
(nix-repl yells at me when I try a toString true or true)
<ekleog>
that module seems full of wtf
<ekleog>
like, multiple nested mkIf's, this thing, the fact that setting services.clamav.daemon.enable = true doesn't actually enable the daemon unless .updater.enable is also set to true... (the original issue causing this investigation)
<ekleog>
fuck
<ekleog>
this is lib.or
<ekleog>
how does this even work
<ekleog>
how did this even work at a single point in time
<ekleog>
like, this is doing (mkIf daemon.enable or) updater.enable { /* actual set */ }
<ekleog>
I don't even begin to understand what this is supposed to mean
<ekleog>
would someone care to explain me before this wonder vanishes behind a “fix-the-world” commit?
mbrgm has quit [(Ping timeout: 255 seconds)]
mbrgm has joined joined #nixos-dev
<copumpkin>
ekleog: figure it out? I don't think the nested mkIfs are necessarily bad
<copumpkin>
gchristensen: nice, I'm seeing a few of those tags floating around now
<bgamari>
man, libtool is terrible
<bgamari>
does anyone know how to coerce libtool not to mangle --start-group/--end-group flags?
sivteck has joined joined #nixos-dev
sivteck has quit [(Ping timeout: 255 seconds)]
srodal has quit [(Ping timeout: 252 seconds)]
sivteck has joined joined #nixos-dev
sivteck has quit [(Quit: user missing.)]
srodal has joined joined #nixos-dev
cransom has quit [(Ping timeout: 240 seconds)]
cransom has joined joined #nixos-dev
sivteck has joined joined #nixos-dev
sivteck has quit [(Quit: user missing.)]
MichaelRaskin has quit [(Quit: MichaelRaskin)]
sivteck has joined joined #nixos-dev
JosW has joined joined #nixos-dev
sivteck has quit [(Quit: user missing.)]
sivteck has joined joined #nixos-dev
sivteck has quit [(Client Quit)]
sivteck has joined joined #nixos-dev
srodal has quit [(Quit: WeeChat 1.9.1)]
<rycee>
ekleog: Are you sure that the `or` comes from `lib`? Looks like the "default operator" to me.
goibhniu has joined joined #nixos-dev
sivteck has quit [(Quit: user missing.)]
sivteck has joined joined #nixos-dev
FRidh has joined joined #nixos-dev
FRidh has quit [(Quit: Konversation terminated!)]
jtojnar has quit [(Read error: Connection reset by peer)]
sivteck has quit [(Quit: user missing.)]
sivteck has joined joined #nixos-dev
<ekleog>
rycee: I don't really know, if I run `toString true or true` it's complaining that `or` is an undefined variable
<ekleog>
so I guess it's a kind of either-a-keyword-or-a-variable depending on the syntax position
<ekleog>
but then, apart if there is special handling for mkIf in nix, the statement reduces to (because the or keyword doesn't appear to bind stronger than function application for toString) (mkIf daemon.enable or) updater.enable { ... }
<ekleog>
which would kind of explain the behaviour of enabling the daemon only when updater.enable is true, I think, if `or` was a kind of `optionalDict`?
<ekleog>
but then as `or` is either a keyword (in which case I don't get how it's parsed) or a function (in which case it's defined as x: y: x || y, and true || {} = true and false || {} -> typing error), I don't get either way how it works
<ekleog>
hmm, so `or` is some kind of syntax-dependent keyword indeed
<rycee>
Well, as far as I can see the keyword or binds harder that function application.
sivteck has quit [(Quit: user missing.)]
<rycee>
For example, `let foo = {}; in toString foo.bar or true` is interpreted as `let foo = {}; in toString (foo.bar or true)`
<ekleog>
hmm, but then how does nix guess when `or` is a keyword and when it is the function? when I try `toString true or true 3` to replicate the `mkIf daemon.enable or updater.enable { ... }` I get an undefined variable `or`, which makes me believe it tries to parse it as the function?
<bgamari>
hmm, this path seems slightly suspicious: /nix/store/jcdh2zk05dnkcp3hm07m9r7d72qwd8zq-arm-unknown-linux-gnueabihf-binutils-2.28.1/x86_64-unknown-linux-gnu/arm-unknown-linux-gnueabihf/include
<bgamari>
are two prefixes to be expected?
goibhniu has quit [(Ping timeout: 248 seconds)]
FRidh has joined joined #nixos-dev
<gchristensen>
someone suggested I rename grahamcofborg to queen of the borg, but I wonder if there is an appropriate term in FPto use, like some kind of combinator