-
Notifications
You must be signed in to change notification settings - Fork 352
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
devenv up broken with flakes #756
Comments
Did some analysis based on the Git history of The last commit in the history of that file that worked was d12fb30. Everything after that broke. So we can conclude that commit ddba5b4 broke the |
I'll look into this tomorrow. |
Broke in #16019. This would have been caught if someone ran 'devenv up' during manual testing of that PR, or better yet, if we had CI for the nix developer environment. Switch back to the latest release version, which doesn't have the upstream issue: cachix/devenv#756
You can workaround it for now by using revision |
|
Broke in #16019. This would have been caught if someone ran 'devenv up' during manual testing of that PR, or better yet, if we had CI for the nix developer environment. Switch back to the latest release version, which doesn't have the upstream issue: cachix/devenv#756
Thanks for that suggestion @amiuhle, I was using the v0.6.3 branch through finding this issue about 2 weeks ago, but of course that was failing with dotenv and so your comment was a very helpful work-around |
The suggested commits didn't work for me since I was using some newer options. I ended up adding the following to my flake as a workaround: basically I'm manually doing this Line 51 in 63d20fe
|
Looks like there's some issue evaluating the devenv config. I see the following error in a nix repl (hope this is helpful)
|
Thanks, got this to fix my config too. Added
|
Using the default flake template for devenv i had to add the following to my flake.nix
as a sibling of
|
When patching the flake, the second-order evaluation of procfileScript slows down |
@zarybnicky # symlinking latest templated process-compose yaml file from config.processes
ln -sf ${config.process-managers.process-compose.configFile} ${config.env.DEVENV_ROOT}/process-compose.yml and gitignoring the symlinked file. This way I can just use the plain |
The workarounds and implementation use the procfileScript from the For instance I have a
Minimal reproducible example
flake.nix{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
systems.url = "github:nix-systems/default";
devenv.url = "github:cachix/devenv";
};
nixConfig = {
extra-trusted-public-keys = "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=";
extra-substituters = "https://devenv.cachix.org";
};
outputs = { self, nixpkgs, devenv, systems, ... } @ inputs:
let
forEachSystem = nixpkgs.lib.genAttrs (import systems);
in
{
packages = forEachSystem (system: {
devenv-up = self.devShells.${system}.default.config.procfileScript;
});
devShells = forEachSystem
(system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
default = devenv.lib.mkShell {
inherit inputs pkgs;
modules = [ { packages = [ pkgs.cowsay ]; }
];
};
second-shell = devenv.lib.mkShell {
inherit inputs pkgs;
modules = [ {
packages = [ pkgs.hello ];
enterShell = ''
hello
'';
processes.run.exec = "hello";
}
];
};
});
};
} Actual Output
Expected Output
|
Confirmed also works with latest v1.0 release |
It's now possible to use devenv with flakes, but you need to insert that |
A separate issue sounds like a good thing to me. |
Describe the bug
devenv up not working with flakes
To reproduce
use example flake in the guides and run devenv up
https://devenv.sh/guides/using-with-flakes/#modifying-your-flakenix-file
gives the error
Version
devenv: 0.6.3
The text was updated successfully, but these errors were encountered: