1

Previously I could nix build a project / derivation with a default.nix file.

However after upgrading to Nixos 22.05, and hence Nix 2.8+ running nix build results in:

path '/example/lib' does not contain a 'flake.nix', searching up
error: path '/example/lib' is not part of a flake (neither it nor its parent directories contain a 'flake.nix' file)

Is there some way I can run / build this as before with nix 2.8, without having to modify the project (integrate it with the flakes functionality)? Perhaps a blank/default flake.nix file I could reference in the command? As an alternative I can run nix-env -if default.nix which builds the project however it also adds it to the user profile.

Peter Becich
  • 989
  • 3
  • 14
  • 30
Chris Stryczynski
  • 30,145
  • 48
  • 175
  • 286

0 Answers0