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
Our devenv.nix requests excluding the package.yaml file, so to force callCabal2nix to fail:
> cat devenv.nix
{pkgs,inputs, ... }:
lethpkgs=pkgs.haskellPackages;Top=withpkgs.haskell.lib;withhpkgs;withinputs;callCabal2nix"Top"(nix-filter.lib.filter{root=self;exclude=["package.yaml"];}){};in{env.name="bug.01";env.GREET="bug.01";packages=[Top];scripts.hello.exec="echo hello from $GREET";enterShell='' hello '';}
Building
Build with devenv
Run devenv and see it build successfully (this is bogus):
> devenv shell Top
Building shell ...
warning: Git tree '/Users/smunix/programming/repros/devenv-issue-01' is dirty
warning: applying 'toString' to path '/Users/smunix/programming/repros/devenv-issue-01/package.yaml' and then accessing it is deprecated, at «github:numtide/nix-filter/1a3b735e13e90a8d2fd5629f2f8363bd7ffbbec7»/default.nix:164:7
warning: applying 'toString' to path '/Users/smunix/programming/repros/devenv-issue-01/' and then accessing it is deprecated, at «github:numtide/nix-filter/1a3b735e13e90a8d2fd5629f2f8363bd7ffbbec7»/default.nix:165:8
hello from bug.01
"devenv sits at the Top"
Build with flake
Run the build using flake and see it fail to build (this is expected):
> nix develop -c Top
error: builder for'/nix/store/grydafb37p8qkk575g14b1z0m4gn6w7j-cabal2nix-Top.drv' failed with exit code 1;
last 1 log lines:
> cabal2nix: user error (*** Found neither a .cabal file nor package.yaml. Exiting.)
For full logs, run 'nix log /nix/store/grydafb37p8qkk575g14b1z0m4gn6w7j-cabal2nix-Top.drv'.
(use '--show-trace' to show detailed location information)
The flake.nix also requested to exclude the package.yaml file, so the build failure is expected:
Describe the bug
devenv
doesn't honor instructions to exclude files usingnix-filter
.See the complete description of the bug here
To Reproduce
Get the file sources
Clone this small repository devenv-issue-01:
cd into
devenv-issue-01
:Our
devenv.nix
requests excluding thepackage.yaml
file, so to forcecallCabal2nix
to fail:> cat devenv.nix
Building
Build with devenv
Run
devenv
and see it build successfully (this is bogus):Build with flake
Run the build using flake and see it fail to build (this is expected):
The
flake.nix
also requested to exclude thepackage.yaml
file, so the build failure is expected:> cat flake.nix
Version
> devenv version devenv: 0.5
The text was updated successfully, but these errors were encountered: