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

nix-prefetch-git broken (maybe macos only) #24

Open
will opened this issue Nov 29, 2024 · 1 comment
Open

nix-prefetch-git broken (maybe macos only) #24

will opened this issue Nov 29, 2024 · 1 comment

Comments

@will
Copy link

will commented Nov 29, 2024

nix-prefetch-git is failing with error: path '/tmp' is a symlink, which then causes json parsing to fail:

❯ crystal2nix
Initialized empty Git repository in /private/tmp/git-checkout-tmp-UCUG3iTb/backtracer.cr/.git/
From https://github.com/sija/backtracer.cr
 * tag               v1.2.2     -> FETCH_HEAD
Switched to a new branch 'fetchgit'
removing `.git'...
error: path '/tmp' is a symlink
Unhandled exception: Expected BeginObject but was EOF at line 1, column 1
  parsing Crystal2Nix::PrefetchJSON at line 0, column 0 (JSON::SerializableError)
  from /nix/store/fpnllrcmwbhpj2l3njin35jjb2f7jfdb-crystal2nix-0.3.0/bin/.crystal2nix-wrapped in 'raise<JSON::SerializableError>:NoReturn'
  from /nix/store/fpnllrcmwbhpj2l3njin35jjb2f7jfdb-crystal2nix-0.3.0/bin/.crystal2nix-wrapped in 'Crystal2Nix::Worker#run:Nil'
  from /nix/store/fpnllrcmwbhpj2l3njin35jjb2f7jfdb-crystal2nix-0.3.0/bin/.crystal2nix-wrapped in '__crystal_main'
  from /nix/store/fpnllrcmwbhpj2l3njin35jjb2f7jfdb-crystal2nix-0.3.0/bin/.crystal2nix-wrapped in 'main'
Caused by: Expected BeginObject but was EOF at line 1, column 1 (JSON::ParseException)
  from /nix/store/fpnllrcmwbhpj2l3njin35jjb2f7jfdb-crystal2nix-0.3.0/bin/.crystal2nix-wrapped in 'raise<JSON::ParseException>:NoReturn'
  from /nix/store/fpnllrcmwbhpj2l3njin35jjb2f7jfdb-crystal2nix-0.3.0/bin/.crystal2nix-wrapped in 'JSON::PullParser#raise<String>:NoReturn'
  from /nix/store/fpnllrcmwbhpj2l3njin35jjb2f7jfdb-crystal2nix-0.3.0/bin/.crystal2nix-wrapped in 'Crystal2Nix::Worker#run:Nil'
  from /nix/store/fpnllrcmwbhpj2l3njin35jjb2f7jfdb-crystal2nix-0.3.0/bin/.crystal2nix-wrapped in '__crystal_main'
  from /nix/store/fpnllrcmwbhpj2l3njin35jjb2f7jfdb-crystal2nix-0.3.0/bin/.crystal2nix-wrapped in 'main'

I found NixOS/nixpkgs#358685 and NixOS/nix#11941 which seem releated, but mention that this may be a macos only problem

@Mic92
Copy link
Member

Mic92 commented Dec 13, 2024

Nixpkgs now has a workaround for that.

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

No branches or pull requests

2 participants