<{^_^}>
#79696 (by tfc, 4 days ago, open): nixosTests.ec2: Port tests that depend on common/ec2.nix
<worldofpeace>
Is that in support of backporting any further ports that are made?
CRTified has joined #nixos-dev
psyanticy has quit [Quit: Connection closed for inactivity]
<aminechikhaoui>
quick hydra question: is there a way to specify a hydra build id as previous hydra build in the inputs ?
<gchristensen>
interesting
<aminechikhaoui>
ok I think it's just project:jobset:job:build-id
<aminechikhaoui>
let's see if it works
claudiii has joined #nixos-dev
<aminechikhaoui>
eh didn't work
<aminechikhaoui>
ah it's just the build id
<aminechikhaoui>
kinda make sense, just unfortunate one should read the code to figure it out :)
<gchristensen>
write some docs? :P
zarel has quit [Ping timeout: 256 seconds]
zarel has joined #nixos-dev
kraem has quit [Quit: outta here]
zarel has quit [Ping timeout: 265 seconds]
zarel has joined #nixos-dev
sogatori has quit [Remote host closed the connection]
harrow has quit [Quit: Leaving]
ivan has quit [Quit: lp0 on fire]
ivan has joined #nixos-dev
lovesegfault has joined #nixos-dev
harrow has joined #nixos-dev
<infinisil>
niksnut: While testing #78640 I found that `builtins.unsafeDiscardStringContext "${./foo}"` imports ./foo into the store, which I think it shouldn't
<niksnut>
why not? that's what "${./foo}" does normally
<infinisil>
If it's used for something yes, but unsafeDiscardStringContext should arguably prevent this
<infinisil>
Because the context is discarded, it's not a string that refers to any context afterwards, including the context of ./foo
<niksnut>
so what should the result be?
<infinisil>
The same as for derivations, "${pkgs.hello}" doesn't build hello to make the store path exist, so it's just the string of the store path where hello would end up
<infinisil>
Similarly it would make sense for "${./foo}" to only compute the store path for the file, not actually import it
<infinisil>
Although, I see that there's a problem with this: The contents could be changed inbetween computing the path and actually importing it
<infinisil>
Well I guess that doesn't matter really, it's kind of part of the unsafe deal
<infinisil>
(unsafe meaning you have no guarantee that the store path actually exists)
<niksnut>
problem is that "${./foo}" already copies the path
<niksnut>
the behaviour shouldn't change just because it's an argument to builtins.unsafeDiscardStringContext
<niksnut>
I suppose copying could be delayed in general, but it would require carrying more context (namely the source path)
<infinisil>
niksnut: Unfortunately I can't implement a safeish types.secretPath without this, since any check to determine whether a path (here "${./foo}") is in /nix/store will evaluate it, which will import it into the store, making it readable to everyone
<infinisil>
If at all possible I think it's reasonable to make unsafeDiscardStringContext an exception to the copy-to-store rule for "${./foo}", because of its unsafeness
<infinisil>
Although it would also make sense for `builtins.hasContext` (which would be very useful for types.secretPath too), because it only returns a boolean, only deciding whether it has context, which is entirely safe to do without importing anything into the store
claudiii has quit [Quit: Connection closed for inactivity]