<aszlig>
samueldr: given that there were a few other last-minute-wishes (IIRC on discourse) for nixos 19.03, do you have any objection against backporting https://github.com/NixOS/nixpkgs/pull/57519 to 19.03?
<samueldr>
from a quick glance at the code, and reading the description, since it changes no defaults, and only ehnances the features available in <nixpkgs/nixos>, I don't see any issues
<samueldr>
and there are tests
<samueldr>
and yes, good call: changelog entry :)
ajs124 has left #nixos-dev [#nixos-dev]
ajs124 has joined #nixos-dev
ajs124 has left #nixos-dev [#nixos-dev]
ajs124 has joined #nixos-dev
orivej has quit [Ping timeout: 245 seconds]
fadenb has quit [Remote host closed the connection]
fadenb has joined #nixos-dev
<aszlig>
samueldr: done
ajs124 has left #nixos-dev [#nixos-dev]
ajs124 has joined #nixos-dev
emily has quit [Quit: Updating details, brb]
emily has joined #nixos-dev
ajs124 has left #nixos-dev [#nixos-dev]
ajs124 has joined #nixos-dev
<infinisil>
Idea: Add a `meta.howToTest` (or with a better name) attribute that tells you how this package can be tested
<infinisil>
This can include a command/instructions/prerequisites
<infinisil>
This could be very useful for reviewing package updates
<manveru>
infinisil: what happened to the idea of having actual tests in meta?
<infinisil>
Hmm, well I think that would be rather hard to write and then is another thing that can break
<infinisil>
And some things can't be tested easily with actual tests
<manveru>
true that, i didn't mean for everything :)
<manveru>
for those cases you can have a description, but i'd like to see tests separated from nixos a bit...
<infinisil>
Ah yeah that would be nice
<manveru>
even if it's just something like `hasZeroExitStatus = "$out/bin/ag --version";` :)
<samueldr>
are checkPhase automatically skipped with cross compilation?
<samueldr>
in that case this could be a checkPhase thing?
<manveru>
it'd be better to have this be run outside the derivation to ensure the same purity you'd get with running it as a normal user
<samueldr>
I was about to say "then re-run checkPhase in that impure env" but most automatic checkPhases imply the source tree being present
<manveru>
yeah
<samueldr>
... but something similar could exist, some kind of integrationTestPhase, ran when building, but tooling could also run it outside of build
<samueldr>
trivialChecks?
<infinisil>
Are trivial checks worth much though?
<samueldr>
not sure
<infinisil>
Can't hurt I guess
<manveru>
i'm occasionally stumbling across packages that are built by hydra but don't actually run
<manveru>
and marking as broken is ... not ideal
drakonis has quit [Quit: WeeChat 2.3]
<infinisil>
manveru: perhaps we should have a distinction between package builds being broken and packages runtime being broken
<ekleog>
samueldr: trivialCheck would be `passthru.tests.returnsZero = lib.makeTrivialCheck "${this}/bin/ag --version";`
<ekleog>
(disclaimer: this would need checking to validate it doesn't introduce an infinite recursion error -- I'm just currently wondering how we manage to not have issues with infinite recursion when adding a nixos test to the package… but it works, so I guess I'm missing something)
<infinisil>
this = placeholder "out" :)
<infinisil>
I think Nix does some magic for it to not inf rec
<ekleog>
infinisil: the idea here would be to have the command be run in a separate derivation so that it's run outside of the build environment, so it'd not be possible to use ${placeholder "out"}
<ekleog>
lib.makeTrivialCheck would basically be lib.runCommand with bash-strict-defaults
<infinisil>
I honestly have no idea how placeholder works
<infinisil>
Like, what is the scope of it, how does it know which derivation it's intended for
<ekleog>
my current understanding is it embeds a magic string in the output that nix is after the build able to sed with the real out
<ekleog>
actually it's likely being sed'd before the build
<ekleog>
(my reasoning is based on the fact that `placeholder "out"` in `nix repl` appears to be reproducible)
<infinisil>
Ah, so using placeholder outside of a build doesn't make any sense