You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.
Describe the bug lorri fails in some cases if the shell derivation uses disallowedReferences or disallowedRequisites. This can be useful as a safety guard to avoid e.g. situations where your shell depends on building too much stuff (happened to me at work!).
To Reproduce
Steps to reproduce the behavior:
{ pkgs ? (import <nixpkgs> {}) }:
pkgs.mkShell {
buildInputs = [ pkgs.hello ];
disallowedReferences = [ pkgs.hello ];
# so you can nix-build this file and check that it's okay
nobuildPhase = ''touch $out'';
}
Observe:
nix-build shell.nix is fine
lorri will fail with logs: [LogLine("these derivations will be built:"), LogLine(" /nix/store/w23dsh466vh9clalnd0mc8hsgxli5gj8-lorri-keep-env-hack-nix-shell.drv"), LogLine("building \'/nix/store/w23dsh466vh9clalnd0mc8hsgxli5gj8-lorri-keep-env-hack-nix-shell.drv\'..."), LogLine("output \'/nix/store/mggmmwyrpkywaavix36l0il7mcfcvsxg-lorri-keep-env-hack-nix-shell\' is not allowed to refer to the following paths:"), LogLine(" /nix/store/8a6lbpbxbc5lc60ljwhw69sszr25ys5f-hello-2.10"), LogLine("error: build of \'/nix/store/w23dsh466vh9clalnd0mc8hsgxli5gj8-lorri-keep-env-hack-nix-shell.drv\' failed")]
Expected behavior lorri does not fail if the normal use of the shell.nix does not fail.
Additional context
I'm pretty sure the problem is here:
This keeps all the drv attributes but messes with the inputs, thus making disallowedReferences and disallowedRequisites do the wrong thing. A simple fix would probably be to just strip those attributes.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
lorri
fails in some cases if the shell derivation usesdisallowedReferences
ordisallowedRequisites
. This can be useful as a safety guard to avoid e.g. situations where your shell depends on building too much stuff (happened to me at work!).To Reproduce
Steps to reproduce the behavior:
Observe:
nix-build shell.nix
is finelogs: [LogLine("these derivations will be built:"), LogLine(" /nix/store/w23dsh466vh9clalnd0mc8hsgxli5gj8-lorri-keep-env-hack-nix-shell.drv"), LogLine("building \'/nix/store/w23dsh466vh9clalnd0mc8hsgxli5gj8-lorri-keep-env-hack-nix-shell.drv\'..."), LogLine("output \'/nix/store/mggmmwyrpkywaavix36l0il7mcfcvsxg-lorri-keep-env-hack-nix-shell\' is not allowed to refer to the following paths:"), LogLine(" /nix/store/8a6lbpbxbc5lc60ljwhw69sszr25ys5f-hello-2.10"), LogLine("error: build of \'/nix/store/w23dsh466vh9clalnd0mc8hsgxli5gj8-lorri-keep-env-hack-nix-shell.drv\' failed")]
Expected behavior
lorri
does not fail if the normal use of theshell.nix
does not fail.Additional context
I'm pretty sure the problem is here:
lorri/src/logged-evaluation.nix
Line 39 in 008646a
This keeps all the drv attributes but messes with the inputs, thus making
disallowedReferences
anddisallowedRequisites
do the wrong thing. A simple fix would probably be to just strip those attributes.The text was updated successfully, but these errors were encountered: