-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix nix-build invocation in non-flake builds #272
Conversation
I wonder if we could set up some nixos tests to make sure there are no regressions. Would you mind looking into it? |
this adds a nixos vm test doing a deploy on a nix which does not have flakes enabled, to guard against this breaking as it has done before [1]. The existing test infrastructure is changed slightly to make enabling flakes configurable inside the vm's config. [1] serokell#272
this adds a nixos vm test doing a deploy on a nix which does not have flakes enabled, to guard against this breaking as it has done before [1]. The existing test infrastructure is changed slightly to make enabling flakes configurable inside the vm's config. [1] serokell#272
226fd62
to
885285f
Compare
@PhilTaken I've attempted to write a test for this (changing the existing test setup slightly to allow for non-flake-enabled nix inside the vms & their configuration, and adding a flake-compat shim). However, it seems to hang on the I might have another look at this later, when I have access to more powerful hardware than my laptop. |
this adds a nixos vm test doing a deploy on a nix which does not have flakes enabled, to guard against this breaking as it has done before [1]. The existing test infrastructure is changed slightly to make enabling flakes configurable inside the vm's config. [1] serokell#272
885285f
to
fb54886
Compare
ah i forgot about doing this back then. so here we go: the problem with the test seems to be that nix uses a surprising amount of memory to evaluate anything inside the vm (and more so without flakes); with the limit given in I've also been using this patch locally for over a month now to deploy a couple of my own machines. |
The drvpath^out syntax is only part of `nix build', not `nix-build', which still produces the outPath as it did before, but errors out if attempted to be called in the same way as `nix build'.
this adds a nixos vm test doing a deploy on a nix which does not have flakes enabled, to guard against this breaking as it has done before [1]. The existing test infrastructure is changed slightly to make enabling flakes configurable inside the vm's config. [1] serokell#272
fb54886
to
9655369
Compare
Sounds like a good enough way to resolve the issue:) |
this adds a nixos vm test doing a deploy on a nix which does not have flakes enabled, to guard against this breaking as it has done before [1]. The existing test infrastructure is changed slightly to make enabling flakes configurable inside the vm's config. [1] serokell#272
9655369
to
d3b1122
Compare
The
drvpath^out
syntax is only part ofnix build
, notnix-build
. The latter still behaves as before Nix 2.15 and produces the outPath, but produces an error if one attempts to call it the same way asnix build
.