Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

stuebinm
Copy link

@stuebinm stuebinm commented May 7, 2024

The drvpath^out syntax is only part of nix build, not nix-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 as nix build.

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'.
@PhilTaken
Copy link
Collaborator

I wonder if we could set up some nixos tests to make sure there are no regressions. Would you mind looking into it?

stuebinm added a commit to stuebinm/deploy-rs that referenced this pull request May 15, 2024
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
@stuebinm
Copy link
Author

@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 deploy step for me for an unreasonable amount of time. I'm unsure if this is an actual issue in the test — the existing tests using flakes likewise take very long, although they do eventually succeed.

I might have another look at this later, when I have access to more powerful hardware than my laptop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants