<vcunat>
derivation on nix level don't necessarily reflect the attributes passed to the derviation function
<vcunat>
after applying the function you can even modify the attrset in whatever way you want
<vcunat>
(we do this e.g. for passthru and meta)
<Profpatsch>
Huh, isn’t that nix level already?
<Profpatsch>
meta is special-cased in nix, isn’t it?
<Profpatsch>
As well as passthru
<vcunat>
No, that's done in nixpkgs.
<vcunat>
There's almost nothing on nix level, really.
<LnL>
doesn't drvAttrs have the original set?
<vcunat>
(and that's good, IMHO)
<Profpatsch>
Huh, then I need to read make-derivation more closely. On skimming I thought there was no special casing there.
<vcunat>
lib.extendDerivation adds passthru
<Profpatsch>
vcunat: Last time I checked there was a call to `derivation` in make-derivation.nix
<Profpatsch>
It seems to be gone?
<vcunat>
We did quite some changes.
<Profpatsch>
Oh, there it is, on the last lin.e
<vcunat>
Related to allowing to evaluate lost of stuff even for broken packages.
<vcunat>
stdenv is really complex beast nowadays
<Profpatsch>
Ah, now I see.
orivej has quit [Ping timeout: 264 seconds]
<Profpatsch>
Where is type = "derivation" added then?
<Profpatsch>
And I guess nix-repl simply stops at attribute sets that have that field?
<Profpatsch>
Or hm, that has to be a builtin nix behaviour, since nix-instantiate works in the same way.
<Profpatsch>
Ah, it comes from `commonArgs = drv // …
<vcunat>
type = "derivation" is added by the derivation() primitive itself, IIRC
<vcunat>
(i.e. on the nix level)
orivej has joined #nixos-dev
orivej has quit [Ping timeout: 268 seconds]
ma27 has quit [Ping timeout: 256 seconds]
ma27 has joined #nixos-dev
goibhniu has joined #nixos-dev
<vcunat>
fpletz: [#NixOS-aarch64] FYI it seems probable that 18.03 announcement will come later for aarch64, as I don't want to delay x86_64-linux significantly longer than necessary. I hope that today we solve the remaining x86_64 blocker by systemd "downgrade", and we might be good. Well, except that channel-bumping seems stuck for the last few days in general, so we'll probably have to wait for that as well.\
<Profpatsch>
Huh, this is brutal
<Profpatsch>
calls to 2598 functions:
<Profpatsch>
1201677 anonymous function at ESC[1m/home/philip/nixpkgs/lib/modules.nixESC[0m:202:30
<Profpatsch>
700987 anonymous function at ESC[1m/home/philip/nixpkgs/lib/modules.nixESC[0m:208:30
<Profpatsch>
428668 'hasPrefix' at ESC[1m/home/philip/nixpkgs/lib/strings.nixESC[0m:148:21
<Profpatsch>
217765 anonymous function at ESC[1m/home/philip/nixpkgs/lib/modules.nixESC[0m:217:22
<Profpatsch>
211202 'splitByAndCompare' at ESC[1m/home/philip/nixpkgs/lib/trivial.nixESC[0m:115:35
<Profpatsch>
That’s the containers-imperative test, which times at around 8 seconds.
<Profpatsch>
30%–50% of calls are two definitions in the submodule merging logic, decls (1201677 calls) and defns (700987 calls).
<Profpatsch>
To be fair, without timings it’s hard to say whether those take up a lot of time (but everything else is lib/trivial or lib/lists)
<Dezgeg>
yes, there should be a lot of low-hanging fruit
<Profpatsch>
compareLists is also called 100k times, and it’s only used in exactly one place.
<Profpatsch>
Then again I wonder why this test has to evaluate the manual.
<Dezgeg>
manual is enabled by default in NixOS configurations
<tilpner>
What is the non-obsolete alternative to the "options" argument of mkOption?
<tilpner>
I want to add an option into users.users.<name>.*
<LnL>
I'm not sure if you can do that for submodules
<Profpatsch>
traceValFn (x: toString x.a) { a = 1; b = 2; }
pxc has joined #nixos-dev
ma27 has joined #nixos-dev
<gchristensen>
https://github.com/NixOS/nix/issues/2033 vcunat could I get your eyes on this issue both as part of your role on the core team, and also dpoint person on the 18.03 release?
<vcunat>
Yes, I agree with sh.levy on this.
ma27 has quit [Remote host closed the connection]
ma27 has joined #nixos-dev
jtojnar has quit [Remote host closed the connection]
<gchristensen>
OK with a backport to 18.03?
<vcunat>
yes, if we do that fast (written on the issue)
<gchristensen>
Ok, great, thanks!
<aminechikhaoui>
shlevy: the manual doesn't seem to go through all settings in src/libstore/globals.hh so I'm hesitant to add anything for the disk cache ttl thingy
<aminechikhaoui>
ah nope
<aminechikhaoui>
I see doc/manual/command-ref/conf-file.xml now
<copumpkin>
I feel like 95% of the time I use filterSource, I want it to pass a path relative to the base path I ask it for
<copumpkin>
I guess that's probably worth wrapping in lib
<copumpkin>
relative in string terms, that is
<copumpkin>
I don't actually want it to be a path type because my filter predicate shouldn't be copying stuff into the store
* copumpkin
stops talking to himself :)
<shlevy>
copumpkin: We have that in our own infrar
<shlevy>
Our "filter" is relative to the base of the project
<copumpkin>
any chance you'd push your version to lib/ in nixpkgs? :)
<copumpkin>
I can't be the only person outside your company who wants it
<shlevy>
copumpkin: We have a task to open source it... It's a pretty significant divergence from how paths are "normally" handled
<shlevy>
But I can see about just excising the filter bits
<copumpkin>
oh
<shlevy>
We use nix-adt to represent different kinds of sources
<shlevy>
One of which is a "filtered" version of another source
<copumpkin>
so not just a precompose with relativize
<shlevy>
And the filter for that is relative, not absolute
<copumpkin>
also, is there a .gitignore parser -> filterSource floating around in nixpkgs?
<shlevy>
:scream:
<shlevy>
I tried writing one with import-from-derivation once but it exposed a bug in filterSource that I never got around to fixing
<shlevy>
Wonder if it works now
<vcunat>
.nixignore :-)
<copumpkin>
:)
<copumpkin>
or perhaps a builtins.fetchgit + filterSource
<copumpkin>
:P
<Dezgeg>
IMHO we should have a flag for builtins.fetchGit to ignore .gitignore'd files
<copumpkin>
oh, it doesn't?
<Dezgeg>
not sure
<shlevy>
I think it should for local repos
ma27 has quit [Ping timeout: 256 seconds]
ma27 has joined #nixos-dev
pxc has quit [Ping timeout: 260 seconds]
abbradar has joined #nixos-dev
ma27 has quit [Ping timeout: 256 seconds]
<copumpkin>
hmm, did filterSource start/stop using "source" as the name of the store path at some point?
<copumpkin>
I have one nix implementation producing a path called [basename] and another called "source"
<copumpkin>
oh perhaps someone cloned my repo into a different path, hmm
<copumpkin>
nah, it seems to be called "source" regardless
<copumpkin>
never mind, PEBKAC :)
<copumpkin>
very annoying that it uses the basename of the folder though
<copumpkin>
I guess that's why we added path
<copumpkin>
argh, is builtins.path not in any released version?
<copumpkin>
oh I'm behind
ma27 has joined #nixos-dev
Sonarpulse has joined #nixos-dev
ma27 has quit [Remote host closed the connection]
ma27 has joined #nixos-dev
pxc has joined #nixos-dev
ma27 has quit [Ping timeout: 240 seconds]
ma27 has joined #nixos-dev
zybell_ has quit [Ping timeout: 256 seconds]
<copumpkin>
shlevy: is there a good way to simulate builtins.path on Nix before it?
<copumpkin>
I can't make a regular derivation on top of it because it'll have a different hash
<copumpkin>
but I want a stable name regardless of the basename
zybell_ has joined #nixos-dev
ma27 has quit [Ping timeout: 256 seconds]
ma27 has joined #nixos-dev
JosW has joined #nixos-dev
pxc has quit [Ping timeout: 256 seconds]
JosW has quit [Quit: Konversation terminated!]
<vcunat>
niksnut: the -small channels don't get bumps anymore, for no apparent reason (maybe big ones as well, but nixpkgs-18.03-darwin did get it today)
ma27 has quit [Ping timeout: 240 seconds]
ma27 has joined #nixos-dev
<gchristensen>
vcunat: will a user's nixpkgs override the explicitly defined nixpkgs in the NIX_PATH?
<vcunat>
no, the command-line -I parameters are prepended to the NIX_PATH list
<vcunat>
eh, "yes", tat is
<vcunat>
gchristensen: I hope you get my meaning :-)
<gchristensen>
yeah
ma27 has quit [Ping timeout: 256 seconds]
ma27 has joined #nixos-dev
abbradar has quit [Remote host closed the connection]
pxc has joined #nixos-dev
<gchristensen>
vcunat: lgty / ready to merge & backport?
orivej has joined #nixos-dev
pxc has quit [Quit: WeeChat 2.0]
<niksnut>
vcunat: sorry about that, it's fixed now
<thoughtpolice>
Mmmm, Is there any good reason the PostgreSQL module does not override the 'postgresql' attribute of the extraPlugins you specify? As it is now, if I want Postgres 10, I have to manually map an override to set `postgres = postgres100;` for each extraPlugin in the NixOS module, since they default to Postgres 9.4 otherwise -- anyone have insight here?
<gchristensen>
look out everyone, I'm writing ... C++
<MichaelRaskin>
Yeah, here you can create a data race and not even notice it!
<MichaelRaskin>
(Although I guess it is Nix, and Nix evaluator is not dangerously multithreaded as far as I remember)
<thoughtpolice>
Also come to think of it, it's a bit weird that the postgresql plugins are just sort of 'free floating' in the namespace. :| I'm surprised there's no 'postgres10Plugins.postgis', for example.
<thoughtpolice>
That would help with having to prefix pg_ everywhere or having names like 'postgis' (which aren't otherwise relevant outside PostgreSQL) just hanging out...
<vcunat>
niksnut: great, many bumps at once now!
goibhniu has quit [Ping timeout: 256 seconds]
zybell_ has quit [Ping timeout: 256 seconds]
<vcunat>
gchristensen: it's really fast. It would seem best if some other member looked at it. I'm not releasing today anyway :-)
<gchristensen>
error: a 'aarch64-linux' with the system features 'magic-pixie-dust', 'kvm' is required to build '/nix/store/h1wz42yalaayy9zhshq3vqz00358drml-hello-2.10.drv', but I am a 'x86_64-linux'
<gchristensen>
error: a 'aarch64-linux' with the system feature 'magic-pixie-dust' is required to build '/nix/store/2r9r8m2pf8j0kjwfxk02gx5siyl4m9ks-hello-2.10.drv', but I am a 'x86_64-linux'
orivej has quit [Ping timeout: 240 seconds]
zybell_ has joined #nixos-dev
<shlevy>
\o/
<LnL>
that's great! this is even confusing for people that know about it
<Sonarpulse>
gchristensen: i am trying installed
<Sonarpulse>
*installer
<Sonarpulse>
weird af err where I swear ~root/.nix-profile/bin eventually pointed to the bin directory of nix itself
<Sonarpulse>
not a symlink tree
<Sonarpulse>
unfortunately no time to repo :(
<Sonarpulse>
need to get coworker up and running again
ma27 has quit [Ping timeout: 240 seconds]
<gchristensen>
that is standard, Sonarpulse
<Sonarpulse>
gchristensen: oh.. ok
<Sonarpulse>
no nix-channel then?
<gchristensen>
if there is only 1 thing in the env, it doesn't make a tree, just passes along the one thin
<Sonarpulse>
gchristensen: ah ok
Cale has joined #nixos-dev
<gchristensen>
it should have worked, though. did it not?
<Sonarpulse>
then is nix-channel not part of nix? nix perl stuff instead for example?
<gchristensen>
no, nix-channel should have been there
<Sonarpulse>
huh....
ma27 has joined #nixos-dev
<Sonarpulse>
gchristensen: `.....-r-xr-xr-x 1 root root 249696 Dec 31 1969 nix-channel ` ok nevermind
<Sonarpulse>
I swear the shell didn't find it on path
<Sonarpulse>
but i dunno
<Sonarpulse>
sorry this is all useless scary noise for you....
<gchristensen>
no worries :)
<gchristensen>
Sonarpulse: is it working now?
<Sonarpulse>
gchristensen: root is
<Sonarpulse>
going back to user
<Sonarpulse>
will report
<gchristensen>
ok
goibhniu has joined #nixos-dev
jtojnar has joined #nixos-dev
vcunat has quit [Quit: Leaving.]
goibhniu has quit [Ping timeout: 240 seconds]
jtojnar_ has joined #nixos-dev
jtojnar has quit [Read error: Connection reset by peer]
<Sonarpulse>
gchristensen: ok so the user issues were just zsh profile things
<Sonarpulse>
out of scope
<Sonarpulse>
but while the daemon seems to be running (at least the socket is there, no noise in the journal)
<Sonarpulse>
regular user cannot connect
<Sonarpulse>
btw I did enable sandboxing
jtojnar has joined #nixos-dev
jtojnar_ has quit [Ping timeout: 260 seconds]
davidlt_ has quit [Ping timeout: 240 seconds]
<dtz>
nix-channel is native now
<dtz>
should be :)
<Sonarpulse>
dtz: yeah i dunno what was going on
<Sonarpulse>
have it now
<Sonarpulse>
gchristensen: ah it seems to be .socket vs .service
<dtz>
interesting
<gchristensen>
Sonarpulse: huh?
<gchristensen>
it should automatically start the service when the socket is used for the first time. did you not see that?