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

Incorrect evaluation in directories with spaces in name #1307

Closed
ejb-11 opened this issue Jun 28, 2024 · 3 comments
Closed

Incorrect evaluation in directories with spaces in name #1307

ejb-11 opened this issue Jun 28, 2024 · 3 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists nix An upstream issue with Nix

Comments

@ejb-11
Copy link

ejb-11 commented Jun 28, 2024

Describe the bug

I am new to this software and am testing it to see if it will work for me (I need to install Python libraries unavailable in nixpkgs and I understand it is better practice to use virtual environments anyway). I was going absolutely insane trying to work out what was wrong for a while, but I managed to figure it out after removing some red herrings that the error trace incorrectly returned as having broken.

As the title implies, running devenv shell does not work correctly in a directory with spaces in its name, but works fine in one without.

To reproduce

Run devenv init
Use this simple devenv.nix:

#devenv.nix
{
  pkgs,
  lib,
  config,
  inputs,
  ...
}:

{
  languages.python = {
    enable = true;
    venv.enable = true;
    venv.requirements = lib.readFile ./requirement.txt;
  };

  enterShell = ''
    python -c "import control as ct" && echo "No errors!"
  '';
  cachix.enable = false;
}

Use this requirement.txt:

#requirement.txt
control==0.10.0

Then run devenv shell.

In a folder with no spaces in the name, it will run normally and return
No errors!
But in one with spaces in its name, it will return with an error (in this example, the folder is /home/ejb/Documents/Uni/Masters/Control and Estimation Theory, and each word is erroneously evaluated as a function):

• Building shell ...
error: builder for '/nix/store/mk1x85rpx2fi2rkvbp1ixcnv62kn4zfp-python3-3.11.8-env.drv' failed with exit code 1;
       last 5 log lines:
       > created 4 symlinks in user environment
       > <stdin>: In function 'main':
       > <stdin>:56:6: error: #error makeCWrapper: Unknown argument and
       > <stdin>:57:6: error: #error makeCWrapper: Unknown argument Estimation
       > <stdin>:58:6: error: #error makeCWrapper: Unknown argument Theory/Lab2/.devenv/profile/lib:/nix/store/7v7c61ikm7cbd3kbimk9qr8h7pdmyccn-manylinux2014/lib:/nix/store/c2yb135iv4maadia5f760b3xhbh6jh61-gcc-13.2.0-lib/lib
       For full logs, run 'nix log /nix/store/mk1x85rpx2fi2rkvbp1ixcnv62kn4zfp-python3-3.11.8-env.drv'.
error: 1 dependencies of derivation '/nix/store/427kbgfs1ivm08227jbjhn1y8xm1yx6r-devenv-profile.drv' failed to build
error: 1 dependencies of derivation '/nix/store/zlnikh8fg8jrindcm1y45cw15jrh54mz-init-venv.sh.drv' failed to build
error:
       error: 3 dependencies of derivation '/nix/store/2vjcng7fzpnskmi7c5wsf6bakr926cq6-devenv-shell-env.drv' failed to build

✖ Command produced the following output:


✔ Building shell in 1.4s.
Error:   × Command `/nix/store/w6idni5fc3692nbpl3dnyq1i50ai3b7r-nix-2.21-devenv/bin/nix --show-trace --extra-experimental-features nix-command --extra-
  │ experimental-features flakes --option warn-dirty false --option eval-cache false --keep-going --max-jobs 10 print-dev-env --profile /home/
  │ ejb/Documents/Uni/Masters/Control and Estimation Theory/Lab2/.devenv/gc/shell` failed with with exit code 1

Version

Output of devenv version:
devenv 1.0.7 (x86_64-linux)

@ejb-11 ejb-11 added the bug Something isn't working label Jun 28, 2024
@sandydoo
Copy link
Member

Duplicate of #1107.

@sandydoo sandydoo added duplicate This issue or pull request already exists nix An upstream issue with Nix labels Jun 29, 2024
@ejb-11
Copy link
Author

ejb-11 commented Jun 29, 2024

Why is this issue closed as completed when the other issue is stale and abandoned? Is there a timeline for getting this problem fixed, or should I find some other software like how the other person had to?

@sandydoo
Copy link
Member

sandydoo commented Jul 2, 2024

We already have a tracking issue for this.
It's not stale or abandoned. We don't have an immediate fix for this because the issue is with Nix, not devenv.

@sandydoo sandydoo closed this as not planned Won't fix, can't repro, duplicate, stale Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists nix An upstream issue with Nix
Projects
None yet
Development

No branches or pull requests

3 participants